diff --git a/.mock/definition/__package__.yml b/.mock/definition/__package__.yml index 919577d3b..36d9b01ef 100644 --- a/.mock/definition/__package__.yml +++ b/.mock/definition/__package__.yml @@ -548,6 +548,99 @@ types: maxLength: 100 source: openapi: openapi/openapi.json + BankAccountCreatedEvent: + docs: |- + Published when you link an external bank account to a Square + account in the Seller Dashboard. Square sets the initial status to + `VERIFICATION_IN_PROGRESS` and publishes the event. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + location_id: + type: optional> + docs: The ID of the target location associated with the event. + type: + type: optional> + docs: The type of event this represents, `"bank_account.created"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + BankAccountCreatedEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"bank_account"`. + id: + type: optional + docs: ID of the affected bank account. + object: + type: optional + docs: An object containing the created bank account. + source: + openapi: openapi/openapi.json + BankAccountCreatedEventObject: + properties: + bank_account: + type: optional + docs: The created bank account. + source: + openapi: openapi/openapi.json + BankAccountDisabledEvent: + docs: |- + Published when Square sets the status of a + [BankAccount](entity:BankAccount) to `DISABLED`. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + location_id: + type: optional> + docs: The ID of the target location associated with the event. + type: + type: optional> + docs: The type of event this represents, `"bank_account.disabled"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was disabled, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + BankAccountDisabledEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"bank_account"`. + id: + type: optional + docs: ID of the affected bank account. + object: + type: optional + docs: An object containing the disabled bank account. + source: + openapi: openapi/openapi.json + BankAccountDisabledEventObject: + properties: + bank_account: + type: optional + docs: The disabled bank account. + source: + openapi: openapi/openapi.json BankAccountPaymentDetails: docs: Additional details about BANK_ACCOUNT type payments. properties: @@ -618,6 +711,52 @@ types: docs: Indicates the financial purpose of the bank account. source: openapi: openapi/openapi.json + BankAccountVerifiedEvent: + docs: |- + Published when Square sets the status of a + [BankAccount](entity:BankAccount) to `VERIFIED`. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + location_id: + type: optional> + docs: The ID of the target location associated with the event. + type: + type: optional> + docs: The type of event this represents, `"bank_account.verified"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was verified, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + BankAccountVerifiedEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"bank_account"`. + id: + type: optional + docs: ID of the affected bank account. + object: + type: optional + docs: An object containing the verified bank account. + source: + openapi: openapi/openapi.json + BankAccountVerifiedEventObject: + properties: + bank_account: + type: optional + docs: The verified bank account. + source: + openapi: openapi/openapi.json BatchChangeInventoryRequest: properties: idempotency_key: @@ -1008,6 +1147,59 @@ types: docs: Supported sources a booking was created from. source: openapi: openapi/openapi.json + BookingCreatedEvent: + docs: >- + Published when a booking is created. + + + To receive this event with buyer-level permissions, you must have + `APPOINTMENTS_READ` set for the OAuth scope. + + To receive this event with seller-level permissions, you must have + `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` set for the OAuth scope. + properties: + merchant_id: + type: optional> + docs: The ID of the target seller associated with the event. + type: + type: optional> + docs: The type of this event. The value is `"booking.created"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + BookingCreatedEventData: + properties: + type: + type: optional> + docs: The type of the event data object. The value is `"booking"`. + validation: + maxLength: 50 + id: + type: optional + docs: The ID of the event data object. + validation: + maxLength: 192 + object: + type: optional + docs: An object containing the created booking. + source: + openapi: openapi/openapi.json + BookingCreatedEventObject: + properties: + booking: + type: optional + docs: The created booking. + source: + openapi: openapi/openapi.json BookingCreatorDetails: docs: Information about a booking creator. properties: @@ -1048,84 +1240,386 @@ types: docs: Supported types of a booking creator. source: openapi: openapi/openapi.json - BookingCustomAttributeDeleteRequest: + BookingCustomAttributeDefinitionOwnedCreatedEvent: docs: >- - Represents an individual delete request in a - [BulkDeleteBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkDeleteBookingCustomAttributes) + Published when a booking [custom attribute + definition](entity:CustomAttributeDefinition) - request. An individual request contains a booking ID, the custom attribute - to delete, and an optional idempotency key. + is created by the subscribing application. Subscribe to this event to be + notified + + when your application creates a booking custom attribute definition. properties: - booking_id: - type: string - docs: The ID of the target [booking](entity:Booking). - validation: - minLength: 1 - maxLength: 36 - key: - type: string + merchant_id: + type: optional> docs: >- - The key of the custom attribute to delete. This key must match the - `key` of a - - custom attribute definition in the Square seller account. If the - requesting application is not - - the definition owner, you must use the qualified key. - validation: - minLength: 1 + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"booking.custom_attribute_definition.owned.created"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. source: openapi: openapi/openapi.json - BookingCustomAttributeDeleteResponse: + BookingCustomAttributeDefinitionOwnedDeletedEvent: docs: >- - Represents a response for an individual upsert request in a - [BulkDeleteBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkDeleteBookingCustomAttributes) - operation. + Published when a booking [custom attribute + definition](entity:CustomAttributeDefinition) + + is deleted by the subscribing application. Subscribe to this event to be + notified + + when your application deletes a booking custom attribute definition. properties: - booking_id: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"booking.custom_attribute_definition.owned.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: type: optional docs: >- - The ID of the [booking](entity:Booking) associated with the custom - attribute. - errors: - type: optional> - docs: Any errors that occurred while processing the individual request. + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. source: openapi: openapi/openapi.json - BookingCustomAttributeUpsertRequest: + BookingCustomAttributeDefinitionOwnedUpdatedEvent: docs: >- - Represents an individual upsert request in a - [BulkUpsertBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkUpsertBookingCustomAttributes) + Published when a booking [custom attribute + definition](entity:CustomAttributeDefinition) - request. An individual request contains a booking ID, the custom attribute - to create or update, + is updated by the subscribing application. Subscribe to this event to be + notified - and an optional idempotency key. + when your application updates a booking custom attribute definition. properties: - booking_id: - type: string - docs: The ID of the target [booking](entity:Booking). - validation: - minLength: 1 - maxLength: 36 - custom_attribute: - type: CustomAttribute + merchant_id: + type: optional> docs: >- - The custom attribute to create or update, with following fields: - - - - `key`. This key must match the `key` of a custom attribute - definition in the Square seller + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"booking.custom_attribute_definition.owned.updated"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + BookingCustomAttributeDefinitionVisibleCreatedEvent: + docs: >- + Published when a booking [custom attribute + definition](entity:CustomAttributeDefinition) - account. If the requesting application is not the definition owner, - you must provide the qualified key. + with the `visibility` field set to `VISIBILITY_READ_ONLY` or + `VISIBILITY_READ_WRITE_VALUES` is created. + An application that subscribes to this event is notified when a booking + custom attribute definition is created - - `value`. This value must conform to the `schema` specified by the - definition. + by any application for which the subscribing application has read access + to the booking custom attribute definition. + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"booking.custom_attribute_definition.visible.created"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + BookingCustomAttributeDefinitionVisibleDeletedEvent: + docs: >- + Published when a booking [custom attribute + definition](entity:CustomAttributeDefinition) - For more information, see [Value data - types](https://developer.squareup.com/docs/booking-custom-attributes-api/custom-attributes#value-data-types). + with the `visibility` field set to `VISIBILITY_READ_ONLY` or + `VISIBILITY_READ_WRITE_VALUES` is deleted. + + An application that subscribes to this event is notified when a booking + custom attribute definition is deleted + + by any application for which the subscribing application has read access + to the booking custom attribute definition. + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"booking.custom_attribute_definition.visible.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + BookingCustomAttributeDefinitionVisibleUpdatedEvent: + docs: >- + Published when a booking [custom attribute + definition](entity:CustomAttributeDefinition) + + with the `visibility` field set to `VISIBILITY_READ_ONLY` or + `VISIBILITY_READ_WRITE_VALUES` is updated. + + An application that subscribes to this event is notified when a booking + custom attribute definition is updated + + by any application for which the subscribing application has read access + to the booking custom attribute definition. + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"booking.custom_attribute_definition.visible.updated"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + BookingCustomAttributeDeleteRequest: + docs: >- + Represents an individual delete request in a + [BulkDeleteBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkDeleteBookingCustomAttributes) + + request. An individual request contains a booking ID, the custom attribute + to delete, and an optional idempotency key. + properties: + booking_id: + type: string + docs: The ID of the target [booking](entity:Booking). + validation: + minLength: 1 + maxLength: 36 + key: + type: string + docs: >- + The key of the custom attribute to delete. This key must match the + `key` of a + + custom attribute definition in the Square seller account. If the + requesting application is not + + the definition owner, you must use the qualified key. + validation: + minLength: 1 + source: + openapi: openapi/openapi.json + BookingCustomAttributeDeleteResponse: + docs: >- + Represents a response for an individual upsert request in a + [BulkDeleteBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkDeleteBookingCustomAttributes) + operation. + properties: + booking_id: + type: optional + docs: >- + The ID of the [booking](entity:Booking) associated with the custom + attribute. + errors: + type: optional> + docs: Any errors that occurred while processing the individual request. + source: + openapi: openapi/openapi.json + BookingCustomAttributeOwnedDeletedEvent: + docs: >- + Published when a booking [custom attribute](entity:CustomAttribute) + + associated with a [custom attribute + definition](entity:CustomAttributeDefinition) that is + + owned by the subscribing application is deleted. + + Subscribe to this event to be notified + + when your application deletes a booking custom attribute. + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"booking.custom_attribute.owned.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + BookingCustomAttributeOwnedUpdatedEvent: + docs: >- + Published when a booking [custom attribute](entity:CustomAttribute) + + is updated by the subscribing application. Subscribe to this event to be + notified + + when your application updates a booking custom attribute. + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"booking.custom_attribute.owned.updated"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + BookingCustomAttributeUpsertRequest: + docs: >- + Represents an individual upsert request in a + [BulkUpsertBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkUpsertBookingCustomAttributes) + + request. An individual request contains a booking ID, the custom attribute + to create or update, + + and an optional idempotency key. + properties: + booking_id: + type: string + docs: The ID of the target [booking](entity:Booking). + validation: + minLength: 1 + maxLength: 36 + custom_attribute: + type: CustomAttribute + docs: >- + The custom attribute to create or update, with following fields: + + + - `key`. This key must match the `key` of a custom attribute + definition in the Square seller + + account. If the requesting application is not the definition owner, + you must provide the qualified key. + + + - `value`. This value must conform to the `schema` specified by the + definition. + + For more information, see [Value data + types](https://developer.squareup.com/docs/booking-custom-attributes-api/custom-attributes#value-data-types). - `version`. To enable [optimistic @@ -1166,6 +1660,84 @@ types: docs: Any errors that occurred while processing the individual request. source: openapi: openapi/openapi.json + BookingCustomAttributeVisibleDeletedEvent: + docs: >- + Published when a booking [custom attribute](entity:CustomAttribute) with + + the `visibility` field set to `VISIBILITY_READ_ONLY` or + `VISIBILITY_READ_WRITE_VALUES` is deleted. + + An application that subscribes to this event is notified when a booking + custom attribute is deleted + + by any application for which the subscribing application has read access + to the booking custom attribute. + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"booking.custom_attribute.visible.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + BookingCustomAttributeVisibleUpdatedEvent: + docs: >- + Published when a booking [custom attribute](entity:CustomAttribute) + + with the `visibility` field set to `VISIBILITY_READ_ONLY` or + `VISIBILITY_READ_WRITE_VALUES` is updated. + + An application that subscribes to this event is notified when a booking + custom attribute is updated + + by any application for which the subscribing application has read access + to the booking custom attribute. + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"booking.custom_attribute.visible.updated"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json BookingStatus: enum: - PENDING @@ -1177,6 +1749,59 @@ types: docs: Supported booking statuses. source: openapi: openapi/openapi.json + BookingUpdatedEvent: + docs: >- + Published when a booking is updated or cancelled. + + + To receive this event with buyer-level permissions, you must have + `APPOINTMENTS_READ` set for the OAuth scope. + + To receive this event with seller-level permissions, you must have + `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` set for the OAuth scope. + properties: + merchant_id: + type: optional> + docs: The ID of the target seller associated with the event. + type: + type: optional> + docs: The type of this event. The value is `"booking.updated"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + BookingUpdatedEventData: + properties: + type: + type: optional> + docs: The type of the event data object. The value is `"booking"`. + validation: + maxLength: 50 + id: + type: optional + docs: The ID of the event data object. + validation: + maxLength: 192 + object: + type: optional + docs: An object containing the updated booking. + source: + openapi: openapi/openapi.json + BookingUpdatedEventObject: + properties: + booking: + type: optional + docs: The updated booking. + source: + openapi: openapi/openapi.json Break: docs: A record of a team member's break on a [timecard](entity:Timecard). properties: @@ -2912,18 +3537,67 @@ types: access: read-only source: openapi: openapi/openapi.json - CardBrand: - enum: - - OTHER_BRAND - - VISA - - MASTERCARD - - AMERICAN_EXPRESS - - DISCOVER - - DISCOVER_DINERS - - JCB - - CHINA_UNIONPAY - - SQUARE_GIFT_CARD - - SQUARE_CAPITAL_CARD + CardAutomaticallyUpdatedEvent: + docs: >- + Published when Square automatically updates the expiration date or + + primary account number (PAN) of a [card](entity:Card) or adds or removes + an issuer alert. + properties: + merchant_id: + type: optional> + docs: The ID of the target seller associated with the event. + type: + type: optional> + docs: The type of this event. The value is `"card.automatically_updated"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + CardAutomaticallyUpdatedEventData: + properties: + type: + type: optional> + docs: The type of the event data object. The value is `"card"`. + validation: + maxLength: 50 + id: + type: optional + docs: The ID of the event data object. + validation: + maxLength: 192 + object: + type: optional + docs: An object containing the automatically updated card. + source: + openapi: openapi/openapi.json + CardAutomaticallyUpdatedEventObject: + properties: + card: + type: optional + docs: The automatically updated card. + source: + openapi: openapi/openapi.json + CardBrand: + enum: + - OTHER_BRAND + - VISA + - MASTERCARD + - AMERICAN_EXPRESS + - DISCOVER + - DISCOVER_DINERS + - JCB + - CHINA_UNIONPAY + - SQUARE_GIFT_CARD + - SQUARE_CAPITAL_CARD - INTERAC - EFTPOS - FELICA @@ -2939,6 +3613,181 @@ types: docs: Indicates the brand for a co-branded card. source: openapi: openapi/openapi.json + CardCreatedEvent: + docs: Published when a [card](entity:Card) is created or imported. + properties: + merchant_id: + type: optional> + docs: The ID of the target seller associated with the event. + type: + type: optional> + docs: The type of this event. The value is `"card.created"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + CardCreatedEventData: + properties: + type: + type: optional> + docs: The type of the event data object. The value is `"card"`. + validation: + maxLength: 50 + id: + type: optional + docs: The ID of the event data object. + validation: + maxLength: 192 + object: + type: optional + docs: An object containing the created card. + source: + openapi: openapi/openapi.json + CardCreatedEventObject: + properties: + card: + type: optional + docs: The created card. + source: + openapi: openapi/openapi.json + CardDisabledEvent: + docs: Published when a [card](entity:Card) is disabled. + properties: + merchant_id: + type: optional> + docs: The ID of the target seller associated with the event. + type: + type: optional> + docs: The type of this event. The value is `"card.disabled"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + CardDisabledEventData: + properties: + type: + type: optional> + docs: The type of the event data object. The value is `"card"`. + validation: + maxLength: 50 + id: + type: optional + docs: The ID of the event data object. + validation: + maxLength: 192 + object: + type: optional + docs: An object containing the disabled card. + source: + openapi: openapi/openapi.json + CardDisabledEventObject: + properties: + card: + type: optional + docs: The disabled card. + source: + openapi: openapi/openapi.json + CardForgottenEvent: + docs: Published when a [card](entity:Card) is GDPR forgotten or vaulted. + properties: + merchant_id: + type: optional> + docs: The ID of the target seller associated with the event. + type: + type: optional> + docs: The type of this event. The value is `"card.forgotten"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + CardForgottenEventCard: + properties: + id: + type: optional + docs: Unique ID for this card. Generated by Square. + validation: + maxLength: 64 + access: read-only + customer_id: + type: optional> + docs: >- + The ID of a customer created using the Customers API associated with + the card. + enabled: + type: optional> + docs: Indicates whether or not a card can be used for payments. + reference_id: + type: optional> + docs: >- + An optional user-defined reference ID that associates this card with + + another entity in an external system. For example, a customer ID from + an + + external customer management system. + version: + type: optional + docs: >- + Current version number of the card. Increments with each card update. + Requests to update an + + existing Card object will be rejected unless the version in the + request matches the current + + version for the Card. + merchant_id: + type: optional> + docs: The ID of the merchant associated with the card. + source: + openapi: openapi/openapi.json + CardForgottenEventData: + properties: + type: + type: optional> + docs: The type of the event data object. The value is `"card"`. + validation: + maxLength: 50 + id: + type: optional + docs: The ID of the event data object. + validation: + maxLength: 192 + object: + type: optional + docs: An object containing the forgotten card. + source: + openapi: openapi/openapi.json + CardForgottenEventObject: + properties: + card: + type: optional + docs: The forgotten card. + source: + openapi: openapi/openapi.json CardIssuerAlert: type: literal<"ISSUER_ALERT_CARD_CLOSED"> docs: Indicates the type of issuer alert for a [card on file](entity:Card). @@ -3093,6 +3942,53 @@ types: docs: Indicates a card's type, such as `CREDIT` or `DEBIT`. source: openapi: openapi/openapi.json + CardUpdatedEvent: + docs: >- + Published when a [card](entity:Card) is updated by the seller in the + Square Dashboard. + properties: + merchant_id: + type: optional> + docs: The ID of the target seller associated with the event. + type: + type: optional> + docs: The type of this event. The value is `"card.updated"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + CardUpdatedEventData: + properties: + type: + type: optional> + docs: The type of the event data object. The value is `"card"`. + validation: + maxLength: 50 + id: + type: optional + docs: The ID of the event data object. + validation: + maxLength: 192 + object: + type: optional + docs: An object containing the updated card. + source: + openapi: openapi/openapi.json + CardUpdatedEventObject: + properties: + card: + type: optional + docs: The updated card. + source: + openapi: openapi/openapi.json CashAppDetails: docs: >- Additional details about `WALLET` type payments with the `brand` of @@ -6437,6 +7333,54 @@ types: docs: The ID of the `Location` this Connect V1 ID is associated with. source: openapi: openapi/openapi.json + CatalogVersionUpdatedEvent: + docs: Published when the catalog is updated. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + CatalogVersionUpdatedEventCatalogVersion: + properties: + updated_at: + type: optional + docs: Last modification timestamp in RFC 3339 format. + access: read-only + source: + openapi: openapi/openapi.json + CatalogVersionUpdatedEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type. + object: + type: optional + docs: >- + An object containing fields and values relevant to the event. Is + absent if affected object was deleted. + source: + openapi: openapi/openapi.json + CatalogVersionUpdatedEventObject: + properties: + catalog_version: + type: optional + docs: The version of the object. + source: + openapi: openapi/openapi.json CategoryPathToRootNode: docs: A node in the path from a retrieved category to its root node. properties: @@ -8460,22 +9404,75 @@ types: access: read-only source: openapi: openapi/openapi.json - CustomAttributeDefinitionVisibility: - enum: - - VISIBILITY_HIDDEN - - VISIBILITY_READ_ONLY - - VISIBILITY_READ_WRITE_VALUES - docs: >- - The level of permission that a seller or other applications requires to - - view this custom attribute definition. - + CustomAttributeDefinitionEventData: + docs: |- + Represents an object in the CustomAttributeDefinition event notification + payload that contains the affected custom attribute definition. + properties: + type: + type: optional> + docs: >- + The type of the event data object. The value is + `"custom_attribute_definition"`. + validation: + maxLength: 50 + id: + type: optional + docs: The ID of the event data object. + validation: + maxLength: 192 + object: + type: optional + docs: An object containing the custom attribute definition. + source: + openapi: openapi/openapi.json + CustomAttributeDefinitionEventDataObject: + properties: + custom_attribute_definition: + type: optional + docs: The custom attribute definition. + source: + openapi: openapi/openapi.json + CustomAttributeDefinitionVisibility: + enum: + - VISIBILITY_HIDDEN + - VISIBILITY_READ_ONLY + - VISIBILITY_READ_WRITE_VALUES + docs: >- + The level of permission that a seller or other applications requires to + + view this custom attribute definition. + The `Visibility` field controls who can read and write the custom attribute values and custom attribute definition. source: openapi: openapi/openapi.json + CustomAttributeEventData: + properties: + type: + type: optional> + docs: The type of the event data object. The value is `"custom_attribute"`. + validation: + maxLength: 50 + id: + type: optional + docs: The ID of the event data object. + validation: + maxLength: 192 + object: + type: optional + docs: An object containing the custom attribute. + source: + openapi: openapi/openapi.json + CustomAttributeEventDataObject: + properties: + custom_attribute: + type: optional + docs: The custom attribute. + source: + openapi: openapi/openapi.json CustomAttributeFilter: docs: |- Supported custom attribute query expressions for calling the @@ -8687,6 +9684,92 @@ types: See [Country](#type-country) for possible values source: openapi: openapi/openapi.json + CustomerCreatedEvent: + docs: >- + Published when a [customer](entity:Customer) is created. Subscribe to this + event to track customer profiles affected by a merge operation. + + For more information, see [Use Customer + Webhooks](https://developer.squareup.com/docs/customers-api/use-the-api/customer-webhooks). + + + The `customer` object in the event notification does not include the + `segment_ids` field. + properties: + merchant_id: + type: optional> + docs: The ID of the seller associated with the event. + type: + type: optional> + docs: The type of event. For this object, the value is `customer.created`. + event_id: + type: optional> + docs: >- + The unique ID of the event, which is used for [idempotency + support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + CustomerCreatedEventData: + docs: The data associated with the event. + properties: + type: + type: optional> + docs: >- + The type of object affected by the event. For this event, the value is + `customer`. + validation: + maxLength: 50 + id: + type: optional + docs: The ID of the new customer. + validation: + maxLength: 192 + object: + type: optional + docs: An object that contains the new customer. + source: + openapi: openapi/openapi.json + CustomerCreatedEventEventContext: + docs: Information about the change that triggered the event. + properties: + merge: + type: optional + docs: Information about the merge operation associated with the event. + source: + openapi: openapi/openapi.json + CustomerCreatedEventEventContextMerge: + docs: >- + Information about a merge operation, which creates a new customer using + aggregated properties from two or more existing customers. + properties: + from_customer_ids: + type: optional>> + docs: The IDs of the existing customers that were merged and then deleted. + to_customer_id: + type: optional> + docs: The ID of the new customer created by the merge. + source: + openapi: openapi/openapi.json + CustomerCreatedEventObject: + docs: An object that contains the customer associated with the event. + properties: + customer: + type: optional + docs: The new customer. + event_context: + type: optional + docs: >- + Information about the change that triggered the event. This field is + returned only if the customer is created by a merge operation. + source: + openapi: openapi/openapi.json CustomerCreationSource: enum: - OTHER @@ -8743,6132 +9826,9307 @@ types: possible values source: openapi: openapi/openapi.json - CustomerCustomAttributeFilter: + CustomerCustomAttributeDefinitionCreatedEvent: docs: >- - The custom attribute filter. Use this filter in a set of [custom attribute - filters](entity:CustomerCustomAttributeFilters) to search + Published when a customer [custom attribute + definition](entity:CustomAttributeDefinition) - based on the value or last updated date of a customer-related [custom - attribute](entity:CustomAttribute). - properties: - key: - type: string - docs: >- - The `key` of the [custom attribute](entity:CustomAttribute) to filter - by. The key is the identifier of the custom attribute - - (and the corresponding custom attribute definition) and can be - retrieved using the [Customer Custom Attributes - API](api:CustomerCustomAttributes). - filter: - type: optional - docs: >- - A filter that corresponds to the data type of the target custom - attribute. For example, provide the `phone` filter to - - search based on the value of a `PhoneNumber`-type custom attribute. - The data type is specified by the schema field of the custom attribute - definition, + is created by the subscribing application. - which can be retrieved using the [Customer Custom Attributes - API](api:CustomerCustomAttributes). + This event is replaced by - You must provide this `filter` field, the `updated_at` field, or both. - updated_at: - type: optional + [customer.custom_attribute_definition.owned.created](webhook:customer.custom_attribute_definition.owned.created). + properties: + merchant_id: + type: optional> docs: >- - The date range for when the custom attribute was last updated. The - date range can include `start_at`, `end_at`, or - - both. Range boundaries are inclusive. Dates are specified as RFC 3339 - timestamps. - - - You must provide this `updated_at` field, the `filter` field, or both. + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"customer.custom_attribute_definition.created"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. source: openapi: openapi/openapi.json - CustomerCustomAttributeFilterValue: + CustomerCustomAttributeDefinitionCreatedPublicEvent: docs: >- - A type-specific filter used in a [custom attribute - filter](entity:CustomerCustomAttributeFilter) to search based on the - value - - of a customer-related [custom attribute](entity:CustomAttribute). - properties: - email: - type: optional - docs: >- - A filter for a query based on the value of an `Email`-type custom - attribute. This filter is case-insensitive and can - - include `exact` or `fuzzy`, but not both. - + Published when a customer [custom attribute + definition](entity:CustomAttributeDefinition) - For an `exact` match, provide the complete email address. + that is visible to all applications is created. A notification is sent + when any application creates a custom + attribute definition whose `visibility` is `VISIBILITY_READ_ONLY` or + `VISIBILITY_READ_WRITE_VALUES`. - For a `fuzzy` match, provide a query expression containing one or more - query tokens to match against the email address. Square removes - any punctuation (including periods (.), underscores (_), and the @ - symbol) and tokenizes the email addresses on spaces. A match is found + This event is replaced by - if a tokenized email address contains all the tokens in the search - query, irrespective of the token order. For example, `Steven gmail` + [customer.custom_attribute_definition.visible.created](webhook:customer.custom_attribute_definition.visible.created), - matches steven.jones@gmail.com and mygmail@stevensbakery.com. - phone: - type: optional + which applies to custom attribute definitions that are visible to the + subscribing application. + properties: + merchant_id: + type: optional> docs: >- - A filter for a query based on the value of a `PhoneNumber`-type custom - attribute. This filter is case-insensitive and - - can include `exact` or `fuzzy`, but not both. - - - For an `exact` match, provide the complete phone number. This is - always an E.164-compliant phone number that starts - - with the + sign followed by the country code and subscriber number. - For example, the format for a US phone number is +12061112222. - + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"customer.custom_attribute_definition.public.created"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + CustomerCustomAttributeDefinitionDeletedEvent: + docs: >- + Published when a customer [custom attribute + definition](entity:CustomAttributeDefinition) - For a `fuzzy` match, provide a query expression containing one or more - query tokens to match against the phone number. + created by the subscribing application is deleted. A custom attribute + definition can only be deleted by - Square removes any punctuation and tokenizes the expression on spaces. - A match is found if a tokenized phone number contains + the application that created it. - all the tokens in the search query, irrespective of the token order. - For example, `415 123 45` is tokenized to `415`, `123`, and `45`, - which matches +14151234567 and +12345674158, but does not match - +1234156780. Similarly, the expression `415` matches + This event is replaced by - +14151234567, +12345674158, and +1234156780. - text: - type: optional + [customer.custom_attribute_definition.owned.deleted](webhook:customer.custom_attribute_definition.owned.deleted). + properties: + merchant_id: + type: optional> docs: >- - A filter for a query based on the value of a `String`-type custom - attribute. This filter is case-insensitive and - - can include `exact` or `fuzzy`, but not both. + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"customer.custom_attribute_definition.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + CustomerCustomAttributeDefinitionDeletedPublicEvent: + docs: >- + Published when a customer [custom attribute + definition](entity:CustomAttributeDefinition) + that is visible to all applications is deleted. A notification is sent + when any application deletes a custom - For an `exact` match, provide the complete string. + attribute definition whose `visibility` is `VISIBILITY_READ_ONLY` or + `VISIBILITY_READ_WRITE_VALUES`. - For a `fuzzy` match, provide a query expression containing one or more - query tokens in any order that contain complete words + This event is replaced by - to match against the string. Square tokenizes the expression using a - grammar-based tokenizer. For example, the expressions `quick brown`, + [customer.custom_attribute_definition.visible.deleted](webhook:customer.custom_attribute_definition.visible.deleted), - `brown quick`, and `quick fox` match "The quick brown fox jumps over - the lazy dog". However, `quick foxes` and `qui` do not match. - selection: - type: optional + which applies to custom attribute definitions that are visible to the + subscribing application. + properties: + merchant_id: + type: optional> docs: >- - A filter for a query based on the display name for a `Selection`-type - custom attribute value. This filter is case-sensitive - - and can contain `any`, `all`, or both. The `none` condition is not - supported. - - - Provide the display name of each item that you want to search for. To - find the display names for the selection, use the - - [Customer Custom Attributes API](api:CustomerCustomAttributes) to - retrieve the corresponding custom attribute definition - - and then check the `schema.items.names` field. For more information, - see - - [Search based on - selection](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#custom-attribute-value-filter-selection). - - - Note that when a `Selection`-type custom attribute is assigned to a - customer profile, the custom attribute value is a list of one - - or more UUIDs (sourced from the `schema.items.enum` field) that map to - the item names. These UUIDs are unique per seller. - date: - type: optional - docs: >- - A filter for a query based on the value of a `Date`-type custom - attribute. - - - Provide a date range for this filter using `start_at`, `end_at`, or - both. Range boundaries are inclusive. Dates can be specified - - in `YYYY-MM-DD` format or as RFC 3339 timestamps. - number: - type: optional + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> docs: >- - A filter for a query based on the value of a `Number`-type custom - attribute, which can be an integer or a decimal with up to - - 5 digits of precision. - - - Provide a numerical range for this filter using `start_at`, `end_at`, - or both. Range boundaries are inclusive. Numbers are specified - - as decimals or integers. The absolute value of range boundaries must - not exceed `(2^63-1)/10^5`, or 92233720368547. - boolean: - type: optional> + The type of this event. The value is + `"customer.custom_attribute_definition.public.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional docs: >- - A filter for a query based on the value of a `Boolean`-type custom - attribute. - address: - type: optional + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional docs: >- - A filter for a query based on the value of an `Address`-type custom - attribute. The filter can include `postal_code`, `country`, or both. + The data associated with the event that triggered the event + notification. source: openapi: openapi/openapi.json - CustomerCustomAttributeFilters: + CustomerCustomAttributeDefinitionOwnedCreatedEvent: docs: >- - The custom attribute filters in a set of [customer - filters](entity:CustomerFilter) used in a search query. Use this filter - - to search based on [custom attributes](entity:CustomAttribute) that are - assigned to customer profiles. For more information, see + Published when a customer [custom attribute + definition](entity:CustomAttributeDefinition) - [Search by custom - attribute](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-custom-attribute). + is created by the subscribing application. properties: - filters: - type: optional>> + merchant_id: + type: optional> docs: >- - The custom attribute filters. Each filter must specify `key` and - include the `filter` field with a type-specific filter, - - the `updated_at` field, or both. The provided keys must be unique - within the list of custom attribute filters. + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"customer.custom_attribute_definition.owned.created"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. source: openapi: openapi/openapi.json - CustomerDetails: - docs: Details about the customer making the payment. + CustomerCustomAttributeDefinitionOwnedDeletedEvent: + docs: >- + Published when a customer [custom attribute + definition](entity:CustomAttributeDefinition) + + created by the subscribing application is deleted. A custom attribute + definition can only be deleted by + + the application that created it. properties: - customer_initiated: - type: optional> - docs: Indicates whether the customer initiated the payment. - seller_keyed_in: - type: optional> + merchant_id: + type: optional> docs: >- - Indicates that the seller keyed in payment details on behalf of the - customer. - - This is used to flag a payment as Mail Order / Telephone Order (MOTO). + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"customer.custom_attribute_definition.owned.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. source: openapi: openapi/openapi.json - CustomerFilter: + CustomerCustomAttributeDefinitionOwnedUpdatedEvent: docs: >- - Represents the filtering criteria in a [search - query](entity:CustomerQuery) that defines how to filter + Published when a customer [custom attribute + definition](entity:CustomAttributeDefinition) - customer profiles returned in - [SearchCustomers](api-endpoint:Customers-SearchCustomers) results. + created by the subscribing application is updated. A custom attribute + definition can only be updated by + + the application that created it. properties: - creation_source: - type: optional - docs: A filter to select customers based on their creation source. + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"customer.custom_attribute_definition.owned.updated"`. + event_id: + type: optional> + docs: A unique ID for the event notification. created_at: - type: optional - docs: A filter to select customers based on when they were created. - updated_at: - type: optional - docs: A filter to select customers based on when they were last updated. - email_address: - type: optional + type: optional docs: >- - A filter to [select customers by their email - address](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-email-address) + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + CustomerCustomAttributeDefinitionUpdatedEvent: + docs: >- + Published when a customer [custom attribute + definition](entity:CustomAttributeDefinition) - visible to the seller. + created by the subscribing application is updated. A custom attribute + definition can only be updated by - This filter is case-insensitive. + the application that created it. - For [exact - matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#exact-search-by-email-address), - this + This event is replaced by - filter causes the search to return customer profiles + [customer.custom_attribute_definition.owned.updated](webhook:customer.custom_attribute_definition.owned.updated). + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"customer.custom_attribute_definition.updated"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + CustomerCustomAttributeDefinitionUpdatedPublicEvent: + docs: >- + Published when a customer [custom attribute + definition](entity:CustomAttributeDefinition) - whose `email_address` field value are identical to the email address - provided + that is visible to all applications is updated. A notification is sent + when any application updates a custom - in the query. + attribute definition whose `visibility` is `VISIBILITY_READ_ONLY` or + `VISIBILITY_READ_WRITE_VALUES`. - For [fuzzy - matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#fuzzy-search-by-email-address), + This event is replaced by - this filter causes the search to return customer profiles + [customer.custom_attribute_definition.visible.updated](webhook:customer.custom_attribute_definition.visible.updated), - whose `email_address` field value has a token-wise partial match - against the filtering + which applies to custom attribute definitions that are visible to the + subscribing application. + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"customer.custom_attribute_definition.public.updated"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + CustomerCustomAttributeDefinitionVisibleCreatedEvent: + docs: >- + Published when a customer [custom attribute + definition](entity:CustomAttributeDefinition) - expression in the query. For example, with `Steven gmail` provided in - a search + that is visible to the subscribing application is created. A notification + is sent when your application - query, the search returns customers whose email address is - `steven.johnson@gmail.com` + creates a custom attribute definition or another application creates a + custom attribute definition whose - or `mygmail@stevensbakery.com`. Square removes any punctuation - (including periods (.), + `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"customer.custom_attribute_definition.visible.created"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + CustomerCustomAttributeDefinitionVisibleDeletedEvent: + docs: >- + Published when a customer [custom attribute + definition](entity:CustomAttributeDefinition) - underscores (_), and the @ symbol) and tokenizes the email addresses - on spaces. A match is + that is visible to the subscribing application is deleted. A custom + attribute definition can only be deleted - found if a tokenized email address contains all the tokens in the - search query, + by the application that created it. A notification is sent when your + application deletes a custom attribute - irrespective of the token order. - phone_number: - type: optional + definition or when another application deletes a custom attribute + definition whose `visibility` is + + `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. + properties: + merchant_id: + type: optional> docs: >- - A filter to [select customers by their phone - numbers](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-phone-number) + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"customer.custom_attribute_definition.visible.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + CustomerCustomAttributeDefinitionVisibleUpdatedEvent: + docs: >- + Published when a customer [custom attribute + definition](entity:CustomAttributeDefinition) - visible to the seller. + that is visible to the subscribing application is updated. A custom + attribute definition can only be updated + by the application that created it. A notification is sent when your + application updates a custom - For [exact - matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#exact-search-by-phone-number), + attribute definition or when another application updates a custom + attribute definition whose `visibility` is - this filter returns customers whose phone number matches the specified - query expression. The number in the query must be of an + `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"customer.custom_attribute_definition.visible.updated"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + CustomerCustomAttributeDeletedEvent: + docs: >- + Published when a customer [custom attribute](entity:CustomAttribute) owned + by the - E.164-compliant form. In particular, it must include the leading `+` - sign followed by a country code and then a subscriber number. + subscribing application is deleted. Custom attributes are owned by the + application that created the - For example, the standard E.164 form of a US phone number is - `+12062223333` and an E.164-compliant variation is `+1 (206) - 222-3333`. + corresponding [custom attribute + definition](entity:CustomAttributeDefinition). Custom attributes whose - To match the query expression, stored customer phone numbers are - converted to the standard E.164 form. + `visibility` is `VISIBILITY_READ_WRITE_VALUES` can be deleted by any + application. - For [fuzzy - matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#fuzzy-search-by-phone-number), + This event is replaced by - this filter returns customers whose phone number matches the token or - tokens provided in the query expression. For example, with `415` + [customer.custom_attribute.owned.deleted](webhook:customer.custom_attribute.owned.deleted). + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"customer.custom_attribute.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + CustomerCustomAttributeDeletedPublicEvent: + docs: >- + Published when a customer [custom attribute](entity:CustomAttribute) that + is visible - provided in a search query, the search returns customers with the - phone numbers `+1-415-212-1200`, `+1-212-415-1234`, and `+1 (551) - 234-1567`. + to all applications is deleted. A notification is sent when any + application deletes a custom attribute - Similarly, a search query of `415 123` returns customers with the - phone numbers `+1-212-415-1234` and `+1 (551) 234-1567` but not + whose `visibility` is `VISIBILITY_READ_ONLY` or + `VISIBILITY_READ_WRITE_VALUES`. - `+1-212-415-1200`. A match is found if a tokenized phone number - contains all the tokens in the search query, irrespective of the token - order. - reference_id: - type: optional - docs: >- - A filter to [select customers by their reference - IDs](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-reference-id). - This filter is case-insensitive. + This event is replaced by + [customer.custom_attribute.visible.deleted](webhook:customer.custom_attribute.visible.deleted), - [Exact - matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#exact-search-by-reference-id) + which applies to custom attributes that are visible to the subscribing + application. + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"customer.custom_attribute.public.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + CustomerCustomAttributeFilter: + docs: >- + The custom attribute filter. Use this filter in a set of [custom attribute + filters](entity:CustomerCustomAttributeFilters) to search - of a customer's reference ID against a query's reference ID is - evaluated as an + based on the value or last updated date of a customer-related [custom + attribute](entity:CustomAttribute). + properties: + key: + type: string + docs: >- + The `key` of the [custom attribute](entity:CustomAttribute) to filter + by. The key is the identifier of the custom attribute - exact match between two strings, character by character in the given - order. + (and the corresponding custom attribute definition) and can be + retrieved using the [Customer Custom Attributes + API](api:CustomerCustomAttributes). + filter: + type: optional + docs: >- + A filter that corresponds to the data type of the target custom + attribute. For example, provide the `phone` filter to + search based on the value of a `PhoneNumber`-type custom attribute. + The data type is specified by the schema field of the custom attribute + definition, - [Fuzzy - matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#fuzzy-search-by-reference-id) + which can be retrieved using the [Customer Custom Attributes + API](api:CustomerCustomAttributes). - of stored reference IDs against queried reference IDs works - exactly the same as fuzzy matching on email addresses. - Non-alphanumeric characters + You must provide this `filter` field, the `updated_at` field, or both. + updated_at: + type: optional + docs: >- + The date range for when the custom attribute was last updated. The + date range can include `start_at`, `end_at`, or - are replaced by spaces to tokenize stored and queried reference IDs. A - match is found + both. Range boundaries are inclusive. Dates are specified as RFC 3339 + timestamps. - if a tokenized stored reference ID contains all tokens specified in - any order in the query. For example, - a query of `NYC M` matches customer profiles with the `reference_id` - value of `NYC_M_35_JOHNSON` + You must provide this `updated_at` field, the `filter` field, or both. + source: + openapi: openapi/openapi.json + CustomerCustomAttributeFilterValue: + docs: >- + A type-specific filter used in a [custom attribute + filter](entity:CustomerCustomAttributeFilter) to search based on the + value - and `NYC_27_MURRAY`. - group_ids: - type: optional + of a customer-related [custom attribute](entity:CustomAttribute). + properties: + email: + type: optional docs: >- - A filter to select customers based on the - [groups](entity:CustomerGroup) they belong to. + A filter for a query based on the value of an `Email`-type custom + attribute. This filter is case-insensitive and can - Group membership is controlled by sellers and developers. + include `exact` or `fuzzy`, but not both. - The `group_ids` filter has the following syntax: + For an `exact` match, provide the complete email address. - ``` - "group_ids": { + For a `fuzzy` match, provide a query expression containing one or more + query tokens to match against the email address. Square removes - "any": ["{group_a_id}", "{group_b_id}", ...], + any punctuation (including periods (.), underscores (_), and the @ + symbol) and tokenizes the email addresses on spaces. A match is found - "all": ["{group_1_id}", "{group_2_id}", ...], + if a tokenized email address contains all the tokens in the search + query, irrespective of the token order. For example, `Steven gmail` - "none": ["{group_i_id}", "{group_ii_id}", ...] + matches steven.jones@gmail.com and mygmail@stevensbakery.com. + phone: + type: optional + docs: >- + A filter for a query based on the value of a `PhoneNumber`-type custom + attribute. This filter is case-insensitive and - } + can include `exact` or `fuzzy`, but not both. - ``` + For an `exact` match, provide the complete phone number. This is + always an E.164-compliant phone number that starts - You can use any combination of the `any`, `all`, and `none` fields in - the filter. + with the + sign followed by the country code and subscriber number. + For example, the format for a US phone number is +12061112222. - With `any`, the search returns customers in groups `a` or `b` or any - other group specified in the list. - With `all`, the search returns customers in groups `1` and `2` and all - other groups specified in the list. + For a `fuzzy` match, provide a query expression containing one or more + query tokens to match against the phone number. - With `none`, the search returns customers not in groups `i` or `ii` or - any other group specified in the list. + Square removes any punctuation and tokenizes the expression on spaces. + A match is found if a tokenized phone number contains + all the tokens in the search query, irrespective of the token order. + For example, `415 123 45` is tokenized to `415`, `123`, and `45`, - If any of the search conditions are not met, including when an invalid - or non-existent group ID is provided, + which matches +14151234567 and +12345674158, but does not match + +1234156780. Similarly, the expression `415` matches - the result is an empty object (`{}`). - custom_attribute: - type: optional + +14151234567, +12345674158, and +1234156780. + text: + type: optional docs: >- - A filter to select customers based on one or more custom attributes. - - This filter can contain up to 10 custom attribute filters. Each custom - attribute filter specifies filtering criteria for a target custom - - attribute. If multiple custom attribute filters are provided, they are - combined as an `AND` operation. + A filter for a query based on the value of a `String`-type custom + attribute. This filter is case-insensitive and + can include `exact` or `fuzzy`, but not both. - To be valid for a search, the custom attributes must be visible to the - requesting application. For more information, including example - queries, - see [Search by custom - attribute](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-custom-attribute). + For an `exact` match, provide the complete string. - Square returns matching customer profiles, which do not contain custom - attributes. To retrieve customer-related custom attributes, + For a `fuzzy` match, provide a query expression containing one or more + query tokens in any order that contain complete words - use the [Customer Custom Attributes - API](api:CustomerCustomAttributes). For example, you can call + to match against the string. Square tokenizes the expression using a + grammar-based tokenizer. For example, the expressions `quick brown`, - [RetrieveCustomerCustomAttribute](api-endpoint:CustomerCustomAttributes-RetrieveCustomerCustomAttribute) - using a customer ID from the result set. - segment_ids: + `brown quick`, and `quick fox` match "The quick brown fox jumps over + the lazy dog". However, `quick foxes` and `qui` do not match. + selection: type: optional - docs: >2- - A filter to select customers based on the [segments](entity:CustomerSegment) they belong to. - Segment membership is dynamic and adjusts automatically based on - whether customers meet the segment criteria. + docs: >- + A filter for a query based on the display name for a `Selection`-type + custom attribute value. This filter is case-sensitive + and can contain `any`, `all`, or both. The `none` condition is not + supported. - You can provide up to three segment IDs in the filter, using any - combination of the `all`, `any`, and `none` fields. - For the following example, the results include customers who belong to - both segment A and segment B but do not belong to segment C. + Provide the display name of each item that you want to search for. To + find the display names for the selection, use the + [Customer Custom Attributes API](api:CustomerCustomAttributes) to + retrieve the corresponding custom attribute definition - ``` + and then check the `schema.items.names` field. For more information, + see - "segment_ids": { + [Search based on + selection](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#custom-attribute-value-filter-selection). - "all": ["{segment_A_id}", "{segment_B_id}"], - "none": ["{segment_C_id}"] + Note that when a `Selection`-type custom attribute is assigned to a + customer profile, the custom attribute value is a list of one - } + or more UUIDs (sourced from the `schema.items.enum` field) that map to + the item names. These UUIDs are unique per seller. + date: + type: optional + docs: >- + A filter for a query based on the value of a `Date`-type custom + attribute. - ``` + Provide a date range for this filter using `start_at`, `end_at`, or + both. Range boundaries are inclusive. Dates can be specified - If an invalid or non-existent segment ID is provided in the filter, - Square stops processing the request + in `YYYY-MM-DD` format or as RFC 3339 timestamps. + number: + type: optional + docs: >- + A filter for a query based on the value of a `Number`-type custom + attribute, which can be an integer or a decimal with up to - and returns a `400 BAD_REQUEST` error that includes the segment ID. - source: - openapi: openapi/openapi.json - CustomerGroup: - docs: >- - Represents a group of customer profiles. + 5 digits of precision. - Customer groups can be created, be modified, and have their membership - defined using + Provide a numerical range for this filter using `start_at`, `end_at`, + or both. Range boundaries are inclusive. Numbers are specified - the Customers API or within the Customer Directory in the Square Seller - Dashboard or Point of Sale. - properties: - id: - type: optional - docs: A unique Square-generated ID for the customer group. - validation: - maxLength: 255 - access: read-only - name: - type: string - docs: The name of the customer group. - created_at: - type: optional - docs: The timestamp when the customer group was created, in RFC 3339 format. - access: read-only - updated_at: - type: optional - docs: >- - The timestamp when the customer group was last updated, in RFC 3339 - format. - access: read-only - source: - openapi: openapi/openapi.json - CustomerInclusionExclusion: - enum: - - INCLUDE - - EXCLUDE - docs: |- - Indicates whether customers should be included in, or excluded from, - the result set when they match the filtering criteria. - source: - openapi: openapi/openapi.json - CustomerPreferences: - docs: Represents communication preferences for the customer profile. - properties: - email_unsubscribed: + as decimals or integers. The absolute value of range boundaries must + not exceed `(2^63-1)/10^5`, or 92233720368547. + boolean: type: optional> docs: >- - Indicates whether the customer has unsubscribed from marketing - campaign emails. A value of `true` means that the customer chose to - opt out of email marketing from the current Square seller or from all - Square sellers. This value is read-only from the Customers API. + A filter for a query based on the value of a `Boolean`-type custom + attribute. + address: + type: optional + docs: >- + A filter for a query based on the value of an `Address`-type custom + attribute. The filter can include `postal_code`, `country`, or both. source: openapi: openapi/openapi.json - CustomerQuery: + CustomerCustomAttributeFilters: docs: >- - Represents filtering and sorting criteria for a - [SearchCustomers](api-endpoint:Customers-SearchCustomers) request. - properties: - filter: - type: optional - docs: >- - The filtering criteria for the search query. A query can contain - multiple filters in any combination. - - Multiple filters are combined as `AND` statements. + The custom attribute filters in a set of [customer + filters](entity:CustomerFilter) used in a search query. Use this filter + to search based on [custom attributes](entity:CustomAttribute) that are + assigned to customer profiles. For more information, see - __Note:__ Combining multiple filters as `OR` statements is not - supported. Instead, send multiple single-filter + [Search by custom + attribute](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-custom-attribute). + properties: + filters: + type: optional>> + docs: >- + The custom attribute filters. Each filter must specify `key` and + include the `filter` field with a type-specific filter, - searches and join the result sets. - sort: - type: optional - docs: |- - Sorting criteria for query results. The default behavior is to sort - customers alphabetically by `given_name` and `family_name`. + the `updated_at` field, or both. The provided keys must be unique + within the list of custom attribute filters. source: openapi: openapi/openapi.json - CustomerSegment: + CustomerCustomAttributeOwnedDeletedEvent: docs: >- - Represents a group of customer profiles that match one or more predefined - filter criteria. + Published when a customer [custom attribute](entity:CustomAttribute) owned + by the + subscribing application is deleted. Custom attributes are owned by the + application that created the - Segments (also known as Smart Groups) are defined and created within the - Customer Directory in the + corresponding [custom attribute + definition](entity:CustomAttributeDefinition). Custom attributes whose - Square Seller Dashboard or Point of Sale. + `visibility` is `VISIBILITY_READ_WRITE_VALUES` can be deleted by any + application. properties: - id: - type: optional - docs: A unique Square-generated ID for the segment. - validation: - maxLength: 255 - access: read-only - name: - type: string - docs: The name of the segment. - access: read-only + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"customer.custom_attribute.owned.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event notification. created_at: type: optional - docs: The timestamp when the segment was created, in RFC 3339 format. - access: read-only - updated_at: - type: optional - docs: The timestamp when the segment was last updated, in RFC 3339 format. + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. source: openapi: openapi/openapi.json - CustomerSort: + CustomerCustomAttributeOwnedUpdatedEvent: docs: >- - Represents the sorting criteria in a [search query](entity:CustomerQuery) - that defines how to sort - - customer profiles returned in - [SearchCustomers](api-endpoint:Customers-SearchCustomers) results. - properties: - field: - type: optional - docs: >- - Indicates the fields to use as the sort key, which is either the - default set of fields or `created_at`. + Published when a customer [custom attribute](entity:CustomAttribute) owned + by the + subscribing application is created or updated. Custom attributes are owned + by the application that created - The default value is `DEFAULT`. + the corresponding [custom attribute + definition](entity:CustomAttributeDefinition). Custom attributes whose - See [CustomerSortField](#type-customersortfield) for possible values - order: - type: optional + `visibility` is `VISIBILITY_READ_WRITE_VALUES` can be created or updated + by any application. + properties: + merchant_id: + type: optional> docs: >- - Indicates the order in which results should be sorted based on the + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"customer.custom_attribute.owned.updated"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + CustomerCustomAttributeUpdatedEvent: + docs: >- + Published when a customer [custom attribute](entity:CustomAttribute) owned + by the - sort field value. Strings use standard alphabetic comparison + subscribing application is created or updated. Custom attributes are owned + by the application that created - to determine order. Strings representing numbers are sorted as - strings. + the corresponding [custom attribute + definition](entity:CustomAttributeDefinition). Custom attributes whose + `visibility` is `VISIBILITY_READ_WRITE_VALUES` can be created or updated + by any application. - The default value is `ASC`. - See [SortOrder](#type-sortorder) for possible values - source: - openapi: openapi/openapi.json - CustomerSortField: - enum: - - DEFAULT - - CREATED_AT - docs: >- - Specifies customer attributes as the sort key to customer profiles - returned from a search. - source: - openapi: openapi/openapi.json - CustomerTaxIds: - docs: >- - Represents the tax ID associated with a [customer - profile](entity:Customer). The corresponding `tax_ids` field is available - only for customers of sellers in EU countries or the United Kingdom. + This event is replaced by - For more information, see [Customer tax - IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids). + [customer.custom_attribute.owned.updated](webhook:customer.custom_attribute.owned.updated). properties: - eu_vat: + merchant_id: type: optional> docs: >- - The EU VAT identification number for the customer. For example, - `IE3426675K`. The ID can contain alphanumeric characters only. - validation: - maxLength: 20 + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"customer.custom_attribute.updated"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. source: openapi: openapi/openapi.json - CustomerTextFilter: + CustomerCustomAttributeUpdatedPublicEvent: docs: >- - A filter to select customers based on exact or fuzzy matching of + Published when a customer [custom attribute](entity:CustomAttribute) that + is visible - customer attributes against a specified query. Depending on the customer - attributes, + to all applications is created or updated. A notification is sent when any + application creates or updates - the filter can be case-sensitive. This filter can be exact or fuzzy, but - it cannot be both. + a custom attribute whose `visibility` is `VISIBILITY_READ_ONLY` or + `VISIBILITY_READ_WRITE_VALUES`. + + + This event is replaced by + + [customer.custom_attribute.visible.updated](webhook:customer.custom_attribute.visible.updated), + + which applies to custom attributes that are visible to the subscribing + application. properties: - exact: + merchant_id: type: optional> docs: >- - Use the exact filter to select customers whose attributes match - exactly the specified query. - fuzzy: + The ID of the seller associated with the event that triggered the + event notification. + type: type: optional> docs: >- - Use the fuzzy filter to select customers whose attributes match the - specified query - - in a fuzzy manner. When the fuzzy option is used, search queries are - tokenized, and then - - each query token must be matched somewhere in the searched attribute. - For single token queries, - - this is effectively the same behavior as a partial match operation. - source: - openapi: openapi/openapi.json - DataCollectionOptions: - properties: - title: - type: string - docs: The title text to display in the data collection flow on the Terminal. - validation: - minLength: 1 - maxLength: 250 - body: - type: string + The type of this event. The value is + `"customer.custom_attribute.public.updated"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional docs: >- - The body text to display under the title in the data collection screen - flow on the - - Terminal. - validation: - minLength: 1 - maxLength: 10000 - input_type: - type: DataCollectionOptionsInputType - docs: |- - Represents the type of the input text. - See [InputType](#type-inputtype) for possible values - collected_data: - type: optional - docs: The buyer’s input text from the data collection screen. - source: - openapi: openapi/openapi.json - DataCollectionOptionsInputType: - enum: - - EMAIL - - PHONE_NUMBER - docs: Describes the input type of the data. + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. source: openapi: openapi/openapi.json - DateRange: - docs: |- - A range defined by two dates. Used for filtering a query for Connect v2 - objects that have date properties. - properties: - start_date: - type: optional> - docs: >- - A string in `YYYY-MM-DD` format, such as `2017-10-31`, per the ISO - 8601 + CustomerCustomAttributeVisibleDeletedEvent: + docs: >- + Published when a customer [custom attribute](entity:CustomAttribute) that + is visible to the - extended format for calendar dates. + subscribing application is deleted. A notification is sent when: - The beginning of a date range (inclusive). - end_date: - type: optional> - docs: >- - A string in `YYYY-MM-DD` format, such as `2017-10-31`, per the ISO - 8601 + - Your application deletes a custom attribute owned by your application, + regardless of the `visibility` setting. - extended format for calendar dates. + - Any application deletes a custom attribute whose `visibility` is + `VISIBILITY_READ_ONLY` - The end of a date range (inclusive). - source: - openapi: openapi/openapi.json - DayOfWeek: - enum: - - SUN - - MON - - TUE - - WED - - THU - - FRI - - SAT - docs: Indicates the specific day of the week. - source: - openapi: openapi/openapi.json - DeleteBookingCustomAttributeDefinitionResponse: - docs: >- - Represents a - [DeleteBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-DeleteBookingCustomAttributeDefinition) - response + or `VISIBILITY_READ_WRITE_VALUES`. - containing error messages when errors occurred during the request. The - successful response does not contain any payload. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: openapi/openapi.json - DeleteBookingCustomAttributeResponse: - docs: >- - Represents a - [DeleteBookingCustomAttribute](api-endpoint:BookingCustomAttributes-DeleteBookingCustomAttribute) - response. - Either an empty object `{}` (for a successful deletion) or `errors` is - present in the response. + Custom attributes set to `VISIBILITY_READ_WRITE_VALUES` can be deleted by + any application, but those set to + + `VISIBILITY_READ_ONLY` or `VISIBILITY_HIDDEN` can only be deleted by the + owner. Custom attributes are owned + + by the application that created the corresponding [custom attribute + definition](entity:CustomAttributeDefinition). properties: - errors: - type: optional> - docs: Any errors that occurred during the request. + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"customer.custom_attribute.visible.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. source: openapi: openapi/openapi.json - DeleteBreakTypeResponse: + CustomerCustomAttributeVisibleUpdatedEvent: docs: >- - The response to a request to delete a `BreakType`. The response might - contain a set + Published when a customer [custom attribute](entity:CustomAttribute) that + is visible to the - of `Error` objects if the request resulted in errors. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: openapi/openapi.json - DeleteCatalogObjectResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - deleted_object_ids: - type: optional> - docs: >- - The IDs of all catalog objects deleted by this request. + subscribing application is created or updated. A notification is sent + when: - Multiple IDs may be returned when associated objects are also deleted, - for example + - Your application creates or updates a custom attribute owned by your + application, regardless of the `visibility` setting. - a catalog item variation will be deleted (and its ID included in this - field) + - Any application creates or updates a custom attribute whose `visibility` + is `VISIBILITY_READ_ONLY` - when its parent catalog item is deleted. - deleted_at: + or `VISIBILITY_READ_WRITE_VALUES`. + + + Custom attributes set to `VISIBILITY_READ_WRITE_VALUES` can be created or + updated by any application, but those set to + + `VISIBILITY_READ_ONLY` or `VISIBILITY_HIDDEN` can only be created or + updated by the owner. Custom attributes are owned + + by the application that created the corresponding [custom attribute + definition](entity:CustomAttributeDefinition). + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"customer.custom_attribute.visible.updated"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: type: optional docs: >- - The database - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - of this deletion in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`. + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. source: openapi: openapi/openapi.json - DeleteCustomerCardResponse: - docs: |- - Defines the fields that are included in the response body of - a request to the `DeleteCustomerCard` endpoint. + CustomerDeletedEvent: + docs: >- + Published when a [customer](entity:Customer) is deleted. For more + information, see [Use Customer + Webhooks](https://developer.squareup.com/docs/customers-api/use-the-api/customer-webhooks). + + + The `customer` object in the event notification does not include the + following fields: `group_ids` and `segment_ids`. properties: - errors: - type: optional> - docs: Any errors that occurred during the request. + merchant_id: + type: optional> + docs: The ID of the seller associated with the event. + type: + type: optional> + docs: The type of event. For this object, the value is `customer.deleted`. + event_id: + type: optional> + docs: >- + The unique ID of the event, which is used for [idempotency + support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. source: openapi: openapi/openapi.json - DeleteCustomerCustomAttributeDefinitionResponse: - docs: >- - Represents a response from a delete request containing error messages if - there are any. + CustomerDeletedEventData: + docs: The data associated with the event. properties: - errors: - type: optional> - docs: Any errors that occurred during the request. + type: + type: optional> + docs: >- + The type of object affected by the event. For this event, the value is + `customer`. + validation: + maxLength: 50 + id: + type: optional + docs: The ID of the deleted customer. + validation: + maxLength: 192 + object: + type: optional + docs: An object that contains the deleted customer. source: openapi: openapi/openapi.json - DeleteCustomerCustomAttributeResponse: - docs: >- - Represents a - [DeleteCustomerCustomAttribute](api-endpoint:CustomerCustomAttributes-DeleteCustomerCustomAttribute) - response. - - Either an empty object `{}` (for a successful deletion) or `errors` is - present in the response. + CustomerDeletedEventEventContext: + docs: Information about the change that triggered the event. properties: - errors: - type: optional> - docs: Any errors that occurred during the request. + merge: + type: optional + docs: Information about the merge operation associated with the event. source: openapi: openapi/openapi.json - DeleteCustomerGroupResponse: + CustomerDeletedEventEventContextMerge: docs: >- - Defines the fields that are included in the response body of - - a request to the - [DeleteCustomerGroup](api-endpoint:CustomerGroups-DeleteCustomerGroup) - endpoint. + Information about a merge operation, which creates a new customer using + aggregated properties from two or more existing customers. properties: - errors: - type: optional> - docs: Any errors that occurred during the request. + from_customer_ids: + type: optional>> + docs: The IDs of the existing customers that were merged and then deleted. + to_customer_id: + type: optional> + docs: The ID of the new customer created by the merge. source: openapi: openapi/openapi.json - DeleteCustomerResponse: - docs: |- - Defines the fields that are included in the response body of - a request to the `DeleteCustomer` endpoint. + CustomerDeletedEventObject: + docs: An object that contains the customer associated with the event. properties: - errors: - type: optional> - docs: Any errors that occurred during the request. + customer: + type: optional + docs: The deleted customer. + event_context: + type: optional + docs: >- + Information about the change that triggered the event. This field is + returned only if the customer is deleted by a merge operation. source: openapi: openapi/openapi.json - DeleteDisputeEvidenceResponse: - docs: Defines the fields in a `DeleteDisputeEvidence` response. + CustomerDetails: + docs: Details about the customer making the payment. properties: - errors: - type: optional> - docs: Information about errors encountered during the request. + customer_initiated: + type: optional> + docs: Indicates whether the customer initiated the payment. + seller_keyed_in: + type: optional> + docs: >- + Indicates that the seller keyed in payment details on behalf of the + customer. + + This is used to flag a payment as Mail Order / Telephone Order (MOTO). source: openapi: openapi/openapi.json - DeleteInvoiceAttachmentResponse: + CustomerFilter: docs: >- - Represents a - [DeleteInvoiceAttachment](api-endpoint:Invoices-DeleteInvoiceAttachment) + Represents the filtering criteria in a [search + query](entity:CustomerQuery) that defines how to filter + + customer profiles returned in + [SearchCustomers](api-endpoint:Customers-SearchCustomers) results. + properties: + creation_source: + type: optional + docs: A filter to select customers based on their creation source. + created_at: + type: optional + docs: A filter to select customers based on when they were created. + updated_at: + type: optional + docs: A filter to select customers based on when they were last updated. + email_address: + type: optional + docs: >- + A filter to [select customers by their email + address](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-email-address) + + visible to the seller. + + This filter is case-insensitive. + + + For [exact + matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#exact-search-by-email-address), + this + + filter causes the search to return customer profiles + + whose `email_address` field value are identical to the email address + provided + + in the query. + + + For [fuzzy + matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#fuzzy-search-by-email-address), + + this filter causes the search to return customer profiles + + whose `email_address` field value has a token-wise partial match + against the filtering + + expression in the query. For example, with `Steven gmail` provided in + a search + + query, the search returns customers whose email address is + `steven.johnson@gmail.com` + + or `mygmail@stevensbakery.com`. Square removes any punctuation + (including periods (.), + + underscores (_), and the @ symbol) and tokenizes the email addresses + on spaces. A match is + + found if a tokenized email address contains all the tokens in the + search query, + + irrespective of the token order. + phone_number: + type: optional + docs: >- + A filter to [select customers by their phone + numbers](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-phone-number) + + visible to the seller. + + + For [exact + matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#exact-search-by-phone-number), + + this filter returns customers whose phone number matches the specified + query expression. The number in the query must be of an + + E.164-compliant form. In particular, it must include the leading `+` + sign followed by a country code and then a subscriber number. + + For example, the standard E.164 form of a US phone number is + `+12062223333` and an E.164-compliant variation is `+1 (206) + 222-3333`. + + To match the query expression, stored customer phone numbers are + converted to the standard E.164 form. + + + For [fuzzy + matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#fuzzy-search-by-phone-number), + + this filter returns customers whose phone number matches the token or + tokens provided in the query expression. For example, with `415` + + provided in a search query, the search returns customers with the + phone numbers `+1-415-212-1200`, `+1-212-415-1234`, and `+1 (551) + 234-1567`. + + Similarly, a search query of `415 123` returns customers with the + phone numbers `+1-212-415-1234` and `+1 (551) 234-1567` but not + + `+1-212-415-1200`. A match is found if a tokenized phone number + contains all the tokens in the search query, irrespective of the token + order. + reference_id: + type: optional + docs: >- + A filter to [select customers by their reference + IDs](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-reference-id). + + This filter is case-insensitive. + + + [Exact + matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#exact-search-by-reference-id) + + of a customer's reference ID against a query's reference ID is + evaluated as an + + exact match between two strings, character by character in the given + order. + + + [Fuzzy + matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#fuzzy-search-by-reference-id) + + of stored reference IDs against queried reference IDs works + + exactly the same as fuzzy matching on email addresses. + Non-alphanumeric characters + + are replaced by spaces to tokenize stored and queried reference IDs. A + match is found + + if a tokenized stored reference ID contains all tokens specified in + any order in the query. For example, + + a query of `NYC M` matches customer profiles with the `reference_id` + value of `NYC_M_35_JOHNSON` + + and `NYC_27_MURRAY`. + group_ids: + type: optional + docs: >- + A filter to select customers based on the + [groups](entity:CustomerGroup) they belong to. + + Group membership is controlled by sellers and developers. + + + The `group_ids` filter has the following syntax: + + ``` + + "group_ids": { + + "any": ["{group_a_id}", "{group_b_id}", ...], + + "all": ["{group_1_id}", "{group_2_id}", ...], + + "none": ["{group_i_id}", "{group_ii_id}", ...] + + } + + ``` + + + You can use any combination of the `any`, `all`, and `none` fields in + the filter. + + With `any`, the search returns customers in groups `a` or `b` or any + other group specified in the list. + + With `all`, the search returns customers in groups `1` and `2` and all + other groups specified in the list. + + With `none`, the search returns customers not in groups `i` or `ii` or + any other group specified in the list. + + + If any of the search conditions are not met, including when an invalid + or non-existent group ID is provided, + + the result is an empty object (`{}`). + custom_attribute: + type: optional + docs: >- + A filter to select customers based on one or more custom attributes. + + This filter can contain up to 10 custom attribute filters. Each custom + attribute filter specifies filtering criteria for a target custom + + attribute. If multiple custom attribute filters are provided, they are + combined as an `AND` operation. + + + To be valid for a search, the custom attributes must be visible to the + requesting application. For more information, including example + queries, + + see [Search by custom + attribute](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-custom-attribute). + + + Square returns matching customer profiles, which do not contain custom + attributes. To retrieve customer-related custom attributes, + + use the [Customer Custom Attributes + API](api:CustomerCustomAttributes). For example, you can call + + [RetrieveCustomerCustomAttribute](api-endpoint:CustomerCustomAttributes-RetrieveCustomerCustomAttribute) + using a customer ID from the result set. + segment_ids: + type: optional + docs: >2- + A filter to select customers based on the [segments](entity:CustomerSegment) they belong to. + Segment membership is dynamic and adjusts automatically based on + whether customers meet the segment criteria. + + + You can provide up to three segment IDs in the filter, using any + combination of the `all`, `any`, and `none` fields. + + For the following example, the results include customers who belong to + both segment A and segment B but do not belong to segment C. + + + ``` + + "segment_ids": { + + "all": ["{segment_A_id}", "{segment_B_id}"], + + "none": ["{segment_C_id}"] + + } + + ``` + + + If an invalid or non-existent segment ID is provided in the filter, + Square stops processing the request + + and returns a `400 BAD_REQUEST` error that includes the segment ID. + source: + openapi: openapi/openapi.json + CustomerGroup: + docs: >- + Represents a group of customer profiles. + + + Customer groups can be created, be modified, and have their membership + defined using + + the Customers API or within the Customer Directory in the Square Seller + Dashboard or Point of Sale. + properties: + id: + type: optional + docs: A unique Square-generated ID for the customer group. + validation: + maxLength: 255 + access: read-only + name: + type: string + docs: The name of the customer group. + created_at: + type: optional + docs: The timestamp when the customer group was created, in RFC 3339 format. + access: read-only + updated_at: + type: optional + docs: >- + The timestamp when the customer group was last updated, in RFC 3339 + format. + access: read-only + source: + openapi: openapi/openapi.json + CustomerInclusionExclusion: + enum: + - INCLUDE + - EXCLUDE + docs: |- + Indicates whether customers should be included in, or excluded from, + the result set when they match the filtering criteria. + source: + openapi: openapi/openapi.json + CustomerPreferences: + docs: Represents communication preferences for the customer profile. + properties: + email_unsubscribed: + type: optional> + docs: >- + Indicates whether the customer has unsubscribed from marketing + campaign emails. A value of `true` means that the customer chose to + opt out of email marketing from the current Square seller or from all + Square sellers. This value is read-only from the Customers API. + source: + openapi: openapi/openapi.json + CustomerQuery: + docs: >- + Represents filtering and sorting criteria for a + [SearchCustomers](api-endpoint:Customers-SearchCustomers) request. + properties: + filter: + type: optional + docs: >- + The filtering criteria for the search query. A query can contain + multiple filters in any combination. + + Multiple filters are combined as `AND` statements. + + + __Note:__ Combining multiple filters as `OR` statements is not + supported. Instead, send multiple single-filter + + searches and join the result sets. + sort: + type: optional + docs: |- + Sorting criteria for query results. The default behavior is to sort + customers alphabetically by `given_name` and `family_name`. + source: + openapi: openapi/openapi.json + CustomerSegment: + docs: >- + Represents a group of customer profiles that match one or more predefined + filter criteria. + + + Segments (also known as Smart Groups) are defined and created within the + Customer Directory in the + + Square Seller Dashboard or Point of Sale. + properties: + id: + type: optional + docs: A unique Square-generated ID for the segment. + validation: + maxLength: 255 + access: read-only + name: + type: string + docs: The name of the segment. + access: read-only + created_at: + type: optional + docs: The timestamp when the segment was created, in RFC 3339 format. + access: read-only + updated_at: + type: optional + docs: The timestamp when the segment was last updated, in RFC 3339 format. + access: read-only + source: + openapi: openapi/openapi.json + CustomerSort: + docs: >- + Represents the sorting criteria in a [search query](entity:CustomerQuery) + that defines how to sort + + customer profiles returned in + [SearchCustomers](api-endpoint:Customers-SearchCustomers) results. + properties: + field: + type: optional + docs: >- + Indicates the fields to use as the sort key, which is either the + default set of fields or `created_at`. + + + The default value is `DEFAULT`. + + See [CustomerSortField](#type-customersortfield) for possible values + order: + type: optional + docs: >- + Indicates the order in which results should be sorted based on the + + sort field value. Strings use standard alphabetic comparison + + to determine order. Strings representing numbers are sorted as + strings. + + + The default value is `ASC`. + + See [SortOrder](#type-sortorder) for possible values + source: + openapi: openapi/openapi.json + CustomerSortField: + enum: + - DEFAULT + - CREATED_AT + docs: >- + Specifies customer attributes as the sort key to customer profiles + returned from a search. + source: + openapi: openapi/openapi.json + CustomerTaxIds: + docs: >- + Represents the tax ID associated with a [customer + profile](entity:Customer). The corresponding `tax_ids` field is available + only for customers of sellers in EU countries or the United Kingdom. + + For more information, see [Customer tax + IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids). + properties: + eu_vat: + type: optional> + docs: >- + The EU VAT identification number for the customer. For example, + `IE3426675K`. The ID can contain alphanumeric characters only. + validation: + maxLength: 20 + source: + openapi: openapi/openapi.json + CustomerTextFilter: + docs: >- + A filter to select customers based on exact or fuzzy matching of + + customer attributes against a specified query. Depending on the customer + attributes, + + the filter can be case-sensitive. This filter can be exact or fuzzy, but + it cannot be both. + properties: + exact: + type: optional> + docs: >- + Use the exact filter to select customers whose attributes match + exactly the specified query. + fuzzy: + type: optional> + docs: >- + Use the fuzzy filter to select customers whose attributes match the + specified query + + in a fuzzy manner. When the fuzzy option is used, search queries are + tokenized, and then + + each query token must be matched somewhere in the searched attribute. + For single token queries, + + this is effectively the same behavior as a partial match operation. + source: + openapi: openapi/openapi.json + CustomerUpdatedEvent: + docs: >- + Published when a [customer](entity:Customer) is updated. For more + information, see [Use Customer + Webhooks](https://developer.squareup.com/docs/customers-api/use-the-api/customer-webhooks). + + + Updates to the 'segment_ids' customer field does not invoke a + `customer.updated` event. In addition, the `customer` object in the event + notification does not include this field. + properties: + merchant_id: + type: optional> + docs: The ID of the seller associated with the event. + type: + type: optional> + docs: The type of event. For this object, the value is `customer.updated`. + event_id: + type: optional> + docs: >- + The unique ID of the event, which is used for [idempotency + support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + CustomerUpdatedEventData: + docs: The data associated with the event. + properties: + type: + type: optional> + docs: >- + The type of object affected by the event. For this event, the value is + `customer`. + validation: + maxLength: 50 + id: + type: optional + docs: The ID of the updated customer. + validation: + maxLength: 192 + object: + type: optional + docs: An object that contains the updated customer. + source: + openapi: openapi/openapi.json + CustomerUpdatedEventObject: + docs: An object that contains the customer associated with the event. + properties: + customer: + type: optional + docs: The updated customer. + source: + openapi: openapi/openapi.json + DataCollectionOptions: + properties: + title: + type: string + docs: The title text to display in the data collection flow on the Terminal. + validation: + minLength: 1 + maxLength: 250 + body: + type: string + docs: >- + The body text to display under the title in the data collection screen + flow on the + + Terminal. + validation: + minLength: 1 + maxLength: 10000 + input_type: + type: DataCollectionOptionsInputType + docs: |- + Represents the type of the input text. + See [InputType](#type-inputtype) for possible values + collected_data: + type: optional + docs: The buyer’s input text from the data collection screen. + source: + openapi: openapi/openapi.json + DataCollectionOptionsInputType: + enum: + - EMAIL + - PHONE_NUMBER + docs: Describes the input type of the data. + source: + openapi: openapi/openapi.json + DateRange: + docs: |- + A range defined by two dates. Used for filtering a query for Connect v2 + objects that have date properties. + properties: + start_date: + type: optional> + docs: >- + A string in `YYYY-MM-DD` format, such as `2017-10-31`, per the ISO + 8601 + + extended format for calendar dates. + + The beginning of a date range (inclusive). + end_date: + type: optional> + docs: >- + A string in `YYYY-MM-DD` format, such as `2017-10-31`, per the ISO + 8601 + + extended format for calendar dates. + + The end of a date range (inclusive). + source: + openapi: openapi/openapi.json + DayOfWeek: + enum: + - SUN + - MON + - TUE + - WED + - THU + - FRI + - SAT + docs: Indicates the specific day of the week. + source: + openapi: openapi/openapi.json + DeleteBookingCustomAttributeDefinitionResponse: + docs: >- + Represents a + [DeleteBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-DeleteBookingCustomAttributeDefinition) + response + + containing error messages when errors occurred during the request. The + successful response does not contain any payload. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + DeleteBookingCustomAttributeResponse: + docs: >- + Represents a + [DeleteBookingCustomAttribute](api-endpoint:BookingCustomAttributes-DeleteBookingCustomAttribute) + response. + + Either an empty object `{}` (for a successful deletion) or `errors` is + present in the response. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + DeleteBreakTypeResponse: + docs: >- + The response to a request to delete a `BreakType`. The response might + contain a set + + of `Error` objects if the request resulted in errors. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + DeleteCatalogObjectResponse: + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + deleted_object_ids: + type: optional> + docs: >- + The IDs of all catalog objects deleted by this request. + + Multiple IDs may be returned when associated objects are also deleted, + for example + + a catalog item variation will be deleted (and its ID included in this + field) + + when its parent catalog item is deleted. + deleted_at: + type: optional + docs: >- + The database + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + of this deletion in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`. + source: + openapi: openapi/openapi.json + DeleteCustomerCardResponse: + docs: |- + Defines the fields that are included in the response body of + a request to the `DeleteCustomerCard` endpoint. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + DeleteCustomerCustomAttributeDefinitionResponse: + docs: >- + Represents a response from a delete request containing error messages if + there are any. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + DeleteCustomerCustomAttributeResponse: + docs: >- + Represents a + [DeleteCustomerCustomAttribute](api-endpoint:CustomerCustomAttributes-DeleteCustomerCustomAttribute) + response. + + Either an empty object `{}` (for a successful deletion) or `errors` is + present in the response. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + DeleteCustomerGroupResponse: + docs: >- + Defines the fields that are included in the response body of + + a request to the + [DeleteCustomerGroup](api-endpoint:CustomerGroups-DeleteCustomerGroup) + endpoint. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + DeleteCustomerResponse: + docs: |- + Defines the fields that are included in the response body of + a request to the `DeleteCustomer` endpoint. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + DeleteDisputeEvidenceResponse: + docs: Defines the fields in a `DeleteDisputeEvidence` response. + properties: + errors: + type: optional> + docs: Information about errors encountered during the request. + source: + openapi: openapi/openapi.json + DeleteInvoiceAttachmentResponse: + docs: >- + Represents a + [DeleteInvoiceAttachment](api-endpoint:Invoices-DeleteInvoiceAttachment) + response. + properties: + errors: + type: optional> + docs: Information about errors encountered during the request. + source: + openapi: openapi/openapi.json + DeleteInvoiceResponse: + docs: Describes a `DeleteInvoice` response. + properties: + errors: + type: optional> + docs: Information about errors encountered during the request. + source: + openapi: openapi/openapi.json + DeleteLocationCustomAttributeDefinitionResponse: + docs: >- + Represents a response from a delete request containing error messages if + there are any. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + DeleteLocationCustomAttributeResponse: + docs: >- + Represents a + [DeleteLocationCustomAttribute](api-endpoint:LocationCustomAttributes-DeleteLocationCustomAttribute) + response. + + Either an empty object `{}` (for a successful deletion) or `errors` is + present in the response. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + DeleteLoyaltyRewardResponse: + docs: A response returned by the API call. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + DeleteMerchantCustomAttributeDefinitionResponse: + docs: >- + Represents a response from a delete request containing error messages if + there are any. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + DeleteMerchantCustomAttributeResponse: + docs: >- + Represents a + [DeleteMerchantCustomAttribute](api-endpoint:MerchantCustomAttributes-DeleteMerchantCustomAttribute) response. + + Either an empty object `{}` (for a successful deletion) or `errors` is + present in the response. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + DeleteOrderCustomAttributeDefinitionResponse: + docs: Represents a response from deleting an order custom attribute definition. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + DeleteOrderCustomAttributeResponse: + docs: Represents a response from deleting an order custom attribute. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + DeletePaymentLinkResponse: + properties: + errors: optional> + id: + type: optional + docs: The ID of the link that is deleted. + cancelled_order_id: + type: optional + docs: >- + The ID of the order that is canceled. When a payment link is deleted, + Square updates the + + the `state` (of the order that the checkout link created) to CANCELED. + source: + openapi: openapi/openapi.json + DeleteShiftResponse: + docs: >- + The response to a request to delete a `Shift`. The response might contain + a set of + + `Error` objects if the request resulted in errors. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + DeleteSnippetResponse: + docs: Represents a `DeleteSnippet` response. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + DeleteSubscriptionActionResponse: + docs: >- + Defines output parameters in a response of the + [DeleteSubscriptionAction](api-endpoint:Subscriptions-DeleteSubscriptionAction) + + endpoint. + properties: + errors: + type: optional> + docs: Errors encountered during the request. + subscription: + type: optional + docs: The subscription that has the specified action deleted. + source: + openapi: openapi/openapi.json + DeleteTimecardResponse: + docs: >- + The response to a request to delete a `Timecard`. The response might + contain a set of + + `Error` objects if the request resulted in errors. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + DeleteWebhookSubscriptionResponse: + docs: >- + Defines the fields that are included in the response body of + + a request to the + [DeleteWebhookSubscription](api-endpoint:WebhookSubscriptions-DeleteWebhookSubscription) + endpoint. + properties: + errors: + type: optional> + docs: Information on errors encountered during the request. + source: + openapi: openapi/openapi.json + Destination: + docs: Information about the destination against which the payout was made. + properties: + type: + type: optional + docs: |- + Type of the destination such as a bank account or debit card. + See [DestinationType](#type-destinationtype) for possible values + id: + type: optional + docs: >- + Square issued unique ID (also known as the instrument ID) associated + with this destination. + source: + openapi: openapi/openapi.json + DestinationDetails: + docs: Details about a refund's destination. + properties: + card_details: + type: optional + docs: >- + Details about a card refund. Only populated if the destination_type is + `CARD`. + cash_details: + type: optional + docs: >- + Details about a cash refund. Only populated if the destination_type is + `CASH`. + external_details: + type: optional + docs: >- + Details about an external refund. Only populated if the + destination_type is `EXTERNAL`. + source: + openapi: openapi/openapi.json + DestinationDetailsCardRefundDetails: + properties: + card: + type: optional + docs: The card's non-confidential details. + entry_method: + type: optional> + docs: >- + The method used to enter the card's details for the refund. The method + can be + + `KEYED`, `SWIPED`, `EMV`, `ON_FILE`, or `CONTACTLESS`. + validation: + maxLength: 50 + auth_result_code: + type: optional> + docs: >- + The authorization code provided by the issuer when a refund is + approved. + validation: + maxLength: 10 + source: + openapi: openapi/openapi.json + DestinationDetailsCashRefundDetails: + docs: >- + Stores details about a cash refund. Contains only non-confidential + information. + properties: + seller_supplied_money: + type: Money + docs: The amount and currency of the money supplied by the seller. + change_back_money: + type: optional + docs: |- + The amount of change due back to the seller. + This read-only field is calculated + from the `amount_money` and `seller_supplied_money` fields. + source: + openapi: openapi/openapi.json + DestinationDetailsExternalRefundDetails: + docs: >- + Stores details about an external refund. Contains only non-confidential + information. + properties: + type: + type: string + docs: >- + The type of external refund the seller paid to the buyer. It can be + one of the + + following: + + - CHECK - Refunded using a physical check. + + - BANK_TRANSFER - Refunded using external bank transfer. + + - OTHER\_GIFT\_CARD - Refunded using a non-Square gift card. + + - CRYPTO - Refunded using a crypto currency. + + - SQUARE_CASH - Refunded using Square Cash App. + + - SOCIAL - Refunded using peer-to-peer payment applications. + + - EXTERNAL - A third-party application gathered this refund outside of + Square. + + - EMONEY - Refunded using an E-money provider. + + - CARD - A credit or debit card that Square does not support. + + - STORED_BALANCE - Use for house accounts, store credit, and so forth. + + - FOOD_VOUCHER - Restaurant voucher provided by employers to employees + to pay for meals + + - OTHER - A type not listed here. + validation: + maxLength: 50 + source: + type: string + docs: |- + A description of the external refund source. For example, + "Food Delivery Service". + validation: + maxLength: 255 + source_id: + type: optional> + docs: An ID to associate the refund to its originating source. + validation: + maxLength: 255 + source: + openapi: openapi/openapi.json + DestinationType: + enum: + - BANK_ACCOUNT + - CARD + - SQUARE_BALANCE + - SQUARE_STORED_BALANCE + docs: List of possible destinations against which a payout can be made. + source: + openapi: openapi/openapi.json + Device: + properties: + id: + type: optional + docs: >- + A synthetic identifier for the device. The identifier includes a + standardized prefix and + + is otherwise an opaque id generated from key device fields. + access: read-only + attributes: + type: DeviceAttributes + docs: A collection of DeviceAttributes representing the device. + components: + type: optional>> + docs: A list of components applicable to the device. + status: + type: optional + docs: The current status of the device. + source: + openapi: openapi/openapi.json + DeviceAttributes: + properties: + type: + type: DeviceAttributesDeviceType + docs: |- + The device type. + See [DeviceType](#type-devicetype) for possible values + manufacturer: + type: string + docs: The maker of the device. + model: + type: optional> + docs: The specific model of the device. + name: + type: optional> + docs: A seller-specified name for the device. + manufacturers_id: + type: optional> + docs: >- + The manufacturer-supplied identifier for the device (where available). + In many cases, + + this identifier will be a serial number. + updated_at: + type: optional + docs: >- + The RFC 3339-formatted value of the most recent update to the device + information. + + (Could represent any field update on the device.) + version: + type: optional + docs: The current version of software installed on the device. + merchant_token: + type: optional> + docs: The merchant_token identifying the merchant controlling the device. + source: + openapi: openapi/openapi.json + DeviceAttributesDeviceType: + type: literal<"TERMINAL"> + docs: An enum identifier of the device type. + DeviceCheckoutOptions: + properties: + device_id: + type: string + docs: >- + The unique ID of the device intended for this `TerminalCheckout`. + + A list of `DeviceCode` objects can be retrieved from the + /v2/devices/codes endpoint. + + Match a `DeviceCode.device_id` value with `device_id` to get the + associated device code. + skip_receipt_screen: + type: optional> + docs: Instructs the device to skip the receipt screen. Defaults to false. + collect_signature: + type: optional> + docs: >- + Indicates that signature collection is desired during checkout. + Defaults to false. + tip_settings: + type: optional + docs: Tip-specific settings. + show_itemized_cart: + type: optional> + docs: >- + Show the itemization screen prior to taking a payment. This field is + only meaningful when the + + checkout includes an order ID. Defaults to true. + source: + openapi: openapi/openapi.json + DeviceCode: + properties: + id: + type: optional + docs: The unique id for this device code. + access: read-only + name: + type: optional> + docs: An optional user-defined name for the device code. + validation: + maxLength: 128 + code: + type: optional + docs: The unique code that can be used to login. + access: read-only + device_id: + type: optional + docs: >- + The unique id of the device that used this code. Populated when the + device is paired up. + access: read-only + product_type: + type: ProductType + docs: The targeting product type of the device code. + location_id: + type: optional> + docs: The location assigned to this code. + validation: + maxLength: 50 + status: + type: optional + docs: |- + The pairing status of the device code. + See [DeviceCodeStatus](#type-devicecodestatus) for possible values + pair_by: + type: optional + docs: >- + When this DeviceCode will expire and no longer login. Timestamp in RFC + 3339 format. + access: read-only + created_at: + type: optional + docs: When this DeviceCode was created. Timestamp in RFC 3339 format. + access: read-only + status_changed_at: + type: optional + docs: >- + When this DeviceCode's status was last changed. Timestamp in RFC 3339 + format. + access: read-only + paired_at: + type: optional + docs: When this DeviceCode was paired. Timestamp in RFC 3339 format. + access: read-only + source: + openapi: openapi/openapi.json + DeviceCodePairedEvent: + docs: |- + Published when a Square Terminal has been paired with a + Terminal API client and the device_id of the paired Square Terminal is + available. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + location_id: + type: optional> + docs: The ID of the target location associated with the event. + type: + type: optional> + docs: The type of event this represents, `"device.code.paired"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: RFC 3339 timestamp of when the event was created. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + DeviceCodePairedEventData: + properties: + type: + type: optional> + docs: Name of the paired object’s type, `"device_code"`. + id: + type: optional + docs: ID of the paired device code. + object: + type: optional + docs: An object containing the paired device code. + source: + openapi: openapi/openapi.json + DeviceCodePairedEventObject: + properties: + device_code: + type: optional + docs: The created terminal checkout + source: + openapi: openapi/openapi.json + DeviceCodeStatus: + enum: + - UNKNOWN + - UNPAIRED + - PAIRED + - EXPIRED + docs: DeviceCode.Status enum. + source: + openapi: openapi/openapi.json + DeviceComponentDetailsApplicationDetails: + properties: + application_type: + type: optional + docs: |- + The type of application. + See [ApplicationType](#type-applicationtype) for possible values + version: + type: optional + docs: The version of the application. + session_location: + type: optional> + docs: The location_id of the session for the application. + device_code_id: + type: optional> + docs: The id of the device code that was used to log in to the device. + source: + openapi: openapi/openapi.json + DeviceComponentDetailsBatteryDetails: + properties: + visible_percent: + type: optional> + docs: The battery charge percentage as displayed on the device. + external_power: + type: optional + docs: |- + The status of external_power. + See [ExternalPower](#type-externalpower) for possible values + source: + openapi: openapi/openapi.json + DeviceComponentDetailsCardReaderDetails: + properties: + version: + type: optional + docs: The version of the card reader. + source: + openapi: openapi/openapi.json + DeviceComponentDetailsEthernetDetails: + properties: + active: + type: optional> + docs: >- + A boolean to represent whether the Ethernet interface is currently + active. + ip_address_v4: + type: optional> + docs: The string representation of the device’s IPv4 address. + source: + openapi: openapi/openapi.json + DeviceComponentDetailsExternalPower: + enum: + - AVAILABLE_CHARGING + - AVAILABLE_NOT_IN_USE + - UNAVAILABLE + - AVAILABLE_INSUFFICIENT + docs: An enum for ExternalPower. + source: + openapi: openapi/openapi.json + DeviceComponentDetailsMeasurement: + docs: A value qualified by unit of measure. + properties: + value: optional> + source: + openapi: openapi/openapi.json + DeviceComponentDetailsWiFiDetails: + properties: + active: + type: optional> + docs: A boolean to represent whether the WiFI interface is currently active. + ssid: + type: optional> + docs: The name of the connected WIFI network. + ip_address_v4: + type: optional> + docs: The string representation of the device’s IPv4 address. + secure_connection: + type: optional> + docs: >- + The security protocol for a secure connection (e.g. WPA2). None + provided if the connection + + is unsecured. + signal_strength: + type: optional + docs: A representation of signal strength of the WIFI network connection. + source: + openapi: openapi/openapi.json + DeviceCreatedEvent: + docs: Published when a Device is created. + properties: + merchant_id: + type: optional> + docs: The merchant the newly created device belongs to. + type: + type: optional> + docs: The type of event this represents. The value is `"device.created"`. + event_id: + type: optional> + docs: A UUID that uniquely identifies this device creation event. + created_at: + type: optional + docs: >- + The time when the device creation event was first created, in RFC 3339 + format. + access: read-only + data: + type: optional + docs: The metadata associated with the device creation event. + source: + openapi: openapi/openapi.json + DeviceCreatedEventData: + properties: + type: + type: optional> + docs: The type of the event data object. The value is `"device"`. + id: + type: optional + docs: The ID of the device. + object: + type: optional + docs: An object containing the created device. + source: + openapi: openapi/openapi.json + DeviceCreatedEventObject: + properties: + device: + type: optional + docs: The created device. + source: + openapi: openapi/openapi.json + DeviceDetails: + docs: Details about the device that took the payment. + properties: + device_id: + type: optional> + docs: The Square-issued ID of the device. + validation: + maxLength: 255 + device_installation_id: + type: optional> + docs: The Square-issued installation ID for the device. + validation: + maxLength: 255 + device_name: + type: optional> + docs: The name of the device set by the seller. + validation: + maxLength: 255 + source: + openapi: openapi/openapi.json + DeviceMetadata: + properties: + battery_percentage: + type: optional> + docs: The Terminal’s remaining battery percentage, between 1-100. + charging_state: + type: optional> + docs: |- + The current charging state of the Terminal. + Options: `CHARGING`, `NOT_CHARGING` + location_id: + type: optional> + docs: >- + The ID of the Square seller business location associated with the + Terminal. + merchant_id: + type: optional> + docs: >- + The ID of the Square merchant account that is currently signed-in to + the Terminal. + network_connection_type: + type: optional> + docs: |- + The Terminal’s current network connection type. + Options: `WIFI`, `ETHERNET` + payment_region: + type: optional> + docs: The country in which the Terminal is authorized to take payments. + serial_number: + type: optional> + docs: >- + The unique identifier assigned to the Terminal, which can be found on + the lower back + + of the device. + os_version: + type: optional> + docs: The current version of the Terminal’s operating system. + app_version: + type: optional> + docs: The current version of the application running on the Terminal. + wifi_network_name: + type: optional> + docs: The name of the Wi-Fi network to which the Terminal is connected. + wifi_network_strength: + type: optional> + docs: |- + The signal strength of the Wi-FI network connection. + Options: `POOR`, `FAIR`, `GOOD`, `EXCELLENT` + ip_address: + type: optional> + docs: The IP address of the Terminal. + source: + openapi: openapi/openapi.json + DeviceStatus: + properties: + category: + type: optional + docs: |- + + See [Category](#type-category) for possible values + source: + openapi: openapi/openapi.json + DeviceStatusCategory: + enum: + - AVAILABLE + - NEEDS_ATTENTION + - OFFLINE + source: + openapi: openapi/openapi.json + DigitalWalletDetails: + docs: >- + Additional details about `WALLET` type payments. Contains only + non-confidential information. + properties: + status: + type: optional> + docs: >- + The status of the `WALLET` payment. The status can be `AUTHORIZED`, + `CAPTURED`, `VOIDED`, or + + `FAILED`. + validation: + maxLength: 50 + brand: + type: optional> + docs: >- + The brand used for the `WALLET` payment. The brand can be `CASH_APP`, + `PAYPAY`, `ALIPAY`, + + `RAKUTEN_PAY`, `AU_PAY`, `D_BARAI`, `MERPAY`, `WECHAT_PAY` or + `UNKNOWN`. + validation: + maxLength: 50 + cash_app_details: + type: optional + docs: Brand-specific details for payments with the `brand` of `CASH_APP`. + source: + openapi: openapi/openapi.json + DisableCardResponse: + docs: >- + Defines the fields that are included in the response body of + + a request to the [DisableCard](api-endpoint:Cards-DisableCard) endpoint. + + + Note: if there are errors processing the request, the card field will not + be + + present. + properties: + errors: + type: optional> + docs: Information on errors encountered during the request. + card: + type: optional + docs: The retrieved card. + source: + openapi: openapi/openapi.json + DisableEventsResponse: + docs: >- + Defines the fields that are included in the response body of + + a request to the [DisableEvents](api-endpoint:Events-DisableEvents) + endpoint. + + + Note: if there are errors processing the request, the events field will + not be + + present. + properties: + errors: + type: optional> + docs: Information on errors encountered during the request. + source: + openapi: openapi/openapi.json + DismissTerminalActionResponse: + properties: + errors: + type: optional> + docs: Information on errors encountered during the request. + action: + type: optional + docs: Current state of the action to be dismissed. + source: + openapi: openapi/openapi.json + DismissTerminalCheckoutResponse: + properties: + errors: + type: optional> + docs: Information on errors encountered during the request. + checkout: + type: optional + docs: Current state of the checkout to be dismissed. + source: + openapi: openapi/openapi.json + DismissTerminalRefundResponse: + properties: + errors: + type: optional> + docs: Information on errors encountered during the request. + refund: + type: optional + docs: Current state of the refund to be dismissed. + source: + openapi: openapi/openapi.json + Dispute: + docs: >- + Represents a + [dispute](https://developer.squareup.com/docs/disputes-api/overview) a + cardholder initiated with their bank. + properties: + dispute_id: + type: optional> + docs: The unique ID for this `Dispute`, generated by Square. + validation: + minLength: 1 + maxLength: 40 + id: + type: optional + docs: The unique ID for this `Dispute`, generated by Square. + validation: + minLength: 1 + maxLength: 40 + amount_money: + type: optional + docs: >- + The disputed amount, which can be less than the total transaction + amount. + + For instance, if multiple items were purchased but the cardholder only + initiates a dispute over some of the items. + reason: + type: optional + docs: |- + The reason why the cardholder initiated the dispute. + See [DisputeReason](#type-disputereason) for possible values + state: + type: optional + docs: |- + The current state of this dispute. + See [DisputeState](#type-disputestate) for possible values + due_at: + type: optional> + docs: >- + The deadline by which the seller must respond to the dispute, in [RFC + 3339 + format](https://developer.squareup.com/docs/build-basics/common-data-types/working-with-dates). + validation: + minLength: 1 + maxLength: 40 + disputed_payment: + type: optional + docs: The payment challenged in this dispute. + evidence_ids: + type: optional>> + docs: The IDs of the evidence associated with the dispute. + card_brand: + type: optional + docs: |- + The card brand used in the disputed payment. + See [CardBrand](#type-cardbrand) for possible values + created_at: + type: optional + docs: The timestamp when the dispute was created, in RFC 3339 format. + validation: + minLength: 1 + maxLength: 40 + access: read-only + updated_at: + type: optional + docs: The timestamp when the dispute was last updated, in RFC 3339 format. + validation: + minLength: 1 + maxLength: 40 + access: read-only + brand_dispute_id: + type: optional> + docs: >- + The ID of the dispute in the card brand system, generated by the card + brand. + validation: + minLength: 1 + maxLength: 40 + reported_date: + type: optional> + docs: The timestamp when the dispute was reported, in RFC 3339 format. + validation: + minLength: 1 + maxLength: 40 + reported_at: + type: optional> + docs: The timestamp when the dispute was reported, in RFC 3339 format. + validation: + minLength: 1 + maxLength: 40 + version: + type: optional + docs: The current version of the `Dispute`. + location_id: + type: optional> + docs: The ID of the location where the dispute originated. + validation: + minLength: 1 + maxLength: 40 + source: + openapi: openapi/openapi.json + DisputeCreatedEvent: + docs: Published when a [Dispute](entity:Dispute) is created. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + location_id: + type: optional> + docs: The ID of the target location associated with the event. + type: + type: optional> + docs: The type of event this represents. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + DisputeCreatedEventData: + properties: + type: + type: optional> + docs: Name of the affected dispute's type. + id: + type: optional + docs: ID of the affected dispute. + object: + type: optional + docs: An object containing fields and values relevant to the event. + source: + openapi: openapi/openapi.json + DisputeCreatedEventObject: + properties: + object: + type: optional + docs: The dispute object. + source: + openapi: openapi/openapi.json + DisputeEvidence: + properties: + evidence_id: + type: optional> + docs: The Square-generated ID of the evidence. + validation: + minLength: 1 + maxLength: 40 + id: + type: optional + docs: The Square-generated ID of the evidence. + validation: + minLength: 1 + maxLength: 40 + dispute_id: + type: optional> + docs: The ID of the dispute the evidence is associated with. + validation: + minLength: 1 + maxLength: 40 + evidence_file: + type: optional + docs: Image, PDF, TXT + evidence_text: + type: optional> + docs: Raw text + validation: + minLength: 1 + maxLength: 500 + uploaded_at: + type: optional> + docs: The time when the evidence was uploaded, in RFC 3339 format. + validation: + minLength: 1 + maxLength: 40 + evidence_type: + type: optional + docs: >- + The type of the evidence. + + See [DisputeEvidenceType](#type-disputeevidencetype) for possible + values + source: + openapi: openapi/openapi.json + DisputeEvidenceAddedEvent: + docs: >- + Published when evidence is added to a [Dispute](entity:Dispute) + + from the Disputes Dashboard in the Seller Dashboard, the Square Point of + Sale app, + + or by calling either + [CreateDisputeEvidenceFile](api-endpoint:Disputes-CreateDisputeEvidenceFile) + or + [CreateDisputeEvidenceText](api-endpoint:Disputes-CreateDisputeEvidenceText). + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + location_id: + type: optional> + docs: The ID of the target location associated with the event. + type: + type: optional> + docs: The type of event this represents. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + DisputeEvidenceAddedEventData: + properties: + type: + type: optional> + docs: Name of the affected dispute's type. + id: + type: optional + docs: ID of the affected dispute. + object: + type: optional + docs: An object containing fields and values relevant to the event. + source: + openapi: openapi/openapi.json + DisputeEvidenceAddedEventObject: + properties: + object: + type: optional + docs: The dispute object. + source: + openapi: openapi/openapi.json + DisputeEvidenceCreatedEvent: + docs: >- + Published when evidence is added to a [Dispute](entity:Dispute) + + from the Disputes Dashboard in the Seller Dashboard, the Square Point of + Sale app, + + or by calling either + [CreateDisputeEvidenceFile](api-endpoint:Disputes-CreateDisputeEvidenceFile) + or + [CreateDisputeEvidenceText](api-endpoint:Disputes-CreateDisputeEvidenceText). + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + location_id: + type: optional> + docs: The ID of the target location associated with the event. + type: + type: optional> + docs: The type of event this represents. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + DisputeEvidenceCreatedEventData: + properties: + type: + type: optional> + docs: Name of the affected dispute's type. + id: + type: optional + docs: ID of the affected dispute. + object: + type: optional + docs: An object containing fields and values relevant to the event. + source: + openapi: openapi/openapi.json + DisputeEvidenceCreatedEventObject: + properties: + object: + type: optional + docs: The dispute object. + source: + openapi: openapi/openapi.json + DisputeEvidenceDeletedEvent: + docs: >- + Published when evidence is removed from a [Dispute](entity:Dispute) + + from the Disputes Dashboard in the Seller Dashboard, the Square Point of + Sale app, + + or by calling + [DeleteDisputeEvidence](api-endpoint:Disputes-DeleteDisputeEvidence). + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + location_id: + type: optional> + docs: The ID of the target location associated with the event. + type: + type: optional> + docs: The type of event this represents. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + DisputeEvidenceDeletedEventData: + properties: + type: + type: optional> + docs: Name of the affected dispute's type. + id: + type: optional + docs: ID of the affected dispute. + object: + type: optional + docs: An object containing fields and values relevant to the event. + source: + openapi: openapi/openapi.json + DisputeEvidenceDeletedEventObject: + properties: + object: + type: optional + docs: The dispute object. + source: + openapi: openapi/openapi.json + DisputeEvidenceFile: + docs: A file to be uploaded as dispute evidence. + properties: + filename: + type: optional> + docs: >- + The file name including the file extension. For example: + "receipt.tiff". + validation: + minLength: 1 + maxLength: 40 + filetype: + type: optional> + docs: >- + Dispute evidence files must be application/pdf, image/heic, + image/heif, image/jpeg, image/png, or image/tiff formats. + validation: + minLength: 1 + maxLength: 40 + source: + openapi: openapi/openapi.json + DisputeEvidenceRemovedEvent: + docs: >- + Published when evidence is removed from a [Dispute](entity:Dispute) + + from the Disputes Dashboard in the Seller Dashboard, the Square Point of + Sale app, + + or by calling + [DeleteDisputeEvidence](api-endpoint:Disputes-DeleteDisputeEvidence). + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + location_id: + type: optional> + docs: The ID of the target location associated with the event. + type: + type: optional> + docs: The type of event this represents. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + DisputeEvidenceRemovedEventData: + properties: + type: + type: optional> + docs: Name of the affected dispute's type. + id: + type: optional + docs: ID of the affected dispute. + object: + type: optional + docs: An object containing fields and values relevant to the event. + source: + openapi: openapi/openapi.json + DisputeEvidenceRemovedEventObject: + properties: + object: + type: optional + docs: The dispute object. + source: + openapi: openapi/openapi.json + DisputeEvidenceType: + enum: + - GENERIC_EVIDENCE + - ONLINE_OR_APP_ACCESS_LOG + - AUTHORIZATION_DOCUMENTATION + - CANCELLATION_OR_REFUND_DOCUMENTATION + - CARDHOLDER_COMMUNICATION + - CARDHOLDER_INFORMATION + - PURCHASE_ACKNOWLEDGEMENT + - DUPLICATE_CHARGE_DOCUMENTATION + - PRODUCT_OR_SERVICE_DESCRIPTION + - RECEIPT + - SERVICE_RECEIVED_DOCUMENTATION + - PROOF_OF_DELIVERY_DOCUMENTATION + - RELATED_TRANSACTION_DOCUMENTATION + - REBUTTAL_EXPLANATION + - TRACKING_NUMBER + docs: The type of the dispute evidence. + source: + openapi: openapi/openapi.json + DisputeReason: + enum: + - AMOUNT_DIFFERS + - CANCELLED + - DUPLICATE + - NO_KNOWLEDGE + - NOT_AS_DESCRIBED + - NOT_RECEIVED + - PAID_BY_OTHER_MEANS + - CUSTOMER_REQUESTS_CREDIT + - EMV_LIABILITY_SHIFT + docs: |- + The list of possible reasons why a cardholder might initiate a + dispute with their bank. + source: + openapi: openapi/openapi.json + DisputeState: + enum: + - INQUIRY_EVIDENCE_REQUIRED + - INQUIRY_PROCESSING + - INQUIRY_CLOSED + - EVIDENCE_REQUIRED + - PROCESSING + - WON + - LOST + - ACCEPTED + docs: The list of possible dispute states. + source: + openapi: openapi/openapi.json + DisputeStateChangedEvent: + docs: >- + Published when the state of a [Dispute](entity:Dispute) changes. + + This includes the dispute resolution (WON, LOST) reported by the bank. The + event + + data includes details of what changed. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + location_id: + type: optional> + docs: The ID of the target location associated with the event. + type: + type: optional> + docs: The type of event this represents. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + DisputeStateChangedEventData: properties: - errors: - type: optional> - docs: Information about errors encountered during the request. + type: + type: optional> + docs: Name of the affected dispute's type. + id: + type: optional + docs: ID of the affected dispute. + object: + type: optional + docs: An object containing fields and values relevant to the event. source: openapi: openapi/openapi.json - DeleteInvoiceResponse: - docs: Describes a `DeleteInvoice` response. + DisputeStateChangedEventObject: properties: - errors: - type: optional> - docs: Information about errors encountered during the request. + object: + type: optional + docs: The dispute object. source: openapi: openapi/openapi.json - DeleteLocationCustomAttributeDefinitionResponse: + DisputeStateUpdatedEvent: docs: >- - Represents a response from a delete request containing error messages if - there are any. + Published when the state of a [Dispute](entity:Dispute) changes. + + This includes the dispute resolution (WON, LOST) reported by the bank. The + event + + data includes details of what changed. properties: - errors: - type: optional> - docs: Any errors that occurred during the request. + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + location_id: + type: optional> + docs: The ID of the target location associated with the event. + type: + type: optional> + docs: The type of event this represents. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. source: openapi: openapi/openapi.json - DeleteLocationCustomAttributeResponse: + DisputeStateUpdatedEventData: + properties: + type: + type: optional> + docs: Name of the affected dispute's type. + id: + type: optional + docs: ID of the affected dispute. + object: + type: optional + docs: An object containing fields and values relevant to the event. + source: + openapi: openapi/openapi.json + DisputeStateUpdatedEventObject: + properties: + object: + type: optional + docs: The dispute object. + source: + openapi: openapi/openapi.json + DisputedPayment: + docs: The payment the cardholder disputed. + properties: + payment_id: + type: optional> + docs: Square-generated unique ID of the payment being disputed. + validation: + minLength: 1 + maxLength: 192 + source: + openapi: openapi/openapi.json + EcomVisibility: + enum: + - UNINDEXED + - UNAVAILABLE + - HIDDEN + - VISIBLE + docs: Determines item visibility in Ecom (Online Store) and Online Checkout. + source: + openapi: openapi/openapi.json + Employee: docs: >- - Represents a - [DeleteLocationCustomAttribute](api-endpoint:LocationCustomAttributes-DeleteLocationCustomAttribute) - response. + An employee object that is used by the external API. - Either an empty object `{}` (for a successful deletion) or `errors` is - present in the response. + + DEPRECATED at version 2020-08-26. Replaced by + [TeamMember](entity:TeamMember). properties: - errors: - type: optional> - docs: Any errors that occurred during the request. + id: + type: optional + docs: UUID for this object. + first_name: + type: optional> + docs: The employee's first name. + last_name: + type: optional> + docs: The employee's last name. + email: + type: optional> + docs: The employee's email address + phone_number: + type: optional> + docs: The employee's phone number in E.164 format, i.e. "+12125554250" + location_ids: + type: optional>> + docs: A list of location IDs where this employee has access to. + status: + type: optional + docs: |- + Specifies the status of the employees being fetched. + See [EmployeeStatus](#type-employeestatus) for possible values + is_owner: + type: optional> + docs: |- + Whether this employee is the owner of the merchant. Each merchant + has one owner employee, and that employee has full authority over + the account. + created_at: + type: optional + docs: A read-only timestamp in RFC 3339 format. + access: read-only + updated_at: + type: optional + docs: A read-only timestamp in RFC 3339 format. + access: read-only source: openapi: openapi/openapi.json - DeleteLoyaltyRewardResponse: - docs: A response returned by the API call. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. + EmployeeStatus: + enum: + - ACTIVE + - INACTIVE + docs: >- + The status of the Employee being retrieved. + + + DEPRECATED at version 2020-08-26. Replaced by + [TeamMemberStatus](entity:TeamMemberStatus). source: openapi: openapi/openapi.json - DeleteMerchantCustomAttributeDefinitionResponse: + EmployeeWage: docs: >- - Represents a response from a delete request containing error messages if - there are any. + The hourly wage rate that an employee earns on a `Shift` for doing the job + specified by the `title` property of this object. Deprecated at version + 2020-08-26. Use [TeamMemberWage](entity:TeamMemberWage). properties: - errors: - type: optional> - docs: Any errors that occurred during the request. + id: + type: optional + docs: The UUID for this object. + employee_id: + type: optional> + docs: The `Employee` that this wage is assigned to. + title: + type: optional> + docs: The job title that this wage relates to. + hourly_rate: + type: optional + docs: |- + Can be a custom-set hourly wage or the calculated effective hourly + wage based on the annual wage and hours worked per week. source: openapi: openapi/openapi.json - DeleteMerchantCustomAttributeResponse: + EnableEventsResponse: docs: >- - Represents a - [DeleteMerchantCustomAttribute](api-endpoint:MerchantCustomAttributes-DeleteMerchantCustomAttribute) - response. + Defines the fields that are included in the response body of - Either an empty object `{}` (for a successful deletion) or `errors` is - present in the response. + a request to the [EnableEvents](api-endpoint:Events-EnableEvents) + endpoint. + + + Note: if there are errors processing the request, the events field will + not be + + present. properties: errors: type: optional> - docs: Any errors that occurred during the request. + docs: Information on errors encountered during the request. source: openapi: openapi/openapi.json - DeleteOrderCustomAttributeDefinitionResponse: - docs: Represents a response from deleting an order custom attribute definition. + Error: + docs: >- + Represents an error encountered during a request to the Connect API. + + + See [Handling + errors](https://developer.squareup.com/docs/build-basics/handling-errors) + for more information. properties: - errors: - type: optional> - docs: Any errors that occurred during the request. + category: + type: ErrorCategory + docs: |- + The high-level category for the error. + See [ErrorCategory](#type-errorcategory) for possible values + code: + type: ErrorCode + docs: |- + The specific code of the error. + See [ErrorCode](#type-errorcode) for possible values + detail: + type: optional + docs: A human-readable description of the error for debugging purposes. + field: + type: optional + docs: |- + The name of the field provided in the original request (if any) that + the error pertains to. + source: + openapi: openapi/openapi.json + ErrorCategory: + enum: + - API_ERROR + - AUTHENTICATION_ERROR + - INVALID_REQUEST_ERROR + - RATE_LIMIT_ERROR + - PAYMENT_METHOD_ERROR + - REFUND_ERROR + - MERCHANT_SUBSCRIPTION_ERROR + - EXTERNAL_VENDOR_ERROR + docs: |- + Indicates which high-level category of error has occurred during a + request to the Connect API. + source: + openapi: openapi/openapi.json + ErrorCode: + enum: + - INTERNAL_SERVER_ERROR + - UNAUTHORIZED + - ACCESS_TOKEN_EXPIRED + - ACCESS_TOKEN_REVOKED + - CLIENT_DISABLED + - FORBIDDEN + - INSUFFICIENT_SCOPES + - APPLICATION_DISABLED + - V1_APPLICATION + - V1_ACCESS_TOKEN + - CARD_PROCESSING_NOT_ENABLED + - MERCHANT_SUBSCRIPTION_NOT_FOUND + - BAD_REQUEST + - MISSING_REQUIRED_PARAMETER + - INCORRECT_TYPE + - INVALID_TIME + - INVALID_TIME_RANGE + - INVALID_VALUE + - INVALID_CURSOR + - UNKNOWN_QUERY_PARAMETER + - CONFLICTING_PARAMETERS + - EXPECTED_JSON_BODY + - INVALID_SORT_ORDER + - VALUE_REGEX_MISMATCH + - VALUE_TOO_SHORT + - VALUE_TOO_LONG + - VALUE_TOO_LOW + - VALUE_TOO_HIGH + - VALUE_EMPTY + - ARRAY_LENGTH_TOO_LONG + - ARRAY_LENGTH_TOO_SHORT + - ARRAY_EMPTY + - EXPECTED_BOOLEAN + - EXPECTED_INTEGER + - EXPECTED_FLOAT + - EXPECTED_STRING + - EXPECTED_OBJECT + - EXPECTED_ARRAY + - EXPECTED_MAP + - EXPECTED_BASE64_ENCODED_BYTE_ARRAY + - INVALID_ARRAY_VALUE + - INVALID_ENUM_VALUE + - INVALID_CONTENT_TYPE + - INVALID_FORM_VALUE + - CUSTOMER_NOT_FOUND + - ONE_INSTRUMENT_EXPECTED + - NO_FIELDS_SET + - TOO_MANY_MAP_ENTRIES + - MAP_KEY_LENGTH_TOO_SHORT + - MAP_KEY_LENGTH_TOO_LONG + - CUSTOMER_MISSING_NAME + - CUSTOMER_MISSING_EMAIL + - INVALID_PAUSE_LENGTH + - INVALID_DATE + - UNSUPPORTED_COUNTRY + - UNSUPPORTED_CURRENCY + - APPLE_TTP_PIN_TOKEN + - CARD_EXPIRED + - INVALID_EXPIRATION + - INVALID_EXPIRATION_YEAR + - INVALID_EXPIRATION_DATE + - UNSUPPORTED_CARD_BRAND + - UNSUPPORTED_ENTRY_METHOD + - INVALID_ENCRYPTED_CARD + - INVALID_CARD + - PAYMENT_AMOUNT_MISMATCH + - GENERIC_DECLINE + - CVV_FAILURE + - ADDRESS_VERIFICATION_FAILURE + - INVALID_ACCOUNT + - CURRENCY_MISMATCH + - INSUFFICIENT_FUNDS + - INSUFFICIENT_PERMISSIONS + - CARDHOLDER_INSUFFICIENT_PERMISSIONS + - INVALID_LOCATION + - TRANSACTION_LIMIT + - VOICE_FAILURE + - PAN_FAILURE + - EXPIRATION_FAILURE + - CARD_NOT_SUPPORTED + - READER_DECLINED + - INVALID_PIN + - MISSING_PIN + - MISSING_ACCOUNT_TYPE + - INVALID_POSTAL_CODE + - INVALID_FEES + - MANUALLY_ENTERED_PAYMENT_NOT_SUPPORTED + - PAYMENT_LIMIT_EXCEEDED + - GIFT_CARD_AVAILABLE_AMOUNT + - ACCOUNT_UNUSABLE + - BUYER_REFUSED_PAYMENT + - DELAYED_TRANSACTION_EXPIRED + - DELAYED_TRANSACTION_CANCELED + - DELAYED_TRANSACTION_CAPTURED + - DELAYED_TRANSACTION_FAILED + - CARD_TOKEN_EXPIRED + - CARD_TOKEN_USED + - AMOUNT_TOO_HIGH + - UNSUPPORTED_INSTRUMENT_TYPE + - REFUND_AMOUNT_INVALID + - REFUND_ALREADY_PENDING + - PAYMENT_NOT_REFUNDABLE + - PAYMENT_NOT_REFUNDABLE_DUE_TO_DISPUTE + - REFUND_ERROR_PAYMENT_NEEDS_COMPLETION + - REFUND_DECLINED + - INSUFFICIENT_PERMISSIONS_FOR_REFUND + - INVALID_CARD_DATA + - SOURCE_USED + - SOURCE_EXPIRED + - UNSUPPORTED_LOYALTY_REWARD_TIER + - LOCATION_MISMATCH + - ORDER_UNPAID_NOT_RETURNABLE + - IDEMPOTENCY_KEY_REUSED + - UNEXPECTED_VALUE + - SANDBOX_NOT_SUPPORTED + - INVALID_EMAIL_ADDRESS + - INVALID_PHONE_NUMBER + - CHECKOUT_EXPIRED + - BAD_CERTIFICATE + - INVALID_SQUARE_VERSION_FORMAT + - API_VERSION_INCOMPATIBLE + - CARD_PRESENCE_REQUIRED + - UNSUPPORTED_SOURCE_TYPE + - CARD_MISMATCH + - PLAID_ERROR + - PLAID_ERROR_ITEM_LOGIN_REQUIRED + - PLAID_ERROR_RATE_LIMIT + - CARD_DECLINED + - VERIFY_CVV_FAILURE + - VERIFY_AVS_FAILURE + - CARD_DECLINED_CALL_ISSUER + - CARD_DECLINED_VERIFICATION_REQUIRED + - BAD_EXPIRATION + - CHIP_INSERTION_REQUIRED + - ALLOWABLE_PIN_TRIES_EXCEEDED + - RESERVATION_DECLINED + - UNKNOWN_BODY_PARAMETER + - NOT_FOUND + - APPLE_PAYMENT_PROCESSING_CERTIFICATE_HASH_NOT_FOUND + - METHOD_NOT_ALLOWED + - NOT_ACCEPTABLE + - REQUEST_TIMEOUT + - CONFLICT + - GONE + - REQUEST_ENTITY_TOO_LARGE + - UNSUPPORTED_MEDIA_TYPE + - UNPROCESSABLE_ENTITY + - RATE_LIMITED + - NOT_IMPLEMENTED + - BAD_GATEWAY + - SERVICE_UNAVAILABLE + - TEMPORARY_ERROR + - GATEWAY_TIMEOUT + docs: |- + Indicates the specific error that occurred during a request to a + Square API. source: openapi: openapi/openapi.json - DeleteOrderCustomAttributeResponse: - docs: Represents a response from deleting an order custom attribute. + Event: properties: - errors: - type: optional> - docs: Any errors that occurred during the request. + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + location_id: + type: optional> + docs: The ID of the target location associated with the event. + type: + type: optional> + docs: The type of event this represents. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. source: openapi: openapi/openapi.json - DeletePaymentLinkResponse: + EventData: properties: - errors: optional> + type: + type: optional> + docs: The name of the affected object’s type. id: type: optional - docs: The ID of the link that is deleted. - cancelled_order_id: - type: optional + docs: The ID of the affected object. + deleted: + type: optional> docs: >- - The ID of the order that is canceled. When a payment link is deleted, - Square updates the - - the `state` (of the order that the checkout link created) to CANCELED. - source: - openapi: openapi/openapi.json - DeleteShiftResponse: - docs: >- - The response to a request to delete a `Shift`. The response might contain - a set of - - `Error` objects if the request resulted in errors. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: openapi/openapi.json - DeleteSnippetResponse: - docs: Represents a `DeleteSnippet` response. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: openapi/openapi.json - DeleteSubscriptionActionResponse: - docs: >- - Defines output parameters in a response of the - [DeleteSubscriptionAction](api-endpoint:Subscriptions-DeleteSubscriptionAction) - - endpoint. - properties: - errors: - type: optional> - docs: Errors encountered during the request. - subscription: - type: optional - docs: The subscription that has the specified action deleted. - source: - openapi: openapi/openapi.json - DeleteTimecardResponse: - docs: >- - The response to a request to delete a `Timecard`. The response might - contain a set of - - `Error` objects if the request resulted in errors. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. + This is true if the affected object has been deleted; otherwise, it's + absent. + object: + type: optional>> + docs: >- + An object containing fields and values relevant to the event. It is + absent if the affected object has been deleted. source: openapi: openapi/openapi.json - DeleteWebhookSubscriptionResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the - [DeleteWebhookSubscription](api-endpoint:WebhookSubscriptions-DeleteWebhookSubscription) - endpoint. + EventMetadata: + docs: Contains metadata about a particular [Event](entity:Event). properties: - errors: - type: optional> - docs: Information on errors encountered during the request. + event_id: + type: optional> + docs: A unique ID for the event. + api_version: + type: optional> + docs: >- + The API version of the event. This corresponds to the default API + version of the developer application at the time when the event was + created. source: openapi: openapi/openapi.json - Destination: - docs: Information about the destination against which the payout was made. + EventTypeMetadata: + docs: Contains the metadata of a webhook event type. properties: - type: - type: optional - docs: |- - Type of the destination such as a bank account or debit card. - See [DestinationType](#type-destinationtype) for possible values - id: + event_type: type: optional - docs: >- - Square issued unique ID (also known as the instrument ID) associated - with this destination. + docs: The event type. + access: read-only + api_version_introduced: + type: optional + docs: The API version at which the event type was introduced. + access: read-only + release_status: + type: optional + docs: The release status of the event type. + access: read-only source: openapi: openapi/openapi.json - DestinationDetails: - docs: Details about a refund's destination. - properties: - card_details: - type: optional - docs: >- - Details about a card refund. Only populated if the destination_type is - `CARD`. - cash_details: - type: optional - docs: >- - Details about a cash refund. Only populated if the destination_type is - `CASH`. - external_details: - type: optional - docs: >- - Details about an external refund. Only populated if the - destination_type is `EXTERNAL`. + ExcludeStrategy: + enum: + - LEAST_EXPENSIVE + - MOST_EXPENSIVE + docs: |- + Indicates which products matched by a CatalogPricingRule + will be excluded if the pricing rule uses an exclude set. source: openapi: openapi/openapi.json - DestinationDetailsCardRefundDetails: + ExternalPaymentDetails: + docs: >- + Stores details about an external payment. Contains only non-confidential + information. + + For more information, see + + [Take External + Payments](https://developer.squareup.com/docs/payments-api/take-payments/external-payments). properties: - card: - type: optional - docs: The card's non-confidential details. - entry_method: - type: optional> + type: + type: string docs: >- - The method used to enter the card's details for the refund. The method - can be + The type of external payment the seller received. It can be one of the + following: - `KEYED`, `SWIPED`, `EMV`, `ON_FILE`, or `CONTACTLESS`. + - CHECK - Paid using a physical check. + + - BANK_TRANSFER - Paid using external bank transfer. + + - OTHER\_GIFT\_CARD - Paid using a non-Square gift card. + + - CRYPTO - Paid using a crypto currency. + + - SQUARE_CASH - Paid using Square Cash App. + + - SOCIAL - Paid using peer-to-peer payment applications. + + - EXTERNAL - A third-party application gathered this payment outside + of Square. + + - EMONEY - Paid using an E-money provider. + + - CARD - A credit or debit card that Square does not support. + + - STORED_BALANCE - Use for house accounts, store credit, and so forth. + + - FOOD_VOUCHER - Restaurant voucher provided by employers to employees + to pay for meals + + - OTHER - A type not listed here. validation: maxLength: 50 - auth_result_code: + source: + type: string + docs: |- + A description of the external payment source. For example, + "Food Delivery Service". + validation: + maxLength: 255 + source_id: type: optional> - docs: >- - The authorization code provided by the issuer when a refund is - approved. + docs: An ID to associate the payment to its originating source. validation: - maxLength: 10 + maxLength: 255 + source_fee_money: + type: optional + docs: |- + The fees paid to the source. The `amount_money` minus this field is + the net amount seller receives. source: openapi: openapi/openapi.json - DestinationDetailsCashRefundDetails: + FilterValue: docs: >- - Stores details about a cash refund. Contains only non-confidential - information. + A filter to select resources based on an exact field value. For any given + + value, the value can only be in one property. Depending on the field, + either + + all properties can be set or only a subset will be available. + + + Refer to the documentation of the field. properties: - seller_supplied_money: - type: Money - docs: The amount and currency of the money supplied by the seller. - change_back_money: - type: optional + all: + type: optional>> + docs: A list of terms that must be present on the field of the resource. + any: + type: optional>> docs: |- - The amount of change due back to the seller. - This read-only field is calculated - from the `amount_money` and `seller_supplied_money` fields. + A list of terms where at least one of them must be present on the + field of the resource. + none: + type: optional>> + docs: A list of terms that must not be present on the field the resource source: openapi: openapi/openapi.json - DestinationDetailsExternalRefundDetails: + FloatNumberRange: + docs: Specifies a decimal number range. + properties: + start_at: + type: optional> + docs: A decimal value indicating where the range starts. + end_at: + type: optional> + docs: A decimal value indicating where the range ends. + source: + openapi: openapi/openapi.json + Fulfillment: docs: >- - Stores details about an external refund. Contains only non-confidential - information. + Contains details about how to fulfill this order. + + Orders can only be created with at most one fulfillment using the API. + + However, orders returned by the Orders API might contain multiple + fulfillments because sellers can create multiple fulfillments using Square + products such as Square Online. properties: + uid: + type: optional> + docs: A unique ID that identifies the fulfillment only within this order. + validation: + maxLength: 60 type: - type: string + type: optional + docs: |- + The type of the fulfillment. + See [FulfillmentType](#type-fulfillmenttype) for possible values + state: + type: optional + docs: |- + The state of the fulfillment. + See [FulfillmentState](#type-fulfillmentstate) for possible values + line_item_application: + type: optional docs: >- - The type of external refund the seller paid to the buyer. It can be - one of the + Describes what order line items this fulfillment applies to. - following: + It can be `ALL` or `ENTRY_LIST` with a supplied list of fulfillment + entries. - - CHECK - Refunded using a physical check. + See + [FulfillmentFulfillmentLineItemApplication](#type-fulfillmentfulfillmentlineitemapplication) + for possible values + entries: + type: optional> + docs: >- + A list of entries pertaining to the fulfillment of an order. Each + entry must reference - - BANK_TRANSFER - Refunded using external bank transfer. + a valid `uid` for an order line item in the `line_item_uid` field, as + well as a `quantity` to + + fulfill. + + + Multiple entries can reference the same line item `uid`, as long as + the total quantity among + + all fulfillment entries referencing a single line item does not exceed + the quantity of the + + order's line item itself. + + + An order cannot be marked as `COMPLETED` before all fulfillments are + `COMPLETED`, + + `CANCELED`, or `FAILED`. Fulfillments can be created and completed + independently + + before order completion. + access: read-only + metadata: + type: optional>>>> + docs: >- + Application-defined data attached to this fulfillment. Metadata fields + are intended + + to store descriptive references or associations with an entity in + another system or store brief + + information about the object. Square does not process this field; it + only stores and returns it + + in relevant API calls. Do not use metadata to store any sensitive + information (such as personally + + identifiable information or card details). + + + Keys written by applications must be 60 characters or less and must be + in the character set + + `[a-zA-Z0-9_-]`. Entries can also include metadata generated by + Square. These keys are prefixed + + with a namespace, separated from the key with a ':' character. + + + Values have a maximum length of 255 characters. + + + An application can have up to 10 entries per metadata field. + + + Entries written by applications are private and can only be read or + modified by the same + + application. + + + For more information, see + [Metadata](https://developer.squareup.com/docs/build-basics/metadata). + pickup_details: + type: optional + docs: >- + Contains details for a pickup fulfillment. These details are required + when the fulfillment - - OTHER\_GIFT\_CARD - Refunded using a non-Square gift card. + type is `PICKUP`. + shipment_details: + type: optional + docs: >- + Contains details for a shipment fulfillment. These details are + required when the fulfillment type - - CRYPTO - Refunded using a crypto currency. + is `SHIPMENT`. - - SQUARE_CASH - Refunded using Square Cash App. - - SOCIAL - Refunded using peer-to-peer payment applications. + A shipment fulfillment's relationship to fulfillment `state`: - - EXTERNAL - A third-party application gathered this refund outside of - Square. + `PROPOSED`: A shipment is requested. - - EMONEY - Refunded using an E-money provider. + `RESERVED`: Fulfillment in progress. Shipment processing. - - CARD - A credit or debit card that Square does not support. + `PREPARED`: Shipment packaged. Shipping label created. - - STORED_BALANCE - Use for house accounts, store credit, and so forth. + `COMPLETED`: Package has been shipped. - - FOOD_VOUCHER - Restaurant voucher provided by employers to employees - to pay for meals + `CANCELED`: Shipment has been canceled. - - OTHER - A type not listed here. - validation: - maxLength: 50 - source: - type: string - docs: |- - A description of the external refund source. For example, - "Food Delivery Service". - validation: - maxLength: 255 - source_id: - type: optional> - docs: An ID to associate the refund to its originating source. - validation: - maxLength: 255 - source: - openapi: openapi/openapi.json - DestinationType: - enum: - - BANK_ACCOUNT - - CARD - - SQUARE_BALANCE - - SQUARE_STORED_BALANCE - docs: List of possible destinations against which a payout can be made. + `FAILED`: Shipment has failed. + delivery_details: + type: optional + docs: Describes delivery details of an order fulfillment. source: openapi: openapi/openapi.json - Device: + FulfillmentDeliveryDetails: + docs: Describes delivery details of an order fulfillment. properties: - id: + recipient: + type: optional + docs: The contact information for the person to receive the fulfillment. + schedule_type: + type: >- + optional + docs: >- + Indicates the fulfillment delivery schedule type. If `SCHEDULED`, then + + `deliver_at` is required. If `ASAP`, then `prep_time_duration` is + required. The default is `SCHEDULED`. + + See + [OrderFulfillmentDeliveryDetailsScheduleType](#type-orderfulfillmentdeliverydetailsscheduletype) + for possible values + placed_at: type: optional docs: >- - A synthetic identifier for the device. The identifier includes a - standardized prefix and + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - is otherwise an opaque id generated from key device fields. + indicating when the fulfillment was placed. + + The timestamp must be in RFC 3339 format (for example, + "2016-09-04T23:59:33.123Z"). + + + Must be in RFC 3339 timestamp format, e.g., + "2016-09-04T23:59:33.123Z". access: read-only - attributes: - type: DeviceAttributes - docs: A collection of DeviceAttributes representing the device. - components: - type: optional>> - docs: A list of components applicable to the device. - status: - type: optional - docs: The current status of the device. - source: - openapi: openapi/openapi.json - DeviceAttributes: - properties: - type: - type: DeviceAttributesDeviceType - docs: |- - The device type. - See [DeviceType](#type-devicetype) for possible values - manufacturer: - type: string - docs: The maker of the device. - model: + deliver_at: type: optional> - docs: The specific model of the device. - name: + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + that represents the start of the delivery period. + + When the fulfillment `schedule_type` is `ASAP`, the field is + automatically + + set to the current time plus the `prep_time_duration`. + + Otherwise, the application can set this field while the fulfillment + `state` is + + `PROPOSED`, `RESERVED`, or `PREPARED` (any time before the + + terminal state such as `COMPLETED`, `CANCELED`, and `FAILED`). + + + The timestamp must be in RFC 3339 format + + (for example, "2016-09-04T23:59:33.123Z"). + prep_time_duration: type: optional> - docs: A seller-specified name for the device. - manufacturers_id: + docs: |- + The duration of time it takes to prepare and deliver this fulfillment. + The duration must be in RFC 3339 format (for example, "P1W3D"). + delivery_window_duration: type: optional> docs: >- - The manufacturer-supplied identifier for the device (where available). - In many cases, + The time period after `deliver_at` in which to deliver the order. - this identifier will be a serial number. - updated_at: - type: optional + Applications can set this field when the fulfillment `state` is + + `PROPOSED`, `RESERVED`, or `PREPARED` (any time before the terminal + state + + such as `COMPLETED`, `CANCELED`, and `FAILED`). + + + The duration must be in RFC 3339 format (for example, "P1W3D"). + note: + type: optional> docs: >- - The RFC 3339-formatted value of the most recent update to the device - information. + Provides additional instructions about the delivery fulfillment. - (Could represent any field update on the device.) - version: - type: optional - docs: The current version of software installed on the device. - merchant_token: + It is displayed in the Square Point of Sale application and set by the + API. + validation: + maxLength: 550 + completed_at: type: optional> - docs: The merchant_token identifying the merchant controlling the device. - source: - openapi: openapi/openapi.json - DeviceAttributesDeviceType: - type: literal<"TERMINAL"> - docs: An enum identifier of the device type. - DeviceCheckoutOptions: - properties: - device_id: - type: string docs: >- - The unique ID of the device intended for this `TerminalCheckout`. + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - A list of `DeviceCode` objects can be retrieved from the - /v2/devices/codes endpoint. + indicates when the seller completed the fulfillment. - Match a `DeviceCode.device_id` value with `device_id` to get the - associated device code. - skip_receipt_screen: - type: optional> - docs: Instructs the device to skip the receipt screen. Defaults to false. - collect_signature: - type: optional> - docs: >- - Indicates that signature collection is desired during checkout. - Defaults to false. - tip_settings: - type: optional - docs: Tip-specific settings. - show_itemized_cart: - type: optional> - docs: >- - Show the itemization screen prior to taking a payment. This field is - only meaningful when the + This field is automatically set when fulfillment `state` changes to + `COMPLETED`. - checkout includes an order ID. Defaults to true. - source: - openapi: openapi/openapi.json - DeviceCode: - properties: - id: - type: optional - docs: The unique id for this device code. - access: read-only - name: - type: optional> - docs: An optional user-defined name for the device code. - validation: - maxLength: 128 - code: - type: optional - docs: The unique code that can be used to login. - access: read-only - device_id: + The timestamp must be in RFC 3339 format (for example, + "2016-09-04T23:59:33.123Z"). + in_progress_at: type: optional docs: >- - The unique id of the device that used this code. Populated when the - device is paired up. - access: read-only - product_type: - type: ProductType - docs: The targeting product type of the device code. - location_id: - type: optional> - docs: The location assigned to this code. - validation: - maxLength: 50 - status: - type: optional - docs: |- - The pairing status of the device code. - See [DeviceCodeStatus](#type-devicecodestatus) for possible values - pair_by: + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicates when the seller started processing the fulfillment. + + This field is automatically set when the fulfillment `state` changes + to `RESERVED`. + + The timestamp must be in RFC 3339 format (for example, + "2016-09-04T23:59:33.123Z"). + access: read-only + rejected_at: type: optional docs: >- - When this DeviceCode will expire and no longer login. Timestamp in RFC - 3339 format. + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when the fulfillment was rejected. This field is + + automatically set when the fulfillment `state` changes to `FAILED`. + + The timestamp must be in RFC 3339 format (for example, + "2016-09-04T23:59:33.123Z"). access: read-only - created_at: + ready_at: type: optional - docs: When this DeviceCode was created. Timestamp in RFC 3339 format. + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when the seller marked the fulfillment as ready for + + courier pickup. This field is automatically set when the fulfillment + `state` changes + + to PREPARED. + + The timestamp must be in RFC 3339 format (for example, + "2016-09-04T23:59:33.123Z"). access: read-only - status_changed_at: + delivered_at: type: optional docs: >- - When this DeviceCode's status was last changed. Timestamp in RFC 3339 - format. + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when the fulfillment was delivered to the recipient. + + The timestamp must be in RFC 3339 format (for example, + "2016-09-04T23:59:33.123Z"). access: read-only - paired_at: + canceled_at: type: optional - docs: When this DeviceCode was paired. Timestamp in RFC 3339 format. + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when the fulfillment was canceled. This field is + automatically + + set when the fulfillment `state` changes to `CANCELED`. + + + The timestamp must be in RFC 3339 format (for example, + "2016-09-04T23:59:33.123Z"). access: read-only - source: - openapi: openapi/openapi.json - DeviceCodeStatus: - enum: - - UNKNOWN - - UNPAIRED - - PAIRED - - EXPIRED - docs: DeviceCode.Status enum. - source: - openapi: openapi/openapi.json - DeviceComponentDetailsApplicationDetails: - properties: - application_type: - type: optional - docs: |- - The type of application. - See [ApplicationType](#type-applicationtype) for possible values - version: - type: optional - docs: The version of the application. - session_location: + cancel_reason: type: optional> - docs: The location_id of the session for the application. - device_code_id: + docs: 'The delivery cancellation reason. Max length: 100 characters.' + validation: + maxLength: 100 + courier_pickup_at: type: optional> - docs: The id of the device code that was used to log in to the device. - source: - openapi: openapi/openapi.json - DeviceComponentDetailsBatteryDetails: - properties: - visible_percent: - type: optional> - docs: The battery charge percentage as displayed on the device. - external_power: - type: optional - docs: |- - The status of external_power. - See [ExternalPower](#type-externalpower) for possible values - source: - openapi: openapi/openapi.json - DeviceComponentDetailsCardReaderDetails: - properties: - version: - type: optional - docs: The version of the card reader. - source: - openapi: openapi/openapi.json - DeviceComponentDetailsEthernetDetails: - properties: - active: - type: optional> docs: >- - A boolean to represent whether the Ethernet interface is currently - active. - ip_address_v4: - type: optional> - docs: The string representation of the device’s IPv4 address. - source: - openapi: openapi/openapi.json - DeviceComponentDetailsExternalPower: - enum: - - AVAILABLE_CHARGING - - AVAILABLE_NOT_IN_USE - - UNAVAILABLE - - AVAILABLE_INSUFFICIENT - docs: An enum for ExternalPower. - source: - openapi: openapi/openapi.json - DeviceComponentDetailsMeasurement: - docs: A value qualified by unit of measure. - properties: - value: optional> - source: - openapi: openapi/openapi.json - DeviceComponentDetailsWiFiDetails: - properties: - active: - type: optional> - docs: A boolean to represent whether the WiFI interface is currently active. - ssid: - type: optional> - docs: The name of the connected WIFI network. - ip_address_v4: - type: optional> - docs: The string representation of the device’s IPv4 address. - secure_connection: + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when an order can be picked up by the courier for delivery. + + The timestamp must be in RFC 3339 format (for example, + "2016-09-04T23:59:33.123Z"). + courier_pickup_window_duration: type: optional> docs: >- - The security protocol for a secure connection (e.g. WPA2). None - provided if the connection + The time period after `courier_pickup_at` in which the courier should + pick up the order. - is unsecured. - signal_strength: - type: optional - docs: A representation of signal strength of the WIFI network connection. - source: - openapi: openapi/openapi.json - DeviceDetails: - docs: Details about the device that took the payment. - properties: - device_id: + The duration must be in RFC 3339 format (for example, "P1W3D"). + is_no_contact_delivery: + type: optional> + docs: Whether the delivery is preferred to be no contact. + dropoff_notes: type: optional> - docs: The Square-issued ID of the device. + docs: >- + A note to provide additional instructions about how to deliver the + order. validation: - maxLength: 255 - device_installation_id: + maxLength: 550 + courier_provider_name: type: optional> - docs: The Square-issued installation ID for the device. + docs: The name of the courier provider. validation: maxLength: 255 - device_name: + courier_support_phone_number: type: optional> - docs: The name of the device set by the seller. + docs: The support phone number of the courier. validation: - maxLength: 255 - source: - openapi: openapi/openapi.json - DeviceMetadata: - properties: - battery_percentage: - type: optional> - docs: The Terminal’s remaining battery percentage, between 1-100. - charging_state: - type: optional> - docs: |- - The current charging state of the Terminal. - Options: `CHARGING`, `NOT_CHARGING` - location_id: - type: optional> - docs: >- - The ID of the Square seller business location associated with the - Terminal. - merchant_id: - type: optional> - docs: >- - The ID of the Square merchant account that is currently signed-in to - the Terminal. - network_connection_type: - type: optional> - docs: |- - The Terminal’s current network connection type. - Options: `WIFI`, `ETHERNET` - payment_region: + maxLength: 17 + square_delivery_id: type: optional> - docs: The country in which the Terminal is authorized to take payments. - serial_number: + docs: The identifier for the delivery created by Square. + validation: + maxLength: 50 + external_delivery_id: type: optional> docs: >- - The unique identifier assigned to the Terminal, which can be found on - the lower back - - of the device. - os_version: - type: optional> - docs: The current version of the Terminal’s operating system. - app_version: - type: optional> - docs: The current version of the application running on the Terminal. - wifi_network_name: - type: optional> - docs: The name of the Wi-Fi network to which the Terminal is connected. - wifi_network_strength: - type: optional> - docs: |- - The signal strength of the Wi-FI network connection. - Options: `POOR`, `FAIR`, `GOOD`, `EXCELLENT` - ip_address: - type: optional> - docs: The IP address of the Terminal. - source: - openapi: openapi/openapi.json - DeviceStatus: - properties: - category: - type: optional - docs: |- + The identifier for the delivery created by the third-party courier + service. + validation: + maxLength: 50 + managed_delivery: + type: optional> + docs: >- + The flag to indicate the delivery is managed by a third party (ie + DoorDash), which means - See [Category](#type-category) for possible values + we may not receive all recipient information for PII purposes. source: openapi: openapi/openapi.json - DeviceStatusCategory: + FulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleType: enum: - - AVAILABLE - - NEEDS_ATTENTION - - OFFLINE + - SCHEDULED + - ASAP + docs: The schedule type of the delivery fulfillment. source: openapi: openapi/openapi.json - DigitalWalletDetails: + FulfillmentFulfillmentEntry: docs: >- - Additional details about `WALLET` type payments. Contains only - non-confidential information. + Links an order line item to a fulfillment. Each entry must reference + + a valid `uid` for an order line item in the `line_item_uid` field, as well + as a `quantity` to + + fulfill. properties: - status: + uid: type: optional> docs: >- - The status of the `WALLET` payment. The status can be `AUTHORIZED`, - `CAPTURED`, `VOIDED`, or - - `FAILED`. + A unique ID that identifies the fulfillment entry only within this + order. validation: - maxLength: 50 - brand: - type: optional> + maxLength: 60 + line_item_uid: + type: string + docs: The `uid` from the order line item. + validation: + minLength: 1 + quantity: + type: string docs: >- - The brand used for the `WALLET` payment. The brand can be `CASH_APP`, - `PAYPAY`, `ALIPAY`, + The quantity of the line item being fulfilled, formatted as a decimal + number. - `RAKUTEN_PAY`, `AU_PAY`, `D_BARAI`, `MERPAY`, `WECHAT_PAY` or - `UNKNOWN`. + For example, `"3"`. + + + Fulfillments for line items with a `quantity_unit` can have + non-integer quantities. + + For example, `"1.70000"`. validation: - maxLength: 50 - cash_app_details: - type: optional - docs: Brand-specific details for payments with the `brand` of `CASH_APP`. - source: - openapi: openapi/openapi.json - DisableCardResponse: - docs: >- - Defines the fields that are included in the response body of + minLength: 1 + maxLength: 12 + metadata: + type: optional>>>> + docs: >- + Application-defined data attached to this fulfillment entry. Metadata + fields are intended - a request to the [DisableCard](api-endpoint:Cards-DisableCard) endpoint. + 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 - Note: if there are errors processing the request, the card field will not - be + in relevant API calls. Do not use metadata to store any sensitive + information (such as personally - present. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - card: - type: optional - docs: The retrieved card. - source: - openapi: openapi/openapi.json - DisableEventsResponse: - docs: >- - Defines the fields that are included in the response body of + identifiable information or card details). - a request to the [DisableEvents](api-endpoint:Events-DisableEvents) - endpoint. + Keys written by applications must be 60 characters or less and must be + in the character set - Note: if there are errors processing the request, the events field will - not be + `[a-zA-Z0-9_-]`. Entries can also include metadata generated by + Square. These keys are prefixed - present. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - source: - openapi: openapi/openapi.json - DismissTerminalActionResponse: - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - action: - type: optional - docs: Current state of the action to be dismissed. - source: - openapi: openapi/openapi.json - DismissTerminalCheckoutResponse: - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - checkout: - type: optional - docs: Current state of the checkout to be dismissed. + with a namespace, separated from the key with a ':' character. + + + Values have a maximum length of 255 characters. + + + An application can have up to 10 entries per metadata field. + + + Entries written by applications are private and can only be read or + modified by the same + + application. + + + For more information, see + [Metadata](https://developer.squareup.com/docs/build-basics/metadata). source: openapi: openapi/openapi.json - DismissTerminalRefundResponse: - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - refund: - type: optional - docs: Current state of the refund to be dismissed. + FulfillmentFulfillmentLineItemApplication: + enum: + - ALL + - ENTRY_LIST + docs: >- + The `line_item_application` describes what order line items this + fulfillment applies + + to. It can be `ALL` or `ENTRY_LIST` with a supplied list of fulfillment + entries. source: openapi: openapi/openapi.json - Dispute: - docs: >- - Represents a - [dispute](https://developer.squareup.com/docs/disputes-api/overview) a - cardholder initiated with their bank. + FulfillmentPickupDetails: + docs: Contains details necessary to fulfill a pickup order. properties: - dispute_id: + recipient: + type: optional + docs: >- + Information about the person to pick up this fulfillment from a + physical + + location. + expires_at: type: optional> - docs: The unique ID for this `Dispute`, generated by Square. - validation: - minLength: 1 - maxLength: 40 - id: - type: optional - docs: The unique ID for this `Dispute`, generated by Square. - validation: - minLength: 1 - maxLength: 40 - amount_money: - type: optional docs: >- - The disputed amount, which can be less than the total transaction - amount. + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - For instance, if multiple items were purchased but the cardholder only - initiates a dispute over some of the items. - reason: - type: optional - docs: |- - The reason why the cardholder initiated the dispute. - See [DisputeReason](#type-disputereason) for possible values - state: - type: optional + indicating when this fulfillment expires if it is not marked in + progress. The timestamp must be + + in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). The + expiration time can only be set + + up to 7 days in the future. If `expires_at` is not set, any new + payments attached to the order + + are automatically completed. + auto_complete_duration: + type: optional> + docs: >- + The duration of time after which an in progress pickup fulfillment is + automatically moved + + to the `COMPLETED` state. The duration must be in RFC 3339 format (for + example, "P1W3D"). + + + If not set, this pickup fulfillment remains in progress until it is + canceled or completed. + schedule_type: + type: optional + docs: >- + The schedule type of the pickup fulfillment. Defaults to `SCHEDULED`. + + See + [FulfillmentPickupDetailsScheduleType](#type-fulfillmentpickupdetailsscheduletype) + for possible values + pickup_at: + type: optional> + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + that represents the start of the pickup window. Must be in RFC 3339 + timestamp format, e.g., + + "2016-09-04T23:59:33.123Z". + + + For fulfillments with the schedule type `ASAP`, this is automatically + set + + to the current time plus the expected duration to prepare the + fulfillment. + pickup_window_duration: + type: optional> + docs: >- + The window of time in which the order should be picked up after the + `pickup_at` timestamp. + + Must be in RFC 3339 duration format, e.g., "P1W3D". Can be used as an + + informational guideline for merchants. + prep_time_duration: + type: optional> docs: |- - The current state of this dispute. - See [DisputeState](#type-disputestate) for possible values - due_at: + The duration of time it takes to prepare this fulfillment. + The duration must be in RFC 3339 format (for example, "P1W3D"). + note: type: optional> docs: >- - 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). + A note to provide additional instructions about the pickup + + fulfillment displayed in the Square Point of Sale application and set + by the API. validation: - minLength: 1 - maxLength: 40 - disputed_payment: - type: optional - docs: The payment challenged in this dispute. - evidence_ids: - type: optional>> - docs: The IDs of the evidence associated with the dispute. - card_brand: - type: optional - docs: |- - The card brand used in the disputed payment. - See [CardBrand](#type-cardbrand) for possible values - created_at: + maxLength: 500 + placed_at: type: optional - docs: The timestamp when the dispute was created, in RFC 3339 format. - validation: - minLength: 1 - maxLength: 40 + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when the fulfillment was placed. The timestamp must be in + RFC 3339 format + + (for example, "2016-09-04T23:59:33.123Z"). access: read-only - updated_at: + accepted_at: type: optional - docs: The timestamp when the dispute was last updated, in RFC 3339 format. - validation: - minLength: 1 - maxLength: 40 + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when the fulfillment was marked in progress. The timestamp + must be in RFC 3339 format + + (for example, "2016-09-04T23:59:33.123Z"). access: read-only - brand_dispute_id: - type: optional> + rejected_at: + type: optional docs: >- - The ID of the dispute in the card brand system, generated by the card - brand. - validation: - minLength: 1 - maxLength: 40 - reported_date: + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when the fulfillment was rejected. The timestamp must be in + RFC 3339 format + + (for example, "2016-09-04T23:59:33.123Z"). + access: read-only + ready_at: + type: optional + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when the fulfillment is marked as ready for pickup. The + timestamp must be in RFC 3339 format + + (for example, "2016-09-04T23:59:33.123Z"). + access: read-only + expired_at: + type: optional + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when the fulfillment expired. The timestamp must be in RFC + 3339 format + + (for example, "2016-09-04T23:59:33.123Z"). + access: read-only + picked_up_at: + type: optional + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when the fulfillment was picked up by the recipient. The + timestamp must be in RFC 3339 format + + (for example, "2016-09-04T23:59:33.123Z"). + access: read-only + canceled_at: + type: optional + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when the fulfillment was canceled. The timestamp must be in + RFC 3339 format + + (for example, "2016-09-04T23:59:33.123Z"). + access: read-only + cancel_reason: type: optional> - docs: The timestamp when the dispute was reported, in RFC 3339 format. + docs: >- + A description of why the pickup was canceled. The maximum length: 100 + characters. validation: - minLength: 1 - maxLength: 40 - reported_at: + maxLength: 100 + is_curbside_pickup: + type: optional> + docs: >- + If set to `true`, indicates that this pickup order is for curbside + pickup, not in-store pickup. + curbside_pickup_details: + type: optional + docs: >- + Specific details for curbside pickup. These details can only be + populated if `is_curbside_pickup` is set to `true`. + source: + openapi: openapi/openapi.json + FulfillmentPickupDetailsCurbsidePickupDetails: + docs: Specific details for curbside pickup. + properties: + curbside_details: type: optional> - docs: The timestamp when the dispute was reported, in RFC 3339 format. + docs: >- + Specific details for curbside pickup, such as parking number and + vehicle model. validation: - minLength: 1 - maxLength: 40 - version: - type: optional - docs: The current version of the `Dispute`. - location_id: + maxLength: 250 + buyer_arrived_at: type: optional> - docs: The ID of the location where the dispute originated. - validation: - minLength: 1 - maxLength: 40 + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when the buyer arrived and is waiting for pickup. The + timestamp must be in RFC 3339 format + + (for example, "2016-09-04T23:59:33.123Z"). source: openapi: openapi/openapi.json - DisputeEvidence: + FulfillmentPickupDetailsScheduleType: + enum: + - SCHEDULED + - ASAP + docs: The schedule type of the pickup fulfillment. + source: + openapi: openapi/openapi.json + FulfillmentRecipient: + docs: Information about the fulfillment recipient. properties: - evidence_id: + customer_id: type: optional> - docs: The Square-generated ID of the evidence. - validation: - minLength: 1 - maxLength: 40 - id: - type: optional - docs: The Square-generated ID of the evidence. + docs: >- + The ID of the customer associated with the fulfillment. + + + If `customer_id` is provided, the fulfillment recipient's + `display_name`, + + `email_address`, and `phone_number` are automatically populated from + the + + targeted customer profile. If these fields are set in the request, the + request + + values override the information from the customer profile. If the + + targeted customer profile does not contain the necessary information + and + + these fields are left unset, the request results in an error. validation: - minLength: 1 - maxLength: 40 - dispute_id: + maxLength: 191 + display_name: type: optional> - docs: The ID of the dispute the evidence is associated with. + docs: >- + The display name of the fulfillment recipient. This field is required. + + + If provided, the display name overrides the corresponding customer + profile value + + indicated by `customer_id`. validation: - minLength: 1 - maxLength: 40 - evidence_file: - type: optional - docs: Image, PDF, TXT - evidence_text: + maxLength: 255 + email_address: type: optional> - docs: Raw text + docs: >- + The email address of the fulfillment recipient. + + + If provided, the email address overrides the corresponding customer + profile value + + indicated by `customer_id`. validation: - minLength: 1 - maxLength: 500 - uploaded_at: + maxLength: 255 + phone_number: type: optional> - docs: The time when the evidence was uploaded, in RFC 3339 format. + docs: >- + The phone number of the fulfillment recipient. This field is required. + + + If provided, the phone number overrides the corresponding customer + profile value + + indicated by `customer_id`. validation: - minLength: 1 - maxLength: 40 - evidence_type: - type: optional + maxLength: 17 + address: + type: optional
docs: >- - The type of the evidence. + The address of the fulfillment recipient. This field is required. - See [DisputeEvidenceType](#type-disputeevidencetype) for possible - values + + If provided, the address overrides the corresponding customer profile + value + + indicated by `customer_id`. source: openapi: openapi/openapi.json - DisputeEvidenceFile: - docs: A file to be uploaded as dispute evidence. + FulfillmentShipmentDetails: + docs: Contains the details necessary to fulfill a shipment order. properties: - filename: + recipient: + type: optional + docs: Information about the person to receive this shipment fulfillment. + carrier: type: optional> docs: >- - The file name including the file extension. For example: - "receipt.tiff". + The shipping carrier being used to ship this fulfillment (such as UPS, + FedEx, or USPS). validation: - minLength: 1 - maxLength: 40 - filetype: + maxLength: 50 + shipping_note: type: optional> - docs: >- - Dispute evidence files must be application/pdf, image/heic, - image/heif, image/jpeg, image/png, or image/tiff formats. + docs: A note with additional information for the shipping carrier. validation: - minLength: 1 - maxLength: 40 - source: - openapi: openapi/openapi.json - DisputeEvidenceType: - enum: - - GENERIC_EVIDENCE - - ONLINE_OR_APP_ACCESS_LOG - - AUTHORIZATION_DOCUMENTATION - - CANCELLATION_OR_REFUND_DOCUMENTATION - - CARDHOLDER_COMMUNICATION - - CARDHOLDER_INFORMATION - - PURCHASE_ACKNOWLEDGEMENT - - DUPLICATE_CHARGE_DOCUMENTATION - - PRODUCT_OR_SERVICE_DESCRIPTION - - RECEIPT - - SERVICE_RECEIVED_DOCUMENTATION - - PROOF_OF_DELIVERY_DOCUMENTATION - - RELATED_TRANSACTION_DOCUMENTATION - - REBUTTAL_EXPLANATION - - TRACKING_NUMBER - docs: The type of the dispute evidence. - source: - openapi: openapi/openapi.json - DisputeReason: - enum: - - AMOUNT_DIFFERS - - CANCELLED - - DUPLICATE - - NO_KNOWLEDGE - - NOT_AS_DESCRIBED - - NOT_RECEIVED - - PAID_BY_OTHER_MEANS - - CUSTOMER_REQUESTS_CREDIT - - EMV_LIABILITY_SHIFT - docs: |- - The list of possible reasons why a cardholder might initiate a - dispute with their bank. - source: - openapi: openapi/openapi.json - DisputeState: - enum: - - INQUIRY_EVIDENCE_REQUIRED - - INQUIRY_PROCESSING - - INQUIRY_CLOSED - - EVIDENCE_REQUIRED - - PROCESSING - - WON - - LOST - - ACCEPTED - docs: The list of possible dispute states. - source: - openapi: openapi/openapi.json - DisputedPayment: - docs: The payment the cardholder disputed. - properties: - payment_id: + maxLength: 500 + shipping_type: type: optional> - docs: Square-generated unique ID of the payment being disputed. - validation: - minLength: 1 - maxLength: 192 - source: - openapi: openapi/openapi.json - Employee: - docs: >- - An employee object that is used by the external API. - + docs: >- + A description of the type of shipping product purchased from the + carrier - DEPRECATED at version 2020-08-26. Replaced by - [TeamMember](entity:TeamMember). - properties: - id: - type: optional - docs: UUID for this object. - first_name: - type: optional> - docs: The employee's first name. - last_name: - type: optional> - docs: The employee's last name. - email: + (such as First Class, Priority, or Express). + validation: + maxLength: 50 + tracking_number: type: optional> - docs: The employee's email address - phone_number: + docs: >- + The reference number provided by the carrier to track the shipment's + progress. + validation: + maxLength: 100 + tracking_url: type: optional> - docs: The employee's phone number in E.164 format, i.e. "+12125554250" - location_ids: - type: optional>> - docs: A list of location IDs where this employee has access to. - status: - type: optional - docs: |- - Specifies the status of the employees being fetched. - See [EmployeeStatus](#type-employeestatus) for possible values - is_owner: - type: optional> - docs: |- - Whether this employee is the owner of the merchant. Each merchant - has one owner employee, and that employee has full authority over - the account. - created_at: + docs: A link to the tracking webpage on the carrier's website. + validation: + maxLength: 2000 + placed_at: type: optional - docs: A read-only timestamp in RFC 3339 format. + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when the shipment was requested. The timestamp must be in + RFC 3339 format + + (for example, "2016-09-04T23:59:33.123Z"). access: read-only - updated_at: + in_progress_at: type: optional - docs: A read-only timestamp in RFC 3339 format. - access: read-only - source: - openapi: openapi/openapi.json - EmployeeStatus: - enum: - - ACTIVE - - INACTIVE - docs: >- - The status of the Employee being retrieved. + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + indicating when this fulfillment was moved to the `RESERVED` state, + which indicates that preparation - DEPRECATED at version 2020-08-26. Replaced by - [TeamMemberStatus](entity:TeamMemberStatus). - source: - openapi: openapi/openapi.json - EmployeeWage: - docs: >- - The hourly wage rate that an employee earns on a `Shift` for doing the job - specified by the `title` property of this object. Deprecated at version - 2020-08-26. Use [TeamMemberWage](entity:TeamMemberWage). - properties: - id: + of this shipment has begun. The timestamp must be in RFC 3339 format + (for example, "2016-09-04T23:59:33.123Z"). + access: read-only + packaged_at: type: optional - docs: The UUID for this object. - employee_id: - type: optional> - docs: The `Employee` that this wage is assigned to. - title: + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when this fulfillment was moved to the `PREPARED` state, + which indicates that the + + fulfillment is packaged. The timestamp must be in RFC 3339 format (for + example, "2016-09-04T23:59:33.123Z"). + access: read-only + expected_shipped_at: type: optional> - docs: The job title that this wage relates to. - hourly_rate: - type: optional - docs: |- - Can be a custom-set hourly wage or the calculated effective hourly - wage based on the annual wage and hours worked per week. - source: - openapi: openapi/openapi.json - EnableEventsResponse: - docs: >- - Defines the fields that are included in the response body of + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - a request to the [EnableEvents](api-endpoint:Events-EnableEvents) - endpoint. + indicating when the shipment is expected to be delivered to the + shipping carrier. + The timestamp must be in RFC 3339 format (for example, + "2016-09-04T23:59:33.123Z"). + shipped_at: + type: optional + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - Note: if there are errors processing the request, the events field will - not be + indicating when this fulfillment was moved to the `COMPLETED` state, + which indicates that - present. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - source: - openapi: openapi/openapi.json - Error: - docs: >- - Represents an error encountered during a request to the Connect API. + the fulfillment has been given to the shipping carrier. The timestamp + must be in RFC 3339 format + + (for example, "2016-09-04T23:59:33.123Z"). + access: read-only + canceled_at: + type: optional> + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + indicating the shipment was canceled. - See [Handling - errors](https://developer.squareup.com/docs/build-basics/handling-errors) - for more information. - properties: - category: - type: ErrorCategory - docs: |- - The high-level category for the error. - See [ErrorCategory](#type-errorcategory) for possible values - code: - type: ErrorCode - docs: |- - The specific code of the error. - See [ErrorCode](#type-errorcode) for possible values - detail: - type: optional - docs: A human-readable description of the error for debugging purposes. - field: + The timestamp must be in RFC 3339 format (for example, + "2016-09-04T23:59:33.123Z"). + cancel_reason: + type: optional> + docs: A description of why the shipment was canceled. + validation: + maxLength: 100 + failed_at: type: optional - docs: |- - The name of the field provided in the original request (if any) that - the error pertains to. + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when the shipment failed to be completed. The timestamp + must be in RFC 3339 format + + (for example, "2016-09-04T23:59:33.123Z"). + access: read-only + failure_reason: + type: optional> + docs: A description of why the shipment failed to be completed. + validation: + maxLength: 100 source: openapi: openapi/openapi.json - ErrorCategory: + FulfillmentState: enum: - - API_ERROR - - AUTHENTICATION_ERROR - - INVALID_REQUEST_ERROR - - RATE_LIMIT_ERROR - - PAYMENT_METHOD_ERROR - - REFUND_ERROR - - MERCHANT_SUBSCRIPTION_ERROR - - EXTERNAL_VENDOR_ERROR - docs: |- - Indicates which high-level category of error has occurred during a - request to the Connect API. + - PROPOSED + - RESERVED + - PREPARED + - COMPLETED + - CANCELED + - FAILED + docs: The current state of this fulfillment. source: openapi: openapi/openapi.json - ErrorCode: + FulfillmentType: enum: - - INTERNAL_SERVER_ERROR - - UNAUTHORIZED - - ACCESS_TOKEN_EXPIRED - - ACCESS_TOKEN_REVOKED - - CLIENT_DISABLED - - FORBIDDEN - - INSUFFICIENT_SCOPES - - APPLICATION_DISABLED - - V1_APPLICATION - - V1_ACCESS_TOKEN - - CARD_PROCESSING_NOT_ENABLED - - MERCHANT_SUBSCRIPTION_NOT_FOUND - - BAD_REQUEST - - MISSING_REQUIRED_PARAMETER - - INCORRECT_TYPE - - INVALID_TIME - - INVALID_TIME_RANGE - - INVALID_VALUE - - INVALID_CURSOR - - UNKNOWN_QUERY_PARAMETER - - CONFLICTING_PARAMETERS - - EXPECTED_JSON_BODY - - INVALID_SORT_ORDER - - VALUE_REGEX_MISMATCH - - VALUE_TOO_SHORT - - VALUE_TOO_LONG - - VALUE_TOO_LOW - - VALUE_TOO_HIGH - - VALUE_EMPTY - - ARRAY_LENGTH_TOO_LONG - - ARRAY_LENGTH_TOO_SHORT - - ARRAY_EMPTY - - EXPECTED_BOOLEAN - - EXPECTED_INTEGER - - EXPECTED_FLOAT - - EXPECTED_STRING - - EXPECTED_OBJECT - - EXPECTED_ARRAY - - EXPECTED_MAP - - EXPECTED_BASE64_ENCODED_BYTE_ARRAY - - INVALID_ARRAY_VALUE - - INVALID_ENUM_VALUE - - INVALID_CONTENT_TYPE - - INVALID_FORM_VALUE - - CUSTOMER_NOT_FOUND - - ONE_INSTRUMENT_EXPECTED - - NO_FIELDS_SET - - TOO_MANY_MAP_ENTRIES - - MAP_KEY_LENGTH_TOO_SHORT - - MAP_KEY_LENGTH_TOO_LONG - - CUSTOMER_MISSING_NAME - - CUSTOMER_MISSING_EMAIL - - INVALID_PAUSE_LENGTH - - INVALID_DATE - - UNSUPPORTED_COUNTRY - - UNSUPPORTED_CURRENCY - - APPLE_TTP_PIN_TOKEN - - CARD_EXPIRED - - INVALID_EXPIRATION - - INVALID_EXPIRATION_YEAR - - INVALID_EXPIRATION_DATE - - UNSUPPORTED_CARD_BRAND - - UNSUPPORTED_ENTRY_METHOD - - INVALID_ENCRYPTED_CARD - - INVALID_CARD - - PAYMENT_AMOUNT_MISMATCH - - GENERIC_DECLINE - - CVV_FAILURE - - ADDRESS_VERIFICATION_FAILURE - - INVALID_ACCOUNT - - CURRENCY_MISMATCH - - INSUFFICIENT_FUNDS - - INSUFFICIENT_PERMISSIONS - - CARDHOLDER_INSUFFICIENT_PERMISSIONS - - INVALID_LOCATION - - TRANSACTION_LIMIT - - VOICE_FAILURE - - PAN_FAILURE - - EXPIRATION_FAILURE - - CARD_NOT_SUPPORTED - - READER_DECLINED - - INVALID_PIN - - MISSING_PIN - - MISSING_ACCOUNT_TYPE - - INVALID_POSTAL_CODE - - INVALID_FEES - - MANUALLY_ENTERED_PAYMENT_NOT_SUPPORTED - - PAYMENT_LIMIT_EXCEEDED - - GIFT_CARD_AVAILABLE_AMOUNT - - ACCOUNT_UNUSABLE - - BUYER_REFUSED_PAYMENT - - DELAYED_TRANSACTION_EXPIRED - - DELAYED_TRANSACTION_CANCELED - - DELAYED_TRANSACTION_CAPTURED - - DELAYED_TRANSACTION_FAILED - - CARD_TOKEN_EXPIRED - - CARD_TOKEN_USED - - AMOUNT_TOO_HIGH - - UNSUPPORTED_INSTRUMENT_TYPE - - REFUND_AMOUNT_INVALID - - REFUND_ALREADY_PENDING - - PAYMENT_NOT_REFUNDABLE - - PAYMENT_NOT_REFUNDABLE_DUE_TO_DISPUTE - - REFUND_ERROR_PAYMENT_NEEDS_COMPLETION - - REFUND_DECLINED - - INSUFFICIENT_PERMISSIONS_FOR_REFUND - - INVALID_CARD_DATA - - SOURCE_USED - - SOURCE_EXPIRED - - UNSUPPORTED_LOYALTY_REWARD_TIER - - LOCATION_MISMATCH - - ORDER_UNPAID_NOT_RETURNABLE - - IDEMPOTENCY_KEY_REUSED - - UNEXPECTED_VALUE - - SANDBOX_NOT_SUPPORTED - - INVALID_EMAIL_ADDRESS - - INVALID_PHONE_NUMBER - - CHECKOUT_EXPIRED - - BAD_CERTIFICATE - - INVALID_SQUARE_VERSION_FORMAT - - API_VERSION_INCOMPATIBLE - - CARD_PRESENCE_REQUIRED - - UNSUPPORTED_SOURCE_TYPE - - CARD_MISMATCH - - PLAID_ERROR - - PLAID_ERROR_ITEM_LOGIN_REQUIRED - - PLAID_ERROR_RATE_LIMIT - - CARD_DECLINED - - VERIFY_CVV_FAILURE - - VERIFY_AVS_FAILURE - - CARD_DECLINED_CALL_ISSUER - - CARD_DECLINED_VERIFICATION_REQUIRED - - BAD_EXPIRATION - - CHIP_INSERTION_REQUIRED - - ALLOWABLE_PIN_TRIES_EXCEEDED - - RESERVATION_DECLINED - - UNKNOWN_BODY_PARAMETER - - NOT_FOUND - - APPLE_PAYMENT_PROCESSING_CERTIFICATE_HASH_NOT_FOUND - - METHOD_NOT_ALLOWED - - NOT_ACCEPTABLE - - REQUEST_TIMEOUT - - CONFLICT - - GONE - - REQUEST_ENTITY_TOO_LARGE - - UNSUPPORTED_MEDIA_TYPE - - UNPROCESSABLE_ENTITY - - RATE_LIMITED - - NOT_IMPLEMENTED - - BAD_GATEWAY - - SERVICE_UNAVAILABLE - - TEMPORARY_ERROR - - GATEWAY_TIMEOUT - docs: |- - Indicates the specific error that occurred during a request to a - Square API. + - PICKUP + - SHIPMENT + - DELIVERY + docs: The type of fulfillment. source: openapi: openapi/openapi.json - Event: + GetBankAccountByV1IdResponse: + docs: Response object returned by GetBankAccountByV1Id. properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - location_id: - type: optional> - docs: The ID of the target location associated with the event. - type: - type: optional> - docs: The type of event this represents. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. + errors: + type: optional> + docs: Information on errors encountered during the request. + bank_account: + type: optional + docs: The requested `BankAccount` object. source: openapi: openapi/openapi.json - EventData: + GetBankAccountResponse: + docs: Response object returned by `GetBankAccount`. properties: - type: - type: optional> - docs: The name of the affected object’s type. - id: - type: optional - docs: The ID of the affected object. - deleted: - type: optional> - docs: >- - This is true if the affected object has been deleted; otherwise, it's - absent. - object: - type: optional>> - docs: >- - An object containing fields and values relevant to the event. It is - absent if the affected object has been deleted. + errors: + type: optional> + docs: Information on errors encountered during the request. + bank_account: + type: optional + docs: The requested `BankAccount` object. source: openapi: openapi/openapi.json - EventMetadata: - docs: Contains metadata about a particular [Event](entity:Event). + GetBreakTypeResponse: + docs: >- + The response to a request to get a `BreakType`. The response contains + + the requested `BreakType` objects and might contain a set of `Error` + objects if + + the request resulted in errors. properties: - event_id: - type: optional> - docs: A unique ID for the event. - api_version: - type: optional> - docs: >- - The API version of the event. This corresponds to the default API - version of the developer application at the time when the event was - created. + break_type: + type: optional + docs: The response object. + errors: + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - EventTypeMetadata: - docs: Contains the metadata of a webhook event type. + GetDeviceCodeResponse: properties: - event_type: - type: optional - docs: The event type. - access: read-only - api_version_introduced: - type: optional - docs: The API version at which the event type was introduced. - access: read-only - release_status: - type: optional - docs: The release status of the event type. - access: read-only + errors: + type: optional> + docs: Any errors that occurred during the request. + device_code: + type: optional + docs: The queried DeviceCode. source: openapi: openapi/openapi.json - ExcludeStrategy: - enum: - - LEAST_EXPENSIVE - - MOST_EXPENSIVE - docs: |- - Indicates which products matched by a CatalogPricingRule - will be excluded if the pricing rule uses an exclude set. + GetDeviceResponse: + properties: + errors: + type: optional> + docs: Information about errors encountered during the request. + device: + type: optional + docs: The requested `Device`. source: openapi: openapi/openapi.json - ExternalPaymentDetails: + GetEmployeeWageResponse: docs: >- - Stores details about an external payment. Contains only non-confidential - information. + A response to a request to get an `EmployeeWage`. The response contains - For more information, see + the requested `EmployeeWage` objects and might contain a set of `Error` + objects if - [Take External - Payments](https://developer.squareup.com/docs/payments-api/take-payments/external-payments). + the request resulted in errors. properties: - type: - type: string - docs: >- - The type of external payment the seller received. It can be one of the - following: - - - CHECK - Paid using a physical check. - - - BANK_TRANSFER - Paid using external bank transfer. - - - OTHER\_GIFT\_CARD - Paid using a non-Square gift card. - - - CRYPTO - Paid using a crypto currency. - - - SQUARE_CASH - Paid using Square Cash App. - - - SOCIAL - Paid using peer-to-peer payment applications. - - - EXTERNAL - A third-party application gathered this payment outside - of Square. - - - EMONEY - Paid using an E-money provider. - - - CARD - A credit or debit card that Square does not support. + employee_wage: + type: optional + docs: The requested `EmployeeWage` object. + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + GetInvoiceResponse: + docs: Describes a `GetInvoice` response. + properties: + invoice: + type: optional + docs: The invoice requested. + errors: + type: optional> + docs: Information about errors encountered during the request. + source: + openapi: openapi/openapi.json + GetPaymentRefundResponse: + docs: >- + Defines the response returned by + [GetRefund](api-endpoint:Refunds-GetPaymentRefund). - - STORED_BALANCE - Use for house accounts, store credit, and so forth. - - FOOD_VOUCHER - Restaurant voucher provided by employers to employees - to pay for meals + Note: If there are errors processing the request, the refund field might + not be - - OTHER - A type not listed here. - validation: - maxLength: 50 - source: - type: string - docs: |- - A description of the external payment source. For example, - "Food Delivery Service". - validation: - maxLength: 255 - source_id: - type: optional> - docs: An ID to associate the payment to its originating source. - validation: - maxLength: 255 - source_fee_money: - type: optional - docs: |- - The fees paid to the source. The `amount_money` minus this field is - the net amount seller receives. + present or it might be present in a FAILED state. + properties: + errors: + type: optional> + docs: Information about errors encountered during the request. + refund: + type: optional + docs: The requested `PaymentRefund`. source: openapi: openapi/openapi.json - FilterValue: + GetPaymentResponse: docs: >- - A filter to select resources based on an exact field value. For any given - - value, the value can only be in one property. Depending on the field, - either - - all properties can be set or only a subset will be available. + Defines the response returned by + [GetPayment](api-endpoint:Payments-GetPayment). + properties: + errors: + type: optional> + docs: Information about errors encountered during the request. + payment: + type: optional + docs: The requested `Payment`. + source: + openapi: openapi/openapi.json + GetPayoutResponse: + properties: + payout: + type: optional + docs: The requested payout. + errors: + type: optional> + docs: Information about errors encountered during the request. + source: + openapi: openapi/openapi.json + GetShiftResponse: + docs: |- + A response to a request to get a `Shift`. The response contains + the requested `Shift` object and might contain a set of `Error` objects if + the request resulted in errors. + properties: + shift: + type: optional + docs: The requested `Shift`. + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + GetTeamMemberWageResponse: + docs: >- + A response to a request to get a `TeamMemberWage`. The response contains + the requested `TeamMemberWage` objects and might contain a set of `Error` + objects if - Refer to the documentation of the field. + the request resulted in errors. properties: - all: - type: optional>> - docs: A list of terms that must be present on the field of the resource. - any: - type: optional>> - docs: |- - A list of terms where at least one of them must be present on the - field of the resource. - none: - type: optional>> - docs: A list of terms that must not be present on the field the resource + team_member_wage: + type: optional + docs: The requested `TeamMemberWage` object. + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + GetTerminalActionResponse: + properties: + errors: + type: optional> + docs: Information on errors encountered during the request. + action: + type: optional + docs: The requested `TerminalAction` source: openapi: openapi/openapi.json - FloatNumberRange: - docs: Specifies a decimal number range. + GetTerminalCheckoutResponse: properties: - start_at: - type: optional> - docs: A decimal value indicating where the range starts. - end_at: - type: optional> - docs: A decimal value indicating where the range ends. + errors: + type: optional> + docs: Information about errors encountered during the request. + checkout: + type: optional + docs: The requested `TerminalCheckout`. source: openapi: openapi/openapi.json - Fulfillment: - docs: >- - Contains details about how to fulfill this order. - - Orders can only be created with at most one fulfillment using the API. - - However, orders returned by the Orders API might contain multiple - fulfillments because sellers can create multiple fulfillments using Square - products such as Square Online. + GetTerminalRefundResponse: properties: - uid: - type: optional> - docs: A unique ID that identifies the fulfillment only within this order. - validation: - maxLength: 60 + errors: + type: optional> + docs: Information about errors encountered during the request. + refund: + type: optional + docs: The requested `Refund`. + source: + openapi: openapi/openapi.json + GiftCard: + docs: Represents a Square gift card. + properties: + id: + type: optional + docs: The Square-assigned ID of the gift card. + access: read-only type: - type: optional + type: GiftCardType docs: |- - The type of the fulfillment. - See [FulfillmentType](#type-fulfillmenttype) for possible values + The gift card type. + See [Type](#type-type) for possible values + gan_source: + type: optional + docs: >- + The source that generated the gift card account number (GAN). The + default value is `SQUARE`. + + See [GANSource](#type-gansource) for possible values state: - type: optional + type: optional docs: |- - The state of the fulfillment. - See [FulfillmentState](#type-fulfillmentstate) for possible values - line_item_application: - type: optional + The current gift card state. + See [Status](#type-status) for possible values + balance_money: + type: optional docs: >- - Describes what order line items this fulfillment applies to. - - It can be `ALL` or `ENTRY_LIST` with a supplied list of fulfillment - entries. - - See - [FulfillmentFulfillmentLineItemApplication](#type-fulfillmentfulfillmentlineitemapplication) - for possible values - entries: - type: optional> + The current gift card balance. This balance is always greater than or + equal to zero. + gan: + type: optional> docs: >- - A list of entries pertaining to the fulfillment of an order. Each - entry must reference - - a valid `uid` for an order line item in the `line_item_uid` field, as - well as a `quantity` to - - fulfill. - - - Multiple entries can reference the same line item `uid`, as long as - the total quantity among - - all fulfillment entries referencing a single line item does not exceed - the quantity of the + The gift card account number (GAN). Buyers can use the GAN to make + purchases or check - order's line item itself. + the gift card balance. + created_at: + type: optional + docs: >- + The timestamp when the gift card was created, in RFC 3339 format. + In the case of a digital gift card, it is the time when you create a + card - An order cannot be marked as `COMPLETED` before all fulfillments are - `COMPLETED`, + (using the Square Point of Sale application, Seller Dashboard, or Gift + Cards API). - `CANCELED`, or `FAILED`. Fulfillments can be created and completed - independently + In the case of a plastic gift card, it is the time when Square + associates the card with the - before order completion. + seller at the time of activation. access: read-only - metadata: - type: optional>>>> + customer_ids: + type: optional> docs: >- - Application-defined data attached to this fulfillment. Metadata fields - are intended - - to store descriptive references or associations with an entity in - another system or store brief - - information about the object. Square does not process this field; it - only stores and returns it - - in relevant API calls. Do not use metadata to store any sensitive - information (such as personally - - identifiable information or card details). - - - Keys written by applications must be 60 characters or less and must be - in the character set - - `[a-zA-Z0-9_-]`. Entries can also include metadata generated by - Square. These keys are prefixed - - with a namespace, separated from the key with a ':' character. - - - Values have a maximum length of 255 characters. - - - An application can have up to 10 entries per metadata field. - - - Entries written by applications are private and can only be read or - modified by the same - - application. + The IDs of the [customer profiles](entity:Customer) to whom this gift + card is linked. + access: read-only + source: + openapi: openapi/openapi.json + GiftCardActivity: + docs: >- + Represents an action performed on a [gift card](entity:GiftCard) that + affects its state or balance. + A gift card activity contains information about a specific activity type. + For example, a `REDEEM` activity - For more information, see - [Metadata](https://developer.squareup.com/docs/build-basics/metadata). - pickup_details: - type: optional + includes a `redeem_activity_details` field that contains information about + the redemption. + properties: + id: + type: optional + docs: The Square-assigned ID of the gift card activity. + access: read-only + type: + type: GiftCardActivityType + docs: |- + The type of gift card activity. + See [Type](#type-type) for possible values + location_id: + type: string docs: >- - Contains details for a pickup fulfillment. These details are required - when the fulfillment - - type is `PICKUP`. - shipment_details: - type: optional + The ID of the [business location](entity:Location) where the activity + occurred. + created_at: + type: optional docs: >- - Contains details for a shipment fulfillment. These details are - required when the fulfillment type - - is `SHIPMENT`. - - - A shipment fulfillment's relationship to fulfillment `state`: - - `PROPOSED`: A shipment is requested. - - `RESERVED`: Fulfillment in progress. Shipment processing. - - `PREPARED`: Shipment packaged. Shipping label created. - - `COMPLETED`: Package has been shipped. - - `CANCELED`: Shipment has been canceled. + The timestamp when the gift card activity was created, in RFC 3339 + format. + access: read-only + gift_card_id: + type: optional> + docs: >- + The gift card ID. When creating a gift card activity, `gift_card_id` + is not required if - `FAILED`: Shipment has failed. - delivery_details: - type: optional - docs: Describes delivery details of an order fulfillment. - source: - openapi: openapi/openapi.json - FulfillmentDeliveryDetails: - docs: Describes delivery details of an order fulfillment. - properties: - recipient: - type: optional - docs: The contact information for the person to receive the fulfillment. - schedule_type: - type: >- - optional + `gift_card_gan` is specified. + gift_card_gan: + type: optional> docs: >- - Indicates the fulfillment delivery schedule type. If `SCHEDULED`, then + The gift card account number (GAN). When creating a gift card + activity, `gift_card_gan` - `deliver_at` is required. If `ASAP`, then `prep_time_duration` is - required. The default is `SCHEDULED`. + is not required if `gift_card_id` is specified. + gift_card_balance_money: + type: optional + docs: The final balance on the gift card after the action is completed. + load_activity_details: + type: optional + docs: >- + Additional details about a `LOAD` activity, which is used to reload + money onto a gift card. + activate_activity_details: + type: optional + docs: >- + Additional details about an `ACTIVATE` activity, which is used to + activate a gift card with - See - [OrderFulfillmentDeliveryDetailsScheduleType](#type-orderfulfillmentdeliverydetailsscheduletype) - for possible values - placed_at: - type: optional + an initial balance. + redeem_activity_details: + type: optional docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + Additional details about a `REDEEM` activity, which is used to redeem + a gift card for a purchase. - indicating when the fulfillment was placed. - The timestamp must be in RFC 3339 format (for example, - "2016-09-04T23:59:33.123Z"). + For applications that process payments using the Square Payments API, + Square creates a `REDEEM` activity that + updates the gift card balance after the corresponding + [CreatePayment](api-endpoint:Payments-CreatePayment) - Must be in RFC 3339 timestamp format, e.g., - "2016-09-04T23:59:33.123Z". - access: read-only - deliver_at: - type: optional> - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + request is completed. Applications that use a custom payment + processing system must call - that represents the start of the delivery period. + [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) + to create the `REDEEM` activity. + clear_balance_activity_details: + type: optional + docs: >- + Additional details about a `CLEAR_BALANCE` activity, which is used to + set the balance of a gift card to zero. + deactivate_activity_details: + type: optional + docs: >- + Additional details about a `DEACTIVATE` activity, which is used to + deactivate a gift card. + adjust_increment_activity_details: + type: optional + docs: >- + Additional details about an `ADJUST_INCREMENT` activity, which is used + to add money to a gift card - When the fulfillment `schedule_type` is `ASAP`, the field is - automatically + outside of a typical `ACTIVATE`, `LOAD`, or `REFUND` activity flow. + adjust_decrement_activity_details: + type: optional + docs: >- + Additional details about an `ADJUST_DECREMENT` activity, which is used + to deduct money from a gift - set to the current time plus the `prep_time_duration`. + card outside of a typical `REDEEM` activity flow. + refund_activity_details: + type: optional + docs: >- + Additional details about a `REFUND` activity, which is used to add + money to a gift card when - Otherwise, the application can set this field while the fulfillment - `state` is + refunding a payment. - `PROPOSED`, `RESERVED`, or `PREPARED` (any time before the - terminal state such as `COMPLETED`, `CANCELED`, and `FAILED`). + For applications that refund payments to a gift card using the Square + Refunds API, Square automatically + creates a `REFUND` activity that updates the gift card balance after a + [RefundPayment](api-endpoint:Refunds-RefundPayment) - The timestamp must be in RFC 3339 format + request is completed. Applications that use a custom processing system + must call - (for example, "2016-09-04T23:59:33.123Z"). - prep_time_duration: - type: optional> - docs: |- - The duration of time it takes to prepare and deliver this fulfillment. - The duration must be in RFC 3339 format (for example, "P1W3D"). - delivery_window_duration: - type: optional> + [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) + to create the `REFUND` activity. + unlinked_activity_refund_activity_details: + type: optional docs: >- - The time period after `deliver_at` in which to deliver the order. + Additional details about an `UNLINKED_ACTIVITY_REFUND` activity. This + activity is used to add money - Applications can set this field when the fulfillment `state` is + to a gift card when refunding a payment that was processed using a + custom payment processing system - `PROPOSED`, `RESERVED`, or `PREPARED` (any time before the terminal - state + and not linked to the gift card. + import_activity_details: + type: optional + docs: >- + Additional details about an `IMPORT` activity, which Square uses to + import a third-party - such as `COMPLETED`, `CANCELED`, and `FAILED`). + gift card with a balance. + block_activity_details: + type: optional + docs: >- + Additional details about a `BLOCK` activity, which Square uses to + temporarily block a gift card. + unblock_activity_details: + type: optional + docs: >- + Additional details about an `UNBLOCK` activity, which Square uses to + unblock a gift card. + import_reversal_activity_details: + type: optional + docs: >- + Additional details about an `IMPORT_REVERSAL` activity, which Square + uses to reverse the + import of a third-party gift card. + transfer_balance_to_activity_details: + type: optional + docs: >- + Additional details about a `TRANSFER_BALANCE_TO` activity, which + Square uses to add money to - The duration must be in RFC 3339 format (for example, "P1W3D"). - note: - type: optional> + a gift card as the result of a transfer from another gift card. + transfer_balance_from_activity_details: + type: optional docs: >- - Provides additional instructions about the delivery fulfillment. + Additional details about a `TRANSFER_BALANCE_FROM` activity, which + Square uses to deduct money from - It is displayed in the Square Point of Sale application and set by the - API. - validation: - maxLength: 550 - completed_at: - type: optional> + a gift as the result of a transfer to another gift card. + source: + openapi: openapi/openapi.json + GiftCardActivityActivate: + docs: >- + Represents details about an `ACTIVATE` [gift card activity + type](entity:GiftCardActivityType). + properties: + amount_money: + type: optional docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + The amount added to the gift card. This value is a positive integer. - indicates when the seller completed the fulfillment. - This field is automatically set when fulfillment `state` changes to - `COMPLETED`. + Applications that use a custom order processing system must specify + this amount in the - The timestamp must be in RFC 3339 format (for example, - "2016-09-04T23:59:33.123Z"). - in_progress_at: - type: optional + [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) + request. + order_id: + type: optional> docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + The ID of the [order](entity:Order) that contains the `GIFT_CARD` line + item. - indicates when the seller started processing the fulfillment. - This field is automatically set when the fulfillment `state` changes - to `RESERVED`. + Applications that use the Square Orders API to process orders must + specify the order ID - The timestamp must be in RFC 3339 format (for example, - "2016-09-04T23:59:33.123Z"). - access: read-only - rejected_at: - type: optional + [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) + request. + line_item_uid: + type: optional> docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + The UID of the `GIFT_CARD` line item in the order that represents the + gift card purchase. - indicating when the fulfillment was rejected. This field is - automatically set when the fulfillment `state` changes to `FAILED`. + Applications that use the Square Orders API to process orders must + specify the line item UID - The timestamp must be in RFC 3339 format (for example, - "2016-09-04T23:59:33.123Z"). - access: read-only - ready_at: - type: optional + in the + [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) + request. + reference_id: + type: optional> docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the seller marked the fulfillment as ready for + A client-specified ID that associates the gift card activity with an + entity in another system. - courier pickup. This field is automatically set when the fulfillment - `state` changes - to PREPARED. + Applications that use a custom order processing system can use this + field to track information - The timestamp must be in RFC 3339 format (for example, - "2016-09-04T23:59:33.123Z"). - access: read-only - delivered_at: - type: optional + related to an order or payment. + buyer_payment_instrument_ids: + type: optional>> docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the fulfillment was delivered to the recipient. + The payment instrument IDs used to process the gift card purchase, + such as a credit card ID - The timestamp must be in RFC 3339 format (for example, - "2016-09-04T23:59:33.123Z"). - access: read-only - canceled_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + or bank account ID. - indicating when the fulfillment was canceled. This field is - automatically - set when the fulfillment `state` changes to `CANCELED`. + Applications that use a custom order processing system must specify + payment instrument IDs in + the + [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) + request. - The timestamp must be in RFC 3339 format (for example, - "2016-09-04T23:59:33.123Z"). - access: read-only - cancel_reason: - type: optional> - docs: 'The delivery cancellation reason. Max length: 100 characters.' - validation: - maxLength: 100 - courier_pickup_at: - type: optional> - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + Square uses this information to perform compliance checks. - indicating when an order can be picked up by the courier for delivery. - The timestamp must be in RFC 3339 format (for example, - "2016-09-04T23:59:33.123Z"). - courier_pickup_window_duration: - type: optional> - docs: >- - The time period after `courier_pickup_at` in which the courier should - pick up the order. + For applications that use the Square Orders API to process payments, + Square has the necessary - The duration must be in RFC 3339 format (for example, "P1W3D"). - is_no_contact_delivery: - type: optional> - docs: Whether the delivery is preferred to be no contact. - dropoff_notes: - type: optional> + instrument IDs to perform compliance checks. + + + Each buyer payment instrument ID can contain a maximum of 255 + characters. + source: + openapi: openapi/openapi.json + GiftCardActivityAdjustDecrement: + docs: >- + Represents details about an `ADJUST_DECREMENT` [gift card activity + type](entity:GiftCardActivityType). + properties: + amount_money: + type: Money docs: >- - A note to provide additional instructions about how to deliver the - order. - validation: - maxLength: 550 - courier_provider_name: - type: optional> - docs: The name of the courier provider. - validation: - maxLength: 255 - courier_support_phone_number: - type: optional> - docs: The support phone number of the courier. - validation: - maxLength: 17 - square_delivery_id: + The amount deducted from the gift card balance. This value is a + positive integer. + reason: + type: GiftCardActivityAdjustDecrementReason + docs: |- + The reason the gift card balance was adjusted. + See [Reason](#type-reason) for possible values + source: + openapi: openapi/openapi.json + GiftCardActivityAdjustDecrementReason: + enum: + - SUSPICIOUS_ACTIVITY + - BALANCE_ACCIDENTALLY_INCREASED + - SUPPORT_ISSUE + - PURCHASE_WAS_REFUNDED + docs: >- + Indicates the reason for deducting money from a [gift + card](entity:GiftCard). + source: + openapi: openapi/openapi.json + GiftCardActivityAdjustIncrement: + docs: >- + Represents details about an `ADJUST_INCREMENT` [gift card activity + type](entity:GiftCardActivityType). + properties: + amount_money: + type: Money + docs: >- + The amount added to the gift card balance. This value is a positive + integer. + reason: + type: GiftCardActivityAdjustIncrementReason + docs: |- + The reason the gift card balance was adjusted. + See [Reason](#type-reason) for possible values + source: + openapi: openapi/openapi.json + GiftCardActivityAdjustIncrementReason: + enum: + - COMPLIMENTARY + - SUPPORT_ISSUE + - TRANSACTION_VOIDED + docs: Indicates the reason for adding money to a [gift card](entity:GiftCard). + source: + openapi: openapi/openapi.json + GiftCardActivityBlock: + docs: >- + Represents details about a `BLOCK` [gift card activity + type](entity:GiftCardActivityType). + properties: + reason: + type: GiftCardActivityBlockReason + docs: |- + The reason the gift card was blocked. + See [Reason](#type-reason) for possible values + source: + openapi: openapi/openapi.json + GiftCardActivityBlockReason: + type: literal<"CHARGEBACK_BLOCK"> + docs: Indicates the reason for blocking a [gift card](entity:GiftCard). + GiftCardActivityClearBalance: + docs: >- + Represents details about a `CLEAR_BALANCE` [gift card activity + type](entity:GiftCardActivityType). + properties: + reason: + type: GiftCardActivityClearBalanceReason + docs: |- + The reason the gift card balance was cleared. + See [Reason](#type-reason) for possible values + source: + openapi: openapi/openapi.json + GiftCardActivityClearBalanceReason: + enum: + - SUSPICIOUS_ACTIVITY + - REUSE_GIFTCARD + - UNKNOWN_REASON + docs: >- + Indicates the reason for clearing the balance of a [gift + card](entity:GiftCard). + source: + openapi: openapi/openapi.json + GiftCardActivityCreatedEvent: + docs: Published when a [gift card activity](entity:GiftCardActivity) is created. + properties: + merchant_id: type: optional> - docs: The identifier for the delivery created by Square. - validation: - maxLength: 50 - external_delivery_id: + docs: The ID of the Square seller associated with the event. + type: type: optional> docs: >- - The identifier for the delivery created by the third-party courier - service. - validation: - maxLength: 50 - managed_delivery: - type: optional> + The type of event. For this event, the value is + `gift_card.activity.created`. + event_id: + type: optional> docs: >- - The flag to indicate the delivery is managed by a third party (ie - DoorDash), which means + The unique ID of the event, which is used for - we may not receive all recipient information for PII purposes. + [idempotency + support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. source: openapi: openapi/openapi.json - FulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleType: + GiftCardActivityCreatedEventData: + docs: Represents the data associated with a `gift_card.activity.created` event. + properties: + type: + type: optional> + docs: >- + The type of object affected by the event. For this event, the value is + `gift_card_activity`. + id: + type: optional + docs: The ID of the new gift card activity. + object: + type: optional + docs: An object that contains the new gift card activity. + source: + openapi: openapi/openapi.json + GiftCardActivityCreatedEventObject: + docs: |- + An object that contains the gift card activity associated with a + `gift_card.activity.created` event. + properties: + gift_card_activity: + type: optional + docs: The new gift card activity. + source: + openapi: openapi/openapi.json + GiftCardActivityDeactivate: + docs: >- + Represents details about a `DEACTIVATE` [gift card activity + type](entity:GiftCardActivityType). + properties: + reason: + type: GiftCardActivityDeactivateReason + docs: |- + The reason the gift card was deactivated. + See [Reason](#type-reason) for possible values + source: + openapi: openapi/openapi.json + GiftCardActivityDeactivateReason: enum: - - SCHEDULED - - ASAP - docs: The schedule type of the delivery fulfillment. + - SUSPICIOUS_ACTIVITY + - UNKNOWN_REASON + - CHARGEBACK_DEACTIVATE + docs: Indicates the reason for deactivating a [gift card](entity:GiftCard). source: openapi: openapi/openapi.json - FulfillmentFulfillmentEntry: + GiftCardActivityImport: docs: >- - Links an order line item to a fulfillment. Each entry must reference + Represents details about an `IMPORT` [gift card activity + type](entity:GiftCardActivityType). - a valid `uid` for an order line item in the `line_item_uid` field, as well - as a `quantity` to + This activity type is used when Square imports a third-party gift card, in + which case the - fulfill. + `gan_source` of the gift card is set to `OTHER`. properties: - uid: + amount_money: + type: Money + docs: The balance amount on the imported gift card. + source: + openapi: openapi/openapi.json + GiftCardActivityImportReversal: + docs: >- + Represents details about an `IMPORT_REVERSAL` [gift card activity + type](entity:GiftCardActivityType). + properties: + amount_money: + type: Money + docs: |- + The amount of money cleared from the third-party gift card when + the import was reversed. + source: + openapi: openapi/openapi.json + GiftCardActivityLoad: + docs: >- + Represents details about a `LOAD` [gift card activity + type](entity:GiftCardActivityType). + properties: + amount_money: + type: optional + docs: >- + The amount added to the gift card. This value is a positive integer. + + + Applications that use a custom order processing system must specify + this amount in the + + [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) + request. + order_id: type: optional> docs: >- - A unique ID that identifies the fulfillment entry only within this - order. - validation: - maxLength: 60 + The ID of the [order](entity:Order) that contains the `GIFT_CARD` line + item. + + + Applications that use the Square Orders API to process orders must + specify the order ID in the + + [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) + request. line_item_uid: - type: string - docs: The `uid` from the order line item. - validation: - minLength: 1 - quantity: - type: string + type: optional> docs: >- - The quantity of the line item being fulfilled, formatted as a decimal - number. + The UID of the `GIFT_CARD` line item in the order that represents the + additional funds for the gift card. - For example, `"3"`. + Applications that use the Square Orders API to process orders must + specify the line item UID - Fulfillments for line items with a `quantity_unit` can have - non-integer quantities. + in the + [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) + request. + reference_id: + type: optional> + docs: >- + A client-specified ID that associates the gift card activity with an + entity in another system. - For example, `"1.70000"`. - validation: - minLength: 1 - maxLength: 12 - metadata: - type: optional>>>> + + Applications that use a custom order processing system can use this + field to track information related to + + an order or payment. + buyer_payment_instrument_ids: + type: optional>> docs: >- - Application-defined data attached to this fulfillment entry. Metadata - fields are intended + The payment instrument IDs used to process the order for the + additional funds, such as a credit card ID - to store descriptive references or associations with an entity in - another system or store brief + or bank account ID. - 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 + Applications that use a custom order processing system must specify + payment instrument IDs in - identifiable information or card details). + the + [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) + request. + Square uses this information to perform compliance checks. - 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 + For applications that use the Square Orders API to process payments, + Square has the necessary - with a namespace, separated from the key with a ':' character. + instrument IDs to perform compliance checks. - Values have a maximum length of 255 characters. + Each buyer payment instrument ID can contain a maximum of 255 + characters. + source: + openapi: openapi/openapi.json + GiftCardActivityRedeem: + docs: >- + Represents details about a `REDEEM` [gift card activity + type](entity:GiftCardActivityType). + properties: + amount_money: + type: Money + docs: >- + The amount deducted from the gift card for the redemption. This value + is a positive integer. - An application can have up to 10 entries per metadata field. + Applications that use a custom payment processing system must specify + this amount in the + [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) + request. + payment_id: + type: optional + docs: >- + The ID of the payment that represents the gift card redemption. Square + populates this field - Entries written by applications are private and can only be read or - modified by the same + if the payment was processed by Square. + access: read-only + reference_id: + type: optional> + docs: >- + A client-specified ID that associates the gift card activity with an + entity in another system. - application. + Applications that use a custom payment processing system can use this + field to track information - For more information, see - [Metadata](https://developer.squareup.com/docs/build-basics/metadata). + related to an order or payment. + status: + type: optional + docs: >- + The status of the gift card redemption. Gift cards redeemed from + Square Point of Sale or the + + Square Seller Dashboard use a two-state process: `PENDING` + + to `COMPLETED` or `PENDING` to `CANCELED`. Gift cards redeemed using + the Gift Card Activities API + + always have a `COMPLETED` status. + + See [Status](#type-status) for possible values source: openapi: openapi/openapi.json - FulfillmentFulfillmentLineItemApplication: + GiftCardActivityRedeemStatus: enum: - - ALL - - ENTRY_LIST + - PENDING + - COMPLETED + - CANCELED docs: >- - The `line_item_application` describes what order line items this - fulfillment applies + Indicates the status of a [gift card](entity:GiftCard) redemption. This + status is relevant only for - to. It can be `ALL` or `ENTRY_LIST` with a supplied list of fulfillment - entries. + redemptions made from Square products (such as Square Point of Sale) + because Square products use a + + two-state process. Gift cards redeemed using the Gift Card Activities API + always have a `COMPLETED` status. source: openapi: openapi/openapi.json - FulfillmentPickupDetails: - docs: Contains details necessary to fulfill a pickup order. + GiftCardActivityRefund: + docs: >- + Represents details about a `REFUND` [gift card activity + type](entity:GiftCardActivityType). properties: - recipient: - type: optional - docs: >- - Information about the person to pick up this fulfillment from a - physical - - location. - expires_at: + redeem_activity_id: type: optional> docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + The ID of the refunded `REDEEM` gift card activity. Square populates + this field if the - indicating when this fulfillment expires if it is not marked in - progress. The timestamp must be + `payment_id` in the corresponding + [RefundPayment](api-endpoint:Refunds-RefundPayment) request - in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). The - expiration time can only be set + represents a gift card redemption. - up to 7 days in the future. If `expires_at` is not set, any new - payments attached to the order - are automatically completed. - auto_complete_duration: - type: optional> + For applications that use a custom payment processing system, this + field is required when creating + + a `REFUND` activity. The provided `REDEEM` activity ID must be linked + to the same gift card. + amount_money: + type: optional docs: >- - The duration of time after which an in progress pickup fulfillment is - automatically moved + The amount added to the gift card for the refund. This value is a + positive integer. - to the `COMPLETED` state. The duration must be in RFC 3339 format (for - example, "P1W3D"). + This field is required when creating a `REFUND` activity. The amount + can represent a full or partial refund. + reference_id: + type: optional> + docs: >- + A client-specified ID that associates the gift card activity with an + entity in another system. + payment_id: + type: optional + docs: >- + The ID of the refunded payment. Square populates this field if the + refund is for a + + payment processed by Square. This field matches the `payment_id` in + the corresponding - If not set, this pickup fulfillment remains in progress until it is - canceled or completed. - schedule_type: - type: optional + [RefundPayment](api-endpoint:Refunds-RefundPayment) request. + access: read-only + source: + openapi: openapi/openapi.json + GiftCardActivityTransferBalanceFrom: + docs: >- + Represents details about a `TRANSFER_BALANCE_FROM` [gift card activity + type](entity:GiftCardActivityType). + properties: + transfer_to_gift_card_id: + type: string + docs: The ID of the gift card to which the specified amount was transferred. + amount_money: + type: Money + docs: >- + The amount deducted from the gift card for the transfer. This value is + a positive integer. + source: + openapi: openapi/openapi.json + GiftCardActivityTransferBalanceTo: + docs: >- + Represents details about a `TRANSFER_BALANCE_TO` [gift card activity + type](entity:GiftCardActivityType). + properties: + transfer_from_gift_card_id: + type: string + docs: >- + The ID of the gift card from which the specified amount was + transferred. + amount_money: + type: Money + docs: >- + The amount added to the gift card balance for the transfer. This value + is a positive integer. + source: + openapi: openapi/openapi.json + GiftCardActivityType: + enum: + - ACTIVATE + - LOAD + - REDEEM + - CLEAR_BALANCE + - DEACTIVATE + - ADJUST_INCREMENT + - ADJUST_DECREMENT + - REFUND + - UNLINKED_ACTIVITY_REFUND + - IMPORT + - BLOCK + - UNBLOCK + - IMPORT_REVERSAL + - TRANSFER_BALANCE_FROM + - TRANSFER_BALANCE_TO + docs: Indicates the type of [gift card activity](entity:GiftCardActivity). + source: + openapi: openapi/openapi.json + GiftCardActivityUnblock: + docs: >- + Represents details about an `UNBLOCK` [gift card activity + type](entity:GiftCardActivityType). + properties: + reason: + type: GiftCardActivityUnblockReason + docs: |- + The reason the gift card was unblocked. + See [Reason](#type-reason) for possible values + source: + openapi: openapi/openapi.json + GiftCardActivityUnblockReason: + type: literal<"CHARGEBACK_UNBLOCK"> + docs: Indicates the reason for unblocking a [gift card](entity:GiftCard). + GiftCardActivityUnlinkedActivityRefund: + docs: >- + Represents details about an `UNLINKED_ACTIVITY_REFUND` [gift card activity + type](entity:GiftCardActivityType). + properties: + amount_money: + type: Money docs: >- - The schedule type of the pickup fulfillment. Defaults to `SCHEDULED`. - - See - [FulfillmentPickupDetailsScheduleType](#type-fulfillmentpickupdetailsscheduletype) - for possible values - pickup_at: + The amount added to the gift card for the refund. This value is a + positive integer. + reference_id: type: optional> docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - that represents the start of the pickup window. Must be in RFC 3339 - timestamp format, e.g., + A client-specified ID that associates the gift card activity with an + entity in another system. + payment_id: + type: optional + docs: >- + The ID of the refunded payment. This field is not used starting in + Square version 2022-06-16. + access: read-only + source: + openapi: openapi/openapi.json + GiftCardActivityUpdatedEvent: + docs: >- + Published when a [gift card activity](entity:GiftCardActivity) is + updated. - "2016-09-04T23:59:33.123Z". + Subscribe to this event to be notified about the following changes: + - An update to the `REDEEM` activity for a gift card redemption made from + a Square product (such as Square Point of Sale). - For fulfillments with the schedule type `ASAP`, this is automatically - set + These redemptions are initially assigned a `PENDING` state, but then + change to a `COMPLETED` or `CANCELED` state. - to the current time plus the expected duration to prepare the - fulfillment. - pickup_window_duration: + - An update to the `IMPORT` activity for an imported gift card when the + balance is later adjusted by Square. + properties: + merchant_id: type: optional> - docs: >- - The window of time in which the order should be picked up after the - `pickup_at` timestamp. - - Must be in RFC 3339 duration format, e.g., "P1W3D". Can be used as an - - informational guideline for merchants. - prep_time_duration: + docs: The ID of the Square seller associated with the event. + type: type: optional> - docs: |- - The duration of time it takes to prepare this fulfillment. - The duration must be in RFC 3339 format (for example, "P1W3D"). - note: + docs: >- + The type of event. For this event, the value is + `gift_card.activity.updated`. + event_id: type: optional> docs: >- - A note to provide additional instructions about the pickup + The unique ID of the event, which is used for - fulfillment displayed in the Square Point of Sale application and set - by the API. - validation: - maxLength: 500 - placed_at: + [idempotency + support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + created_at: type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the fulfillment was placed. The timestamp must be in - RFC 3339 format - - (for example, "2016-09-04T23:59:33.123Z"). + docs: The timestamp of when the event was created, in RFC 3339 format. access: read-only - accepted_at: - type: optional + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + GiftCardActivityUpdatedEventData: + docs: The data associated with a `gift_card.activity.updated` event. + properties: + type: + type: optional> docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the fulfillment was marked in progress. The timestamp - must be in RFC 3339 format - - (for example, "2016-09-04T23:59:33.123Z"). - access: read-only - rejected_at: + The type of object affected by the event. For this event, the value is + `gift_card_activity`. + id: type: optional + docs: The ID of the updated gift card activity. + object: + type: optional + docs: An object that contains the updated gift card activity. + source: + openapi: openapi/openapi.json + GiftCardActivityUpdatedEventObject: + docs: |- + An object that contains the gift card activity associated with a + `gift_card.activity.updated` event. + properties: + gift_card_activity: + type: optional + docs: The updated gift card activity. + source: + openapi: openapi/openapi.json + GiftCardCreatedEvent: + docs: Published when a [gift card](entity:GiftCard) is created. + properties: + merchant_id: + type: optional> + docs: The ID of the Square seller associated with the event. + type: + type: optional> + docs: The type of event. For this event, the value is `gift_card.created`. + event_id: + type: optional> docs: >- - The - [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 + The unique ID of the event, which is used for - (for example, "2016-09-04T23:59:33.123Z"). - access: read-only - ready_at: + [idempotency + support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + created_at: type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the fulfillment is marked as ready for pickup. The - timestamp must be in RFC 3339 format - - (for example, "2016-09-04T23:59:33.123Z"). + docs: The timestamp of when the event was created, in RFC 3339 format. access: read-only - expired_at: - type: optional + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + GiftCardCreatedEventData: + docs: The data associated with a `gift_card.created` event. + properties: + type: + type: optional> docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the fulfillment expired. The timestamp must be in RFC - 3339 format - - (for example, "2016-09-04T23:59:33.123Z"). - access: read-only - picked_up_at: + The type of object affected by the event. For this event, the value is + `gift_card`. + id: type: optional + docs: The ID of the new gift card. + object: + type: optional + docs: An object that contains the new gift card. + source: + openapi: openapi/openapi.json + GiftCardCreatedEventObject: + docs: >- + An object that contains the gift card associated with a + `gift_card.created` event. + properties: + gift_card: + type: optional + docs: The new gift card. + source: + openapi: openapi/openapi.json + GiftCardCustomerLinkedEvent: + docs: >- + Published when a [customer](entity:Customer) is linked to a [gift + card](entity:GiftCard). + properties: + merchant_id: + type: optional> + docs: The ID of the Square seller associated with the event. + type: + type: optional> docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the fulfillment was picked up by the recipient. The - timestamp must be in RFC 3339 format - - (for example, "2016-09-04T23:59:33.123Z"). - access: read-only - canceled_at: - type: optional + The type of event. For this event, the value is + `gift_card.customer_linked`. + event_id: + type: optional> docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the fulfillment was canceled. The timestamp must be in - RFC 3339 format + The unique ID of the event, which is used for - (for example, "2016-09-04T23:59:33.123Z"). + [idempotency + support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. access: read-only - cancel_reason: + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + GiftCardCustomerLinkedEventData: + docs: The data associated with a `gift_card.customer_linked` event. + properties: + type: type: optional> docs: >- - A description of why the pickup was canceled. The maximum length: 100 - characters. - validation: - maxLength: 100 - is_curbside_pickup: - type: optional> - docs: >- - If set to `true`, indicates that this pickup order is for curbside - pickup, not in-store pickup. - curbside_pickup_details: - type: optional + The type of object affected by the event. For this event, the value is + `gift_card`. + id: + type: optional + docs: The ID of the updated gift card. + object: + type: optional docs: >- - Specific details for curbside pickup. These details can only be - populated if `is_curbside_pickup` is set to `true`. + An object that contains the updated gift card and the ID of the linked + customer. source: openapi: openapi/openapi.json - FulfillmentPickupDetailsCurbsidePickupDetails: - docs: Specific details for curbside pickup. + GiftCardCustomerLinkedEventObject: + docs: |- + An object that contains the gift card and customer ID associated with a + `gift_card.customer_linked` event. properties: - curbside_details: + gift_card: + type: optional + docs: The gift card with the updated `customer_ids` field. + linked_customer_id: + type: optional> + docs: The ID of the linked [customer](entity:Customer). + source: + openapi: openapi/openapi.json + GiftCardCustomerUnlinkedEvent: + docs: >- + Published when a [customer](entity:Customer) is unlinked from a [gift + card](entity:GiftCard). + properties: + merchant_id: + type: optional> + docs: The ID of the Square seller associated with the event. + type: type: optional> docs: >- - Specific details for curbside pickup, such as parking number and - vehicle model. - validation: - maxLength: 250 - buyer_arrived_at: + The type of event. For this event, the value is + `gift_card.customer_unlinked`. + event_id: type: optional> docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + The unique ID of the event, which is used for - indicating when the buyer arrived and is waiting for pickup. The - timestamp must be in RFC 3339 format + [idempotency + support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + GiftCardCustomerUnlinkedEventData: + docs: The data associated with a `gift_card.customer_unlinked` event. + properties: + type: + type: optional> + docs: >- + The type of object affected by the event. For this event, the value is + `gift_card`. + id: + type: optional + docs: The ID of the updated gift card. + object: + type: optional + docs: >- + An object that contains the updated gift card and the ID of the + unlinked customer. + source: + openapi: openapi/openapi.json + GiftCardCustomerUnlinkedEventObject: + docs: >- + An object that contains the gift card and the customer ID associated with + a - (for example, "2016-09-04T23:59:33.123Z"). + `gift_card.customer_linked` event. + properties: + gift_card: + type: optional + docs: |- + The gift card with the updated `customer_ids` field. + The field is removed if the gift card is not linked to any customers. + unlinked_customer_id: + type: optional> + docs: The ID of the unlinked [customer](entity:Customer). + source: + openapi: openapi/openapi.json + GiftCardGanSource: + enum: + - SQUARE + - OTHER + docs: |- + Indicates the source that generated the gift card + account number (GAN). source: openapi: openapi/openapi.json - FulfillmentPickupDetailsScheduleType: + GiftCardStatus: enum: - - SCHEDULED - - ASAP - docs: The schedule type of the pickup fulfillment. + - ACTIVE + - DEACTIVATED + - BLOCKED + - PENDING + docs: Indicates the gift card state. source: openapi: openapi/openapi.json - FulfillmentRecipient: - docs: Information about the fulfillment recipient. + GiftCardType: + enum: + - PHYSICAL + - DIGITAL + docs: Indicates the gift card type. + source: + openapi: openapi/openapi.json + GiftCardUpdatedEvent: + docs: |- + Published when a [gift card](entity:GiftCard) is updated. This includes + changes to the state, balance, and customer association. properties: - customer_id: + merchant_id: type: optional> - docs: >- - The ID of the customer associated with the fulfillment. - - - If `customer_id` is provided, the fulfillment recipient's - `display_name`, - - `email_address`, and `phone_number` are automatically populated from - the - - targeted customer profile. If these fields are set in the request, the - request - - values override the information from the customer profile. If the - - targeted customer profile does not contain the necessary information - and - - these fields are left unset, the request results in an error. - validation: - maxLength: 191 - display_name: + docs: The ID of the Square seller associated with the event. + type: type: optional> docs: >- - The display name of the fulfillment recipient. This field is required. - - - If provided, the display name overrides the corresponding customer - profile value - - indicated by `customer_id`. - validation: - maxLength: 255 - email_address: + The type of this event. For this event, the value is + `gift_card.updated`. + event_id: type: optional> docs: >- - The email address of the fulfillment recipient. - + The unique ID of the event, which is used for - If provided, the email address overrides the corresponding customer - profile value - - indicated by `customer_id`. - validation: - maxLength: 255 - phone_number: + [idempotency + support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + GiftCardUpdatedEventData: + docs: The data associated with a `gift_card.updated` event. + properties: + type: type: optional> docs: >- - The phone number of the fulfillment recipient. This field is required. - - - If provided, the phone number overrides the corresponding customer - profile value - - indicated by `customer_id`. - validation: - maxLength: 17 - address: - type: optional
+ The type of object affected by the event. For this event, the value is + `gift_card`. + id: + type: optional + docs: The ID of the updated gift card. + object: + type: optional + docs: An object that contains the updated gift card. + source: + openapi: openapi/openapi.json + GiftCardUpdatedEventObject: + docs: >- + An object that contains the gift card associated with a + `gift_card.updated` event. + properties: + gift_card: + type: optional docs: >- - The address of the fulfillment recipient. This field is required. - - - If provided, the address overrides the corresponding customer profile - value + The gift card with the updated `balance_money`, `state`, or + `customer_ids` field. - indicated by `customer_id`. + Some events can affect both `balance_money` and `state`. source: openapi: openapi/openapi.json - FulfillmentShipmentDetails: - docs: Contains the details necessary to fulfill a shipment order. + InventoryAdjustment: + docs: |- + Represents a change in state or quantity of product inventory at a + particular time and location. properties: - recipient: - type: optional - docs: Information about the person to receive this shipment fulfillment. - carrier: - type: optional> - docs: >- - The shipping carrier being used to ship this fulfillment (such as UPS, - FedEx, or USPS). + id: + type: optional + docs: |- + A unique ID generated by Square for the + `InventoryAdjustment`. validation: - maxLength: 50 - shipping_note: + maxLength: 100 + reference_id: type: optional> - docs: A note with additional information for the shipping carrier. + docs: |- + An optional ID provided by the application to tie the + `InventoryAdjustment` to an external + system. validation: - maxLength: 500 - shipping_type: + maxLength: 255 + from_state: + type: optional + docs: |- + The [inventory state](entity:InventoryState) of the related quantity + of items before the adjustment. + See [InventoryState](#type-inventorystate) for possible values + to_state: + type: optional + docs: |- + The [inventory state](entity:InventoryState) of the related quantity + of items after the adjustment. + See [InventoryState](#type-inventorystate) for possible values + location_id: type: optional> docs: >- - A description of the type of shipping product purchased from the - carrier + The Square-generated ID of the [Location](entity:Location) where the + related - (such as First Class, Priority, or Express). + quantity of items is being tracked. validation: - maxLength: 50 - tracking_number: + maxLength: 100 + catalog_object_id: type: optional> - docs: >- - The reference number provided by the carrier to track the shipment's - progress. + docs: |- + The Square-generated ID of the + [CatalogObject](entity:CatalogObject) being tracked. validation: maxLength: 100 - tracking_url: + catalog_object_type: type: optional> - docs: A link to the tracking webpage on the carrier's website. - validation: - maxLength: 2000 - placed_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the shipment was requested. The timestamp must be in - RFC 3339 format - - (for example, "2016-09-04T23:59:33.123Z"). - access: read-only - in_progress_at: - type: optional docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when this fulfillment was moved to the `RESERVED` state, - which indicates that preparation + The [type](entity:CatalogObjectType) of the + [CatalogObject](entity:CatalogObject) being tracked. - of this shipment has begun. The timestamp must be in RFC 3339 format - (for example, "2016-09-04T23:59:33.123Z"). - access: read-only - packaged_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - indicating when this fulfillment was moved to the `PREPARED` state, - which indicates that the + The Inventory API supports setting and reading the + `"catalog_object_type": "ITEM_VARIATION"` field value. - fulfillment is packaged. The timestamp must be in RFC 3339 format (for - example, "2016-09-04T23:59:33.123Z"). - access: read-only - expected_shipped_at: + In addition, it can also read the `"catalog_object_type": "ITEM"` + field value that is set by the Square Restaurants app. + validation: + maxLength: 14 + quantity: + type: optional> + docs: |- + The number of items affected by the adjustment as a decimal string. + Can support up to 5 digits after the decimal point. + validation: + maxLength: 26 + total_price_money: + type: optional + docs: |- + The total price paid for goods associated with the + adjustment. Present if and only if `to_state` is `SOLD`. Always + non-negative. + occurred_at: type: optional> docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + A client-generated RFC 3339-formatted timestamp that indicates when - indicating when the shipment is expected to be delivered to the - shipping carrier. + the inventory adjustment took place. For inventory adjustment updates, + the `occurred_at` - The timestamp must be in RFC 3339 format (for example, - "2016-09-04T23:59:33.123Z"). - shipped_at: + timestamp cannot be older than 24 hours or in the future relative to + the + + time of the request. + validation: + maxLength: 34 + created_at: type: optional docs: >- - 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"). + An RFC 3339-formatted timestamp that indicates when the inventory + adjustment is received. + validation: + maxLength: 34 access: read-only - canceled_at: + source: + type: optional + docs: |- + Information about the application that caused the + inventory adjustment. + employee_id: type: optional> docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating the shipment was canceled. + The Square-generated ID of the [Employee](entity:Employee) responsible + for the - The timestamp must be in RFC 3339 format (for example, - "2016-09-04T23:59:33.123Z"). - cancel_reason: + inventory adjustment. + validation: + maxLength: 100 + team_member_id: type: optional> - docs: A description of why the shipment was canceled. + docs: >- + The Square-generated ID of the [Team Member](entity:TeamMember) + responsible for the + + inventory adjustment. validation: maxLength: 100 - failed_at: + transaction_id: + type: optional + docs: |- + The Square-generated ID of the [Transaction](entity:Transaction) that + caused the adjustment. Only relevant for payment-related state + transitions. + validation: + maxLength: 255 + access: read-only + refund_id: + type: optional + docs: |- + The Square-generated ID of the [Refund](entity:Refund) that + caused the adjustment. Only relevant for refund-related state + transitions. + validation: + maxLength: 255 + access: read-only + purchase_order_id: type: optional docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + The Square-generated ID of the purchase order that caused the - indicating when the shipment failed to be completed. The timestamp - must be in RFC 3339 format + adjustment. Only relevant for state transitions from the Square for + Retail - (for example, "2016-09-04T23:59:33.123Z"). - access: read-only - failure_reason: - type: optional> - docs: A description of why the shipment failed to be completed. + app. validation: maxLength: 100 - source: - openapi: openapi/openapi.json - FulfillmentState: - enum: - - PROPOSED - - RESERVED - - PREPARED - - COMPLETED - - CANCELED - - FAILED - docs: The current state of this fulfillment. - source: - openapi: openapi/openapi.json - FulfillmentType: - enum: - - PICKUP - - SHIPMENT - - DELIVERY - docs: The type of fulfillment. - source: - openapi: openapi/openapi.json - GetBankAccountByV1IdResponse: - docs: Response object returned by GetBankAccountByV1Id. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - bank_account: - type: optional - docs: The requested `BankAccount` object. - source: - openapi: openapi/openapi.json - GetBankAccountResponse: - docs: Response object returned by `GetBankAccount`. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - bank_account: - type: optional - docs: The requested `BankAccount` object. - source: - openapi: openapi/openapi.json - GetBreakTypeResponse: - docs: >- - The response to a request to get a `BreakType`. The response contains - - the requested `BreakType` objects and might contain a set of `Error` - objects if - - the request resulted in errors. - properties: - break_type: - type: optional - docs: The response object. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: openapi/openapi.json - GetDeviceCodeResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - device_code: - type: optional - docs: The queried DeviceCode. - source: - openapi: openapi/openapi.json - GetDeviceResponse: - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - device: - type: optional - docs: The requested `Device`. - source: - openapi: openapi/openapi.json - GetEmployeeWageResponse: - docs: >- - A response to a request to get an `EmployeeWage`. The response contains - - the requested `EmployeeWage` objects and might contain a set of `Error` - objects if - - the request resulted in errors. - properties: - employee_wage: - type: optional - docs: The requested `EmployeeWage` object. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: openapi/openapi.json - GetInvoiceResponse: - docs: Describes a `GetInvoice` response. - properties: - invoice: - type: optional - docs: The invoice requested. - errors: - type: optional> - docs: Information about errors encountered during the request. - source: - openapi: openapi/openapi.json - GetPaymentRefundResponse: - docs: >- - Defines the response returned by - [GetRefund](api-endpoint:Refunds-GetPaymentRefund). - + access: read-only + goods_receipt_id: + type: optional + docs: >- + The Square-generated ID of the goods receipt that caused the - Note: If there are errors processing the request, the refund field might - not be + adjustment. Only relevant for state transitions from the Square for + Retail - present or it might be present in a FAILED state. - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - refund: - type: optional - docs: The requested `PaymentRefund`. - source: - openapi: openapi/openapi.json - GetPaymentResponse: - docs: >- - Defines the response returned by - [GetPayment](api-endpoint:Payments-GetPayment). - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - payment: - type: optional - docs: The requested `Payment`. - source: - openapi: openapi/openapi.json - GetPayoutResponse: - properties: - payout: - type: optional - docs: The requested payout. - errors: - type: optional> - docs: Information about errors encountered during the request. + app. + validation: + maxLength: 100 + access: read-only + adjustment_group: + type: optional + docs: >- + An adjustment group bundling the related adjustments of item + variations through stock conversions in a single inventory event. source: openapi: openapi/openapi.json - GetShiftResponse: - docs: |- - A response to a request to get a `Shift`. The response contains - the requested `Shift` object and might contain a set of `Error` objects if - the request resulted in errors. + InventoryAdjustmentGroup: properties: - shift: - type: optional - docs: The requested `Shift`. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: openapi/openapi.json - GetTeamMemberWageResponse: - docs: >- - A response to a request to get a `TeamMemberWage`. The response contains + id: + type: optional + docs: |- + A unique ID generated by Square for the + `InventoryAdjustmentGroup`. + validation: + maxLength: 100 + access: read-only + root_adjustment_id: + type: optional + docs: The inventory adjustment of the composed variation. + validation: + maxLength: 100 + access: read-only + from_state: + type: optional + docs: >- + Representative `from_state` for adjustments within the group. For + example, for a group adjustment from `IN_STOCK` to `SOLD`, - the requested `TeamMemberWage` objects and might contain a set of `Error` - objects if + there can be two component adjustments in the group: one from + `IN_STOCK`to `COMPOSED` and the other one from `COMPOSED` to `SOLD`. - the request resulted in errors. - properties: - team_member_wage: - type: optional - docs: The requested `TeamMemberWage` object. - errors: - type: optional> - docs: Any errors that occurred during the request. + Here, the representative `from_state` for the + `InventoryAdjustmentGroup` is `IN_STOCK`. + + See [InventoryState](#type-inventorystate) for possible values + to_state: + type: optional + docs: >- + Representative `to_state` for adjustments within group. For example, + for a group adjustment from `IN_STOCK` to `SOLD`, + + the two component adjustments in the group can be from `IN_STOCK` to + `COMPOSED` and from `COMPOSED` to `SOLD`. + + Here, the representative `to_state` of the `InventoryAdjustmentGroup` + is `SOLD`. + + See [InventoryState](#type-inventorystate) for possible values source: openapi: openapi/openapi.json - GetTerminalActionResponse: - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - action: - type: optional - docs: The requested `TerminalAction` + InventoryAlertType: + enum: + - NONE + - LOW_QUANTITY + docs: >- + Indicates whether Square should alert the merchant when the inventory + quantity of a CatalogItemVariation is low. source: openapi: openapi/openapi.json - GetTerminalCheckoutResponse: + InventoryChange: + docs: |- + Represents a single physical count, inventory, adjustment, or transfer + that is part of the history of inventory changes for a particular + [CatalogObject](entity:CatalogObject) instance. properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - checkout: - type: optional - docs: The requested `TerminalCheckout`. + type: + type: optional + docs: >- + Indicates how the inventory change is applied. See + + [InventoryChangeType](entity:InventoryChangeType) for all possible + values. + + See [InventoryChangeType](#type-inventorychangetype) for possible + values + physical_count: + type: optional + docs: |- + Contains details about the physical count when `type` is + `PHYSICAL_COUNT`, and is unset for all other change types. + adjustment: + type: optional + docs: |- + Contains details about the inventory adjustment when `type` is + `ADJUSTMENT`, and is unset for all other change types. + transfer: + type: optional + docs: >- + Contains details about the inventory transfer when `type` is + + `TRANSFER`, and is unset for all other change types. + + + _Note:_ An [InventoryTransfer](entity:InventoryTransfer) object can + only be set in the input to the + + [BatchChangeInventory](api-endpoint:Inventory-BatchChangeInventory) + endpoint when the seller has an active Retail Plus subscription. + measurement_unit: + type: optional + docs: >- + The [CatalogMeasurementUnit](entity:CatalogMeasurementUnit) object + representing the catalog measurement unit associated with the + inventory change. + measurement_unit_id: + type: optional + docs: >- + The ID of the [CatalogMeasurementUnit](entity:CatalogMeasurementUnit) + object representing the catalog measurement unit associated with the + inventory change. + access: read-only source: openapi: openapi/openapi.json - GetTerminalRefundResponse: - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - refund: - type: optional - docs: The requested `Refund`. + InventoryChangeType: + enum: + - PHYSICAL_COUNT + - ADJUSTMENT + - TRANSFER + docs: >- + Indicates how the inventory change was applied to a tracked product + quantity. source: openapi: openapi/openapi.json - GiftCard: - docs: Represents a Square gift card. + InventoryCount: + docs: >- + Represents Square-estimated quantity of items in a particular state at a + + particular seller location based on the known history of physical counts + and + + inventory adjustments. properties: - id: - type: optional - docs: The Square-assigned ID of the gift card. - access: read-only - type: - type: GiftCardType + catalog_object_id: + type: optional> docs: |- - The gift card type. - See [Type](#type-type) for possible values - gan_source: - type: optional + The Square-generated ID of the + [CatalogObject](entity:CatalogObject) being tracked. + validation: + maxLength: 100 + catalog_object_type: + type: optional> docs: >- - The source that generated the gift card account number (GAN). The - default value is `SQUARE`. + The [type](entity:CatalogObjectType) of the + [CatalogObject](entity:CatalogObject) being tracked. - See [GANSource](#type-gansource) for possible values + + The Inventory API supports setting and reading the + `"catalog_object_type": "ITEM_VARIATION"` field value. + + In addition, it can also read the `"catalog_object_type": "ITEM"` + field value that is set by the Square Restaurants app. + validation: + maxLength: 14 state: - type: optional + type: optional docs: |- - The current gift card state. - See [Status](#type-status) for possible values - balance_money: - type: optional + The current [inventory state](entity:InventoryState) for the related + quantity of items. + See [InventoryState](#type-inventorystate) for possible values + location_id: + type: optional> docs: >- - The current gift card balance. This balance is always greater than or - equal to zero. - gan: + The Square-generated ID of the [Location](entity:Location) where the + related + + quantity of items is being tracked. + validation: + maxLength: 100 + quantity: type: optional> docs: >- - The gift card account number (GAN). Buyers can use the GAN to make - purchases or check + The number of items affected by the estimated count as a decimal + string. - the gift card balance. - created_at: + Can support up to 5 digits after the decimal point. + validation: + maxLength: 26 + calculated_at: type: optional docs: >- - The timestamp when the gift card was created, in RFC 3339 format. + An RFC 3339-formatted timestamp that indicates when the most recent + physical count or adjustment affecting - In the case of a digital gift card, it is the time when you create a - card + the estimated count is received. + validation: + maxLength: 34 + access: read-only + is_estimated: + type: optional + docs: >- + Whether the inventory count is for composed variation (TRUE) or not + (FALSE). If true, the inventory count will not be present in the + response of - (using the Square Point of Sale application, Seller Dashboard, or Gift - Cards API). + any of these endpoints: + [BatchChangeInventory](api-endpoint:Inventory-BatchChangeInventory), - In the case of a plastic gift card, it is the time when Square - associates the card with the + [BatchRetrieveInventoryChanges](api-endpoint:Inventory-BatchRetrieveInventoryChanges), - seller at the time of activation. + [BatchRetrieveInventoryCounts](api-endpoint:Inventory-BatchRetrieveInventoryCounts), + and + + [RetrieveInventoryChanges](api-endpoint:Inventory-RetrieveInventoryChanges). access: read-only - customer_ids: - type: optional> - docs: >- - The IDs of the [customer profiles](entity:Customer) to whom this gift - card is linked. + source: + openapi: openapi/openapi.json + InventoryCountUpdatedEvent: + docs: |- + Published when the quantity is updated for a + [CatalogItemVariation](entity:CatalogItemVariation). + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. access: read-only + data: + type: optional + docs: Data associated with the event. source: openapi: openapi/openapi.json - GiftCardActivity: + InventoryCountUpdatedEventData: + properties: + type: + type: optional> + docs: >- + Name of the affected object’s type. For this event, the value is + `inventory_counts`. + id: + type: optional + docs: ID of the affected object. + object: + type: optional + docs: >- + An object containing fields and values relevant to the event. Is + absent if affected object was deleted. + source: + openapi: openapi/openapi.json + InventoryCountUpdatedEventObject: + properties: + inventory_counts: + type: optional>> + docs: The inventory counts. + source: + openapi: openapi/openapi.json + InventoryPhysicalCount: docs: >- - Represents an action performed on a [gift card](entity:GiftCard) that - affects its state or balance. + Represents the quantity of an item variation that is physically present - A gift card activity contains information about a specific activity type. - For example, a `REDEEM` activity + at a specific location, verified by a seller or a seller's employee. For + example, - includes a `redeem_activity_details` field that contains information about - the redemption. + a physical count might come from an employee counting the item variations + on + + hand or from syncing with an external system. properties: id: type: optional - docs: The Square-assigned ID of the gift card activity. - access: read-only - type: - type: GiftCardActivityType docs: |- - The type of gift card activity. - See [Type](#type-type) for possible values - location_id: - type: string - docs: >- - The ID of the [business location](entity:Location) where the activity - occurred. - created_at: - type: optional - docs: >- - The timestamp when the gift card activity was created, in RFC 3339 - format. - access: read-only - gift_card_id: + A unique Square-generated ID for the + [InventoryPhysicalCount](entity:InventoryPhysicalCount). + validation: + maxLength: 100 + reference_id: type: optional> - docs: >- - The gift card ID. When creating a gift card activity, `gift_card_id` - is not required if - - `gift_card_gan` is specified. - gift_card_gan: + docs: |- + An optional ID provided by the application to tie the + [InventoryPhysicalCount](entity:InventoryPhysicalCount) to an external + system. + validation: + maxLength: 255 + catalog_object_id: + type: optional> + docs: |- + The Square-generated ID of the + [CatalogObject](entity:CatalogObject) being tracked. + validation: + maxLength: 100 + catalog_object_type: type: optional> docs: >- - The gift card account number (GAN). When creating a gift card - activity, `gift_card_gan` - - is not required if `gift_card_id` is specified. - gift_card_balance_money: - type: optional - docs: The final balance on the gift card after the action is completed. - load_activity_details: - type: optional - docs: >- - Additional details about a `LOAD` activity, which is used to reload - money onto a gift card. - activate_activity_details: - type: optional - docs: >- - Additional details about an `ACTIVATE` activity, which is used to - activate a gift card with - - an initial balance. - redeem_activity_details: - type: optional - docs: >- - Additional details about a `REDEEM` activity, which is used to redeem - a gift card for a purchase. - - - For applications that process payments using the Square Payments API, - Square creates a `REDEEM` activity that + The [type](entity:CatalogObjectType) of the + [CatalogObject](entity:CatalogObject) being tracked. - updates the gift card balance after the corresponding - [CreatePayment](api-endpoint:Payments-CreatePayment) - request is completed. Applications that use a custom payment - processing system must call + The Inventory API supports setting and reading the + `"catalog_object_type": "ITEM_VARIATION"` field value. - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - to create the `REDEEM` activity. - clear_balance_activity_details: - type: optional - docs: >- - Additional details about a `CLEAR_BALANCE` activity, which is used to - set the balance of a gift card to zero. - deactivate_activity_details: - type: optional - docs: >- - Additional details about a `DEACTIVATE` activity, which is used to - deactivate a gift card. - adjust_increment_activity_details: - type: optional + In addition, it can also read the `"catalog_object_type": "ITEM"` + field value that is set by the Square Restaurants app. + validation: + maxLength: 14 + state: + type: optional + docs: |- + The current [inventory state](entity:InventoryState) for the related + quantity of items. + See [InventoryState](#type-inventorystate) for possible values + location_id: + type: optional> docs: >- - Additional details about an `ADJUST_INCREMENT` activity, which is used - to add money to a gift card + The Square-generated ID of the [Location](entity:Location) where the + related - outside of a typical `ACTIVATE`, `LOAD`, or `REFUND` activity flow. - adjust_decrement_activity_details: - type: optional + quantity of items is being tracked. + validation: + maxLength: 100 + quantity: + type: optional> docs: >- - Additional details about an `ADJUST_DECREMENT` activity, which is used - to deduct money from a gift + The number of items affected by the physical count as a decimal + string. - card outside of a typical `REDEEM` activity flow. - refund_activity_details: - type: optional + The number can support up to 5 digits after the decimal point. + validation: + maxLength: 26 + source: + type: optional + docs: |- + Information about the application with which the + physical count is submitted. + employee_id: + type: optional> docs: >- - Additional details about a `REFUND` activity, which is used to add - money to a gift card when - - refunding a payment. - - - For applications that refund payments to a gift card using the Square - Refunds API, Square automatically - - creates a `REFUND` activity that updates the gift card balance after a - [RefundPayment](api-endpoint:Refunds-RefundPayment) - - request is completed. Applications that use a custom processing system - must call + The Square-generated ID of the [Employee](entity:Employee) responsible + for the - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - to create the `REFUND` activity. - unlinked_activity_refund_activity_details: - type: optional + physical count. + validation: + maxLength: 100 + team_member_id: + type: optional> docs: >- - Additional details about an `UNLINKED_ACTIVITY_REFUND` activity. This - activity is used to add money - - to a gift card when refunding a payment that was processed using a - custom payment processing system + The Square-generated ID of the [Team Member](entity:TeamMember) + responsible for the - and not linked to the gift card. - import_activity_details: - type: optional + physical count. + validation: + maxLength: 100 + occurred_at: + type: optional> docs: >- - Additional details about an `IMPORT` activity, which Square uses to - import a third-party + A client-generated RFC 3339-formatted timestamp that indicates when - gift card with a balance. - block_activity_details: - type: optional - docs: >- - Additional details about a `BLOCK` activity, which Square uses to - temporarily block a gift card. - unblock_activity_details: - type: optional - docs: >- - Additional details about an `UNBLOCK` activity, which Square uses to - unblock a gift card. - import_reversal_activity_details: - type: optional - docs: >- - Additional details about an `IMPORT_REVERSAL` activity, which Square - uses to reverse the + the physical count was examined. For physical count updates, the + `occurred_at` - import of a third-party gift card. - transfer_balance_to_activity_details: - type: optional - docs: >- - Additional details about a `TRANSFER_BALANCE_TO` activity, which - Square uses to add money to + timestamp cannot be older than 24 hours or in the future relative to + the - a gift card as the result of a transfer from another gift card. - transfer_balance_from_activity_details: - type: optional + time of the request. + validation: + maxLength: 34 + created_at: + type: optional docs: >- - Additional details about a `TRANSFER_BALANCE_FROM` activity, which - Square uses to deduct money from - - a gift as the result of a transfer to another gift card. + An RFC 3339-formatted timestamp that indicates when the physical count + is received. + validation: + maxLength: 34 + access: read-only source: openapi: openapi/openapi.json - GiftCardActivityActivate: - docs: >- - Represents details about an `ACTIVATE` [gift card activity - type](entity:GiftCardActivityType). + InventoryState: + enum: + - CUSTOM + - IN_STOCK + - SOLD + - RETURNED_BY_CUSTOMER + - RESERVED_FOR_SALE + - SOLD_ONLINE + - ORDERED_FROM_VENDOR + - RECEIVED_FROM_VENDOR + - IN_TRANSIT_TO + - NONE + - WASTE + - UNLINKED_RETURN + - COMPOSED + - DECOMPOSED + - SUPPORTED_BY_NEWER_VERSION + - IN_TRANSIT + docs: Indicates the state of a tracked item quantity in the lifecycle of goods. + source: + openapi: openapi/openapi.json + InventoryTransfer: + docs: |- + Represents the transfer of a quantity of product inventory at a + particular time from one location to another. properties: - amount_money: - type: optional - docs: >- - The amount added to the gift card. This value is a positive integer. - - - Applications that use a custom order processing system must specify - this amount in the - - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - request. - order_id: + id: + type: optional + docs: |- + A unique ID generated by Square for the + `InventoryTransfer`. + validation: + maxLength: 100 + reference_id: + type: optional> + docs: |- + An optional ID provided by the application to tie the + `InventoryTransfer` to an external system. + validation: + maxLength: 255 + state: + type: optional + docs: |- + The [inventory state](entity:InventoryState) for the quantity of + items being transferred. + See [InventoryState](#type-inventorystate) for possible values + from_location_id: type: optional> docs: >- - The 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 + The Square-generated ID of the [Location](entity:Location) where the + related - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - request. - line_item_uid: + quantity of items was tracked before the transfer. + validation: + maxLength: 100 + to_location_id: type: optional> docs: >- - The UID of the `GIFT_CARD` line item in the order that represents the - gift card purchase. - - - Applications that use the Square Orders API to process orders must - specify the line item UID + The Square-generated ID of the [Location](entity:Location) where the + related - in the - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - request. - reference_id: + quantity of items was tracked after the transfer. + validation: + maxLength: 100 + catalog_object_id: + type: optional> + docs: |- + The Square-generated ID of the + [CatalogObject](entity:CatalogObject) being tracked. + validation: + maxLength: 100 + catalog_object_type: type: optional> docs: >- - A client-specified ID that associates the gift card activity with an - entity in another system. + The [type](entity:CatalogObjectType) of the + [CatalogObject](entity:CatalogObject) being tracked. - Applications that use a custom order processing system can use this - field to track information + The Inventory API supports setting and reading the + `"catalog_object_type": "ITEM_VARIATION"` field value. - related to an order or payment. - buyer_payment_instrument_ids: - type: optional>> + In addition, it can also read the `"catalog_object_type": "ITEM"` + field value that is set by the Square Restaurants app. + validation: + maxLength: 14 + quantity: + type: optional> + docs: |- + The number of items affected by the transfer as a decimal string. + Can support up to 5 digits after the decimal point. + validation: + maxLength: 26 + occurred_at: + type: optional> docs: >- - The payment instrument IDs used to process the gift card purchase, - such as a credit card ID - - or bank account ID. - + A client-generated RFC 3339-formatted timestamp that indicates when - Applications that use a custom order processing system must specify - payment instrument IDs in + 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 - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - request. - - Square uses this information to perform compliance checks. - - - For applications that use the Square Orders API to process payments, - Square has the necessary - instrument IDs to perform compliance checks. - - - Each buyer payment instrument ID can contain a maximum of 255 - characters. - source: - openapi: openapi/openapi.json - GiftCardActivityAdjustDecrement: - docs: >- - Represents details about an `ADJUST_DECREMENT` [gift card activity - type](entity:GiftCardActivityType). - properties: - amount_money: - type: Money - docs: >- - The amount deducted from the gift card balance. This value is a - positive integer. - reason: - type: GiftCardActivityAdjustDecrementReason - docs: |- - The reason the gift card balance was adjusted. - See [Reason](#type-reason) for possible values - source: - openapi: openapi/openapi.json - GiftCardActivityAdjustDecrementReason: - enum: - - SUSPICIOUS_ACTIVITY - - BALANCE_ACCIDENTALLY_INCREASED - - SUPPORT_ISSUE - - PURCHASE_WAS_REFUNDED - docs: >- - Indicates the reason for deducting money from a [gift - card](entity:GiftCard). - source: - openapi: openapi/openapi.json - GiftCardActivityAdjustIncrement: - docs: >- - Represents details about an `ADJUST_INCREMENT` [gift card activity - type](entity:GiftCardActivityType). - properties: - amount_money: - type: Money - docs: >- - The amount added to the gift card balance. This value is a positive - integer. - reason: - type: GiftCardActivityAdjustIncrementReason - docs: |- - The reason the gift card balance was adjusted. - See [Reason](#type-reason) for possible values - source: - openapi: openapi/openapi.json - GiftCardActivityAdjustIncrementReason: - enum: - - COMPLIMENTARY - - SUPPORT_ISSUE - - TRANSACTION_VOIDED - docs: Indicates the reason for adding money to a [gift card](entity:GiftCard). - source: - openapi: openapi/openapi.json - GiftCardActivityBlock: - docs: >- - Represents details about a `BLOCK` [gift card activity - type](entity:GiftCardActivityType). - properties: - reason: - type: GiftCardActivityBlockReason - docs: |- - The reason the gift card was blocked. - See [Reason](#type-reason) for possible values - source: - openapi: openapi/openapi.json - GiftCardActivityBlockReason: - type: literal<"CHARGEBACK_BLOCK"> - docs: Indicates the reason for blocking a [gift card](entity:GiftCard). - GiftCardActivityClearBalance: - docs: >- - Represents details about a `CLEAR_BALANCE` [gift card activity - type](entity:GiftCardActivityType). - properties: - reason: - type: GiftCardActivityClearBalanceReason + request. + validation: + maxLength: 34 + created_at: + type: optional docs: |- - The reason the gift card balance was cleared. - See [Reason](#type-reason) for possible values - source: - openapi: openapi/openapi.json - GiftCardActivityClearBalanceReason: - enum: - - SUSPICIOUS_ACTIVITY - - REUSE_GIFTCARD - - UNKNOWN_REASON - docs: >- - Indicates the reason for clearing the balance of a [gift - card](entity:GiftCard). - source: - openapi: openapi/openapi.json - GiftCardActivityDeactivate: - docs: >- - Represents details about a `DEACTIVATE` [gift card activity - type](entity:GiftCardActivityType). - properties: - reason: - type: GiftCardActivityDeactivateReason + An RFC 3339-formatted timestamp that indicates when Square + received the transfer request. + validation: + maxLength: 34 + access: read-only + source: + type: optional docs: |- - The reason the gift card was deactivated. - See [Reason](#type-reason) for possible values - source: - openapi: openapi/openapi.json - GiftCardActivityDeactivateReason: - enum: - - SUSPICIOUS_ACTIVITY - - UNKNOWN_REASON - - CHARGEBACK_DEACTIVATE - docs: Indicates the reason for deactivating a [gift card](entity:GiftCard). - source: - openapi: openapi/openapi.json - GiftCardActivityImport: - docs: >- - Represents details about an `IMPORT` [gift card activity - type](entity:GiftCardActivityType). + Information about the application that initiated the + inventory transfer. + employee_id: + type: optional> + docs: >- + The Square-generated ID of the [Employee](entity:Employee) responsible + for the - This activity type is used when Square imports a third-party gift card, in - which case the + inventory transfer. + validation: + maxLength: 100 + team_member_id: + type: optional> + docs: >- + The Square-generated ID of the [Team Member](entity:TeamMember) + responsible for the - `gan_source` of the gift card is set to `OTHER`. - properties: - amount_money: - type: Money - docs: The balance amount on the imported gift card. - source: - openapi: openapi/openapi.json - GiftCardActivityImportReversal: - docs: >- - Represents details about an `IMPORT_REVERSAL` [gift card activity - type](entity:GiftCardActivityType). - properties: - amount_money: - type: Money - docs: |- - The amount of money cleared from the third-party gift card when - the import was reversed. + inventory transfer. + validation: + maxLength: 100 source: openapi: openapi/openapi.json - GiftCardActivityLoad: + Invoice: docs: >- - Represents details about a `LOAD` [gift card activity - type](entity:GiftCardActivityType). + Stores information about an invoice. You use the Invoices API to create + and manage + + invoices. For more information, see [Invoices API + Overview](https://developer.squareup.com/docs/invoices-api/overview). properties: - amount_money: - type: optional + id: + type: optional + docs: The Square-assigned ID of the invoice. + access: read-only + version: + type: optional docs: >- - The amount added to the gift card. This value is a positive integer. - + The Square-assigned version number, which is incremented each time an + update is committed to the invoice. + location_id: + type: optional> + docs: >- + The ID of the location that this invoice is associated with. - Applications that use a custom order processing system must specify - this amount in the - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - request. + If specified in a `CreateInvoice` request, the value must match the + `location_id` of the associated order. + validation: + minLength: 1 + maxLength: 255 order_id: type: optional> docs: >- - The ID of the [order](entity:Order) that contains the `GIFT_CARD` line - item. + 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. - Applications that use the Square Orders API to process orders must - specify the order ID in the - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - request. - line_item_uid: - type: optional> - docs: >- - The UID of the `GIFT_CARD` line item in the order that represents the - additional funds for the gift card. + To view the line items and other information for the associated order, + call the + [RetrieveOrder](api-endpoint:Orders-RetrieveOrder) endpoint using the + order ID. + validation: + minLength: 1 + maxLength: 255 + primary_recipient: + type: optional + docs: >- + The customer who receives the invoice. This customer data is displayed + on the invoice and used by Square to deliver the invoice. - Applications that use the Square Orders API to process orders must - specify the line item UID - in the - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - request. - reference_id: - type: optional> + This field is required to publish an invoice, and it must specify the + `customer_id`. + payment_requests: + type: optional>> docs: >- - A client-specified ID that associates the gift card activity with an - entity in another system. + 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: - Applications that use a custom order processing system can use this - field to track information related to + - One balance - an order or payment. - buyer_payment_instrument_ids: - type: optional>> + - One deposit with one balance + + - 2–12 installments + + - One deposit with 2–12 installments + + + This field is required when creating an invoice. It must contain at + least one payment request. + + All payment requests for the invoice must equal the total order + amount. For more information, see + + [Configuring payment + requests](https://developer.squareup.com/docs/invoices-api/create-publish-invoices#payment-requests). + + + Adding `INSTALLMENT` payment requests to an invoice requires an + + [Invoices Plus + subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription). + delivery_method: + type: optional docs: >- - The payment instrument IDs used to process the order for the - additional funds, such as a credit card ID + The delivery method that Square uses to send the invoice, reminders, + and receipts to - or bank account ID. + the customer. After the invoice is published, Square processes the + invoice based on the delivery + method and payment request settings, either immediately or on the + `scheduled_at` date, if specified. - Applications that use a custom order processing system must specify - payment instrument IDs in + For example, Square might send the invoice or receipt for an automatic + payment. For invoices with - the - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - request. + automatic payments, this field must be set to `EMAIL`. - Square uses this information to perform compliance checks. + One of the following is required when creating an invoice: - For applications that use the Square Orders API to process payments, - Square has the necessary + - (Recommended) This `delivery_method` field. To configure an + automatic payment, the - instrument IDs to perform compliance checks. + `automatic_payment_source` field of the payment request is also + required. + - The deprecated `request_method` field of the payment request. Note + that `invoice` - Each buyer payment instrument ID can contain a maximum of 255 - characters. - source: - openapi: openapi/openapi.json - GiftCardActivityRedeem: - docs: >- - Represents details about a `REDEEM` [gift card activity - type](entity:GiftCardActivityType). - properties: - amount_money: - type: Money + objects returned in responses do not include `request_method`. + + See [InvoiceDeliveryMethod](#type-invoicedeliverymethod) for possible + values + invoice_number: + type: optional> docs: >- - The amount deducted from the gift card for the redemption. This value - is a positive integer. + 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. - Applications that use a custom payment processing system must specify - this amount in the + It increments from 1 and is padded with zeros making it 7 characters + long - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - request. - payment_id: - type: optional + (for example, 0000001 and 0000002). + validation: + minLength: 1 + maxLength: 191 + title: + type: optional> + docs: The title of the invoice, which is displayed on the invoice. + validation: + minLength: 1 + maxLength: 255 + description: + type: optional> + docs: The description of the invoice, which is displayed on the invoice. + validation: + minLength: 1 + maxLength: 65536 + scheduled_at: + type: optional> docs: >- - The ID of the payment that represents the gift card redemption. Square - populates this field + The timestamp when the invoice is scheduled for processing, in RFC + 3339 format. - if the payment was processed by Square. - access: read-only - reference_id: - type: optional> + After the invoice is published, Square processes the invoice on the + specified date, + + according to the delivery method and payment request settings. + + + If the field is not set, Square processes the invoice immediately + after it is published. + public_url: + type: optional docs: >- - A client-specified ID that associates the gift card activity with an - entity in another system. + A temporary link to the Square-hosted payment page where the customer + can pay the + invoice. If the link expires, customers can provide the email address + or phone number - Applications that use a custom payment processing system can use this - field to track information + associated with the invoice and request a new link directly from the + expired payment page. - related to an order or payment. + + This field is added after the invoice is published and reaches the + scheduled date + + (if one is defined). + access: read-only + next_payment_amount_money: + type: optional + docs: >- + The current amount due for the invoice. In addition to the + + amount due on the next payment request, this includes any overdue + payment amounts. status: - type: optional + type: optional + docs: |- + The status of the invoice. + See [InvoiceStatus](#type-invoicestatus) for possible values + timezone: + type: optional docs: >- - The status of the gift card redemption. Gift cards redeemed from - Square Point of Sale or the + The time zone used to interpret calendar dates on the invoice, such as + `due_date`. - Square Seller Dashboard use a two-state process: `PENDING` + When an invoice is created, this field is set to the `timezone` + specified for the seller - to `COMPLETED` or `PENDING` to `CANCELED`. Gift cards redeemed using - the Gift Card Activities API + location. The value cannot be changed. - always have a `COMPLETED` status. - See [Status](#type-status) for possible values - source: - openapi: openapi/openapi.json - GiftCardActivityRedeemStatus: - enum: - - PENDING - - COMPLETED - - CANCELED - docs: >- - Indicates the status of a [gift card](entity:GiftCard) redemption. This - status is relevant only for + For example, a payment `due_date` of 2021-03-09 with a `timezone` of + America/Los\_Angeles - redemptions made from Square products (such as Square Point of Sale) - because Square products use a + becomes overdue at midnight on March 9 in America/Los\_Angeles (which + equals a UTC timestamp - two-state process. Gift cards redeemed using the Gift Card Activities API - always have a `COMPLETED` status. - source: - openapi: openapi/openapi.json - GiftCardActivityRefund: - docs: >- - Represents details about a `REFUND` [gift card activity - type](entity:GiftCardActivityType). - properties: - redeem_activity_id: - type: optional> + of 2021-03-10T08:00:00Z). + access: read-only + created_at: + type: optional + docs: The timestamp when the invoice was created, in RFC 3339 format. + access: read-only + updated_at: + type: optional + docs: The timestamp when the invoice was last updated, in RFC 3339 format. + access: read-only + accepted_payment_methods: + type: optional docs: >- - The ID of the refunded `REDEEM` gift card activity. Square populates - this field if the + The payment methods that customers can use to pay the invoice on the + Square-hosted - `payment_id` in the corresponding - [RefundPayment](api-endpoint:Refunds-RefundPayment) request + invoice page. This setting is independent of any automatic payment + requests for the invoice. - represents a gift card redemption. + This field is required when creating an invoice and must set at least + one payment method to `true`. + custom_fields: + type: optional>> + docs: >- + Additional seller-defined fields that are displayed on the invoice. + For more information, see - For applications that use a custom payment processing system, this - field is required when creating + [Custom + fields](https://developer.squareup.com/docs/invoices-api/overview#custom-fields). - a `REFUND` activity. The provided `REDEEM` activity ID must be linked - to the same gift card. - amount_money: - type: optional - docs: >- - The amount added to the gift card for the refund. This value is a - positive integer. + Adding custom fields to an invoice requires an - This field is required when creating a `REFUND` activity. The amount - can represent a full or partial refund. - reference_id: - type: optional> - docs: >- - A client-specified ID that associates the gift card activity with an - entity in another system. - payment_id: - type: optional - docs: >- - The ID of the refunded payment. Square populates this field if the - refund is for a + [Invoices Plus + subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription). - payment processed by Square. This field matches the `payment_id` in - the corresponding - [RefundPayment](api-endpoint:Refunds-RefundPayment) request. - access: read-only - source: - openapi: openapi/openapi.json - GiftCardActivityTransferBalanceFrom: - docs: >- - Represents details about a `TRANSFER_BALANCE_FROM` [gift card activity - type](entity:GiftCardActivityType). - properties: - transfer_to_gift_card_id: - type: string - docs: The ID of the gift card to which the specified amount was transferred. - amount_money: - type: Money - docs: >- - The amount deducted from the gift card for the transfer. This value is - a positive integer. - source: - openapi: openapi/openapi.json - GiftCardActivityTransferBalanceTo: - docs: >- - Represents details about a `TRANSFER_BALANCE_TO` [gift card activity - type](entity:GiftCardActivityType). - properties: - transfer_from_gift_card_id: - type: string - docs: >- - The ID of the gift card from which the specified amount was - transferred. - amount_money: - type: Money - docs: >- - The amount added to the gift card balance for the transfer. This value - is a positive integer. - source: - openapi: openapi/openapi.json - GiftCardActivityType: - enum: - - ACTIVATE - - LOAD - - REDEEM - - CLEAR_BALANCE - - DEACTIVATE - - ADJUST_INCREMENT - - ADJUST_DECREMENT - - REFUND - - UNLINKED_ACTIVITY_REFUND - - IMPORT - - BLOCK - - UNBLOCK - - IMPORT_REVERSAL - - TRANSFER_BALANCE_FROM - - TRANSFER_BALANCE_TO - docs: Indicates the type of [gift card activity](entity:GiftCardActivity). - source: - openapi: openapi/openapi.json - GiftCardActivityUnblock: - docs: >- - Represents details about an `UNBLOCK` [gift card activity - type](entity:GiftCardActivityType). - properties: - reason: - type: GiftCardActivityUnblockReason - docs: |- - The reason the gift card was unblocked. - See [Reason](#type-reason) for possible values - source: - openapi: openapi/openapi.json - GiftCardActivityUnblockReason: - type: literal<"CHARGEBACK_UNBLOCK"> - docs: Indicates the reason for unblocking a [gift card](entity:GiftCard). - GiftCardActivityUnlinkedActivityRefund: - docs: >- - Represents details about an `UNLINKED_ACTIVITY_REFUND` [gift card activity - type](entity:GiftCardActivityType). - properties: - amount_money: - type: Money - docs: >- - The amount added to the gift card for the refund. This value is a - positive integer. - reference_id: - type: optional> - docs: >- - A client-specified ID that associates the gift card activity with an - entity in another system. - payment_id: - type: optional - docs: >- - The ID of the refunded payment. This field is not used starting in - Square version 2022-06-16. - access: read-only - source: - openapi: openapi/openapi.json - GiftCardGanSource: - enum: - - SQUARE - - OTHER - docs: |- - Indicates the source that generated the gift card - account number (GAN). - source: - openapi: openapi/openapi.json - GiftCardStatus: - enum: - - ACTIVE - - DEACTIVATED - - BLOCKED - - PENDING - docs: Indicates the gift card state. - source: - openapi: openapi/openapi.json - GiftCardType: - enum: - - PHYSICAL - - DIGITAL - docs: Indicates the gift card type. - source: - openapi: openapi/openapi.json - InventoryAdjustment: - docs: |- - Represents a change in state or quantity of product inventory at a - particular time and location. - properties: - id: + Max: 2 custom fields + subscription_id: type: optional - docs: |- - A unique ID generated by Square for the - `InventoryAdjustment`. - validation: - maxLength: 100 - reference_id: - type: optional> - docs: |- - An optional ID provided by the application to tie the - `InventoryAdjustment` to an external - system. - validation: - maxLength: 255 - from_state: - type: optional - docs: |- - The [inventory state](entity:InventoryState) of the related quantity - of items before the adjustment. - See [InventoryState](#type-inventorystate) for possible values - to_state: - type: optional - docs: |- - The [inventory state](entity:InventoryState) of the related quantity - of items after the adjustment. - See [InventoryState](#type-inventorystate) for possible values - location_id: - type: optional> docs: >- - The Square-generated ID of the [Location](entity:Location) where the - related + The ID of the [subscription](entity:Subscription) associated with the + invoice. - quantity of items is being tracked. - validation: - maxLength: 100 - catalog_object_id: + This field is present only on subscription billing invoices. + access: read-only + sale_or_service_date: type: optional> - docs: |- - The Square-generated ID of the - [CatalogObject](entity:CatalogObject) being tracked. - validation: - maxLength: 100 - catalog_object_type: + docs: >- + The date of the sale or the date that the service is rendered, in + `YYYY-MM-DD` format. + + This field can be used to specify a past or future date which is + displayed on the invoice. + payment_conditions: type: optional> docs: >- - The [type](entity:CatalogObjectType) of the - [CatalogObject](entity:CatalogObject) being tracked. + **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). - The Inventory API supports setting and reading the - `"catalog_object_type": "ITEM_VARIATION"` field value. - In addition, it can also read the `"catalog_object_type": "ITEM"` - field value that is set by the Square Restaurants app. - validation: - maxLength: 14 - quantity: - type: optional> - docs: |- - The number of items affected by the adjustment as a decimal string. - Can support up to 5 digits after the decimal point. + For countries other than France, Square returns an + `INVALID_REQUEST_ERROR` with a `BAD_REQUEST` code and + + "Payment conditions are not supported for this location's country" + detail if this field is included in `CreateInvoice` or `UpdateInvoice` + requests. validation: - maxLength: 26 - total_price_money: - type: optional - docs: |- - The total price paid for goods associated with the - adjustment. Present if and only if `to_state` is `SOLD`. Always - non-negative. - occurred_at: - type: optional> + minLength: 1 + maxLength: 2000 + store_payment_method_enabled: + type: optional> docs: >- - A client-generated RFC 3339-formatted timestamp that indicates when + Indicates whether to allow a customer to save a credit or debit card + as a card on file or a bank transfer as a - the inventory adjustment took place. For inventory adjustment updates, - the `occurred_at` + bank account on file. If `true`, Square displays a __Save my card on + file__ or __Save my bank on file__ checkbox on the - timestamp cannot be older than 24 hours or in the future relative to - the + invoice payment page. Stored payment information can be used for + future automatic payments. The default value is `false`. + attachments: + type: optional> + docs: >- + Metadata about the attachments on the invoice. Invoice attachments are + managed using the - time of the request. - validation: - maxLength: 34 - created_at: + [CreateInvoiceAttachment](api-endpoint:Invoices-CreateInvoiceAttachment) + and + [DeleteInvoiceAttachment](api-endpoint:Invoices-DeleteInvoiceAttachment) + endpoints. + access: read-only + creator_team_member_id: type: optional docs: >- - An RFC 3339-formatted timestamp that indicates when the inventory - adjustment is received. - validation: - maxLength: 34 + The ID of the [team member](entity:TeamMember) who created the + invoice. + + This field is present only on invoices created in the Square Dashboard + or Square Invoices app by a logged-in team member. access: read-only - source: - type: optional - docs: |- - Information about the application that caused the - inventory adjustment. - employee_id: - type: optional> + source: + openapi: openapi/openapi.json + InvoiceAcceptedPaymentMethods: + docs: >- + The payment methods that customers can use to pay an + [invoice](entity:Invoice) on the Square-hosted invoice payment page. + properties: + card: + type: optional> docs: >- - The Square-generated ID of the [Employee](entity:Employee) responsible - for the + Indicates whether credit card or debit card payments are accepted. The + default value is `false`. + square_gift_card: + type: optional> + docs: >- + Indicates whether Square gift card payments are accepted. The default + value is `false`. + bank_account: + type: optional> + docs: >- + Indicates whether ACH bank transfer payments are accepted. The default + value is `false`. + buy_now_pay_later: + type: optional> + docs: >- + Indicates whether Afterpay (also known as Clearpay) payments are + accepted. The default value is `false`. - inventory adjustment. - validation: - maxLength: 100 - team_member_id: - type: optional> + + This option is allowed only for invoices that have a single payment + request of the `BALANCE` type. This payment method is + + supported if the seller account accepts Afterpay payments and the + seller location is in a country where Afterpay + + invoice payments are supported. As a best practice, consider enabling + an additional payment method when allowing + + `buy_now_pay_later` payments. For more information, including detailed + requirements and processing limits, see + + [Buy Now Pay Later payments with + Afterpay](https://developer.squareup.com/docs/invoices-api/overview#buy-now-pay-later). + cash_app_pay: + type: optional> docs: >- - The Square-generated ID of the [Team Member](entity:TeamMember) - responsible for the + Indicates whether Cash App payments are accepted. The default value is + `false`. - inventory adjustment. - validation: - maxLength: 100 - transaction_id: + + This payment method is supported only for seller + [locations](entity:Location) in the United States. + source: + openapi: openapi/openapi.json + InvoiceAttachment: + docs: Represents a file attached to an [invoice](entity:Invoice). + properties: + id: + type: optional + docs: The Square-assigned ID of the attachment. + access: read-only + filename: + type: optional + docs: The file name of the attachment, which is displayed on the invoice. + access: read-only + description: type: optional docs: |- - The Square-generated ID of the [Transaction](entity:Transaction) that - caused the adjustment. Only relevant for payment-related state - transitions. - validation: - maxLength: 255 + The description of the attachment, which is displayed on the invoice. + This field maps to the seller-defined **Message** field. access: read-only - refund_id: + filesize: + type: optional + docs: The file size of the attachment in bytes. + access: read-only + hash: + type: optional + docs: The MD5 hash that was generated from the file contents. + access: read-only + mime_type: + type: optional + docs: >- + The mime type of the attachment. + + The following mime types are supported: + + image/gif, image/jpeg, image/png, image/tiff, image/bmp, + application/pdf. + access: read-only + uploaded_at: + type: optional + docs: The timestamp when the attachment was uploaded, in RFC 3339 format. + access: read-only + source: + openapi: openapi/openapi.json + InvoiceAutomaticPaymentSource: + enum: + - NONE + - CARD_ON_FILE + - BANK_ON_FILE + docs: >- + Indicates the automatic payment method for an [invoice payment + request](entity:InvoicePaymentRequest). + source: + openapi: openapi/openapi.json + InvoiceCanceledEvent: + docs: Published when an [Invoice](entity:Invoice) is canceled. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"invoice.canceled"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + InvoiceCanceledEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"invoice"`. + id: + type: optional + docs: ID of the affected invoice. + object: + type: optional + docs: An object containing the canceled invoice. + source: + openapi: openapi/openapi.json + InvoiceCanceledEventObject: + properties: + invoice: + type: optional + docs: The related invoice. + source: + openapi: openapi/openapi.json + InvoiceCreatedEvent: + docs: Published when an [Invoice](entity:Invoice) is created. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"invoice.created"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: type: optional - docs: |- - The Square-generated ID of the [Refund](entity:Refund) that - caused the adjustment. Only relevant for refund-related state - transitions. - validation: - maxLength: 255 + docs: Timestamp of when the event was created, in RFC 3339 format. access: read-only - purchase_order_id: + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + InvoiceCreatedEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"invoice"`. + id: type: optional - docs: >- - The Square-generated ID of the purchase order that caused the + docs: ID of the affected invoice. + object: + type: optional + docs: An object containing the created invoice. + source: + openapi: openapi/openapi.json + InvoiceCreatedEventObject: + properties: + invoice: + type: optional + docs: The related invoice. + source: + openapi: openapi/openapi.json + InvoiceCustomField: + docs: >- + An additional seller-defined and customer-facing field to include on the + invoice. For more information, - adjustment. Only relevant for state transitions from the Square for - Retail + see [Custom + fields](https://developer.squareup.com/docs/invoices-api/overview#custom-fields). - app. + + Adding custom fields to an invoice requires an + + [Invoices Plus + subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription). + properties: + label: + type: optional> + docs: >- + The label or title of the custom field. This field is required for a + custom field. validation: - maxLength: 100 - access: read-only - goods_receipt_id: - type: optional + maxLength: 30 + value: + type: optional> + docs: The text of the custom field. If omitted, only the label is rendered. + validation: + maxLength: 2000 + placement: + type: optional docs: >- - The Square-generated ID of the goods receipt that caused the + The location of the custom field on the invoice. This field is + required for a custom field. - adjustment. Only relevant for state transitions from the Square for - Retail + See [InvoiceCustomFieldPlacement](#type-invoicecustomfieldplacement) + for possible values + source: + openapi: openapi/openapi.json + InvoiceCustomFieldPlacement: + enum: + - ABOVE_LINE_ITEMS + - BELOW_LINE_ITEMS + docs: >- + Indicates where to render a custom field on the Square-hosted invoice page + and in emailed or PDF - app. - validation: - maxLength: 100 + copies of the invoice. + source: + openapi: openapi/openapi.json + InvoiceDeletedEvent: + docs: Published when a draft [Invoice](entity:Invoice) is deleted. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"invoice.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. access: read-only - adjustment_group: - type: optional - docs: >- - An adjustment group bundling the related adjustments of item - variations through stock conversions in a single inventory event. + data: + type: optional + docs: Data associated with the event. source: openapi: openapi/openapi.json - InventoryAdjustmentGroup: + InvoiceDeletedEventData: properties: + type: + type: optional> + docs: Name of the affected object’s type, `"invoice"`. id: type: optional + docs: ID of the affected invoice. + deleted: + type: optional> + docs: Indicates that the invoice was deleted. + source: + openapi: openapi/openapi.json + InvoiceDeliveryMethod: + enum: + - EMAIL + - SHARE_MANUALLY + - SMS + docs: >- + Indicates how Square delivers the [invoice](entity:Invoice) to the + customer. + source: + openapi: openapi/openapi.json + InvoiceFilter: + docs: Describes query filters to apply. + properties: + location_ids: docs: |- - A unique ID generated by Square for the - `InventoryAdjustmentGroup`. - validation: - maxLength: 100 - access: read-only - root_adjustment_id: - type: optional - docs: The inventory adjustment of the composed variation. - validation: - maxLength: 100 - access: read-only - from_state: - type: optional - docs: >- - Representative `from_state` for adjustments within the group. For - example, for a group adjustment from `IN_STOCK` to `SOLD`, - - there can be two component adjustments in the group: one from - `IN_STOCK`to `COMPOSED` and the other one from `COMPOSED` to `SOLD`. - - Here, the representative `from_state` for the - `InventoryAdjustmentGroup` is `IN_STOCK`. - - See [InventoryState](#type-inventorystate) for possible values - to_state: - type: optional + Limits the search to the specified locations. A location is required. + In the current implementation, only one location can be specified. + type: list + customer_ids: + type: optional>> docs: >- - Representative `to_state` for adjustments within group. For example, - for a group adjustment from `IN_STOCK` to `SOLD`, - - the two component adjustments in the group can be from `IN_STOCK` to - `COMPOSED` and from `COMPOSED` to `SOLD`. + Limits the search to the specified customers, within the specified + locations. - Here, the representative `to_state` of the `InventoryAdjustmentGroup` - is `SOLD`. + Specifying a customer is optional. In the current implementation, - See [InventoryState](#type-inventorystate) for possible values + a maximum of one customer can be specified. source: openapi: openapi/openapi.json - InventoryAlertType: - enum: - - NONE - - LOW_QUANTITY + InvoicePaymentMadeEvent: docs: >- - Indicates whether Square should alert the merchant when the inventory - quantity of a CatalogItemVariation is low. + Published when a payment that is associated with an + [invoice](entity:Invoice) is completed. + + For more information about invoice payments, see [Pay an + invoice](https://developer.squareup.com/docs/invoices-api/pay-refund-invoices#pay-invoice). + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"invoice.payment_made"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. source: openapi: openapi/openapi.json - InventoryChange: - docs: |- - Represents a single physical count, inventory, adjustment, or transfer - that is part of the history of inventory changes for a particular - [CatalogObject](entity:CatalogObject) instance. + InvoicePaymentMadeEventData: properties: type: - type: optional - docs: >- - Indicates how the inventory change is applied. See + type: optional> + docs: Name of the affected object’s type, `"invoice"`. + id: + type: optional + docs: ID of the affected invoice. + object: + type: optional + docs: An object containing the invoice that was paid. + source: + openapi: openapi/openapi.json + InvoicePaymentMadeEventObject: + properties: + invoice: + type: optional + docs: The related invoice. + source: + openapi: openapi/openapi.json + InvoicePaymentReminder: + docs: >- + Describes a payment request reminder (automatic notification) that Square + sends - [InventoryChangeType](entity:InventoryChangeType) for all possible - values. + to the customer. You configure a reminder relative to the payment request - See [InventoryChangeType](#type-inventorychangetype) for possible - values - physical_count: - type: optional - docs: |- - Contains details about the physical count when `type` is - `PHYSICAL_COUNT`, and is unset for all other change types. - adjustment: - type: optional + `due_date`. + properties: + uid: + type: optional docs: |- - Contains details about the inventory adjustment when `type` is - `ADJUSTMENT`, and is unset for all other change types. - transfer: - type: optional + A Square-assigned ID that uniquely identifies the reminder within the + `InvoicePaymentRequest`. + access: read-only + relative_scheduled_days: + type: optional> docs: >- - Contains details about the inventory transfer when `type` is - - `TRANSFER`, and is unset for all other change types. - + The number of days before (a negative number) or after (a positive + number) - _Note:_ An [InventoryTransfer](entity:InventoryTransfer) object can - only be set in the input to the + the payment request `due_date` when the reminder is sent. For example, + -3 indicates that - [BatchChangeInventory](api-endpoint:Inventory-BatchChangeInventory) - endpoint when the seller has an active Retail Plus subscription. - measurement_unit: - type: optional + the reminder should be sent 3 days before the payment request + `due_date`. + validation: + min: -32767 + max: 32767 + message: + type: optional> + docs: The reminder message. + validation: + minLength: 1 + maxLength: 1000 + status: + type: optional docs: >- - The [CatalogMeasurementUnit](entity:CatalogMeasurementUnit) object - representing the catalog measurement unit associated with the - inventory change. - measurement_unit_id: + The status of the reminder. + + See [InvoicePaymentReminderStatus](#type-invoicepaymentreminderstatus) + for possible values + sent_at: type: optional - docs: >- - The ID of the [CatalogMeasurementUnit](entity:CatalogMeasurementUnit) - object representing the catalog measurement unit associated with the - inventory change. + docs: If sent, the timestamp when the reminder was sent, in RFC 3339 format. access: read-only source: openapi: openapi/openapi.json - InventoryChangeType: + InvoicePaymentReminderStatus: enum: - - PHYSICAL_COUNT - - ADJUSTMENT - - TRANSFER - docs: >- - Indicates how the inventory change was applied to a tracked product - quantity. + - PENDING + - NOT_APPLICABLE + - SENT + docs: The status of a payment request reminder. source: openapi: openapi/openapi.json - InventoryCount: + InvoicePaymentRequest: docs: >- - Represents Square-estimated quantity of items in a particular state at a + Represents a payment request for an [invoice](entity:Invoice). Invoices + can specify a maximum - particular seller location based on the known history of physical counts - and + of 13 payment requests, with up to 12 `INSTALLMENT` request types. For + more information, - inventory adjustments. + see [Configuring payment + requests](https://developer.squareup.com/docs/invoices-api/create-publish-invoices#payment-requests). + + + Adding `INSTALLMENT` payment requests to an invoice requires an + + [Invoices Plus + subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription). properties: - catalog_object_id: + uid: type: optional> - docs: |- - The Square-generated ID of the - [CatalogObject](entity:CatalogObject) being tracked. + docs: >- + The Square-generated ID of the payment request in an + [invoice](entity:Invoice). validation: - maxLength: 100 - catalog_object_type: - type: optional> + minLength: 1 + maxLength: 255 + request_method: + type: optional docs: >- - The [type](entity:CatalogObjectType) of the - [CatalogObject](entity:CatalogObject) being tracked. + Indicates how Square processes the payment request. DEPRECATED at + version 2021-01-21. Replaced by the + `Invoice.delivery_method` and + `InvoicePaymentRequest.automatic_payment_source` fields. - The Inventory API supports setting and reading the - `"catalog_object_type": "ITEM_VARIATION"` field value. - In addition, it can also read the `"catalog_object_type": "ITEM"` - field value that is set by the Square Restaurants app. - validation: - maxLength: 14 - state: - type: optional - docs: |- - The current [inventory state](entity:InventoryState) for the related - quantity of items. - See [InventoryState](#type-inventorystate) for possible values - location_id: - type: optional> + One of the following is required when creating an invoice: + + - (Recommended) The `delivery_method` field of the invoice. To + configure an automatic payment, the + + `automatic_payment_source` field of the payment request is also + required. + + - This `request_method` field. Note that `invoice` objects returned in + responses do not include `request_method`. + + See [InvoiceRequestMethod](#type-invoicerequestmethod) for possible + values + request_type: + type: optional docs: >- - The Square-generated ID of the [Location](entity:Location) where the - related + Identifies the payment request type. This type defines how the payment + request amount is determined. - quantity of items is being tracked. - validation: - maxLength: 100 - quantity: + This field is required to create a payment request. + + See [InvoiceRequestType](#type-invoicerequesttype) for possible values + due_date: type: optional> docs: >- - The number of items affected by the estimated count as a decimal - string. + The due date (in the invoice's time zone) for the payment request, in + `YYYY-MM-DD` format. This field - Can support up to 5 digits after the decimal point. - validation: - maxLength: 26 - calculated_at: - type: optional - docs: >- - An RFC 3339-formatted timestamp that indicates when the most recent - physical count or adjustment affecting + is required to create a payment request. If an + `automatic_payment_source` is defined for the request, Square - the estimated count is received. - validation: - maxLength: 34 - access: read-only - is_estimated: - type: optional - docs: >- - Whether the inventory count is for composed variation (TRUE) or not - (FALSE). If true, the inventory count will not be present in the - response of + charges the payment source on this date. - any of these endpoints: - [BatchChangeInventory](api-endpoint:Inventory-BatchChangeInventory), - [BatchRetrieveInventoryChanges](api-endpoint:Inventory-BatchRetrieveInventoryChanges), + After this date, the invoice becomes overdue. For example, a payment + `due_date` of 2021-03-09 with a `timezone` - [BatchRetrieveInventoryCounts](api-endpoint:Inventory-BatchRetrieveInventoryCounts), - and + of America/Los\_Angeles becomes overdue at midnight on March 9 in + America/Los\_Angeles (which equals a UTC - [RetrieveInventoryChanges](api-endpoint:Inventory-RetrieveInventoryChanges). - access: read-only - source: - openapi: openapi/openapi.json - InventoryPhysicalCount: - docs: >- - Represents the quantity of an item variation that is physically present + timestamp of 2021-03-10T08:00:00Z). + fixed_amount_requested_money: + type: optional + docs: >- + If the payment request specifies `DEPOSIT` or `INSTALLMENT` as the + `request_type`, - at a specific location, verified by a seller or a seller's employee. For - example, + this indicates the request amount. - a physical count might come from an employee counting the item variations - on + You cannot specify this when `request_type` is `BALANCE` or when the - hand or from syncing with an external system. - properties: - id: - type: optional - docs: |- - A unique Square-generated ID for the - [InventoryPhysicalCount](entity:InventoryPhysicalCount). - validation: - maxLength: 100 - reference_id: - type: optional> - docs: |- - An optional ID provided by the application to tie the - [InventoryPhysicalCount](entity:InventoryPhysicalCount) to an external - system. - validation: - maxLength: 255 - catalog_object_id: - type: optional> - docs: |- - The Square-generated ID of the - [CatalogObject](entity:CatalogObject) being tracked. - validation: - maxLength: 100 - catalog_object_type: + payment request includes the `percentage_requested` field. + percentage_requested: type: optional> docs: >- - The [type](entity:CatalogObjectType) of the - [CatalogObject](entity:CatalogObject) being tracked. + Specifies the amount for the payment request in percentage: - The Inventory API supports setting and reading the - `"catalog_object_type": "ITEM_VARIATION"` field value. + - When the payment `request_type` is `DEPOSIT`, it is the percentage + of the order's total amount. - In addition, it can also read the `"catalog_object_type": "ITEM"` - field value that is set by the Square Restaurants app. - validation: - maxLength: 14 - state: - type: optional - docs: |- - The current [inventory state](entity:InventoryState) for the related - quantity of items. - See [InventoryState](#type-inventorystate) for possible values - location_id: - type: optional> + - When the payment `request_type` is `INSTALLMENT`, it is the + percentage of the order's total less + + the deposit, if requested. The sum of the `percentage_requested` in + all installment + + payment requests must be equal to 100. + + + You cannot specify this when the payment `request_type` is `BALANCE` + or when the + + payment request specifies the `fixed_amount_requested_money` field. + tipping_enabled: + type: optional> docs: >- - The Square-generated ID of the [Location](entity:Location) where the - related + If set to true, the Square-hosted invoice page (the `public_url` field + of the invoice) - quantity of items is being tracked. - validation: - maxLength: 100 - quantity: - type: optional> + provides a place for the customer to pay a tip. + + + This field is allowed only on the final payment request + + and the payment `request_type` must be `BALANCE` or `INSTALLMENT`. + automatic_payment_source: + type: optional docs: >- - The number of items affected by the physical count as a decimal - string. + The payment method for an automatic payment. - The number can support up to 5 digits after the decimal point. - validation: - maxLength: 26 - source: - type: optional - docs: |- - Information about the application with which the - physical count is submitted. - employee_id: + + The default value is `NONE`. + + See + [InvoiceAutomaticPaymentSource](#type-invoiceautomaticpaymentsource) + for possible values + card_id: type: optional> docs: >- - The Square-generated ID of the [Employee](entity:Employee) responsible - for the + 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, - physical count. + call [ListCards](api-endpoint:Cards-ListCards) and include the + `customer_id` of the invoice recipient. validation: - maxLength: 100 - team_member_id: - type: optional> + minLength: 1 + maxLength: 255 + reminders: + type: optional>> + docs: A list of one or more reminders to send for the payment request. + computed_amount_money: + type: optional docs: >- - The Square-generated ID of the [Team Member](entity:TeamMember) - responsible for the + The amount of the payment request, computed using the order amount and + information from the various payment - physical count. - validation: - maxLength: 100 - occurred_at: - type: optional> + request fields (`request_type`, `fixed_amount_requested_money`, and + `percentage_requested`). + total_completed_amount_money: + type: optional docs: >- - A client-generated RFC 3339-formatted timestamp that indicates when + The amount of money already paid for the specific payment request. - the physical count was examined. For physical count updates, the - `occurred_at` + This amount might include a rounding adjustment if the most recent + invoice payment - timestamp cannot be older than 24 hours or in the future relative to - the + was in cash in a currency that rounds cash payments (such as, `CAD` or + `AUD`). + rounding_adjustment_included_money: + type: optional + docs: >- + If the most recent payment was a cash payment - time of the request. - validation: - maxLength: 34 + in a currency that rounds cash payments (such as, `CAD` or `AUD`) and + the payment + + is rounded from `computed_amount_money` in the payment request, then + this + + field specifies the rounding adjustment applied. This amount + + might be negative. + source: + openapi: openapi/openapi.json + InvoicePublishedEvent: + docs: >- + Published when an [Invoice](entity:Invoice) transitions from a draft to a + non-draft status. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"invoice.published"`. + event_id: + type: optional> + docs: A unique ID for the event. created_at: type: optional - docs: >- - An RFC 3339-formatted timestamp that indicates when the physical count - is received. - validation: - maxLength: 34 + docs: Timestamp of when the event was created, in RFC 3339 format. access: read-only + data: + type: optional + docs: Data associated with the event. source: openapi: openapi/openapi.json - InventoryState: - enum: - - CUSTOM - - IN_STOCK - - SOLD - - RETURNED_BY_CUSTOMER - - RESERVED_FOR_SALE - - SOLD_ONLINE - - ORDERED_FROM_VENDOR - - RECEIVED_FROM_VENDOR - - IN_TRANSIT_TO - - NONE - - WASTE - - UNLINKED_RETURN - - COMPOSED - - DECOMPOSED - - SUPPORTED_BY_NEWER_VERSION - - IN_TRANSIT - docs: Indicates the state of a tracked item quantity in the lifecycle of goods. - source: - openapi: openapi/openapi.json - InventoryTransfer: - docs: |- - Represents the transfer of a quantity of product inventory at a - particular time from one location to another. + InvoicePublishedEventData: properties: + type: + type: optional> + docs: Name of the affected object’s type, `"invoice"`. id: type: optional - docs: |- - A unique ID generated by Square for the - `InventoryTransfer`. - validation: - maxLength: 100 - reference_id: - type: optional> - docs: |- - An optional ID provided by the application to tie the - `InventoryTransfer` to an external system. - validation: - maxLength: 255 - state: - type: optional - docs: |- - The [inventory state](entity:InventoryState) for the quantity of - items being transferred. - See [InventoryState](#type-inventorystate) for possible values - from_location_id: - type: optional> + docs: ID of the affected invoice. + object: + type: optional + docs: An object containing the published invoice. + source: + openapi: openapi/openapi.json + InvoicePublishedEventObject: + properties: + invoice: + type: optional + docs: The related invoice. + source: + openapi: openapi/openapi.json + InvoiceQuery: + docs: Describes query criteria for searching invoices. + properties: + filter: + type: InvoiceFilter docs: >- - The Square-generated ID of the [Location](entity:Location) where the - related + Query filters to apply in searching invoices. - quantity of items was tracked before the transfer. - validation: - maxLength: 100 - to_location_id: - type: optional> - docs: >- - The Square-generated ID of the [Location](entity:Location) where the - related + For more information, see [Search for + invoices](https://developer.squareup.com/docs/invoices-api/retrieve-list-search-invoices#search-invoices). + sort: + type: optional + docs: Describes the sort order for the search result. + source: + openapi: openapi/openapi.json + InvoiceRecipient: + docs: >- + Represents a snapshot of customer data. This object stores customer data + that is displayed on the invoice - quantity of items was tracked after the transfer. - validation: - maxLength: 100 - catalog_object_id: - type: optional> - docs: |- - The Square-generated ID of the - [CatalogObject](entity:CatalogObject) being tracked. - validation: - maxLength: 100 - catalog_object_type: - type: optional> - docs: >- - The [type](entity:CatalogObjectType) of the - [CatalogObject](entity:CatalogObject) being tracked. + and that Square uses to deliver the invoice. - The Inventory API supports setting and reading the - `"catalog_object_type": "ITEM_VARIATION"` field value. + When you provide a customer ID for a draft invoice, Square retrieves the + associated customer profile and populates - In addition, it can also read the `"catalog_object_type": "ITEM"` - field value that is set by the Square Restaurants app. - validation: - maxLength: 14 - quantity: + the remaining `InvoiceRecipient` fields. You cannot update these fields + after the invoice is published. + + Square updates the customer ID in response to a merge operation, but does + not update other fields. + properties: + customer_id: type: optional> docs: |- - The number of items affected by the transfer as a decimal string. - Can support up to 5 digits after the decimal point. - validation: - maxLength: 26 - occurred_at: - type: optional> - docs: >- - A client-generated RFC 3339-formatted timestamp that indicates when - - the transfer took place. For write actions, the `occurred_at` - timestamp - - cannot be older than 24 hours or in the future relative to the time of - the - - request. + The ID of the customer. This is the customer profile ID that + you provide when creating a draft invoice. validation: - maxLength: 34 - created_at: + minLength: 1 + maxLength: 255 + given_name: type: optional - docs: |- - An RFC 3339-formatted timestamp that indicates when Square - received the transfer request. - validation: - maxLength: 34 + docs: The recipient's given (that is, first) name. access: read-only - source: - type: optional - docs: |- - Information about the application that initiated the - inventory transfer. - employee_id: - type: optional> - docs: >- - The Square-generated ID of the [Employee](entity:Employee) responsible - for the - - inventory transfer. - validation: - maxLength: 100 - team_member_id: - type: optional> + family_name: + type: optional + docs: The recipient's family (that is, last) name. + access: read-only + email_address: + type: optional + docs: The recipient's email address. + access: read-only + address: + type: optional
+ docs: The recipient's physical address. + phone_number: + type: optional + docs: The recipient's phone number. + access: read-only + company_name: + type: optional + docs: The name of the recipient's company. + access: read-only + tax_ids: + type: optional docs: >- - The Square-generated ID of the [Team Member](entity:TeamMember) - responsible for the + The recipient's tax IDs. The country of the seller account determines + whether this field - inventory transfer. - validation: - maxLength: 100 + is available for the customer. For more information, see [Invoice + recipient tax + IDs](https://developer.squareup.com/docs/invoices-api/overview#recipient-tax-ids). source: openapi: openapi/openapi.json - Invoice: + InvoiceRecipientTaxIds: docs: >- - Stores information about an invoice. You use the Invoices API to create - and manage + Represents the tax IDs for an invoice recipient. The country of the seller + account determines - invoices. For more information, see [Invoices API - Overview](https://developer.squareup.com/docs/invoices-api/overview). + whether the corresponding `tax_ids` field is available for the customer. + For more information, + + see [Invoice recipient tax + IDs](https://developer.squareup.com/docs/invoices-api/overview#recipient-tax-ids). properties: - id: + eu_vat: type: optional - docs: The Square-assigned ID of the invoice. - access: read-only - version: - type: optional - docs: >- - The Square-assigned version number, which is incremented each time an - update is committed to the invoice. - location_id: - type: optional> docs: >- - The ID of the location that this invoice is associated with. - + The EU VAT identification number for the invoice recipient. For + example, `IE3426675K`. + access: read-only + source: + openapi: openapi/openapi.json + InvoiceRefundedEvent: + docs: >- + Published when a refund is applied toward a payment of an + [invoice](entity:Invoice). - If specified in a `CreateInvoice` request, the value must match the - `location_id` of the associated order. - validation: - minLength: 1 - maxLength: 255 - order_id: + For more information about invoice refunds, see [Refund an + invoice](https://developer.squareup.com/docs/invoices-api/pay-refund-invoices#refund-invoice). + properties: + merchant_id: type: optional> - docs: >- - The ID of the [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. - + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"invoice.refunded"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + InvoiceRefundedEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"invoice"`. + id: + type: optional + docs: ID of the affected invoice. + object: + type: optional + docs: An object containing the refunded invoice. + source: + openapi: openapi/openapi.json + InvoiceRefundedEventObject: + properties: + invoice: + type: optional + docs: The related invoice. + source: + openapi: openapi/openapi.json + InvoiceRequestMethod: + enum: + - EMAIL + - CHARGE_CARD_ON_FILE + - SHARE_MANUALLY + - CHARGE_BANK_ON_FILE + - SMS + - SMS_CHARGE_CARD_ON_FILE + - SMS_CHARGE_BANK_ON_FILE + docs: >- + Specifies the action for Square to take for processing the invoice. For + example, - To view the line items and other information for the associated order, - call the + email the invoice, charge a customer's card on file, or do nothing. + DEPRECATED at - [RetrieveOrder](api-endpoint:Orders-RetrieveOrder) endpoint using the - order ID. - validation: - minLength: 1 - maxLength: 255 - primary_recipient: - type: optional - docs: >- - The customer who receives the invoice. This customer data is displayed - on the invoice and used by Square to deliver the invoice. + version 2021-01-21. The corresponding `request_method` field is replaced + by the + `Invoice.delivery_method` and + `InvoicePaymentRequest.automatic_payment_source` fields. + source: + openapi: openapi/openapi.json + InvoiceRequestType: + enum: + - BALANCE + - DEPOSIT + - INSTALLMENT + docs: >- + Indicates the type of the payment request. For more information, see - This field is required to publish an invoice, and it must specify the - `customer_id`. - payment_requests: - type: optional>> + [Configuring payment + requests](https://developer.squareup.com/docs/invoices-api/create-publish-invoices#payment-requests). + source: + openapi: openapi/openapi.json + InvoiceScheduledChargeFailedEvent: + docs: >- + Published when an automatic scheduled payment for an + [Invoice](entity:Invoice) has failed. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> docs: >- - The payment schedule for the invoice, represented by one or more - payment requests that - - define payment settings, such as amount due and due date. An invoice - supports the following payment request combinations: - - - One balance - - - One deposit with one balance - - - 2–12 installments - - - One deposit with 2–12 installments - - - This field is required when creating an invoice. It must contain at - least one payment request. - - All payment requests for the invoice must equal the total order - amount. For more information, see - - [Configuring payment - requests](https://developer.squareup.com/docs/invoices-api/create-publish-invoices#payment-requests). - - - Adding `INSTALLMENT` payment requests to an invoice requires an - - [Invoices Plus - subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription). - delivery_method: - type: optional + The type of event this represents, + `"invoice.scheduled_charge_failed"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + InvoiceScheduledChargeFailedEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"invoice"`. + id: + type: optional + docs: ID of the affected invoice. + object: + type: optional docs: >- - The delivery method that Square uses to send the invoice, reminders, - and receipts to - - the customer. After the invoice is published, Square processes the - invoice based on the delivery - - method and payment request settings, either immediately or on the - `scheduled_at` date, if specified. - - For example, Square might send the invoice or receipt for an automatic - payment. For invoices with - - automatic payments, this field must be set to `EMAIL`. - - - One of the following is required when creating an invoice: - - - (Recommended) This `delivery_method` field. To configure an - automatic payment, the - - `automatic_payment_source` field of the payment request is also - required. - - - The deprecated `request_method` field of the payment request. Note - that `invoice` - - objects returned in responses do not include `request_method`. - - See [InvoiceDeliveryMethod](#type-invoicedeliverymethod) for possible - values - invoice_number: + An object containing the invoice that experienced the failed scheduled + charge. + source: + openapi: openapi/openapi.json + InvoiceScheduledChargeFailedEventObject: + properties: + invoice: + type: optional + docs: The related invoice. + source: + openapi: openapi/openapi.json + InvoiceSort: + docs: Identifies the sort field and sort order. + properties: + field: + type: InvoiceSortField + docs: |- + The field to use for sorting. + See [InvoiceSortField](#type-invoicesortfield) for possible values + order: + type: optional + docs: |- + The order to use for sorting the results. + See [SortOrder](#type-sortorder) for possible values + source: + openapi: openapi/openapi.json + InvoiceSortField: + type: literal<"INVOICE_SORT_DATE"> + docs: The field to use for sorting. + InvoiceStatus: + enum: + - DRAFT + - UNPAID + - SCHEDULED + - PARTIALLY_PAID + - PAID + - PARTIALLY_REFUNDED + - REFUNDED + - CANCELED + - FAILED + - PAYMENT_PENDING + docs: Indicates the status of an [invoice](entity:Invoice). + source: + openapi: openapi/openapi.json + InvoiceUpdatedEvent: + docs: Published when an [Invoice](entity:Invoice) is updated. + properties: + merchant_id: type: optional> - docs: >- - A user-friendly invoice number that is displayed on the invoice. The - value is unique within a location. - - If not provided when creating an invoice, Square assigns a value. - - It increments from 1 and is padded with zeros making it 7 characters - long - - (for example, 0000001 and 0000002). - validation: - minLength: 1 - maxLength: 191 - title: + docs: The ID of the target merchant associated with the event. + type: type: optional> - docs: The title of the invoice, which is displayed on the invoice. - validation: - minLength: 1 - maxLength: 255 - description: + docs: The type of event this represents, `"invoice.updated"`. + event_id: type: optional> - docs: The description of the invoice, which is displayed on the invoice. - validation: - minLength: 1 - maxLength: 65536 - scheduled_at: + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + InvoiceUpdatedEventData: + properties: + type: type: optional> - docs: >- - The timestamp when the invoice is scheduled for processing, in RFC - 3339 format. - - After the invoice is published, Square processes the invoice on the - specified date, - - according to the delivery method and payment request settings. - - - If the field is not set, Square processes the invoice immediately - after it is published. - public_url: + docs: Name of the affected object’s type, `"invoice"`. + id: type: optional + docs: ID of the affected invoice. + object: + type: optional + docs: An object containing the updated invoice. + source: + openapi: openapi/openapi.json + InvoiceUpdatedEventObject: + properties: + invoice: + type: optional + docs: The related invoice. + source: + openapi: openapi/openapi.json + ItemVariationLocationOverrides: + docs: >- + Price and inventory alerting overrides for a `CatalogItemVariation` at a + specific `Location`. + properties: + location_id: + type: optional> docs: >- - A temporary link to the Square-hosted payment page where the customer - can pay the - - invoice. If the link expires, customers can provide the email address - or phone number - - associated with the invoice and request a new link directly from the - expired payment page. - - - This field is added after the invoice is published and reaches the - scheduled date - - (if one is defined). - access: read-only - next_payment_amount_money: + The ID of the `Location`. This can include locations that are + deactivated. + price_money: type: optional docs: >- - The current amount due for the invoice. In addition to the - - amount due on the next payment request, this includes any overdue - payment amounts. - status: - type: optional - docs: |- - The status of the invoice. - See [InvoiceStatus](#type-invoicestatus) for possible values - timezone: - type: optional + The price of the `CatalogItemVariation` at the given `Location`, or + blank for variable pricing. + pricing_type: + type: optional docs: >- - The time zone used to interpret calendar dates on the invoice, such as - `due_date`. - - When an invoice is created, this field is set to the `timezone` - specified for the seller - - location. The value cannot be changed. - + The pricing type (fixed or variable) for the `CatalogItemVariation` at + the given `Location`. - For example, a payment `due_date` of 2021-03-09 with a `timezone` of - America/Los\_Angeles + See [CatalogPricingType](#type-catalogpricingtype) for possible values + track_inventory: + type: optional> + docs: >- + If `true`, inventory tracking is active for the `CatalogItemVariation` + at this `Location`. + inventory_alert_type: + type: optional + docs: >- + Indicates whether the `CatalogItemVariation` displays an alert when + its inventory - becomes overdue at midnight on March 9 in America/Los\_Angeles (which - equals a UTC timestamp + quantity is less than or equal to its `inventory_alert_threshold`. - of 2021-03-10T08:00:00Z). - access: read-only - created_at: - type: optional - docs: The timestamp when the invoice was created, in RFC 3339 format. - access: read-only - updated_at: - type: optional - docs: The timestamp when the invoice was last updated, in RFC 3339 format. - access: read-only - accepted_payment_methods: - type: optional + See [InventoryAlertType](#type-inventoryalerttype) for possible values + inventory_alert_threshold: + type: optional> docs: >- - The payment methods that customers can use to pay the invoice on the - Square-hosted + If the inventory quantity for the variation is less than or equal to + this value and `inventory_alert_type` - invoice page. This setting is independent of any automatic payment - requests for the invoice. + is `LOW_QUANTITY`, the variation displays an alert in the merchant + dashboard. - This field is required when creating an invoice and must set at least - one payment method to `true`. - custom_fields: - type: optional>> + This value is always an integer. + sold_out: + type: optional docs: >- - Additional seller-defined fields that are displayed on the invoice. - For more information, see + Indicates whether the overridden item variation is sold out at the + specified location. - [Custom - fields](https://developer.squareup.com/docs/invoices-api/overview#custom-fields). + When inventory tracking is enabled on the item variation either + globally or at the specified location, - Adding custom fields to an invoice requires an + the item variation is automatically marked as sold out when its + inventory count reaches zero. The seller - [Invoices Plus - subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription). + 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, - Max: 2 custom fields - subscription_id: + applications should treat its inventory count as zero when this + attribute value is `true`. + access: read-only + sold_out_valid_until: type: optional docs: >- - The ID of the [subscription](entity:Subscription) associated with the - invoice. + The seller-assigned timestamp, of the RFC 3339 format, to indicate + when this sold-out variation - This field is present only on subscription billing invoices. - access: read-only - sale_or_service_date: - type: optional> - docs: >- - The date of the sale or the date that the service is rendered, in - `YYYY-MM-DD` format. + becomes available again at the specified location. Attempts by an + application to set this attribute are ignored. - This field can be used to specify a past or future date which is - displayed on the invoice. - payment_conditions: - type: optional> - docs: >- - **France only.** The payment terms and conditions that are displayed - on the invoice. For more information, + When the current time is later than this attribute value, the affected + item variation is no longer sold out. + access: read-only + source: + openapi: openapi/openapi.json + Job: + docs: >- + Represents a job that can be assigned to [team + members](entity:TeamMember). This object defines the - see [Payment - conditions](https://developer.squareup.com/docs/invoices-api/overview#payment-conditions). + job's title and tip eligibility. Compensation is defined in a [job + assignment](entity:JobAssignment) + in a team member's wage setting. + properties: + id: + type: optional + docs: >- + **Read only** The unique Square-assigned ID of the job. If you need a + job ID for an API request, - For countries other than France, Square returns an - `INVALID_REQUEST_ERROR` with a `BAD_REQUEST` code and + call [ListJobs](api-endpoint:Team-ListJobs) or use the ID returned + when you created the job. - "Payment conditions are not supported for this location's country" - detail if this field is included in `CreateInvoice` or `UpdateInvoice` - requests. + You can also get job IDs from a team member's wage setting. + title: + type: optional> + docs: The title of the job. validation: - minLength: 1 - maxLength: 2000 - store_payment_method_enabled: + maxLength: 150 + is_tip_eligible: type: optional> - docs: >- - Indicates whether to allow a customer to save a credit or debit card - as a card on file or a bank transfer as a - - bank account on file. If `true`, Square displays a __Save my card on - file__ or __Save my bank on file__ checkbox on the - - invoice payment page. Stored payment information can be used for - future automatic payments. The default value is `false`. - attachments: - type: optional> - docs: >- - Metadata about the attachments on the invoice. Invoice attachments are - managed using the - - [CreateInvoiceAttachment](api-endpoint:Invoices-CreateInvoiceAttachment) - and - [DeleteInvoiceAttachment](api-endpoint:Invoices-DeleteInvoiceAttachment) - endpoints. + docs: Indicates whether team members can earn tips for the job. + created_at: + type: optional + docs: The timestamp when the job was created, in RFC 3339 format. access: read-only - creator_team_member_id: + updated_at: type: optional + docs: The timestamp when the job was last updated, in RFC 3339 format. + access: read-only + version: + type: optional docs: >- - The ID of the [team member](entity:TeamMember) who created the - invoice. + **Read only** The current version of the job. Include this field in + `UpdateJob` requests to enable - This field is present only on invoices created in the Square Dashboard - or Square Invoices app by a logged-in team member. - access: read-only + [optimistic + concurrency](https://developer.squareup.com/docs/working-with-apis/optimistic-concurrency) + + control and avoid overwrites from concurrent requests. Requests fail + if the provided version doesn't + + match the server version at the time of the request. source: openapi: openapi/openapi.json - InvoiceAcceptedPaymentMethods: + JobAssignment: docs: >- - The payment methods that customers can use to pay an - [invoice](entity:Invoice) on the Square-hosted invoice payment page. + Represents a job assigned to a [team member](entity:TeamMember), including + the compensation the team + + member earns for the job. Job assignments are listed in the team member's + [wage setting](entity:WageSetting). properties: - card: - type: optional> - docs: >- - Indicates whether credit card or debit card payments are accepted. The - default value is `false`. - square_gift_card: - type: optional> - docs: >- - Indicates whether Square gift card payments are accepted. The default - value is `false`. - bank_account: - type: optional> - docs: >- - Indicates whether ACH bank transfer payments are accepted. The default - value is `false`. - buy_now_pay_later: - type: optional> + job_title: + type: optional> + docs: The title of the job. + pay_type: + type: JobAssignmentPayType docs: >- - Indicates whether Afterpay (also known as Clearpay) payments are - accepted. The default value is `false`. - - - This option is allowed only for invoices that have a single payment - request of the `BALANCE` type. This payment method is - - supported if the seller account accepts Afterpay payments and the - seller location is in a country where Afterpay - - invoice payments are supported. As a best practice, consider enabling - an additional payment method when allowing + The current pay type for the job assignment used to - `buy_now_pay_later` payments. For more information, including detailed - requirements and processing limits, see + calculate the pay amount in a pay period. - [Buy Now Pay Later payments with - Afterpay](https://developer.squareup.com/docs/invoices-api/overview#buy-now-pay-later). - cash_app_pay: - type: optional> + See [JobAssignmentPayType](#type-jobassignmentpaytype) for possible + values + hourly_rate: + type: optional docs: >- - Indicates whether Cash App payments are accepted. The default value is - `false`. - + The hourly pay rate of the job. For `SALARY` pay types, Square + calculates the hourly rate based on - This payment method is supported only for seller - [locations](entity:Location) in the United States. + `annual_rate` and `weekly_hours`. + annual_rate: + type: optional + docs: >- + The total pay amount for a 12-month period on the job. Set if the job + `PayType` is `SALARY`. + weekly_hours: + type: optional> + docs: >- + The planned hours per week for the job. Set if the job `PayType` is + `SALARY`. + job_id: + type: optional> + docs: The ID of the [job](entity:Job). source: openapi: openapi/openapi.json - InvoiceAttachment: - docs: Represents a file attached to an [invoice](entity:Invoice). + JobAssignmentPayType: + enum: + - NONE + - HOURLY + - SALARY + docs: Enumerates the possible pay types that a job can be assigned. + source: + openapi: openapi/openapi.json + JobCreatedEvent: + docs: Published when a Job is created. properties: - id: - type: optional - docs: The Square-assigned ID of the attachment. - access: read-only - filename: - type: optional - docs: The file name of the attachment, which is displayed on the invoice. - access: read-only - description: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"job.created"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: type: optional - docs: |- - The description of the attachment, which is displayed on the invoice. - This field maps to the seller-defined **Message** field. - access: read-only - filesize: - type: optional - docs: The file size of the attachment in bytes. + docs: Timestamp of when the event was created, in RFC 3339 format. access: read-only - hash: + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + JobCreatedEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"job"`. + id: type: optional - docs: The MD5 hash that was generated from the file contents. - access: read-only - mime_type: + docs: ID of the created job. + object: + type: optional + docs: An object containing the created job. + source: + openapi: openapi/openapi.json + JobCreatedEventObject: + properties: + job: + type: optional + docs: The created job. + source: + openapi: openapi/openapi.json + JobUpdatedEvent: + docs: Published when a Job is updated. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"job.updated"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: type: optional - docs: >- - The mime type of the attachment. - - The following mime types are supported: - - image/gif, image/jpeg, image/png, image/tiff, image/bmp, - application/pdf. + docs: Timestamp of when the event was created, in RFC 3339 format. access: read-only - uploaded_at: + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + JobUpdatedEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"job"`. + id: type: optional - docs: The timestamp when the attachment was uploaded, in RFC 3339 format. - access: read-only + docs: ID of the updated job. + object: + type: optional + docs: An object containing the updated job. source: openapi: openapi/openapi.json - InvoiceAutomaticPaymentSource: - enum: - - NONE - - CARD_ON_FILE - - BANK_ON_FILE - docs: >- - Indicates the automatic payment method for an [invoice payment - request](entity:InvoicePaymentRequest). + JobUpdatedEventObject: + properties: + job: + type: optional + docs: The updated job. source: openapi: openapi/openapi.json - InvoiceCustomField: - docs: >- - An additional seller-defined and customer-facing field to include on the - invoice. For more information, - - see [Custom - fields](https://developer.squareup.com/docs/invoices-api/overview#custom-fields). - - - Adding custom fields to an invoice requires an - - [Invoices Plus - subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription). + LaborScheduledShiftCreatedEvent: + docs: Published when a [ScheduledShift](entity:ScheduledShift) is created. properties: - label: + merchant_id: type: optional> - docs: >- - The label or title of the custom field. This field is required for a - custom field. - validation: - maxLength: 30 - value: + docs: The ID of the merchant associated with the event. + location_id: + type: optional> + docs: The ID of the location associated with the event. + type: type: optional> - docs: The text of the custom field. If omitted, only the label is rendered. - validation: - maxLength: 2000 - placement: - type: optional docs: >- - The location of the custom field on the invoice. This field is - required for a custom field. - - See [InvoiceCustomFieldPlacement](#type-invoicecustomfieldplacement) - for possible values + The type of event. For this event, the value is + `labor.scheduled_shift.created`. + event_id: + type: optional> + docs: The unique ID for the event. + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. source: openapi: openapi/openapi.json - InvoiceCustomFieldPlacement: - enum: - - ABOVE_LINE_ITEMS - - BELOW_LINE_ITEMS - docs: >- - Indicates where to render a custom field on the Square-hosted invoice page - and in emailed or PDF - - copies of the invoice. + LaborScheduledShiftCreatedEventData: + properties: + type: + type: optional> + docs: >- + The type of object affected by the event. For this event, the value is + `scheduled_shift`. + validation: + maxLength: 50 + id: + type: optional + docs: The ID of the affected `ScheduledShift`. + validation: + maxLength: 255 + object: + type: optional + docs: An object containing the affected `ScheduledShift`. source: openapi: openapi/openapi.json - InvoiceDeliveryMethod: - enum: - - EMAIL - - SHARE_MANUALLY - - SMS - docs: >- - Indicates how Square delivers the [invoice](entity:Invoice) to the - customer. + LaborScheduledShiftCreatedEventObject: + properties: + ScheduledShift: + type: optional + docs: The new `ScheduledShift`. source: openapi: openapi/openapi.json - InvoiceFilter: - docs: Describes query filters to apply. + LaborScheduledShiftDeletedEvent: + docs: Published when a [ScheduledShift](entity:ScheduledShift) is deleted. properties: - location_ids: - docs: |- - Limits the search to the specified locations. A location is required. - In the current implementation, only one location can be specified. - type: list - customer_ids: - type: optional>> + merchant_id: + type: optional> + docs: The ID of the merchant associated with the event. + location_id: + type: optional> + docs: The ID of the location associated with the event. + type: + type: optional> docs: >- - 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. + The type of event. For this event, the value is + `labor.scheduled_shift.deleted`. + event_id: + type: optional> + docs: The unique ID for the event. + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. source: openapi: openapi/openapi.json - InvoicePaymentReminder: - docs: >- - Describes a payment request reminder (automatic notification) that Square - sends - - to the customer. You configure a reminder relative to the payment request - - `due_date`. + LaborScheduledShiftDeletedEventData: properties: - uid: - type: optional - docs: |- - A Square-assigned ID that uniquely identifies the reminder within the - `InvoicePaymentRequest`. - access: read-only - relative_scheduled_days: - type: optional> + type: + type: optional> docs: >- - The number of days before (a negative number) or after (a positive - number) - - the payment request `due_date` when the reminder is sent. For example, - -3 indicates that - - the reminder should be sent 3 days before the payment request - `due_date`. + The type of object affected by the event. For this event, the value is + `scheduled_shift`. validation: - min: -32767 - max: 32767 - message: - type: optional> - docs: The reminder message. + maxLength: 50 + id: + type: optional + docs: The ID of the affected `ScheduledShift`. validation: - minLength: 1 - maxLength: 1000 - status: - type: optional + maxLength: 255 + deleted: + type: optional> + docs: Is true if the affected object was deleted. Otherwise absent. + source: + openapi: openapi/openapi.json + LaborScheduledShiftPublishedEvent: + docs: Published when a [ScheduledShift](entity:ScheduledShift) is published. + properties: + merchant_id: + type: optional> + docs: The ID of the merchant associated with the event. + location_id: + type: optional> + docs: The ID of the location associated with the event. + type: + type: optional> docs: >- - The status of the reminder. - - See [InvoicePaymentReminderStatus](#type-invoicepaymentreminderstatus) - for possible values - sent_at: + The type of event. For this event, the value is + `labor.scheduled_shift.published`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: type: optional - docs: If sent, the timestamp when the reminder was sent, in RFC 3339 format. + docs: The timestamp of when the event was created, in RFC 3339 format. access: read-only + data: + type: optional + docs: The data associated with the event. source: openapi: openapi/openapi.json - InvoicePaymentReminderStatus: - enum: - - PENDING - - NOT_APPLICABLE - - SENT - docs: The status of a payment request reminder. - source: - openapi: openapi/openapi.json - InvoicePaymentRequest: - docs: >- - Represents a payment request for an [invoice](entity:Invoice). Invoices - can specify a maximum - - of 13 payment requests, with up to 12 `INSTALLMENT` request types. For - more information, - - see [Configuring payment - requests](https://developer.squareup.com/docs/invoices-api/create-publish-invoices#payment-requests). - - - Adding `INSTALLMENT` payment requests to an invoice requires an - - [Invoices Plus - subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription). + LaborScheduledShiftPublishedEventData: properties: - uid: + type: type: optional> docs: >- - The Square-generated ID of the payment request in an - [invoice](entity:Invoice). + The type of object affected by the event. For this event, the value is + `scheduled_shift`. + validation: + maxLength: 50 + id: + type: optional + docs: The ID of the affected `ScheduledShift`. validation: - minLength: 1 maxLength: 255 - request_method: - type: optional - docs: >- - Indicates how Square processes the payment request. DEPRECATED at - version 2021-01-21. Replaced by the - - `Invoice.delivery_method` and - `InvoicePaymentRequest.automatic_payment_source` fields. - - - One of the following is required when creating an invoice: - - - (Recommended) The `delivery_method` field of the invoice. To - configure an automatic payment, the - - `automatic_payment_source` field of the payment request is also - required. - - - This `request_method` field. Note that `invoice` objects returned in - responses do not include `request_method`. - - See [InvoiceRequestMethod](#type-invoicerequestmethod) for possible - values - request_type: - type: optional - docs: >- - Identifies the payment request type. This type defines how the payment - request amount is determined. - - This field is required to create a payment request. - - See [InvoiceRequestType](#type-invoicerequesttype) for possible values - due_date: + object: + type: optional + docs: An object containing the affected `ScheduledShift`. + source: + openapi: openapi/openapi.json + LaborScheduledShiftPublishedEventObject: + properties: + ScheduledShift: + type: optional + docs: The published `ScheduledShift`. + source: + openapi: openapi/openapi.json + LaborScheduledShiftUpdatedEvent: + docs: Published when a [ScheduledShift](entity:ScheduledShift) is updated. + properties: + merchant_id: type: optional> - docs: >- - The due date (in the invoice's time zone) for the payment request, in - `YYYY-MM-DD` format. This field - - is required to create a payment request. If an - `automatic_payment_source` is defined for the request, Square - - charges the payment source on this date. - - - After this date, the invoice becomes overdue. For example, a payment - `due_date` of 2021-03-09 with a `timezone` - - of America/Los\_Angeles becomes overdue at midnight on March 9 in - America/Los\_Angeles (which equals a UTC - - timestamp of 2021-03-10T08:00:00Z). - fixed_amount_requested_money: - type: optional - docs: >- - If the payment request specifies `DEPOSIT` or `INSTALLMENT` as the - `request_type`, - - this indicates the request amount. - - You cannot specify this when `request_type` is `BALANCE` or when the - - payment request includes the `percentage_requested` field. - percentage_requested: + docs: The ID of the merchant associated with the event. + location_id: + type: optional> + docs: The ID of the location associated with the event. + type: type: optional> docs: >- - Specifies the amount for the payment request in percentage: - - - - When the payment `request_type` is `DEPOSIT`, it is the percentage - of the order's total amount. - - - When the payment `request_type` is `INSTALLMENT`, it is the - percentage of the order's total less - - the deposit, if requested. The sum of the `percentage_requested` in - all installment - - payment requests must be equal to 100. - - - You cannot specify this when the payment `request_type` is `BALANCE` - or when the - - payment request specifies the `fixed_amount_requested_money` field. - tipping_enabled: - type: optional> - docs: >- - If set to true, the Square-hosted invoice page (the `public_url` field - of the invoice) - - provides a place for the customer to pay a tip. - - - This field is allowed only on the final payment request - - and the payment `request_type` must be `BALANCE` or `INSTALLMENT`. - automatic_payment_source: - type: optional - docs: >- - The payment method for an automatic payment. - - - The default value is `NONE`. - - See - [InvoiceAutomaticPaymentSource](#type-invoiceautomaticpaymentsource) - for possible values - card_id: + The type of event. For this event, the value is + `labor.scheduled_shift.updated`. + event_id: + type: optional> + docs: The unique ID for the event. + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + LaborScheduledShiftUpdatedEventData: + properties: + type: type: optional> docs: >- - The ID of the credit or debit card on file to charge for the payment - request. To get the cards on file for a customer, - - call [ListCards](api-endpoint:Cards-ListCards) and include the - `customer_id` of the invoice recipient. + The type of object affected by the event. For this event, the value is + `scheduled_shift`. + validation: + maxLength: 50 + id: + type: optional + docs: The ID of the affected `ScheduledShift`. validation: - minLength: 1 maxLength: 255 - reminders: - type: optional>> - docs: A list of one or more reminders to send for the payment request. - computed_amount_money: - type: optional - docs: >- - The amount of the payment request, computed using the order amount and - information from the various payment - - request fields (`request_type`, `fixed_amount_requested_money`, and - `percentage_requested`). - total_completed_amount_money: - type: optional - docs: >- - The amount of money already paid for the specific payment request. + object: + type: optional + docs: An object containing the affected `ScheduledShift`. + source: + openapi: openapi/openapi.json + LaborScheduledShiftUpdatedEventObject: + properties: + ScheduledShift: + type: optional + docs: The updated `ScheduledShift`. + source: + openapi: openapi/openapi.json + LaborShiftCreatedEvent: + docs: >- + Published when a worker starts a [Shift](entity:Shift). - This amount might include a rounding adjustment if the most recent - invoice payment - was in cash in a currency that rounds cash payments (such as, `CAD` or - `AUD`). - rounding_adjustment_included_money: - type: optional + Deprecated at Square API version 2025-05-21. Replaced by + `labor.timecard.created`. + properties: + merchant_id: + type: optional> + docs: The ID of the merchant associated with the event. + type: + type: optional> + docs: The type of event. For this event, the value is `labor.shift.created`. + event_id: + type: optional> + docs: The unique ID for the event. + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + LaborShiftCreatedEventData: + properties: + type: + type: optional> docs: >- - If the most recent payment was a cash payment - - in a currency that rounds cash payments (such as, `CAD` or `AUD`) and - the payment - - is rounded from `computed_amount_money` in the payment request, then - this + The type of object affected by the event. For this event, the value is + `shift`. + id: + type: optional + docs: The ID of the affected `Shift`. + object: + type: optional + docs: An object containing the affected `Shift`. + source: + openapi: openapi/openapi.json + LaborShiftCreatedEventObject: + properties: + shift: + type: optional + docs: The new `Shift`. + source: + openapi: openapi/openapi.json + LaborShiftDeletedEvent: + docs: >- + Published when a [Shift](entity:Shift) is deleted. - field specifies the rounding adjustment applied. This amount - might be negative. + Deprecated at Square API version 2025-05-21. Replaced by + `labor.timecard.deleted`. + properties: + merchant_id: + type: optional> + docs: The ID of the merchant associated with the event. + type: + type: optional> + docs: The type of event. For this event, the value is `labor.shift.deleted`. + event_id: + type: optional> + docs: The unique ID for the event. + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. source: openapi: openapi/openapi.json - InvoiceQuery: - docs: Describes query criteria for searching invoices. + LaborShiftDeletedEventData: properties: - filter: - type: InvoiceFilter + type: + type: optional> docs: >- - Query filters to apply in searching invoices. - - For more information, see [Search for - invoices](https://developer.squareup.com/docs/invoices-api/retrieve-list-search-invoices#search-invoices). - sort: - type: optional - docs: Describes the sort order for the search result. + The type of object affected by the event. For this event, the value is + `shift`. + id: + type: optional + docs: The ID of the affected `Shift`. + deleted: + type: optional> + docs: Is true if the affected object was deleted. Otherwise absent. source: openapi: openapi/openapi.json - InvoiceRecipient: + LaborShiftUpdatedEvent: docs: >- - Represents a snapshot of customer data. This object stores customer data - that is displayed on the invoice - - and that Square uses to deliver the invoice. - - - When you provide a customer ID for a draft invoice, Square retrieves the - associated customer profile and populates + Published when a [Shift](entity:Shift) is updated. - 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. + Deprecated at Square API version 2025-05-21. Replaced by + `labor.timecard.updated`. properties: - customer_id: + merchant_id: type: optional> - docs: |- - The ID of the customer. This is the customer profile ID that - you provide when creating a draft invoice. - validation: - minLength: 1 - maxLength: 255 - given_name: + docs: The ID of the merchant associated with the event. + type: + type: optional> + docs: The type of event. For this event, the value is `labor.shift.updated`. + event_id: + type: optional> + docs: The unique ID for the event. + created_at: type: optional - docs: The recipient's given (that is, first) name. + docs: The timestamp of when the event was created, in RFC 3339 format. access: read-only - family_name: + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + LaborShiftUpdatedEventData: + properties: + type: + type: optional> + docs: >- + The type of object affected by the event. For this event, the value is + `shift`. + id: type: optional - docs: The recipient's family (that is, last) name. - access: read-only - email_address: + docs: ID of the affected `Shift`. + object: + type: optional + docs: An object containing the affected `Shift`. + source: + openapi: openapi/openapi.json + LaborShiftUpdatedEventObject: + properties: + shift: + type: optional + docs: The updated `Shift`. + source: + openapi: openapi/openapi.json + LaborTimecardCreatedEvent: + docs: Published when a worker starts a [Timecard](entity:Timecard). + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: >- + The type of event. For this event, the value is + `labor.timecard.created`. + event_id: + type: optional> + docs: The unique ID for the event. + created_at: type: optional - docs: The recipient's email address. + docs: The timestamp of when the event was created, in RFC 3339 format. access: read-only - address: - type: optional
- docs: The recipient's physical address. - phone_number: + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + LaborTimecardCreatedEventData: + properties: + type: + type: optional> + docs: >- + The type of object affected by the event. For this event, the value is + `timecard`. + id: type: optional - docs: The recipient's phone number. + docs: The ID of the affected `Timecard`. + object: + type: optional + docs: An object containing the affected `Timecard`. + source: + openapi: openapi/openapi.json + LaborTimecardCreatedEventObject: + properties: + timecard: + type: optional + docs: The new `Timecard`. + source: + openapi: openapi/openapi.json + LaborTimecardDeletedEvent: + docs: Published when a [Timecard](entity:Timecard) is deleted. + properties: + merchant_id: + type: optional> + docs: The ID of the merchant associated with the event. + type: + type: optional> + docs: >- + The type of event. For this event, the value is + `labor.timecard.deleted`. + event_id: + type: optional> + docs: The unique ID for the event. + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. access: read-only - company_name: + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + LaborTimecardDeletedEventData: + properties: + type: + type: optional> + docs: >- + The type of object affected by the event. For this event, the value is + `timecard`. + id: type: optional - docs: The name of the recipient's company. + docs: The ID of the affected `Timecard`. + deleted: + type: optional> + docs: Is true if the affected object was deleted. Otherwise absent. + source: + openapi: openapi/openapi.json + LaborTimecardUpdatedEvent: + docs: Published when a [Timecard](entity:Timecard) is updated. + properties: + merchant_id: + type: optional> + docs: The ID of the merchant associated with the event. + type: + type: optional> + docs: >- + The type of event. For this event, the value is + `labor.timecard.updated`. + event_id: + type: optional> + docs: The unique ID for the event. + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. access: read-only - tax_ids: - type: optional + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + LaborTimecardUpdatedEventData: + properties: + type: + type: optional> docs: >- - The recipient's tax IDs. The country of the seller account determines - whether this field - - is available for the customer. For more information, see [Invoice - recipient tax - IDs](https://developer.squareup.com/docs/invoices-api/overview#recipient-tax-ids). + The type of object affected by the event. For this event, the value is + `timecard`. + id: + type: optional + docs: The ID of the affected `Timecard`. + object: + type: optional + docs: An object containing the affected `Timecard`. + source: + openapi: openapi/openapi.json + LaborTimecardUpdatedEventObject: + properties: + timecard: + type: optional + docs: The updated `Timecard`. source: openapi: openapi/openapi.json - InvoiceRecipientTaxIds: + LinkCustomerToGiftCardResponse: docs: >- - Represents the tax IDs for an invoice recipient. The country of the seller - account determines - - whether the corresponding `tax_ids` field is available for the customer. - For more information, + A response that contains the linked `GiftCard` object. If the request + resulted in errors, - see [Invoice recipient tax - IDs](https://developer.squareup.com/docs/invoices-api/overview#recipient-tax-ids). + the response contains a set of `Error` objects. properties: - eu_vat: - type: optional + errors: + type: optional> + docs: Any errors that occurred during the request. + gift_card: + type: optional docs: >- - The EU VAT identification number for the invoice recipient. For - example, `IE3426675K`. - access: read-only + The gift card with the ID of the linked customer listed in the + `customer_ids` field. source: openapi: openapi/openapi.json - InvoiceRequestMethod: - enum: - - EMAIL - - CHARGE_CARD_ON_FILE - - SHARE_MANUALLY - - CHARGE_BANK_ON_FILE - - SMS - - SMS_CHARGE_CARD_ON_FILE - - SMS_CHARGE_BANK_ON_FILE - docs: >- - Specifies the action for Square to take for processing the invoice. For - example, + ListBankAccountsResponse: + docs: Response object returned by ListBankAccounts. + properties: + errors: + type: optional> + docs: Information on errors encountered during the request. + bank_accounts: + type: optional> + docs: List of BankAccounts associated with this account. + cursor: + type: optional + docs: >- + When a response is truncated, it includes a cursor that you can - email the invoice, charge a customer's card on file, or do nothing. - DEPRECATED at + use in a subsequent request to fetch next set of bank accounts. - version 2021-01-21. The corresponding `request_method` field is replaced - by the + If empty, this is the final response. - `Invoice.delivery_method` and - `InvoicePaymentRequest.automatic_payment_source` fields. + + For more information, see + [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). source: openapi: openapi/openapi.json - InvoiceRequestType: - enum: - - BALANCE - - DEPOSIT - - INSTALLMENT + ListBookingCustomAttributeDefinitionsResponse: docs: >- - Indicates the type of the payment request. For more information, see + Represents a + [ListBookingCustomAttributeDefinitions](api-endpoint:BookingCustomAttributes-ListBookingCustomAttributeDefinitions) + response. - [Configuring payment - requests](https://developer.squareup.com/docs/invoices-api/create-publish-invoices#payment-requests). - source: - openapi: openapi/openapi.json - InvoiceSort: - docs: Identifies the sort field and sort order. + Either `custom_attribute_definitions`, an empty object, or `errors` is + present in the response. + + If additional results are available, the `cursor` field is also present + along with `custom_attribute_definitions`. properties: - field: - type: InvoiceSortField - docs: |- - The field to use for sorting. - See [InvoiceSortField](#type-invoicesortfield) for possible values - order: - type: optional - docs: |- - The order to use for sorting the results. - See [SortOrder](#type-sortorder) for possible values - source: - openapi: openapi/openapi.json - InvoiceSortField: - type: literal<"INVOICE_SORT_DATE"> - docs: The field to use for sorting. - InvoiceStatus: - enum: - - DRAFT - - UNPAID - - SCHEDULED - - PARTIALLY_PAID - - PAID - - PARTIALLY_REFUNDED - - REFUNDED - - CANCELED - - FAILED - - PAYMENT_PENDING - docs: Indicates the status of an [invoice](entity:Invoice). + custom_attribute_definitions: + type: optional> + docs: >- + The retrieved custom attribute definitions. If no custom attribute + definitions are found, + + Square returns an empty object (`{}`). + cursor: + type: optional + docs: >- + The cursor to provide in your next call to this endpoint to retrieve + the next page of + + results for your original request. This field is present only if the + request succeeded and + + additional results are available. For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + errors: + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - ItemVariationLocationOverrides: + ListBookingCustomAttributesResponse: docs: >- - Price and inventory alerting overrides for a `CatalogItemVariation` at a - specific `Location`. + Represents a + [ListBookingCustomAttributes](api-endpoint:BookingCustomAttributes-ListBookingCustomAttributes) + response. + + Either `custom_attributes`, an empty object, or `errors` is present in the + response. If additional + + results are available, the `cursor` field is also present along with + `custom_attributes`. properties: - location_id: - type: optional> - docs: >- - The ID of the `Location`. This can include locations that are - deactivated. - price_money: - type: optional - docs: >- - The price of the `CatalogItemVariation` at the given `Location`, or - blank for variable pricing. - pricing_type: - type: optional + custom_attributes: + type: optional> docs: >- - The pricing type (fixed or variable) for the `CatalogItemVariation` at - the given `Location`. + The retrieved custom attributes. If `with_definitions` was set to + `true` in the request, - See [CatalogPricingType](#type-catalogpricingtype) for possible values - track_inventory: - type: optional> - docs: >- - If `true`, inventory tracking is active for the `CatalogItemVariation` - at this `Location`. - inventory_alert_type: - type: optional + the custom attribute definition is returned in the `definition` field + of each custom attribute. + + + If no custom attributes are found, Square returns an empty object + (`{}`). + cursor: + type: optional docs: >- - Indicates whether the `CatalogItemVariation` displays an alert when - its inventory + The cursor to use in your next call to this endpoint to retrieve the + next page of results - quantity is less than or equal to its `inventory_alert_threshold`. + for your original request. This field is present only if the request + succeeded and additional - See [InventoryAlertType](#type-inventoryalerttype) for possible values - inventory_alert_threshold: - type: optional> + results are available. For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + ListBookingsResponse: + properties: + bookings: + type: optional> + docs: The list of targeted bookings. + cursor: + type: optional docs: >- - If the inventory quantity for the variation is less than or equal to - this value and `inventory_alert_type` + The pagination cursor to be used in the subsequent request to get the + next page of the results. Stop retrieving the next page of the results + when the cursor is not set. + validation: + maxLength: 65536 + errors: + type: optional> + docs: Errors that occurred during the request. + source: + openapi: openapi/openapi.json + ListBreakTypesResponse: + docs: >- + The response to a request for a set of `BreakType` objects. The response + contains - is `LOW_QUANTITY`, the variation displays an alert in the merchant - dashboard. + the requested `BreakType` objects and might contain a set of `Error` + objects if + the request resulted in errors. + properties: + break_types: + type: optional> + docs: ' A page of `BreakType` results.' + cursor: + type: optional + docs: |- + The value supplied in the subsequent request to fetch the next page + of `BreakType` results. + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + ListCardsResponse: + docs: >- + Defines the fields that are included in the response body of - This value is always an integer. - sold_out: - type: optional - docs: >- - Indicates whether the overridden item variation is sold out at the - specified location. + a request to the [ListCards](api-endpoint:Cards-ListCards) endpoint. - When inventory tracking is enabled on the item variation either - globally or at the specified location, + Note: if there are errors processing the request, the card field will not + be - the item variation is automatically marked as sold out when its - inventory count reaches zero. The seller + present. + properties: + errors: + type: optional> + docs: Information on errors encountered during the request. + cards: + type: optional> + docs: The requested list of `Card`s. + cursor: + type: optional + docs: >- + The pagination cursor to be used in a subsequent request. If empty, - can manually set the item variation as sold out even when the - inventory count is greater than zero. + this is the final response. - Attempts by an application to set this attribute are ignored. - Regardless how the sold-out status is set, - applications should treat its inventory count as zero when this - attribute value is `true`. - access: read-only - sold_out_valid_until: + See + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) + for more information. + source: + openapi: openapi/openapi.json + ListCashDrawerShiftEventsResponse: + properties: + cursor: + type: optional + docs: |- + Opaque cursor for fetching the next page. Cursor is not present in + the last page of results. + errors: + type: optional> + docs: Any errors that occurred during the request. + cash_drawer_shift_events: + type: optional> + docs: |- + All of the events (payments, refunds, etc.) for a cash drawer during + the shift. + source: + openapi: openapi/openapi.json + ListCashDrawerShiftsResponse: + properties: + cursor: + type: optional + docs: |- + Opaque cursor for fetching the next page of results. Cursor is not + present in the last page of results. + errors: + type: optional> + docs: Any errors that occurred during the request. + cash_drawer_shifts: + type: optional> + docs: |- + A collection of CashDrawerShiftSummary objects for shifts that match + the query. + source: + openapi: openapi/openapi.json + ListCatalogResponse: + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + cursor: type: optional docs: >- - The seller-assigned timestamp, of the RFC 3339 format, to indicate - when this sold-out variation - - becomes available again at the specified location. Attempts by an - application to set this attribute are ignored. + The pagination cursor to be used in a subsequent request. If unset, + this is the final response. - When the current time is later than this attribute value, the affected - item variation is no longer sold out. - access: read-only + See + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) + for more information. + objects: + type: optional> + docs: The CatalogObjects returned. source: openapi: openapi/openapi.json - Job: + ListCustomerCustomAttributeDefinitionsResponse: docs: >- - Represents a job that can be assigned to [team - members](entity:TeamMember). This object defines the + Represents a + [ListCustomerCustomAttributeDefinitions](api-endpoint:CustomerCustomAttributes-ListCustomerCustomAttributeDefinitions) + response. - job's title and tip eligibility. Compensation is defined in a [job - assignment](entity:JobAssignment) + Either `custom_attribute_definitions`, an empty object, or `errors` is + present in the response. - in a team member's wage setting. + If additional results are available, the `cursor` field is also present + along with `custom_attribute_definitions`. properties: - id: - type: optional + custom_attribute_definitions: + type: optional> docs: >- - **Read only** The unique Square-assigned ID of the job. If you need a - job ID for an API request, - - call [ListJobs](api-endpoint:Team-ListJobs) or use the ID returned - when you created the job. + The retrieved custom attribute definitions. If no custom attribute + definitions are found, - You can also get job IDs from a team member's wage setting. - title: - type: optional> - docs: The title of the job. - validation: - maxLength: 150 - is_tip_eligible: - type: optional> - docs: Indicates whether team members can earn tips for the job. - created_at: - type: optional - docs: The timestamp when the job was created, in RFC 3339 format. - access: read-only - updated_at: + Square returns an empty object (`{}`). + cursor: type: optional - docs: The timestamp when the job was last updated, in RFC 3339 format. - access: read-only - version: - type: optional docs: >- - **Read only** The current version of the job. Include this field in - `UpdateJob` requests to enable - - [optimistic - concurrency](https://developer.squareup.com/docs/working-with-apis/optimistic-concurrency) + The cursor to provide in your next call to this endpoint to retrieve + the next page of - control and avoid overwrites from concurrent requests. Requests fail - if the provided version doesn't + results for your original request. This field is present only if the + request succeeded and - match the server version at the time of the request. + additional results are available. For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + errors: + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - JobAssignment: + ListCustomerCustomAttributesResponse: docs: >- - Represents a job assigned to a [team member](entity:TeamMember), including - the compensation the team + Represents a + [ListCustomerCustomAttributes](api-endpoint:CustomerCustomAttributes-ListCustomerCustomAttributes) + response. - member earns for the job. Job assignments are listed in the team member's - [wage setting](entity:WageSetting). + Either `custom_attributes`, an empty object, or `errors` is present in the + response. If additional + + results are available, the `cursor` field is also present along with + `custom_attributes`. properties: - job_title: - type: optional> - docs: The title of the job. - pay_type: - type: JobAssignmentPayType + custom_attributes: + type: optional> docs: >- - The current pay type for the job assignment used to + The retrieved custom attributes. If `with_definitions` was set to + `true` in the request, - calculate the pay amount in a pay period. + the custom attribute definition is returned in the `definition` field + of each custom attribute. - See [JobAssignmentPayType](#type-jobassignmentpaytype) for possible - values - hourly_rate: - type: optional - docs: >- - The hourly pay rate of the job. For `SALARY` pay types, Square - calculates the hourly rate based on - `annual_rate` and `weekly_hours`. - annual_rate: - type: optional - docs: >- - The total pay amount for a 12-month period on the job. Set if the job - `PayType` is `SALARY`. - weekly_hours: - type: optional> + If no custom attributes are found, Square returns an empty object + (`{}`). + cursor: + type: optional docs: >- - The planned hours per week for the job. Set if the job `PayType` is - `SALARY`. - job_id: - type: optional> - docs: The ID of the [job](entity:Job). - source: - openapi: openapi/openapi.json - JobAssignmentPayType: - enum: - - NONE - - HOURLY - - SALARY - docs: Enumerates the possible pay types that a job can be assigned. + The cursor to use in your next call to this endpoint to retrieve the + next page of results + + for your original request. This field is present only if the request + succeeded and additional + + results are available. For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + errors: + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - LinkCustomerToGiftCardResponse: + ListCustomerGroupsResponse: docs: >- - A response that contains the linked `GiftCard` object. If the request - resulted in errors, + Defines the fields that are included in the response body of - the response contains a set of `Error` objects. + a request to the + [ListCustomerGroups](api-endpoint:CustomerGroups-ListCustomerGroups) + endpoint. + + + Either `errors` or `groups` is present in a given response (never both). properties: errors: type: optional> docs: Any errors that occurred during the request. - gift_card: - type: optional + groups: + type: optional> + docs: A list of customer groups belonging to the current seller. + cursor: + type: optional docs: >- - The gift card with the ID of the linked customer listed in the - `customer_ids` field. + A pagination cursor to retrieve the next set of results for your + + original query to the endpoint. This value is present only if the + request + + succeeded and additional results are available. + + + For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). source: openapi: openapi/openapi.json - ListBankAccountsResponse: - docs: Response object returned by ListBankAccounts. + ListCustomerSegmentsResponse: + docs: >- + Defines the fields that are included in the response body for requests to + the `ListCustomerSegments` endpoint. + + + Either `errors` or `segments` is present in a given response (never both). properties: errors: type: optional> - docs: Information on errors encountered during the request. - bank_accounts: - type: optional> - docs: List of BankAccounts associated with this account. + docs: Any errors that occurred during the request. + segments: + type: optional> + docs: >- + The list of customer segments belonging to the associated Square + account. cursor: type: optional docs: >- - When a response is truncated, it includes a cursor that you can + A pagination cursor to be used in subsequent calls to + `ListCustomerSegments` - use in a subsequent request to fetch next set of bank accounts. + to retrieve the next set of query results. The cursor is only present + if the request succeeded and - If empty, this is the final response. + additional results are available. For more information, see - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). source: openapi: openapi/openapi.json - ListBookingCustomAttributeDefinitionsResponse: + ListCustomersResponse: docs: >- - Represents a - [ListBookingCustomAttributeDefinitions](api-endpoint:BookingCustomAttributes-ListBookingCustomAttributeDefinitions) - response. + Defines the fields that are included in the response body of - Either `custom_attribute_definitions`, an empty object, or `errors` is - present in the response. + a request to the `ListCustomers` endpoint. - If additional results are available, the `cursor` field is also present - along with `custom_attribute_definitions`. + + Either `errors` or `customers` is present in a given response (never + both). properties: - custom_attribute_definitions: - type: optional> + errors: + type: optional> + docs: Any errors that occurred during the request. + customers: + type: optional> docs: >- - The retrieved custom attribute definitions. If no custom attribute - definitions are found, + The customer profiles associated with the Square account or an empty + object (`{}`) if none are found. - Square returns an empty object (`{}`). + Only customer profiles with public information (`given_name`, + `family_name`, `company_name`, `email_address`, or + + `phone_number`) are included in the response. cursor: type: optional docs: >- - The cursor to provide in your next call to this endpoint to retrieve - the next page of + A pagination cursor to retrieve the next set of results for the - results for your original request. This field is present only if the - request succeeded and + original query. A cursor is only present if the request succeeded and + additional results - additional results are available. For more information, see + are available. + + + For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: openapi/openapi.json - ListBookingCustomAttributesResponse: - docs: >- - Represents a - [ListBookingCustomAttributes](api-endpoint:BookingCustomAttributes-ListBookingCustomAttributes) - response. + count: + type: optional + docs: >- + The total count of customers associated with the Square account. Only + customer profiles with public information - Either `custom_attributes`, an empty object, or `errors` is present in the - response. If additional + (`given_name`, `family_name`, `company_name`, `email_address`, or + `phone_number`) are counted. This field is present - results are available, the `cursor` field is also present along with - `custom_attributes`. + only if `count` is set to `true` in the request. + source: + openapi: openapi/openapi.json + ListDeviceCodesResponse: properties: - custom_attributes: - type: optional> + errors: + type: optional> + docs: Any errors that occurred during the request. + device_codes: + type: optional> + docs: The queried DeviceCode. + cursor: + type: optional docs: >- - The retrieved custom attributes. If `with_definitions` was set to - `true` in the request, + A pagination cursor to retrieve the next set of results for your - the custom attribute definition is returned in the `definition` field - of each custom attribute. + original query to the endpoint. This value is present only if the + request + succeeded and additional results are available. - If no custom attributes are found, Square returns an empty object - (`{}`). + + See [Paginating + results](https://developer.squareup.com/docs/working-with-apis/pagination) + for more information. + source: + openapi: openapi/openapi.json + ListDevicesResponse: + properties: + errors: + type: optional> + docs: Information about errors that occurred during the request. + devices: + type: optional> + docs: The requested list of `Device` objects. cursor: type: optional docs: >- - The cursor to use in your next call to this endpoint to retrieve the - next page of results + The pagination cursor to be used in a subsequent request. If empty, - for your original request. This field is present only if the request - succeeded and additional + this is the final response. - results are available. For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - errors: - type: optional> - docs: Any errors that occurred during the request. + See + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) + for more information. source: openapi: openapi/openapi.json - ListBookingsResponse: + ListDisputeEvidenceResponse: + docs: Defines the fields in a `ListDisputeEvidence` response. properties: - bookings: - type: optional> - docs: The list of targeted bookings. + evidence: + type: optional> + docs: The list of evidence previously uploaded to the specified dispute. + errors: + type: optional> + docs: Information about errors encountered during the request. cursor: type: optional docs: >- - The pagination cursor to be used in the subsequent request to get the - next page of the results. Stop retrieving the next page of the results - when the cursor is not set. - validation: - maxLength: 65536 + The pagination cursor to be used in a subsequent request. + + If unset, this is the final response. For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + source: + openapi: openapi/openapi.json + ListDisputesResponse: + docs: Defines fields in a `ListDisputes` response. + properties: errors: type: optional> - docs: Errors that occurred during the request. + docs: Information about errors encountered during the request. + disputes: + type: optional> + docs: The list of disputes. + cursor: + type: optional + docs: >- + The pagination cursor to be used in a subsequent request. + + If unset, this is the final response. For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). source: openapi: openapi/openapi.json - ListBreakTypesResponse: + ListEmployeeWagesResponse: docs: >- - The response to a request for a set of `BreakType` objects. The response - contains - - the requested `BreakType` objects and might contain a set of `Error` - objects if + The response to a request for a set of `EmployeeWage` objects. The + response contains - the request resulted in errors. + a set of `EmployeeWage` objects. properties: - break_types: - type: optional> - docs: ' A page of `BreakType` results.' + employee_wages: + type: optional> + docs: A page of `EmployeeWage` results. cursor: type: optional docs: |- The value supplied in the subsequent request to fetch the next page - of `BreakType` results. + of `EmployeeWage` results. errors: type: optional> docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - ListCardsResponse: + ListEmployeesResponse: + properties: + employees: optional> + cursor: + type: optional + docs: The token to be used to retrieve the next page of results. + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + ListEventTypesResponse: docs: >- Defines the fields that are included in the response body of - a request to the [ListCards](api-endpoint:Cards-ListCards) endpoint. + a request to the [ListEventTypes](api-endpoint:Events-ListEventTypes) + endpoint. - Note: if there are errors processing the request, the card field will not - be + Note: if there are errors processing the request, the event types field + will not be present. properties: errors: type: optional> - docs: Information on errors encountered during the request. - cards: - type: optional> - docs: The requested list of `Card`s. + docs: Information on errors encountered during the request. + event_types: + type: optional> + docs: The list of event types. + metadata: + type: optional> + docs: >- + Contains the metadata of an event type. For more information, see + [EventTypeMetadata](entity:EventTypeMetadata). + source: + openapi: openapi/openapi.json + ListGiftCardActivitiesResponse: + docs: >- + A response that contains a list of `GiftCardActivity` objects. If the + request resulted in errors, + + the response contains a set of `Error` objects. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + gift_card_activities: + type: optional> + docs: >- + The requested gift card activities or an empty object if none are + found. + cursor: + type: optional + docs: >- + When a response is truncated, it includes a cursor that you can use in + a + + subsequent request to retrieve the next set of activities. If a cursor + is not present, this is + + the final response. + + For more information, see + [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). + source: + openapi: openapi/openapi.json + ListGiftCardsResponse: + docs: >- + A response that contains a list of `GiftCard` objects. If the request + resulted in errors, + + the response contains a set of `Error` objects. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + gift_cards: + type: optional> + docs: The requested gift cards or an empty object if none are found. cursor: type: optional docs: >- - The pagination cursor to be used in a subsequent request. If empty, + When a response is truncated, it includes a cursor that you can use in + a - this is the final response. + subsequent request to retrieve the next set of gift cards. If a cursor + is not present, this is + the final response. - See - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) - for more information. + For more information, see + [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). source: openapi: openapi/openapi.json - ListCashDrawerShiftEventsResponse: + ListInvoicesResponse: + docs: Describes a `ListInvoice` response. properties: + invoices: + type: optional> + docs: The invoices retrieved. cursor: type: optional - docs: |- - Opaque cursor for fetching the next page. Cursor is not present in - the last page of results. + docs: >- + When a response is truncated, it includes a cursor that you can use in + a + + subsequent request to retrieve the next set of invoices. If empty, + this is the final + + response. + + For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). errors: type: optional> - docs: Any errors that occurred during the request. - cash_drawer_shift_events: - type: optional> - docs: |- - All of the events (payments, refunds, etc.) for a cash drawer during - the shift. + docs: Information about errors encountered during the request. source: openapi: openapi/openapi.json - ListCashDrawerShiftsResponse: + ListJobsResponse: + docs: >- + Represents a [ListJobs](api-endpoint:Team-ListJobs) response. Either + `jobs` or `errors` + + is present in the response. If additional results are available, the + `cursor` field is also present. properties: + jobs: + type: optional> + docs: The retrieved jobs. A single paged response contains up to 100 jobs. cursor: type: optional - docs: |- - Opaque cursor for fetching the next page of results. Cursor is not - present in the last page of results. + docs: >- + An opaque cursor used to retrieve the next page of results. This field + is present only + + if the request succeeded and additional results are available. For + more information, see + + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). errors: type: optional> - docs: Any errors that occurred during the request. - cash_drawer_shifts: - type: optional> - docs: |- - A collection of CashDrawerShiftSummary objects for shifts that match - the query. + docs: The errors that occurred during the request. source: openapi: openapi/openapi.json - ListCatalogResponse: + ListLocationBookingProfilesResponse: properties: - errors: - type: optional> - docs: Any errors that occurred during the request. + location_booking_profiles: + type: optional> + docs: The list of a seller's location booking profiles. cursor: type: optional docs: >- - The pagination cursor to be used in a subsequent request. If unset, - this is the final response. - - See - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) - for more information. - objects: - type: optional> - docs: The CatalogObjects returned. + The pagination cursor to be used in the subsequent request to get the + next page of the results. Stop retrieving the next page of the results + when the cursor is not set. + errors: + type: optional> + docs: Errors that occurred during the request. source: openapi: openapi/openapi.json - ListCustomerCustomAttributeDefinitionsResponse: + ListLocationCustomAttributeDefinitionsResponse: docs: >- Represents a - [ListCustomerCustomAttributeDefinitions](api-endpoint:CustomerCustomAttributes-ListCustomerCustomAttributeDefinitions) + [ListLocationCustomAttributeDefinitions](api-endpoint:LocationCustomAttributes-ListLocationCustomAttributeDefinitions) response. Either `custom_attribute_definitions`, an empty object, or `errors` is @@ -14900,10 +19158,10 @@ types: docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - ListCustomerCustomAttributesResponse: + ListLocationCustomAttributesResponse: docs: >- Represents a - [ListCustomerCustomAttributes](api-endpoint:CustomerCustomAttributes-ListCustomerCustomAttributes) + [ListLocationCustomAttributes](api-endpoint:LocationCustomAttributes-ListLocationCustomAttributes) response. Either `custom_attributes`, an empty object, or `errors` is present in the @@ -14921,7 +19179,6 @@ types: the custom attribute definition is returned in the `definition` field of each custom attribute. - If no custom attributes are found, Square returns an empty object (`{}`). cursor: @@ -14940,329 +19197,304 @@ types: docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - ListCustomerGroupsResponse: + ListLocationsResponse: docs: >- - Defines the fields that are included in the response body of + Defines the fields that are included in the response body of a request - a request to the - [ListCustomerGroups](api-endpoint:CustomerGroups-ListCustomerGroups) - endpoint. + to the [ListLocations](api-endpoint:Locations-ListLocations) endpoint. - Either `errors` or `groups` is present in a given response (never both). + Either `errors` or `locations` is present in a given response (never + both). properties: errors: type: optional> docs: Any errors that occurred during the request. - groups: - type: optional> - docs: A list of customer groups belonging to the current seller. - cursor: - type: optional - docs: >- - A pagination cursor to retrieve the next set of results for your - - original query to the endpoint. This value is present only if the - request - - succeeded and additional results are available. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + locations: + type: optional> + docs: The business locations. source: openapi: openapi/openapi.json - ListCustomerSegmentsResponse: - docs: >- - Defines the fields that are included in the response body for requests to - the `ListCustomerSegments` endpoint. - - - Either `errors` or `segments` is present in a given response (never both). + ListLoyaltyProgramsResponse: + docs: A response that contains all loyalty programs. properties: errors: type: optional> docs: Any errors that occurred during the request. - segments: - type: optional> - docs: >- - The list of customer segments belonging to the associated Square - account. - cursor: - type: optional - docs: >- - A pagination cursor to be used in subsequent calls to - `ListCustomerSegments` - - to retrieve the next set of query results. The cursor is only present - if the request succeeded and - - additional results are available. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + programs: + type: optional> + docs: A list of `LoyaltyProgram` for the merchant. source: openapi: openapi/openapi.json - ListCustomersResponse: + ListLoyaltyPromotionsResponse: docs: >- - Defines the fields that are included in the response body of - - a request to the `ListCustomers` endpoint. + Represents a + [ListLoyaltyPromotions](api-endpoint:Loyalty-ListLoyaltyPromotions) + response. + One of `loyalty_promotions`, an empty object, or `errors` is present in + the response. - Either `errors` or `customers` is present in a given response (never - both). + If additional results are available, the `cursor` field is also present + along with `loyalty_promotions`. properties: errors: type: optional> docs: Any errors that occurred during the request. - customers: - type: optional> - docs: >- - The customer profiles associated with the Square account or an empty - object (`{}`) if none are found. - - Only customer profiles with public information (`given_name`, - `family_name`, `company_name`, `email_address`, or - - `phone_number`) are included in the response. + loyalty_promotions: + type: optional> + docs: The retrieved loyalty promotions. cursor: type: optional docs: >- - A pagination cursor to retrieve the next set of results for the - - original query. A cursor is only present if the request succeeded and - additional results - - are available. + The cursor to use in your next call to this endpoint to retrieve the + next page of results + for your original request. This field is present only if the request + succeeded and additional - For more information, see + results are available. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - count: - type: optional - docs: >- - The total count of customers associated with the Square account. Only - customer profiles with public information - - (`given_name`, `family_name`, `company_name`, `email_address`, or - `phone_number`) are counted. This field is present - - only if `count` is set to `true` in the request. source: openapi: openapi/openapi.json - ListDeviceCodesResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - device_codes: - type: optional> - docs: The queried DeviceCode. - cursor: - type: optional - docs: >- - A pagination cursor to retrieve the next set of results for your - - original query to the endpoint. This value is present only if the - request - - succeeded and additional results are available. + ListMerchantCustomAttributeDefinitionsResponse: + docs: >- + Represents a + [ListMerchantCustomAttributeDefinitions](api-endpoint:MerchantCustomAttributes-ListMerchantCustomAttributeDefinitions) + response. + Either `custom_attribute_definitions`, an empty object, or `errors` is + present in the response. - See [Paginating - results](https://developer.squareup.com/docs/working-with-apis/pagination) - for more information. - source: - openapi: openapi/openapi.json - ListDevicesResponse: + If additional results are available, the `cursor` field is also present + along with `custom_attribute_definitions`. properties: - errors: - type: optional> - docs: Information about errors that occurred during the request. - devices: - type: optional> - docs: The requested list of `Device` objects. + custom_attribute_definitions: + type: optional> + docs: >- + The retrieved custom attribute definitions. If no custom attribute + definitions are found, + + Square returns an empty object (`{}`). cursor: type: optional docs: >- - The pagination cursor to be used in a subsequent request. If empty, + The cursor to provide in your next call to this endpoint to retrieve + the next page of - this is the final response. + results for your original request. This field is present only if the + request succeeded and - See - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) - for more information. + additional results are available. For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + errors: + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - ListDisputeEvidenceResponse: - docs: Defines the fields in a `ListDisputeEvidence` response. + ListMerchantCustomAttributesResponse: + docs: >- + Represents a + [ListMerchantCustomAttributes](api-endpoint:MerchantCustomAttributes-ListMerchantCustomAttributes) + response. + + Either `custom_attributes`, an empty object, or `errors` is present in the + response. If additional + + results are available, the `cursor` field is also present along with + `custom_attributes`. properties: - evidence: - type: optional> - docs: The list of evidence previously uploaded to the specified dispute. - errors: - type: optional> - docs: Information about errors encountered during the request. + custom_attributes: + type: optional> + docs: >- + The retrieved custom attributes. If `with_definitions` was set to + `true` in the request, + + the custom attribute definition is returned in the `definition` field + of each custom attribute. + + If no custom attributes are found, Square returns an empty object + (`{}`). cursor: type: optional docs: >- - The pagination cursor to be used in a subsequent request. + The cursor to use in your next call to this endpoint to retrieve the + next page of results - If unset, this is the final response. For more information, see + for your original request. This field is present only if the request + succeeded and additional + + results are available. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + errors: + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - ListDisputesResponse: - docs: Defines fields in a `ListDisputes` response. + ListMerchantsResponse: + docs: >- + The response object returned by the + [ListMerchant](api-endpoint:Merchants-ListMerchants) endpoint. properties: errors: type: optional> - docs: Information about errors encountered during the request. - disputes: - type: optional> - docs: The list of disputes. + docs: Information on errors encountered during the request. + merchant: + type: optional> + docs: The requested `Merchant` entities. cursor: - type: optional + type: optional docs: >- - The pagination cursor to be used in a subsequent request. - - If unset, this is the final response. For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + If the response is truncated, the cursor to use in next request to + fetch next set of objects. source: openapi: openapi/openapi.json - ListEmployeeWagesResponse: - docs: >- - The response to a request for a set of `EmployeeWage` objects. The - response contains - - a set of `EmployeeWage` objects. + ListOrderCustomAttributeDefinitionsResponse: + docs: Represents a response from listing order custom attribute definitions. properties: - employee_wages: - type: optional> - docs: A page of `EmployeeWage` results. + custom_attribute_definitions: + docs: >- + The retrieved custom attribute definitions. If no custom attribute + definitions are found, Square returns an empty object (`{}`). + type: list cursor: type: optional - docs: |- - The value supplied in the subsequent request to fetch the next page - of `EmployeeWage` results. + docs: >- + The cursor to provide in your next call to this endpoint to retrieve + the next page of results for your original request. + + This field is present only if the request succeeded and additional + results are available. + + For more information, see + [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). + validation: + minLength: 1 errors: type: optional> docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - ListEmployeesResponse: + ListOrderCustomAttributesResponse: + docs: Represents a response from listing order custom attributes. properties: - employees: optional> + custom_attributes: + type: optional> + docs: >- + The retrieved custom attributes. If no custom attribute are found, + Square returns an empty object (`{}`). cursor: type: optional - docs: The token to be used to retrieve the next page of results. + docs: >- + The cursor to provide in your next call to this endpoint to retrieve + the next page of results for your original request. + + This field is present only if the request succeeded and additional + results are available. + + For more information, see + [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). + validation: + minLength: 1 errors: type: optional> docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - ListEventTypesResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the [ListEventTypes](api-endpoint:Events-ListEventTypes) - endpoint. - - - Note: if there are errors processing the request, the event types field - will not be - - present. + ListPaymentLinksResponse: properties: errors: type: optional> - docs: Information on errors encountered during the request. - event_types: - type: optional> - docs: The list of event types. - metadata: - type: optional> - docs: >- - Contains the metadata of an event type. For more information, see - [EventTypeMetadata](entity:EventTypeMetadata). + docs: Errors that occurred during the request. + payment_links: + type: optional> + docs: The list of payment links. + cursor: + type: optional + docs: >2- + When a response is truncated, it includes a cursor that you can use in a subsequent request + to retrieve the next set of gift cards. If a cursor is not present, + this is the final response. + + For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). source: openapi: openapi/openapi.json - ListGiftCardActivitiesResponse: + ListPaymentRefundsRequestSortField: + enum: + - CREATED_AT + - UPDATED_AT + source: + openapi: openapi/openapi.json + ListPaymentRefundsResponse: docs: >- - A response that contains a list of `GiftCardActivity` objects. If the - request resulted in errors, + Defines the response returned by + [ListPaymentRefunds](api-endpoint:Refunds-ListPaymentRefunds). - the response contains a set of `Error` objects. + + Either `errors` or `refunds` is present in a given response (never both). properties: errors: type: optional> - docs: Any errors that occurred during the request. - gift_card_activities: - type: optional> - docs: >- - The requested gift card activities or an empty object if none are - found. + docs: Information about errors encountered during the request. + refunds: + type: optional> + docs: The list of requested refunds. cursor: type: optional docs: >- - When a response is truncated, it includes a cursor that you can use in - a + The pagination cursor to be used in a subsequent request. If empty, - subsequent request to retrieve the next set of activities. If a cursor - is not present, this is + this is the final response. - the final response. For more information, see - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). source: openapi: openapi/openapi.json - ListGiftCardsResponse: + ListPaymentsRequestSortField: + enum: + - CREATED_AT + - OFFLINE_CREATED_AT + - UPDATED_AT + source: + openapi: openapi/openapi.json + ListPaymentsResponse: docs: >- - A response that contains a list of `GiftCard` objects. If the request - resulted in errors, - - the response contains a set of `Error` objects. + Defines the response returned by + [ListPayments](api-endpoint:Payments-ListPayments). properties: errors: type: optional> - docs: Any errors that occurred during the request. - gift_cards: - type: optional> - docs: The requested gift cards or an empty object if none are found. + docs: Information about errors encountered during the request. + payments: + type: optional> + docs: The requested list of payments. cursor: type: optional docs: >- - When a response is truncated, it includes a cursor that you can use in - a + The pagination cursor to be used in a subsequent request. If empty, - subsequent request to retrieve the next set of gift cards. If a cursor - is not present, this is + this is the final response. - the final response. For more information, see - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). source: openapi: openapi/openapi.json - ListInvoicesResponse: - docs: Describes a `ListInvoice` response. + ListPayoutEntriesResponse: + docs: The response to retrieve payout records entries. properties: - invoices: - type: optional> - docs: The invoices retrieved. + payout_entries: + type: optional> + docs: >- + The requested list of payout entries, ordered with the given or + default sort order. cursor: type: optional - docs: >- - When a response is truncated, it includes a cursor that you can use in - a - - subsequent request to retrieve the next set of invoices. If empty, - this is the final - - response. + docs: >- + The pagination cursor to be used in a subsequent request. If empty, + this is the final response. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). @@ -15271,886 +19503,953 @@ types: docs: Information about errors encountered during the request. source: openapi: openapi/openapi.json - ListJobsResponse: - docs: >- - Represents a [ListJobs](api-endpoint:Team-ListJobs) response. Either - `jobs` or `errors` - - is present in the response. If additional results are available, the - `cursor` field is also present. + ListPayoutsResponse: + docs: The response to retrieve payout records entries. properties: - jobs: - type: optional> - docs: The retrieved jobs. A single paged response contains up to 100 jobs. + payouts: + type: optional> + docs: The requested list of payouts. cursor: type: optional docs: >- - An opaque cursor used to retrieve the next page of results. This field - is present only - - if the request succeeded and additional results are available. For - more information, see + The pagination cursor to be used in a subsequent request. If empty, + this is the final response. + For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). errors: type: optional> - docs: The errors that occurred during the request. + docs: Information about errors encountered during the request. source: openapi: openapi/openapi.json - ListLocationBookingProfilesResponse: + ListSitesResponse: + docs: >- + Represents a `ListSites` response. The response can include either `sites` + or `errors`. properties: - location_booking_profiles: - type: optional> - docs: The list of a seller's location booking profiles. - cursor: - type: optional - docs: >- - The pagination cursor to be used in the subsequent request to get the - next page of the results. Stop retrieving the next page of the results - when the cursor is not set. errors: type: optional> - docs: Errors that occurred during the request. + docs: Any errors that occurred during the request. + sites: + type: optional> + docs: The sites that belong to the seller. source: openapi: openapi/openapi.json - ListLocationCustomAttributeDefinitionsResponse: + ListSubscriptionEventsResponse: docs: >- - Represents a - [ListLocationCustomAttributeDefinitions](api-endpoint:LocationCustomAttributes-ListLocationCustomAttributeDefinitions) - response. - - Either `custom_attribute_definitions`, an empty object, or `errors` is - present in the response. + Defines output parameters in a response from the - If additional results are available, the `cursor` field is also present - along with `custom_attribute_definitions`. + [ListSubscriptionEvents](api-endpoint:Subscriptions-ListSubscriptionEvents). properties: - custom_attribute_definitions: - type: optional> - docs: >- - The retrieved custom attribute definitions. If no custom attribute - definitions are found, - - Square returns an empty object (`{}`). + errors: + type: optional> + docs: Errors encountered during the request. + subscription_events: + type: optional> + docs: The retrieved subscription events. cursor: type: optional docs: >- - The cursor to provide in your next call to this endpoint to retrieve - the next page of + When the total number of resulting subscription events exceeds the + limit of a paged response, - results for your original request. This field is present only if the - request succeeded and + the response includes a cursor for you to use in a subsequent request + to fetch the next set of events. - additional results are available. For more information, see + 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). - errors: - type: optional> - docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - ListLocationCustomAttributesResponse: - docs: >- - Represents a - [ListLocationCustomAttributes](api-endpoint:LocationCustomAttributes-ListLocationCustomAttributes) - response. - - Either `custom_attributes`, an empty object, or `errors` is present in the - response. If additional - - results are available, the `cursor` field is also present along with - `custom_attributes`. + ListTeamMemberBookingProfilesResponse: properties: - custom_attributes: - type: optional> + team_member_booking_profiles: + type: optional> docs: >- - The retrieved custom attributes. If `with_definitions` was set to - `true` in the request, + The list of team member booking profiles. The results are returned in + the ascending order of the time - the custom attribute definition is returned in the `definition` field - of each custom attribute. + when the team member booking profiles were last updated. Multiple + booking profiles updated at the same time - If no custom attributes are found, Square returns an empty object - (`{}`). + are further sorted in the ascending order of their IDs. cursor: type: optional docs: >- - The cursor to use in your next call to this endpoint to retrieve the - next page of results - - for your original request. This field is present only if the request - succeeded and additional - - results are available. For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + The pagination cursor to be used in the subsequent request to get the + next page of the results. Stop retrieving the next page of the results + when the cursor is not set. + validation: + maxLength: 65536 errors: type: optional> - docs: Any errors that occurred during the request. + docs: Errors that occurred during the request. source: openapi: openapi/openapi.json - ListLocationsResponse: + ListTeamMemberWagesResponse: docs: >- - Defines the fields that are included in the response body of a request - - to the [ListLocations](api-endpoint:Locations-ListLocations) endpoint. - + The response to a request for a set of `TeamMemberWage` objects. The + response contains - Either `errors` or `locations` is present in a given response (never - both). - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - locations: - type: optional> - docs: The business locations. - source: - openapi: openapi/openapi.json - ListLoyaltyProgramsResponse: - docs: A response that contains all loyalty programs. + a set of `TeamMemberWage` objects. properties: + team_member_wages: + type: optional> + docs: A page of `TeamMemberWage` results. + cursor: + type: optional + docs: |- + The value supplied in the subsequent request to fetch the next page + of `TeamMemberWage` results. errors: type: optional> docs: Any errors that occurred during the request. - programs: - type: optional> - docs: A list of `LoyaltyProgram` for the merchant. source: openapi: openapi/openapi.json - ListLoyaltyPromotionsResponse: + ListTransactionsResponse: docs: >- - Represents a - [ListLoyaltyPromotions](api-endpoint:Loyalty-ListLoyaltyPromotions) - response. + Defines the fields that are included in the response body of - One of `loyalty_promotions`, an empty object, or `errors` is present in - the response. + a request to the + [ListTransactions](api-endpoint:Transactions-ListTransactions) endpoint. - If additional results are available, the `cursor` field is also present - along with `loyalty_promotions`. + + One of `errors` or `transactions` is present in a given response (never + both). properties: errors: type: optional> docs: Any errors that occurred during the request. - loyalty_promotions: - type: optional> - docs: The retrieved loyalty promotions. + transactions: + type: optional> + docs: An array of transactions that match your query. cursor: type: optional docs: >- - The cursor to use in your next call to this endpoint to retrieve the - next page of results + A pagination cursor for retrieving the next set of results, - for your original request. This field is present only if the request - succeeded and additional + if any remain. Provide this value as the `cursor` parameter in a + subsequent - results are available. For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + request to this endpoint. + + + See [Paginating + results](https://developer.squareup.com/docs/working-with-apis/pagination) + for more information. source: openapi: openapi/openapi.json - ListMerchantCustomAttributeDefinitionsResponse: + ListWebhookEventTypesResponse: docs: >- - Represents a - [ListMerchantCustomAttributeDefinitions](api-endpoint:MerchantCustomAttributes-ListMerchantCustomAttributeDefinitions) - response. + Defines the fields that are included in the response body of - Either `custom_attribute_definitions`, an empty object, or `errors` is - present in the response. + a request to the + [ListWebhookEventTypes](api-endpoint:WebhookSubscriptions-ListWebhookEventTypes) + endpoint. - If additional results are available, the `cursor` field is also present - along with `custom_attribute_definitions`. + + Note: if there are errors processing the request, the event types field + will not be + + present. properties: - custom_attribute_definitions: - type: optional> + errors: + type: optional> + docs: Information on errors encountered during the request. + event_types: + type: optional> + docs: The list of event types. + metadata: + type: optional> docs: >- - The retrieved custom attribute definitions. If no custom attribute - definitions are found, + Contains the metadata of a webhook event type. For more information, + see [EventTypeMetadata](entity:EventTypeMetadata). + source: + openapi: openapi/openapi.json + ListWebhookSubscriptionsResponse: + docs: >- + Defines the fields that are included in the response body of - Square returns an empty object (`{}`). + a request to the + [ListWebhookSubscriptions](api-endpoint:WebhookSubscriptions-ListWebhookSubscriptions) + endpoint. + + + Note: if there are errors processing the request, the subscriptions field + will not be + + present. + properties: + errors: + type: optional> + docs: Information on errors encountered during the request. + subscriptions: + type: optional> + docs: The requested list of [Subscription](entity:WebhookSubscription)s. cursor: type: optional docs: >- - The cursor to provide in your next call to this endpoint to retrieve - the next page of + The pagination cursor to be used in a subsequent request. If empty, - results for your original request. This field is present only if the - request succeeded and + this is the final response. - additional results are available. For more information, see + + For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - errors: - type: optional> - docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - ListMerchantCustomAttributesResponse: + ListWorkweekConfigsResponse: docs: >- - Represents a - [ListMerchantCustomAttributes](api-endpoint:MerchantCustomAttributes-ListMerchantCustomAttributes) - response. + The response to a request for a set of `WorkweekConfig` objects. The + response contains - Either `custom_attributes`, an empty object, or `errors` is present in the - response. If additional + the requested `WorkweekConfig` objects and might contain a set of `Error` + objects if - results are available, the `cursor` field is also present along with - `custom_attributes`. + the request resulted in errors. properties: - custom_attributes: - type: optional> - docs: >- - The retrieved custom attributes. If `with_definitions` was set to - `true` in the request, - - the custom attribute definition is returned in the `definition` field - of each custom attribute. - - If no custom attributes are found, Square returns an empty object - (`{}`). + workweek_configs: + type: optional> + docs: A page of `WorkweekConfig` results. cursor: type: optional - docs: >- - The cursor to use in your next call to this endpoint to retrieve the - next page of results - - for your original request. This field is present only if the request - succeeded and additional - - results are available. For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + docs: |- + The value supplied in the subsequent request to fetch the next page of + `WorkweekConfig` results. errors: type: optional> docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - ListMerchantsResponse: + Location: docs: >- - The response object returned by the - [ListMerchant](api-endpoint:Merchants-ListMerchants) endpoint. + Represents one of a business' + [locations](https://developer.squareup.com/docs/locations-api). properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - merchant: - type: optional> - docs: The requested `Merchant` entities. - cursor: - type: optional + id: + type: optional docs: >- - If the response is truncated, the cursor to use in next request to - fetch next set of objects. - source: - openapi: openapi/openapi.json - ListOrderCustomAttributeDefinitionsResponse: - docs: Represents a response from listing order custom attribute definitions. - properties: - custom_attribute_definitions: + A short generated string of letters and numbers that uniquely + identifies this location instance. + validation: + maxLength: 32 + access: read-only + name: + type: optional> + docs: |- + The name of the location. + This information appears in the Seller Dashboard as the nickname. + A location name must be unique within a seller account. + validation: + maxLength: 255 + address: + type: optional
+ docs: The physical address of the location. + timezone: + type: optional> + docs: |- + The [IANA time zone](https://www.iana.org/time-zones) identifier for + the time zone of the location. For example, `America/Los_Angeles`. + validation: + maxLength: 30 + capabilities: + type: optional> docs: >- - The retrieved custom attribute definitions. If no custom attribute - definitions are found, Square returns an empty object (`{}`). - type: list - cursor: + The Square features that are enabled for the location. + + See [LocationCapability](entity:LocationCapability) for possible + values. + + See [LocationCapability](#type-locationcapability) for possible values + access: read-only + status: + type: optional + docs: |- + The status of the location. + See [LocationStatus](#type-locationstatus) for possible values + created_at: type: optional docs: >- - The cursor to provide in your next call to this endpoint to retrieve - the next page of results for your original request. + The time when the location was created, in RFC 3339 format. - This field is present only if the request succeeded and additional - results are available. + For more information, see [Working with + Dates](https://developer.squareup.com/docs/build-basics/working-with-dates). + validation: + minLength: 20 + maxLength: 25 + access: read-only + merchant_id: + type: optional + docs: The ID of the merchant that owns the location. + validation: + maxLength: 32 + access: read-only + country: + type: optional + docs: >- + The country of the location, in the two-letter format of ISO 3166. For + example, `US` or `JP`. - For more information, see - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). + + See [Country](entity:Country) for possible values. + + See [Country](#type-country) for possible values + language_code: + type: optional> + docs: >- + The language associated with the location, in + + [BCP 47 format](https://tools.ietf.org/html/bcp47#appendix-A). + + For more information, see [Language + Preferences](https://developer.squareup.com/docs/build-basics/general-considerations/language-preferences). + validation: + minLength: 2 + maxLength: 5 + currency: + type: optional + docs: >- + The currency used for all transactions at this location, + + in ISO 4217 format. For example, the currency code for US dollars is + `USD`. + + See [Currency](entity:Currency) for possible values. + + See [Currency](#type-currency) for possible values + phone_number: + type: optional> + docs: The phone number of the location. For example, `+1 855-700-6000`. + validation: + maxLength: 17 + business_name: + type: optional> + docs: >- + The name of the location's overall business. This name is present on + receipts and other customer-facing branding, and can be changed no + more than three times in a twelve-month period. + validation: + maxLength: 255 + type: + type: optional + docs: |- + The type of the location. + See [LocationType](#type-locationtype) for possible values + website_url: + type: optional> + docs: The website URL of the location. For example, `https://squareup.com`. + validation: + maxLength: 255 + business_hours: + type: optional + docs: The hours of operation for the location. + business_email: + type: optional> + docs: >- + The email address of the location. This can be unique to the location + and is not always the email address for the business owner or + administrator. + validation: + maxLength: 255 + description: + type: optional> + docs: The description of the location. For example, `Main Street location`. + validation: + maxLength: 1024 + twitter_username: + type: optional> + docs: >- + The Twitter username of the location without the '@' symbol. For + example, `Square`. validation: minLength: 1 - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: openapi/openapi.json - ListOrderCustomAttributesResponse: - docs: Represents a response from listing order custom attributes. - properties: - custom_attributes: - type: optional> + maxLength: 15 + instagram_username: + type: optional> docs: >- - The retrieved custom attributes. If no custom attribute are found, - Square returns an empty object (`{}`). - cursor: + The Instagram username of the location without the '@' symbol. For + example, `square`. + validation: + minLength: 1 + maxLength: 30 + facebook_url: + type: optional> + docs: >- + The Facebook profile URL of the location. The URL should begin with + 'facebook.com/'. For example, `https://www.facebook.com/square`. + validation: + maxLength: 255 + coordinates: + type: optional + docs: The physical coordinates (latitude and longitude) of the location. + logo_url: + type: optional + docs: >- + The URL of the logo image for the location. When configured in the + Seller + + Dashboard (Receipts section), the logo appears on transactions (such + as receipts and invoices) that Square generates on behalf of the + seller. + + This image should have a roughly square (1:1) aspect ratio and should + be at least 200x200 pixels. + validation: + maxLength: 255 + access: read-only + pos_background_url: type: optional + docs: The URL of the Point of Sale background image for the location. + validation: + maxLength: 255 + access: read-only + mcc: + type: optional> docs: >- - The cursor to provide in your next call to this endpoint to retrieve - the next page of results for your original request. + A four-digit number that describes the kind of goods or services sold + at the location. - This field is present only if the request succeeded and additional - results are available. + 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 more information, see - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). + For example, `5045`, for a location that sells computer goods and + software. validation: - minLength: 1 - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: openapi/openapi.json - ListPaymentLinksResponse: - properties: - errors: - type: optional> - docs: Errors that occurred during the request. - payment_links: - type: optional> - docs: The list of payment links. - cursor: + minLength: 4 + maxLength: 4 + full_format_logo_url: type: optional - docs: >2- - When a response is truncated, it includes a cursor that you can use in a subsequent request - to retrieve the next set of gift cards. If a cursor is not present, - this is the final response. + docs: >- + The URL of a full-format logo image for the location. When configured + in the Seller - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - source: - openapi: openapi/openapi.json - ListPaymentRefundsRequestSortField: - enum: - - CREATED_AT - - UPDATED_AT + Dashboard (Receipts section), the logo appears on transactions (such + as receipts and invoices) that Square generates on behalf of the + seller. + + This image can be wider than it is tall and should be at least + 1280x648 pixels. + access: read-only + tax_ids: + type: optional + docs: The tax IDs for this location. source: openapi: openapi/openapi.json - ListPaymentRefundsResponse: + LocationBookingProfile: docs: >- - Defines the response returned by - [ListPaymentRefunds](api-endpoint:Refunds-ListPaymentRefunds). - - - Either `errors` or `refunds` is present in a given response (never both). + The booking profile of a seller's location, including the location's ID + and whether the location is enabled for online booking. properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - refunds: - type: optional> - docs: The list of requested refunds. - cursor: - type: optional - docs: >- - The pagination cursor to be used in a subsequent request. If empty, - - this is the final response. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + location_id: + type: optional> + docs: The ID of the [location](entity:Location). + booking_site_url: + type: optional> + docs: Url for the online booking site for this location. + online_booking_enabled: + type: optional> + docs: Indicates whether the location is enabled for online booking. source: openapi: openapi/openapi.json - ListPaymentsRequestSortField: + LocationCapability: enum: - - CREATED_AT - - OFFLINE_CREATED_AT - - UPDATED_AT + - CREDIT_CARD_PROCESSING + - AUTOMATIC_TRANSFERS + - UNLINKED_REFUNDS + docs: The capabilities a location might have. source: openapi: openapi/openapi.json - ListPaymentsResponse: - docs: >- - Defines the response returned by - [ListPayments](api-endpoint:Payments-ListPayments). + LocationCreatedEvent: + docs: Published when a [Location](entity:Location) is created. properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - payments: - type: optional> - docs: The requested list of payments. - cursor: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + location_id: + type: optional> + docs: The ID of the [Location](entity:Location) associated with the event. + type: + type: optional> + docs: The type of event this represents, `"location.created"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: type: optional - docs: >- - The pagination cursor to be used in a subsequent request. If empty, - - this is the final response. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. source: openapi: openapi/openapi.json - ListPayoutEntriesResponse: - docs: The response to retrieve payout records entries. + LocationCreatedEventData: properties: - payout_entries: - type: optional> - docs: >- - The requested list of payout entries, ordered with the given or - default sort order. - cursor: + type: + type: optional> + docs: Name of the affected object’s type, `"location"`. + id: type: optional - docs: >- - The pagination cursor to be used in a subsequent request. If empty, - this is the final response. - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - errors: - type: optional> - docs: Information about errors encountered during the request. + docs: ID of the updated [Location](entity:Location). source: openapi: openapi/openapi.json - ListPayoutsResponse: - docs: The response to retrieve payout records entries. + LocationCustomAttributeDefinitionOwnedCreatedEvent: + docs: >- + Published when a location [custom attribute + definition](entity:CustomAttributeDefinition) + + is created by the subscribing application. properties: - payouts: - type: optional> - docs: The requested list of payouts. - cursor: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"location.custom_attribute_definition.owned.created"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: type: optional docs: >- - The pagination cursor to be used in a subsequent request. If empty, - this is the final response. - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - errors: - type: optional> - docs: Information about errors encountered during the request. - source: - openapi: openapi/openapi.json - ListSitesResponse: - docs: >- - Represents a `ListSites` response. The response can include either `sites` - or `errors`. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - sites: - type: optional> - docs: The sites that belong to the seller. + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. source: openapi: openapi/openapi.json - ListSubscriptionEventsResponse: + LocationCustomAttributeDefinitionOwnedDeletedEvent: docs: >- - Defines output parameters in a response from the - - [ListSubscriptionEvents](api-endpoint:Subscriptions-ListSubscriptionEvents). - properties: - errors: - type: optional> - docs: Errors encountered during the request. - subscription_events: - type: optional> - docs: The retrieved subscription events. - cursor: - type: optional - docs: >- - When the total number of resulting subscription events exceeds the - limit of a paged response, - - the response includes a cursor for you to use in a subsequent request - to fetch the next set of events. - - If the cursor is unset, the response contains the last page of the - results. + Published when a location [custom attribute + definition](entity:CustomAttributeDefinition) + created by the subscribing application is deleted. A custom attribute + definition can only be deleted by - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - source: - openapi: openapi/openapi.json - ListTeamMemberBookingProfilesResponse: + the application that created it. properties: - team_member_booking_profiles: - type: optional> + merchant_id: + type: optional> docs: >- - The list of team member booking profiles. The results are returned in - the ascending order of the time - - when the team member booking profiles were last updated. Multiple - booking profiles updated at the same time - - are further sorted in the ascending order of their IDs. - cursor: + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"location.custom_attribute_definition.owned.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: type: optional docs: >- - The pagination cursor to be used in the subsequent request to get the - next page of the results. Stop retrieving the next page of the results - when the cursor is not set. - validation: - maxLength: 65536 - errors: - type: optional> - docs: Errors that occurred during the request. + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. source: openapi: openapi/openapi.json - ListTeamMemberWagesResponse: + LocationCustomAttributeDefinitionOwnedUpdatedEvent: docs: >- - The response to a request for a set of `TeamMemberWage` objects. The - response contains + Published when a location [custom attribute + definition](entity:CustomAttributeDefinition) - a set of `TeamMemberWage` objects. + created by the subscribing application is updated. A custom attribute + definition can only be updated + + by the application that created it. properties: - team_member_wages: - type: optional> - docs: A page of `TeamMemberWage` results. - cursor: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"location.custom_attribute_definition.owned.updated"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: type: optional - docs: |- - The value supplied in the subsequent request to fetch the next page - of `TeamMemberWage` results. - errors: - type: optional> - docs: Any errors that occurred during the request. + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. source: openapi: openapi/openapi.json - ListTransactionsResponse: + LocationCustomAttributeDefinitionVisibleCreatedEvent: docs: >- - Defines the fields that are included in the response body of + Published when a location [custom attribute + definition](entity:CustomAttributeDefinition) - a request to the - [ListTransactions](api-endpoint:Transactions-ListTransactions) endpoint. + that is visible to the subscribing application is created. A notification + is sent when your application + creates a custom attribute definition or another application creates a + custom attribute definition whose - One of `errors` or `transactions` is present in a given response (never - both). + `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - transactions: - type: optional> - docs: An array of transactions that match your query. - cursor: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"location.custom_attribute_definition.visible.created"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: type: optional docs: >- - A pagination cursor for retrieving the next set of results, - - if any remain. Provide this value as the `cursor` parameter in a - subsequent - - request to this endpoint. - - - See [Paginating - results](https://developer.squareup.com/docs/working-with-apis/pagination) - for more information. + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. source: openapi: openapi/openapi.json - ListWebhookEventTypesResponse: + LocationCustomAttributeDefinitionVisibleDeletedEvent: docs: >- - Defines the fields that are included in the response body of + Published when a location [custom attribute + definition](entity:CustomAttributeDefinition) - a request to the - [ListWebhookEventTypes](api-endpoint:WebhookSubscriptions-ListWebhookEventTypes) - endpoint. + that is visible to the subscribing application is deleted. A custom + attribute definition can only + be deleted by the application that created it. A notification is sent when + your application deletes - Note: if there are errors processing the request, the event types field - will not be + a custom attribute definition or when another application deletes a custom + attribute definition whose - present. + `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - event_types: - type: optional> - docs: The list of event types. - metadata: - type: optional> + merchant_id: + type: optional> docs: >- - Contains the metadata of a webhook event type. For more information, - see [EventTypeMetadata](entity:EventTypeMetadata). + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"location.custom_attribute_definition.visible.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. source: openapi: openapi/openapi.json - ListWebhookSubscriptionsResponse: + LocationCustomAttributeDefinitionVisibleUpdatedEvent: docs: >- - Defines the fields that are included in the response body of + Published when a location [custom attribute + definition](entity:CustomAttributeDefinition) - a request to the - [ListWebhookSubscriptions](api-endpoint:WebhookSubscriptions-ListWebhookSubscriptions) - endpoint. + that is visible to the subscribing application is updated. A custom + attribute definition can only be updated + by the application that created it. A notification is sent when your + application updates a custom attribute - Note: if there are errors processing the request, the subscriptions field - will not be + definition or when another application updates a custom attribute + definition whose `visibility` is - present. + `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - subscriptions: - type: optional> - docs: The requested list of [Subscription](entity:WebhookSubscription)s. - cursor: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"location.custom_attribute_definition.visible.updated"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: type: optional docs: >- - The pagination cursor to be used in a subsequent request. If empty, - - this is the final response. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. source: openapi: openapi/openapi.json - ListWorkweekConfigsResponse: + LocationCustomAttributeOwnedDeletedEvent: docs: >- - The response to a request for a set of `WorkweekConfig` objects. The - response contains + Published when a location [custom attribute](entity:CustomAttribute) - the requested `WorkweekConfig` objects and might contain a set of `Error` - objects if + owned by the subscribing application is deleted. Custom attributes are + owned by the - the request resulted in errors. + application that created the corresponding [custom attribute + definition](entity:CustomAttributeDefinition). + + Custom attributes whose `visibility` is `VISIBILITY_READ_WRITE_VALUES` can + be deleted by any application. properties: - workweek_configs: - type: optional> - docs: A page of `WorkweekConfig` results. - cursor: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"location.custom_attribute.owned.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: type: optional - docs: |- - The value supplied in the subsequent request to fetch the next page of - `WorkweekConfig` results. - errors: - type: optional> - docs: Any errors that occurred during the request. + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. source: openapi: openapi/openapi.json - Location: + LocationCustomAttributeOwnedUpdatedEvent: docs: >- - Represents one of a business' - [locations](https://developer.squareup.com/docs/locations-api). + Published when a location [custom attribute](entity:CustomAttribute) owned + by the + + subscribing application is created or updated. Custom attributes are owned + by the application that created + + the corresponding [custom attribute + definition](entity:CustomAttributeDefinition). Custom attributes whose + + `visibility` is `VISIBILITY_READ_WRITE_VALUES` can be created or updated + by any application. properties: - id: - type: optional - docs: >- - A short generated string of letters and numbers that uniquely - identifies this location instance. - validation: - maxLength: 32 - access: read-only - name: + merchant_id: type: optional> - docs: |- - The name of the location. - This information appears in the Seller Dashboard as the nickname. - A location name must be unique within a seller account. - validation: - maxLength: 255 - address: - type: optional
- docs: The physical address of the location. - timezone: + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: type: optional> - docs: |- - The [IANA time zone](https://www.iana.org/time-zones) identifier for - the time zone of the location. For example, `America/Los_Angeles`. - validation: - maxLength: 30 - capabilities: - type: optional> docs: >- - The Square features that are enabled for the location. - - See [LocationCapability](entity:LocationCapability) for possible - values. - - See [LocationCapability](#type-locationcapability) for possible values - access: read-only - status: - type: optional - docs: |- - The status of the location. - See [LocationStatus](#type-locationstatus) for possible values + The type of this event. The value is + `"location.custom_attribute.owned.updated"`. + event_id: + type: optional> + docs: A unique ID for the event notification. created_at: type: optional docs: >- - The time when the location was created, in RFC 3339 format. - - For more information, see [Working with - Dates](https://developer.squareup.com/docs/build-basics/working-with-dates). - validation: - minLength: 20 - maxLength: 25 - access: read-only - merchant_id: - type: optional - docs: The ID of the merchant that owns the location. - validation: - maxLength: 32 + The timestamp that indicates when the event notification was created, + in RFC 3339 format. access: read-only - country: - type: optional + data: + type: optional docs: >- - The country of the location, in the two-letter format of ISO 3166. For - example, `US` or `JP`. - + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + LocationCustomAttributeVisibleDeletedEvent: + docs: >- + Published when a location [custom attribute](entity:CustomAttribute) that + is visible to the - See [Country](entity:Country) for possible values. + subscribing application is deleted. A notification is sent when: - See [Country](#type-country) for possible values - language_code: - type: optional> - docs: >- - The language associated with the location, in + - Your application deletes a custom attribute owned by your application, + regardless of the `visibility` setting. - [BCP 47 format](https://tools.ietf.org/html/bcp47#appendix-A). + - Any application deletes a custom attribute whose `visibility` is + `VISIBILITY_READ_ONLY` - For more information, see [Language - Preferences](https://developer.squareup.com/docs/build-basics/general-considerations/language-preferences). - validation: - minLength: 2 - maxLength: 5 - currency: - type: optional - docs: >- - The currency used for all transactions at this location, + or `VISIBILITY_READ_WRITE_VALUES`. - in ISO 4217 format. For example, the currency code for US dollars is - `USD`. - See [Currency](entity:Currency) for possible values. + Custom attributes set to `VISIBILITY_READ_WRITE_VALUES` can be deleted by + any application, but those set to - See [Currency](#type-currency) for possible values - phone_number: - type: optional> - docs: The phone number of the location. For example, `+1 855-700-6000`. - validation: - maxLength: 17 - business_name: + `VISIBILITY_READ_ONLY` or `VISIBILITY_HIDDEN` can only be deleted by the + owner. Custom attributes are owned + + by the application that created the corresponding [custom attribute + definition](entity:CustomAttributeDefinition). + properties: + merchant_id: type: optional> docs: >- - The name of the location's overall business. This name is present on - receipts and other customer-facing branding, and can be changed no - more than three times in a twelve-month period. - validation: - maxLength: 255 + The ID of the seller associated with the event that triggered the + event notification. type: - type: optional - docs: |- - The type of the location. - See [LocationType](#type-locationtype) for possible values - website_url: - type: optional> - docs: The website URL of the location. For example, `https://squareup.com`. - validation: - maxLength: 255 - business_hours: - type: optional - docs: The hours of operation for the location. - business_email: type: optional> docs: >- - The email address of the location. This can be unique to the location - and is not always the email address for the business owner or - administrator. - validation: - maxLength: 255 - description: - type: optional> - docs: The description of the location. For example, `Main Street location`. - validation: - maxLength: 1024 - twitter_username: + The type of this event. The value is + `"location.custom_attribute.visible.deleted"`. + event_id: type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional docs: >- - The Twitter username of the location without the '@' symbol. For - example, `Square`. - validation: - minLength: 1 - maxLength: 15 - instagram_username: + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + LocationCustomAttributeVisibleUpdatedEvent: + docs: >- + Published when a location [custom attribute](entity:CustomAttribute) that + is visible + + to the subscribing application is created or updated. A notification is + sent when: + + - Your application creates or updates a custom attribute owned by your + application, regardless of the `visibility` setting. + + - Any application creates or updates a custom attribute whose `visibility` + is `VISIBILITY_READ_ONLY` + + or `VISIBILITY_READ_WRITE_VALUES`. + + + Custom attributes set to `VISIBILITY_READ_WRITE_VALUES` can be created or + updated by any application, but those set to + + `VISIBILITY_READ_ONLY` or `VISIBILITY_HIDDEN` can only be created or + updated by the owner. Custom attributes are owned + + by the application that created the corresponding [custom attribute + definition](entity:CustomAttributeDefinition). + properties: + merchant_id: type: optional> docs: >- - The Instagram username of the location without the '@' symbol. For - example, `square`. - validation: - minLength: 1 - maxLength: 30 - facebook_url: + The ID of the seller associated with the event that triggered the + event notification. + type: type: optional> docs: >- - The Facebook profile URL of the location. The URL should begin with - 'facebook.com/'. For example, `https://www.facebook.com/square`. - validation: - maxLength: 255 - coordinates: - type: optional - docs: The physical coordinates (latitude and longitude) of the location. - logo_url: + The type of this event. The value is + `"location.custom_attribute.visible.updated"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: type: optional docs: >- - The URL of the logo image for the location. When configured in the - Seller - - Dashboard (Receipts section), the logo appears on transactions (such - as receipts and invoices) that Square generates on behalf of the - seller. - - This image should have a roughly square (1:1) aspect ratio and should - be at least 200x200 pixels. - validation: - maxLength: 255 - access: read-only - pos_background_url: - type: optional - docs: The URL of the Point of Sale background image for the location. - validation: - maxLength: 255 + The timestamp that indicates when the event notification was created, + in RFC 3339 format. access: read-only - mcc: + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + LocationSettingsUpdatedEvent: + docs: Published when online checkout location settings are updated + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: type: optional> docs: >- - A four-digit number that describes the kind of goods or services sold - at the location. - - The [merchant category code - (MCC)](https://developer.squareup.com/docs/locations-api#initialize-a-merchant-category-code) - of the location as standardized by ISO 18245. - - For example, `5045`, for a location that sells computer goods and - software. - validation: - minLength: 4 - maxLength: 4 - full_format_logo_url: + The type of event this represents, + `"online_checkout.location_settings.updated"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: type: optional - docs: >- - 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. + docs: RFC 3339 timestamp of when the event was created. access: read-only - tax_ids: - type: optional - docs: The tax IDs for this location. + data: + type: optional + docs: Data associated with the event. source: openapi: openapi/openapi.json - LocationBookingProfile: - docs: >- - The booking profile of a seller's location, including the location's ID - and whether the location is enabled for online booking. + LocationSettingsUpdatedEventData: properties: - location_id: - type: optional> - docs: The ID of the [location](entity:Location). - booking_site_url: + type: type: optional> - docs: Url for the online booking site for this location. - online_booking_enabled: - type: optional> - docs: Indicates whether the location is enabled for online booking. + docs: >- + Name of the updated object’s type, + `"online_checkout.location_settings"`. + id: + type: optional + docs: ID of the updated location settings. + object: + type: optional + docs: An object containing the updated location settings. source: openapi: openapi/openapi.json - LocationCapability: - enum: - - CREDIT_CARD_PROCESSING - - AUTOMATIC_TRANSFERS - - UNLINKED_REFUNDS - docs: The capabilities a location might have. + LocationSettingsUpdatedEventObject: + properties: + location_settings: + type: optional + docs: The updated location settings. source: openapi: openapi/openapi.json LocationStatus: @@ -16167,6 +20466,40 @@ types: docs: A location's type. source: openapi: openapi/openapi.json + LocationUpdatedEvent: + docs: Published when a [Location](entity:Location) is updated. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + location_id: + type: optional> + docs: The ID of the [Location](entity:Location) associated with the event. + type: + type: optional> + docs: The type of event this represents, `"location.updated"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + LocationUpdatedEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"location"`. + id: + type: optional + docs: ID of the updated [Location](entity:Location). + source: + openapi: openapi/openapi.json LoyaltyAccount: docs: >- Describes a loyalty account in a [loyalty program](entity:LoyaltyProgram). @@ -16271,6 +20604,106 @@ types: in the `balance` field. source: openapi: openapi/openapi.json + LoyaltyAccountCreatedEvent: + docs: Published when a [loyalty account](entity:LoyaltyAccount) is created. + properties: + merchant_id: + type: optional> + docs: The ID of the Square seller associated with the event. + type: + type: optional> + docs: >- + The type of event. For this event, the value is + `loyalty.account.created`. + event_id: + type: optional> + docs: >- + The unique ID for the event, which is used for + + [idempotency + support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + LoyaltyAccountCreatedEventData: + docs: The data associated with a `loyalty.account.created` event. + properties: + type: + type: optional> + docs: >- + The type of object affected by the event. For this event, the value is + `loyalty_account`. + id: + type: optional + docs: The ID of the affected loyalty account. + object: + type: optional + docs: An object that contains the new loyalty account. + source: + openapi: openapi/openapi.json + LoyaltyAccountCreatedEventObject: + properties: + loyalty_account: + type: optional + docs: The loyalty account that was created. + source: + openapi: openapi/openapi.json + LoyaltyAccountDeletedEvent: + docs: Published when a [loyalty account](entity:LoyaltyAccount) is deleted. + properties: + merchant_id: + type: optional> + docs: The ID of the Square seller associated with the event. + type: + type: optional> + docs: >- + The type of event. For this event, the value is + `loyalty.account.deleted`. + event_id: + type: optional> + docs: >- + The unique ID for the event, which is used for + + [idempotency + support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + LoyaltyAccountDeletedEventData: + docs: The data associated with a `loyalty.account.deleted` event. + properties: + type: + type: optional> + docs: >- + The type of object affected by the event. For this event, the value is + `loyalty_account`. + id: + type: optional + docs: The ID of the affected loyalty account. + object: + type: optional + docs: An object that contains the loyalty account that was deleted. + source: + openapi: openapi/openapi.json + LoyaltyAccountDeletedEventObject: + properties: + loyalty_account: + type: optional + docs: The loyalty account that was deleted. + source: + openapi: openapi/openapi.json LoyaltyAccountExpiringPointDeadline: docs: >- Represents a set of points for a loyalty account that are scheduled to @@ -16317,6 +20750,59 @@ types: "+14155551111". source: openapi: openapi/openapi.json + LoyaltyAccountMappingType: + type: literal<"PHONE"> + docs: The type of mapping. + LoyaltyAccountUpdatedEvent: + docs: Published when a [loyalty account](entity:LoyaltyAccount) is updated. + properties: + merchant_id: + type: optional> + docs: The ID of the Square seller associated with the event. + type: + type: optional> + docs: >- + The type of event. For this event, the value is + `loyalty.account.updated`. + event_id: + type: optional> + docs: >- + The unique ID for the event, which is used for + + [idempotency + support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + LoyaltyAccountUpdatedEventData: + docs: The data associated with a `loyalty.account.updated` event. + properties: + type: + type: optional> + docs: >- + The type of object affected by the event. For this event, the value is + `loyalty_account`. + id: + type: optional + docs: The ID of the affected loyalty account. + object: + type: optional + docs: An object that contains the loyalty account that was updated. + source: + openapi: openapi/openapi.json + LoyaltyAccountUpdatedEventObject: + properties: + loyalty_account: + type: optional + docs: The loyalty account that was updated. + source: + openapi: openapi/openapi.json LoyaltyEvent: docs: >- Provides information about a loyalty event. @@ -16495,6 +20981,56 @@ types: access: read-only source: openapi: openapi/openapi.json + LoyaltyEventCreatedEvent: + docs: Published when a [loyalty event](entity:LoyaltyEvent) is created. + properties: + merchant_id: + type: optional> + docs: The ID of the Square seller associated with the event. + type: + type: optional> + docs: >- + The type of event. For this event, the value is + `loyalty.event.created`. + event_id: + type: optional> + docs: >- + The unique ID for the event, which is used for + + [idempotency + support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + LoyaltyEventCreatedEventData: + docs: The data associated with a `loyalty.event.created` event. + properties: + type: + type: optional> + docs: >- + The type of object affected by the event. For this event, the value is + `loyalty_event`. + id: + type: optional + docs: ID of the affected loyalty event. + object: + type: optional + docs: An object that contains the new loyalty event. + source: + openapi: openapi/openapi.json + LoyaltyEventCreatedEventObject: + properties: + loyalty_event: + type: optional + docs: The loyalty event that was created. + source: + openapi: openapi/openapi.json LoyaltyEventDateTimeFilter: docs: Filter events by date time range. properties: @@ -16893,6 +21429,59 @@ types: for possible values source: openapi: openapi/openapi.json + LoyaltyProgramCreatedEvent: + docs: Published when a [loyalty program](entity:LoyaltyProgram) is created. + properties: + merchant_id: + type: optional> + docs: The ID of the Square seller associated with the event. + type: + type: optional> + docs: >- + The type of event. For this event, the value is + `loyalty.program.created`. + event_id: + type: optional> + docs: >- + The unique ID for the event, which is used for + + [idempotency + support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + LoyaltyProgramCreatedEventData: + docs: The data associated with a `loyalty.program.created` event. + properties: + type: + type: optional> + docs: >- + The type of object affected by the event. For this event, the value is + `loyalty_program`. + id: + type: optional + docs: The ID of the created loyalty program. + object: + type: optional + docs: An object that contains the loyalty program that was created. + source: + openapi: openapi/openapi.json + LoyaltyProgramCreatedEventObject: + docs: >- + An object that contains the loyalty program associated with a + `loyalty.program.created` event. + properties: + loyalty_program: + type: optional + docs: The loyalty program that was created. + source: + openapi: openapi/openapi.json LoyaltyProgramExpirationPolicy: docs: Describes when the loyalty program expires. properties: @@ -16910,123 +21499,6 @@ types: minLength: 1 source: openapi: openapi/openapi.json - LoyaltyProgramRewardDefinition: - docs: >- - Provides details about the reward tier discount. DEPRECATED at version - 2020-12-16. Discount details - - are now defined using a catalog pricing rule and other catalog objects. - For more information, see - - [Getting discount details for a reward - tier](https://developer.squareup.com/docs/loyalty-api/loyalty-rewards#get-discount-details). - properties: - scope: - type: LoyaltyProgramRewardDefinitionScope - docs: >- - Indicates the scope of the reward tier. DEPRECATED at version - 2020-12-16. You can find this information in the - - `product_set_data` field of the `PRODUCT_SET` catalog object - referenced by the pricing rule. For `ORDER` scopes, - - `all_products` is true. For `ITEM_VARIATION` or `CATEGORY` scopes, - `product_ids_any` is a list of - - catalog object IDs of the given type. - - See - [LoyaltyProgramRewardDefinitionScope](#type-loyaltyprogramrewarddefinitionscope) - for possible values - discount_type: - type: LoyaltyProgramRewardDefinitionType - docs: >- - The type of discount the reward tier offers. DEPRECATED at version - 2020-12-16. You can find this information - - in the `discount_data.discount_type` field of the `DISCOUNT` catalog - object referenced by the pricing rule. - - See - [LoyaltyProgramRewardDefinitionType](#type-loyaltyprogramrewarddefinitiontype) - for possible values - percentage_discount: - type: optional - docs: >- - The fixed percentage of the discount. Present if `discount_type` is - `FIXED_PERCENTAGE`. - - For example, a 7.25% off discount will be represented as "7.25". - DEPRECATED at version 2020-12-16. You can find this - - information in the `discount_data.percentage` field of the `DISCOUNT` - catalog object referenced by the pricing rule. - access: read-only - catalog_object_ids: - type: optional> - docs: >- - The list of catalog objects to which this reward can be applied. They - are either all item-variation ids or category ids, depending on the - `type` field. - - DEPRECATED at version 2020-12-16. You can find this information in the - `product_set_data.product_ids_any` field - - of the `PRODUCT_SET` catalog object referenced by the pricing rule. - access: read-only - fixed_discount_money: - type: optional - docs: >- - The amount of the discount. Present if `discount_type` is - `FIXED_AMOUNT`. For example, $5 off. - - DEPRECATED at version 2020-12-16. You can find this information in the - `discount_data.amount_money` field of the - - `DISCOUNT` catalog object referenced by the pricing rule. - max_discount_money: - type: optional - docs: >- - When `discount_type` is `FIXED_PERCENTAGE`, the maximum discount - amount that can be applied. - - DEPRECATED at version 2020-12-16. You can find this information in the - `discount_data.maximum_amount_money` field - - of the `DISCOUNT` catalog object referenced by the the pricing rule. - source: - openapi: openapi/openapi.json - LoyaltyProgramRewardDefinitionScope: - enum: - - ORDER - - ITEM_VARIATION - - CATEGORY - docs: >- - Indicates the scope of the reward tier. DEPRECATED at version 2020-12-16. - Discount details - - are now defined using a catalog pricing rule and other catalog objects. - For more information, see - - [Getting discount details for a reward - tier](https://developer.squareup.com/docs/loyalty-api/loyalty-rewards#get-discount-details). - source: - openapi: openapi/openapi.json - LoyaltyProgramRewardDefinitionType: - enum: - - FIXED_AMOUNT - - FIXED_PERCENTAGE - docs: >- - The type of discount the reward tier offers. DEPRECATED at version - 2020-12-16. Discount details - - are now defined using a catalog pricing rule and other catalog objects. - For more information, see - - [Getting discount details for a reward - tier](https://developer.squareup.com/docs/loyalty-api/loyalty-rewards#get-discount-details). - source: - openapi: openapi/openapi.json LoyaltyProgramRewardTier: docs: >- Represents a reward tier in a loyalty program. A reward tier defines how @@ -17049,13 +21521,6 @@ types: type: optional docs: The name of the reward tier. access: read-only - definition: - type: optional - docs: >- - Provides details about the reward tier definition. - - DEPRECATED at version 2020-12-16. Replaced by the - `pricing_rule_reference` field. created_at: type: optional docs: The timestamp when the reward tier was created, in RFC 3339 format. @@ -17101,6 +21566,59 @@ types: minLength: 1 source: openapi: openapi/openapi.json + LoyaltyProgramUpdatedEvent: + docs: Published when a [loyalty program](entity:LoyaltyProgram) is updated. + properties: + merchant_id: + type: optional> + docs: The ID of the Square seller associated with the event. + type: + type: optional> + docs: >- + The type of event. For this event, the value is + `loyalty.program.updated`. + event_id: + type: optional> + docs: >- + The unique ID for the event, which is used for + + [idempotency + support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + LoyaltyProgramUpdatedEventData: + docs: The data associated with a `loyalty.program.updated` event. + properties: + type: + type: optional> + docs: >- + The type of object affected by the event. For this event, the value is + `loyalty_program`. + id: + type: optional + docs: The ID of the affected loyalty program. + object: + type: optional + docs: An object that contains the loyalty program that was updated. + source: + openapi: openapi/openapi.json + LoyaltyProgramUpdatedEventObject: + docs: >- + An object that contains the loyalty program associated with a + `loyalty.program.updated` event. + properties: + loyalty_program: + type: optional + docs: The loyalty program that was updated. + source: + openapi: openapi/openapi.json LoyaltyPromotion: docs: >- Represents a promotion for a [loyalty program](entity:LoyaltyProgram). @@ -17273,6 +21791,59 @@ types: type: list source: openapi: openapi/openapi.json + LoyaltyPromotionCreatedEvent: + docs: Published when a [loyalty promotion](entity:LoyaltyPromotion) is created. + properties: + merchant_id: + type: optional> + docs: The ID of the Square seller associated with the event. + type: + type: optional> + docs: >- + The type of event. For this event, the value is + `loyalty.promotion.created`. + event_id: + type: optional> + docs: >- + The unique ID for the event, which is used for + + [idempotency + support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + LoyaltyPromotionCreatedEventData: + docs: The data associated with a `loyalty.promotion.created` event. + properties: + type: + type: optional> + docs: >- + The type of object affected by the event. For this event, the value is + `loyalty_promotion`. + id: + type: optional + docs: The ID of the affected loyalty promotion. + object: + type: optional + docs: An object that contains the loyalty promotion that was created. + source: + openapi: openapi/openapi.json + LoyaltyPromotionCreatedEventObject: + docs: >- + An object that contains the loyalty promotion associated with a + `loyalty.promotion.created` event. + properties: + loyalty_promotion: + type: optional + docs: The loyalty promotion that was created. + source: + openapi: openapi/openapi.json LoyaltyPromotionIncentive: docs: >- Represents how points for a [loyalty promotion](entity:LoyaltyPromotion) @@ -17447,11 +22018,68 @@ types: - ALL_TIME - DAY docs: >- - Indicates the time period that the [trigger - limit](entity:LoyaltyPromotionTriggerLimit) applies to, - - which is used to determine the number of times a buyer can earn points for - a [loyalty promotion](entity:LoyaltyPromotion). + Indicates the time period that the [trigger + limit](entity:LoyaltyPromotionTriggerLimit) applies to, + + which is used to determine the number of times a buyer can earn points for + a [loyalty promotion](entity:LoyaltyPromotion). + source: + openapi: openapi/openapi.json + LoyaltyPromotionUpdatedEvent: + docs: >- + Published when a [loyalty promotion](entity:LoyaltyPromotion) is updated. + This event is + + invoked only when a loyalty promotion is canceled. + properties: + merchant_id: + type: optional> + docs: The ID of the Square seller associated with the event. + type: + type: optional> + docs: >- + The type of event. For this event, the value is + `loyalty.promotion.updated`. + event_id: + type: optional> + docs: >- + The unique ID for the event, which is used for + + [idempotency + support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + LoyaltyPromotionUpdatedEventData: + docs: The data associated with a `loyalty.promotion.updated` event. + properties: + type: + type: optional> + docs: >- + The type of object affected by the event. For this event, the value is + `loyalty_promotion`. + id: + type: optional + docs: The ID of the affected loyalty promotion. + object: + type: optional + docs: An object that contains the loyalty promotion that was updated. + source: + openapi: openapi/openapi.json + LoyaltyPromotionUpdatedEventObject: + docs: >- + An object that contains the loyalty promotion associated with a + `loyalty.promotion.updated` event. + properties: + loyalty_promotion: + type: optional + docs: The loyalty promotion that was updated. source: openapi: openapi/openapi.json LoyaltyReward: @@ -17735,6 +22363,430 @@ types: access: read-only source: openapi: openapi/openapi.json + MerchantCustomAttributeDefinitionOwnedCreatedEvent: + docs: >- + Published when a merchant [custom attribute + definition](entity:CustomAttributeDefinition) + + is created by the subscribing application. Subscribe to this event to be + notified + + when your application creates a merchant custom attribute definition. + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"merchant.custom_attribute_definition.owned.created"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + MerchantCustomAttributeDefinitionOwnedDeletedEvent: + docs: >- + Published when a merchant [custom attribute + definition](entity:CustomAttributeDefinition) + + is deleted by the subscribing application. Subscribe to this event to be + notified + + when your application deletes a merchant custom attribute definition. + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"merchant.custom_attribute_definition.owned.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + MerchantCustomAttributeDefinitionOwnedUpdatedEvent: + docs: >- + Published when a merchant [custom attribute + definition](entity:CustomAttributeDefinition) + + is updated by the subscribing application. Subscribe to this event to be + notified + + when your application updates a merchant custom attribute definition. + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"merchant.custom_attribute_definition.owned.updated"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + MerchantCustomAttributeDefinitionVisibleCreatedEvent: + docs: >- + Published when a merchant [custom attribute + definition](entity:CustomAttributeDefinition) + + that is visible to the subscribing application is created. A notification + is sent when your application + + creates a custom attribute definition or another application creates a + custom attribute definition whose + + `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"merchant.custom_attribute_definition.visible.created"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + MerchantCustomAttributeDefinitionVisibleDeletedEvent: + docs: >- + Published when a merchant [custom attribute + definition](entity:CustomAttributeDefinition) + + that is visible to the subscribing application is deleted. A notification + is sent when your application + + deletes a custom attribute definition or another application deletes a + custom attribute definition whose + + `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"merchant.custom_attribute_definition.visible.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + MerchantCustomAttributeDefinitionVisibleUpdatedEvent: + docs: >- + Published when a merchant [custom attribute + definition](entity:CustomAttributeDefinition) + + that is visible to the subscribing application is updated. A notification + is sent when your application + + updates a custom attribute definition or another application updates a + custom attribute definition whose + + `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"merchant.custom_attribute_definition.visible.updated"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + MerchantCustomAttributeOwnedDeletedEvent: + docs: >- + Published when a merchant [custom attribute](entity:CustomAttribute) + + associated with a [custom attribute + definition](entity:CustomAttributeDefinition) that is + + owned by the subscribing application is deleted. Subscribe to this event + to be notified + + when your application deletes a merchant custom attribute. + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"merchant.custom_attribute.owned.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + MerchantCustomAttributeOwnedUpdatedEvent: + docs: >- + Published when a merchant [custom attribute](entity:CustomAttribute) + + associated with a [custom attribute + definition](entity:CustomAttributeDefinition) that is + + owned by the subscribing application is updated. Subscribe to this event + to be notified + + when your application updates a merchant custom attribute. + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"merchant.custom_attribute.owned.updated"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + MerchantCustomAttributeVisibleDeletedEvent: + docs: >- + Published when a merchant [custom attribute](entity:CustomAttribute) with + + the `visibility` field set to `VISIBILITY_READ_ONLY` or + `VISIBILITY_READ_WRITE_VALUES` is deleted. + + An application that subscribes to this event is notified when a merchant + custom attribute is deleted + + by any application for which the subscribing application has read access + to the merchant custom attribute. + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"merchant.custom_attribute.visible.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + MerchantCustomAttributeVisibleUpdatedEvent: + docs: >- + Published when a merchant [custom attribute](entity:CustomAttribute) with + + the `visibility` field set to `VISIBILITY_READ_ONLY` or + `VISIBILITY_READ_WRITE_VALUES` is updated. + + An application that subscribes to this event is notified when a merchant + custom attribute is updated + + by any application for which the subscribing application has read access + to the merchant custom attribute. + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"merchant.custom_attribute.visible.updated"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + MerchantSettingsUpdatedEvent: + docs: Published when online checkout merchant settings are updated + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: >- + The type of event this represents, + `"online_checkout.merchant_settings.updated"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: RFC 3339 timestamp of when the event was created. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + MerchantSettingsUpdatedEventData: + properties: + type: + type: optional> + docs: >- + Name of the updated object’s type, + `"online_checkout.merchant_settings"`. + id: + type: optional + docs: ID of the updated merchant settings. + object: + type: optional + docs: An object containing the updated merchant settings. + source: + openapi: openapi/openapi.json + MerchantSettingsUpdatedEventObject: + properties: + merchant_settings: + type: optional + docs: The updated merchant settings. + source: + openapi: openapi/openapi.json MerchantStatus: enum: - ACTIVE @@ -17816,6 +22868,73 @@ types: See [Currency](#type-currency) for possible values source: openapi: openapi/openapi.json + OauthAuthorizationRevokedEvent: + docs: >- + Published when a merchant/application revokes all access tokens and + refresh tokens granted to an application. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"oauth.authorization.revoked"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + OauthAuthorizationRevokedEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"revocation"`. + id: + type: optional + docs: Not applicable, revocation is not an object + object: + type: optional + docs: An object containing information about revocation event. + source: + openapi: openapi/openapi.json + OauthAuthorizationRevokedEventObject: + properties: + revocation: + type: optional + docs: The revocation event. + source: + openapi: openapi/openapi.json + OauthAuthorizationRevokedEventRevocationObject: + properties: + revoked_at: + type: optional> + docs: Timestamp of when the revocation event occurred, in RFC 3339 format. + revoker_type: + type: optional + docs: >- + Type of client that performed the revocation, either APPLICATION, + MERCHANT, or SQUARE. + + See + [OauthAuthorizationRevokedEventRevokerType](#type-oauthauthorizationrevokedeventrevokertype) + for possible values + source: + openapi: openapi/openapi.json + OauthAuthorizationRevokedEventRevokerType: + enum: + - APPLICATION + - MERCHANT + - SQUARE + docs: Defines the possible types for the revoking client. + source: + openapi: openapi/openapi.json ObtainTokenResponse: docs: Represents an [ObtainToken](api-endpoint:OAuth-ObtainToken) response. properties: @@ -18157,120 +23276,605 @@ types: created_at: type: optional docs: >- - The timestamp for when the order was created, at server side, in RFC - 3339 format (for example, "2016-09-04T23:59:33.123Z"). + The timestamp for when the order was created, at server side, in RFC + 3339 format (for example, "2016-09-04T23:59:33.123Z"). + access: read-only + updated_at: + type: optional + docs: >- + The timestamp for when the order was last updated, at server side, in + RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). + access: read-only + closed_at: + type: optional + docs: >- + The timestamp for when the order reached a terminal + [state](entity:OrderState), in RFC 3339 format (for example + "2016-09-04T23:59:33.123Z"). + access: read-only + state: + type: optional + docs: |- + The current state of the order. + See [OrderState](#type-orderstate) for possible values + version: + type: optional + docs: >- + The version number, which is incremented each time an update is + committed to the order. + + Orders not created through the API do not include a version number and + + therefore cannot be updated. + + + [Read more about working with + versions](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders). + total_money: + type: optional + docs: The total amount of money to collect for the order. + total_tax_money: + type: optional + docs: The total amount of tax money to collect for the order. + total_discount_money: + type: optional + docs: The total amount of discount money to collect for the order. + total_tip_money: + type: optional + docs: The total amount of tip money to collect for the order. + total_service_charge_money: + type: optional + docs: >- + The total amount of money collected in service charges for the order. + + + Note: `total_service_charge_money` is the sum of `applied_money` + fields for each individual + + service charge. Therefore, `total_service_charge_money` only includes + inclusive tax amounts, + + not additive tax amounts. + ticket_name: + type: optional> + docs: |- + A short-term identifier for the order (such as a customer first name, + table number, or auto-generated order number that resets daily). + validation: + maxLength: 30 + pricing_options: + type: optional + docs: >- + Pricing options for an order. The options affect how the order's price + is calculated. + + They can be used, for example, to apply automatic price adjustments + that are based on + + preconfigured [pricing rules](entity:CatalogPricingRule). + rewards: + type: optional> + docs: A set-like list of Rewards that have been added to the Order. + access: read-only + net_amount_due_money: + type: optional + docs: The net amount of money due on the order. + source: + openapi: openapi/openapi.json + OrderCreated: + properties: + order_id: + type: optional> + docs: The order's unique ID. + version: + type: optional + docs: >- + The version number, which is incremented each time an update is + committed to the order. + + Orders that were not created through the API do not include a version + number and + + therefore cannot be updated. + + + [Read more about working with + versions.](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders) + location_id: + type: optional> + docs: The ID of the seller location that this order is associated with. + state: + type: optional + docs: |- + The state of the order. + See [OrderState](#type-orderstate) for possible values + created_at: + type: optional + docs: The timestamp for when the order was created, in RFC 3339 format. + access: read-only + source: + openapi: openapi/openapi.json + OrderCreatedEvent: + docs: "Published when an [Order](entity:Order) is created. This event is\ntriggered only by the [CreateOrder](api-endpoint:Orders-CreateOrder) endpoint call.\n\nCreating an order in the Point of Sale\_app will **not** publish this event." + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"order.created"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + OrderCreatedEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"order_created"`. + id: + type: optional + docs: ID of the affected order. + object: + type: optional + docs: An object containing information about the created Order. + source: + openapi: openapi/openapi.json + OrderCreatedObject: + properties: + order_created: + type: optional + docs: Information about the created order. + source: + openapi: openapi/openapi.json + OrderCustomAttributeDefinitionOwnedCreatedEvent: + docs: >- + Published when an order [custom attribute + definition](entity:CustomAttributeDefinition) that is owned by the + subscribing app is created. + properties: + merchant_id: + type: optional> + docs: The ID of the target seller associated with the event. + type: + type: optional> + docs: >- + The type of this event. The value is + `"order.custom_attribute_definition.owned.created"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + OrderCustomAttributeDefinitionOwnedDeletedEvent: + docs: >- + Published when an order [custom attribute + definition](entity:CustomAttributeDefinition) that is owned by the + subscribing app is deleted. + properties: + merchant_id: + type: optional> + docs: The ID of the target seller associated with the event. + type: + type: optional> + docs: >- + The type of this event. The value is + `"order.custom_attribute_definition.owned.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + OrderCustomAttributeDefinitionOwnedUpdatedEvent: + docs: >- + Published when an order [custom attribute + definition](entity:CustomAttributeDefinition) that is owned by the + subscribing app is updated. + properties: + merchant_id: + type: optional> + docs: The ID of the target seller associated with the event. + type: + type: optional> + docs: >- + The type of this event. The value is + `"order.custom_attribute_definition.owned.updated"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + OrderCustomAttributeDefinitionVisibleCreatedEvent: + docs: >- + Published when an order [custom attribute + definition](entity:CustomAttributeDefinition) that is visible to the + subscribing app is created. + properties: + merchant_id: + type: optional> + docs: The ID of the target seller associated with the event. + type: + type: optional> + docs: >- + The type of this event. The value is + `"order.custom_attribute_definition.visible.created"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + OrderCustomAttributeDefinitionVisibleDeletedEvent: + docs: >- + Published when an order [custom attribute + definition](entity:CustomAttributeDefinition) that is visible to the + subscribing app is deleted. + properties: + merchant_id: + type: optional> + docs: The ID of the target seller associated with the event. + type: + type: optional> + docs: >- + The type of this event. The value is + `"order.custom_attribute_definition.visible.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + OrderCustomAttributeDefinitionVisibleUpdatedEvent: + docs: >- + Published when an order [custom attribute + definition](entity:CustomAttributeDefinition) that is visible to the + subscribing app is updated. + properties: + merchant_id: + type: optional> + docs: The ID of the target seller associated with the event. + type: + type: optional> + docs: >- + The type of this event. The value is + `"order.custom_attribute_definition.visible.updated"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. access: read-only - updated_at: + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + OrderCustomAttributeOwnedDeletedEvent: + docs: >- + Published when an order [custom attribute](entity:CustomAttribute) + associated with a [custom attribute + definition](entity:CustomAttributeDefinition) that is owned by the + subscribing app is deleted. + properties: + merchant_id: + type: optional> + docs: The ID of the target seller associated with the event. + type: + type: optional> + docs: >- + The type of this event. The value is + `"order.custom_attribute.owned.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + OrderCustomAttributeOwnedUpdatedEvent: + docs: >- + Published when an order [custom attribute](entity:CustomAttribute) + associated with a [custom attribute + definition](entity:CustomAttributeDefinition) that is owned by the + subscribing app is updated. + properties: + merchant_id: + type: optional> + docs: The ID of the target seller associated with the event. + type: + type: optional> docs: >- - The timestamp for when the order was last updated, at server side, in - RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). + The type of this event. The value is + `"order.custom_attribute.owned.updated"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. access: read-only - closed_at: + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + OrderCustomAttributeVisibleDeletedEvent: + docs: >- + Published when an order [custom attribute](entity:CustomAttribute) that is + visible to the subscribing app is deleted. + properties: + merchant_id: + type: optional> + docs: The ID of the target seller associated with the event. + type: + type: optional> + docs: >- + The type of this event. The value is + `"order.custom_attribute.visible.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + OrderCustomAttributeVisibleUpdatedEvent: + docs: >- + Published when an order [custom attribute](entity:CustomAttribute) that is + visible to the subscribing app is updated. + properties: + merchant_id: + type: optional> + docs: The ID of the target seller associated with the event. + type: + type: optional> docs: >- - The timestamp for when the order reached a terminal - [state](entity:OrderState), in RFC 3339 format (for example - "2016-09-04T23:59:33.123Z"). + The type of this event. The value is + `"order.custom_attribute.visible.updated"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. access: read-only - state: - type: optional - docs: |- - The current state of the order. - See [OrderState](#type-orderstate) for possible values + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + OrderEntry: + docs: >- + A lightweight description of an [order](entity:Order) that is returned + when + + `returned_entries` is `true` on a + [SearchOrdersRequest](api-endpoint:Orders-SearchOrders). + properties: + order_id: + type: optional> + docs: The ID of the order. version: type: optional docs: >- The version number, which is incremented each time an update is committed to the order. - Orders not created through the API do not include a version number and + 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). - total_money: - type: optional - docs: The total amount of money to collect for the order. - total_tax_money: - type: optional - docs: The total amount of tax money to collect for the order. - total_discount_money: - type: optional - docs: The total amount of discount money to collect for the order. - total_tip_money: - type: optional - docs: The total amount of tip money to collect for the order. - total_service_charge_money: - type: optional + versions.](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders) + access: read-only + location_id: + type: optional> + docs: The location ID the order belongs to. + source: + openapi: openapi/openapi.json + OrderFulfillmentDeliveryDetailsScheduleType: + enum: + - SCHEDULED + - ASAP + docs: The schedule type of the delivery fulfillment. + source: + openapi: openapi/openapi.json + OrderFulfillmentFulfillmentLineItemApplication: + enum: + - ALL + - ENTRY_LIST + docs: >- + The `line_item_application` describes what order line items this + fulfillment applies + + to. It can be `ALL` or `ENTRY_LIST` with a supplied list of fulfillment + entries. + source: + openapi: openapi/openapi.json + OrderFulfillmentPickupDetailsScheduleType: + enum: + - SCHEDULED + - ASAP + docs: The schedule type of the pickup fulfillment. + source: + openapi: openapi/openapi.json + OrderFulfillmentState: + enum: + - PROPOSED + - RESERVED + - PREPARED + - COMPLETED + - CANCELED + - FAILED + docs: The current state of this fulfillment. + source: + openapi: openapi/openapi.json + OrderFulfillmentType: + enum: + - PICKUP + - SHIPMENT + - DELIVERY + docs: The type of fulfillment. + source: + openapi: openapi/openapi.json + OrderFulfillmentUpdated: + properties: + order_id: + type: optional> + docs: The order's unique ID. + version: + type: optional docs: >- - The total amount of money collected in service charges for the order. + 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 - Note: `total_service_charge_money` is the sum of `applied_money` - fields for each individual + therefore cannot be updated. - service charge. Therefore, `total_service_charge_money` only includes - inclusive tax amounts, - not additive tax amounts. - ticket_name: + [Read more about working with + versions.](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders) + location_id: type: optional> + docs: The ID of the seller location that this order is associated with. + state: + type: optional docs: |- - A short-term identifier for the order (such as a customer first name, - table number, or auto-generated order number that resets daily). - validation: - maxLength: 30 - pricing_options: - type: optional - docs: >- - Pricing options for an order. The options affect how the order's price - is calculated. - - They can be used, for example, to apply automatic price adjustments - that are based on - - preconfigured [pricing rules](entity:CatalogPricingRule). - rewards: - type: optional> - docs: A set-like list of Rewards that have been added to the Order. + The state of the order. + See [OrderState](#type-orderstate) for possible values + created_at: + type: optional + docs: The timestamp for when the order was created, in RFC 3339 format. access: read-only - net_amount_due_money: - type: optional - docs: The net amount of money due on the order. + updated_at: + type: optional + docs: The timestamp for when the order was last updated, in RFC 3339 format. + access: read-only + fulfillment_update: + type: optional>> + docs: The fulfillments that were updated with this version change. + source: + openapi: openapi/openapi.json + OrderFulfillmentUpdatedEvent: + docs: |- + Published when an [OrderFulfillment](entity:OrderFulfillment) + is created or updated. This event is triggered only by the + [UpdateOrder](api-endpoint:Orders-UpdateOrder) endpoint call. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"order.fulfillment.updated"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + OrderFulfillmentUpdatedEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"order_fulfillment_updated"`. + id: + type: optional + docs: ID of the affected order. + object: + type: optional + docs: An object containing information about the updated Order. + source: + openapi: openapi/openapi.json + OrderFulfillmentUpdatedObject: + properties: + order_fulfillment_updated: + type: optional + docs: Information about the updated order fulfillment. source: openapi: openapi/openapi.json - OrderEntry: - docs: >- - A lightweight description of an [order](entity:Order) that is returned - when - - `returned_entries` is `true` on a - [SearchOrdersRequest](api-endpoint:Orders-SearchOrders). + OrderFulfillmentUpdatedUpdate: + docs: Information about fulfillment updates. properties: - order_id: + fulfillment_uid: type: optional> - docs: The ID of the order. - version: - type: optional + docs: A unique ID that identifies the fulfillment only within this order. + old_state: + type: optional docs: >- - The version number, which is incremented each time an update is - committed to the order. - - Orders that were not created through the API do not include a version - number and - - therefore cannot be updated. + The state of the fulfillment before the change. + The state is not populated if the fulfillment is created with this new + `Order` version. + new_state: + type: optional + docs: >- + The state of the fulfillment after the change. The state might be + equal to `old_state` if a non-state - [Read more about working with - versions.](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders) - access: read-only - location_id: - type: optional> - docs: The location ID the order belongs to. + field was changed on the fulfillment (such as the tracking number). source: openapi: openapi/openapi.json OrderLineItem: @@ -20203,6 +25807,87 @@ types: docs: The state of the order. source: openapi: openapi/openapi.json + OrderUpdated: + properties: + order_id: + type: optional> + docs: The order's unique ID. + version: + type: optional + docs: >- + The version number, which is incremented each time an update is + committed to the order. + + Orders that were not created through the API do not include a version + number and + + therefore cannot be updated. + + + [Read more about working with + versions.](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders) + location_id: + type: optional> + docs: The ID of the seller location that this order is associated with. + state: + type: optional + docs: |- + The state of the order. + See [OrderState](#type-orderstate) for possible values + created_at: + type: optional + docs: The timestamp for when the order was created, in RFC 3339 format. + access: read-only + updated_at: + type: optional + docs: The timestamp for when the order was last updated, in RFC 3339 format. + access: read-only + source: + openapi: openapi/openapi.json + OrderUpdatedEvent: + docs: |- + Published when an [Order](entity:Order) is updated. This + event is triggered by the [UpdateOrder](api-endpoint:Orders-UpdateOrder) + endpoint call, Order Manager, or the Square Dashboard. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"order.updated"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + OrderUpdatedEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"order_updated"`. + id: + type: optional + docs: ID of the affected order. + object: + type: optional + docs: An object containing information about the updated Order. + source: + openapi: openapi/openapi.json + OrderUpdatedObject: + properties: + order_updated: + type: optional + docs: Information about the updated order. + source: + openapi: openapi/openapi.json PauseSubscriptionResponse: docs: >- Defines output parameters in a response from the @@ -20863,6 +26548,51 @@ types: docs: The public refund id associated with this activity. source: openapi: openapi/openapi.json + PaymentCreatedEvent: + docs: Published when a [Payment](entity:Payment) is created. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"payment.created"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + PaymentCreatedEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"payment"`. + validation: + maxLength: 50 + id: + type: optional + docs: ID of the affected payment. + validation: + maxLength: 192 + object: + type: optional + docs: An object containing the created payment. + source: + openapi: openapi/openapi.json + PaymentCreatedEventObject: + properties: + payment: + type: optional + docs: The created payment. + source: + openapi: openapi/openapi.json PaymentLink: properties: id: @@ -21167,6 +26897,57 @@ types: access: read-only source: openapi: openapi/openapi.json + PaymentUpdatedEvent: + docs: >- + Published when a [Payment](entity:Payment) is updated. + + Typically the `payment.status`, or `card_details.status` fields are + updated + + as a payment is canceled, authorized, or completed. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"payment.updated"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + PaymentUpdatedEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"payment"`. + validation: + maxLength: 50 + id: + type: optional + docs: ID of the affected payment. + validation: + maxLength: 192 + object: + type: optional + docs: An object containing the updated payment. + source: + openapi: openapi/openapi.json + PaymentUpdatedEventObject: + properties: + payment: + type: optional + docs: The updated payment. + source: + openapi: openapi/openapi.json Payout: docs: >- An accounting of the amount owed the seller and record of the actual @@ -21387,27 +27168,159 @@ types: deposited back to the seller’s account by Square. source: openapi: openapi/openapi.json - PayoutFee: - docs: Represents a payout fee that can incur as part of a payout. + PayoutFailedEvent: + docs: Published when a [Payout](entity:Payout) has failed. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + location_id: + type: optional> + docs: The ID of the target location associated with the event. + type: + type: optional> + docs: The type of event that this represents, `payout.failed`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: The timestamp of when the event was verified, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + PayoutFailedEventData: + properties: + type: + type: optional> + docs: The name of the affected object's type, `payout`. + id: + type: optional + docs: The ID of the failed payout. + object: + type: optional + docs: An object containing the failed payout. + source: + openapi: openapi/openapi.json + PayoutFailedEventObject: + properties: + payout: + type: optional + docs: The payout that failed. + source: + openapi: openapi/openapi.json + PayoutFee: + docs: Represents a payout fee that can incur as part of a payout. + properties: + amount_money: + type: optional + docs: The money amount of the payout fee. + effective_at: + type: optional> + docs: The timestamp of when the fee takes effect, in RFC 3339 format. + type: + type: optional + docs: |- + The type of fee assessed as part of the payout. + See [PayoutFeeType](#type-payoutfeetype) for possible values + source: + openapi: openapi/openapi.json + PayoutFeeType: + enum: + - TRANSFER_FEE + - TAX_ON_TRANSFER_FEE + docs: Represents the type of payout fee that can incur as part of a payout. + source: + openapi: openapi/openapi.json + PayoutPaidEvent: + docs: Published when a [Payout](entity:Payout) is complete. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + location_id: + type: optional> + docs: The ID of the target location associated with the event. + type: + type: optional> + docs: The type of event this represents, `"payout.paid"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was verified, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + PayoutPaidEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"payout"`. + id: + type: optional + docs: ID of the completed payout. + object: + type: optional + docs: An object containing the completed payout. + source: + openapi: openapi/openapi.json + PayoutPaidEventObject: + properties: + payout: + type: optional + docs: The payout that has completed. + source: + openapi: openapi/openapi.json + PayoutSentEvent: + docs: Published when a [Payout](entity:Payout) is sent. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + location_id: + type: optional> + docs: The ID of the target location associated with the event. + type: + type: optional> + docs: The type of event this represents, `"payout.sent"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was verified, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + PayoutSentEventData: properties: - amount_money: - type: optional - docs: The money amount of the payout fee. - effective_at: - type: optional> - docs: The timestamp of when the fee takes effect, in RFC 3339 format. type: - type: optional - docs: |- - The type of fee assessed as part of the payout. - See [PayoutFeeType](#type-payoutfeetype) for possible values + type: optional> + docs: Name of the affected object’s type, `"payout"`. + id: + type: optional + docs: ID of the sent payout. + object: + type: optional + docs: An object containing the sent payout. source: openapi: openapi/openapi.json - PayoutFeeType: - enum: - - TRANSFER_FEE - - TAX_ON_TRANSFER_FEE - docs: Represents the type of payout fee that can incur as part of a payout. + PayoutSentEventObject: + properties: + payout: + type: optional + docs: The payout that was sent. source: openapi: openapi/openapi.json PayoutStatus: @@ -21677,7 +27590,7 @@ types: validation: maxLength: 192 tender_id: - type: string + type: optional> docs: The ID of the refunded tender. validation: maxLength: 192 @@ -21714,6 +27627,51 @@ types: integration. source: openapi: openapi/openapi.json + RefundCreatedEvent: + docs: Published when a [Refund](entity:PaymentRefund) is created. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"refund.created"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + RefundCreatedEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"refund"`. + validation: + maxLength: 50 + id: + type: optional + docs: ID of the affected refund. + validation: + maxLength: 255 + object: + type: optional + docs: An object containing the created refund. + source: + openapi: openapi/openapi.json + RefundCreatedEventObject: + properties: + refund: + type: optional + docs: The created refund. + source: + openapi: openapi/openapi.json RefundPaymentResponse: docs: >- Defines the response returned by @@ -21743,6 +27701,53 @@ types: docs: Indicates a refund's current status. source: openapi: openapi/openapi.json + RefundUpdatedEvent: + docs: |- + Published when a [Refund](entity:PaymentRefund) is updated. + Typically the `refund.status` changes when a refund is completed. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"refund.updated"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + RefundUpdatedEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"refund"`. + validation: + maxLength: 50 + id: + type: optional + docs: ID of the affected refund. + validation: + maxLength: 255 + object: + type: optional + docs: An object containing the updated refund. + source: + openapi: openapi/openapi.json + RefundUpdatedEventObject: + properties: + refund: + type: optional + docs: The updated refund. + source: + openapi: openapi/openapi.json RegisterDomainResponse: docs: >- Defines the fields that are included in the response body of @@ -24726,6 +30731,51 @@ types: docs: Determines the billing cadence of a [Subscription](entity:Subscription) source: openapi: openapi/openapi.json + SubscriptionCreatedEvent: + docs: Published when a [Subscription](entity:Subscription) is created. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"subscription.created"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + SubscriptionCreatedEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"subscription"`. + validation: + maxLength: 50 + id: + type: optional + docs: ID of the affected subscription. + validation: + maxLength: 255 + object: + type: optional + docs: An object containing the created subscription. + source: + openapi: openapi/openapi.json + SubscriptionCreatedEventObject: + properties: + subscription: + type: optional + docs: The created subscription. + source: + openapi: openapi/openapi.json SubscriptionEvent: docs: Describes changes to a subscription and the subscription status. properties: @@ -24929,6 +30979,57 @@ types: access: read-only source: openapi: openapi/openapi.json + SubscriptionUpdatedEvent: + docs: >- + Published when a [Subscription](entity:Subscription) is updated. + + Typically the `subscription.status` is updated as subscriptions become + active + + or cancelled. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"subscription.updated"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + SubscriptionUpdatedEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"subscription"`. + validation: + maxLength: 50 + id: + type: optional + docs: ID of the affected subscription. + validation: + maxLength: 255 + object: + type: optional + docs: An object containing the updated subscription. + source: + openapi: openapi/openapi.json + SubscriptionUpdatedEventObject: + properties: + subscription: + type: optional + docs: The updated subscription. + source: + openapi: openapi/openapi.json SwapPlanResponse: docs: |- Defines output parameters in a response of the @@ -25136,6 +31237,57 @@ types: access: read-only source: openapi: openapi/openapi.json + TeamMemberCreatedEvent: + docs: Published when a Team Member is created. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"team_member.created"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + TeamMemberCreatedEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"team_member"`. + id: + type: optional + docs: ID of the created team member. + object: + type: optional + docs: An object containing the created team member. + source: + openapi: openapi/openapi.json + TeamMemberCreatedEventObject: + properties: + team_member: + type: optional + docs: The created team member. + source: + openapi: openapi/openapi.json + TeamMemberInvitationStatus: + enum: + - UNINVITED + - PENDING + - ACCEPTED + docs: >- + Enumerates the possible invitation statuses the team member can have + within a business. + source: + openapi: openapi/openapi.json TeamMemberStatus: enum: - ACTIVE @@ -25145,6 +31297,47 @@ types: business. source: openapi: openapi/openapi.json + TeamMemberUpdatedEvent: + docs: Published when a Team Member is updated. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"team_member.updated"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + TeamMemberUpdatedEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"team_member"`. + id: + type: optional + docs: ID of the affected team member. + object: + type: optional + docs: An object containing the updated team member. + source: + openapi: openapi/openapi.json + TeamMemberUpdatedEventObject: + properties: + team_member: + type: optional + docs: The updated team member. + source: + openapi: openapi/openapi.json TeamMemberWage: docs: |- Job and wage information for a [team member](entity:TeamMember). @@ -25173,6 +31366,49 @@ types: docs: Whether team members are eligible for tips when working this job. source: openapi: openapi/openapi.json + TeamMemberWageSettingUpdatedEvent: + docs: Published when a Wage Setting is updated. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: >- + The type of event this represents, + `"team_member.wage_setting.updated"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + TeamMemberWageSettingUpdatedEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"wage_setting"`. + id: + type: optional + docs: ID of the updated team member wage setting. + object: + type: optional + docs: An object containing the updated team member wage setting. + source: + openapi: openapi/openapi.json + TeamMemberWageSettingUpdatedEventObject: + properties: + wage_setting: + type: optional + docs: The updated team member wage setting. + source: + openapi: openapi/openapi.json Tender: docs: >- Represents a tender (i.e., a method of payment) used in a Square @@ -25617,6 +31853,47 @@ types: unit information. This is an ‘open’ enum. source: openapi: openapi/openapi.json + TerminalActionCreatedEvent: + docs: Published when a TerminalAction is created. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"terminal.action.created"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: RFC 3339 timestamp of when the event was created. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + TerminalActionCreatedEventData: + properties: + type: + type: optional> + docs: Name of the created object’s type, `"action"`. + id: + type: optional + docs: ID of the created terminal action. + object: + type: optional + docs: An object containing the created terminal action. + source: + openapi: openapi/openapi.json + TerminalActionCreatedEventObject: + properties: + action: + type: optional + docs: The created terminal action. + source: + openapi: openapi/openapi.json TerminalActionQuery: properties: filter: @@ -25669,6 +31946,47 @@ types: See [SortOrder](#type-sortorder) for possible values source: openapi: openapi/openapi.json + TerminalActionUpdatedEvent: + docs: Published when a TerminalAction is updated. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"terminal.action.updated"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: RFC 3339 timestamp of when the event was created. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + TerminalActionUpdatedEventData: + properties: + type: + type: optional> + docs: Name of the updated object’s type, `"action"`. + id: + type: optional + docs: ID of the updated terminal action. + object: + type: optional + docs: An object containing the updated terminal action. + source: + openapi: openapi/openapi.json + TerminalActionUpdatedEventObject: + properties: + action: + type: optional + docs: The updated terminal action. + source: + openapi: openapi/openapi.json TerminalCheckout: docs: Represents a checkout processed by the Square Terminal. properties: @@ -25845,6 +32163,50 @@ types: `false`). source: openapi: openapi/openapi.json + TerminalCheckoutCreatedEvent: + docs: Published when a [TerminalCheckout](entity:TerminalCheckout) is created. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"terminal.checkout.created"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: RFC 3339 timestamp of when the event was created. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + TerminalCheckoutCreatedEventData: + properties: + type: + type: optional> + docs: Name of the created object’s type, `"checkout"`. + id: + type: optional + docs: ID of the created terminal checkout. + validation: + minLength: 10 + maxLength: 255 + object: + type: optional + docs: An object containing the created terminal checkout + source: + openapi: openapi/openapi.json + TerminalCheckoutCreatedEventObject: + properties: + checkout: + type: optional + docs: The created terminal checkout + source: + openapi: openapi/openapi.json TerminalCheckoutQuery: properties: filter: @@ -25893,6 +32255,50 @@ types: See [SortOrder](#type-sortorder) for possible values source: openapi: openapi/openapi.json + TerminalCheckoutUpdatedEvent: + docs: Published when a [TerminalCheckout](entity:TerminalCheckout) is updated. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"terminal.checkout.updated"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: RFC 3339 timestamp of when the event was created. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + TerminalCheckoutUpdatedEventData: + properties: + type: + type: optional> + docs: Name of the updated object’s type, `"checkout"`. + id: + type: optional + docs: ID of the updated terminal checkout. + validation: + minLength: 10 + maxLength: 255 + object: + type: optional + docs: An object containing the updated terminal checkout + source: + openapi: openapi/openapi.json + TerminalCheckoutUpdatedEventObject: + properties: + checkout: + type: optional + docs: The updated terminal checkout + source: + openapi: openapi/openapi.json TerminalRefund: docs: >- Represents a payment refund processed by the Square Terminal. Only @@ -25995,6 +32401,47 @@ types: access: read-only source: openapi: openapi/openapi.json + TerminalRefundCreatedEvent: + docs: Published when a Terminal API refund is created. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"terminal.refund.created"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: RFC 3339 timestamp of when the event was created. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + TerminalRefundCreatedEventData: + properties: + type: + type: optional> + docs: Name of the created object’s type, `"refund"`. + id: + type: optional + docs: ID of the created terminal refund. + object: + type: optional + docs: An object containing the created terminal refund. + source: + openapi: openapi/openapi.json + TerminalRefundCreatedEventObject: + properties: + refund: + type: optional + docs: The created terminal refund. + source: + openapi: openapi/openapi.json TerminalRefundQuery: properties: filter: @@ -26042,6 +32489,47 @@ types: - `DESC` - Newest to oldest (default). source: openapi: openapi/openapi.json + TerminalRefundUpdatedEvent: + docs: Published when a Terminal API refund is updated. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"terminal.refund.updated"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: RFC 3339 timestamp of when the event was created. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + TerminalRefundUpdatedEventData: + properties: + type: + type: optional> + docs: Name of the updated object’s type, `"refund"`. + id: + type: optional + docs: ID of the updated terminal refund. + object: + type: optional + docs: An object containing the updated terminal refund. + source: + openapi: openapi/openapi.json + TerminalRefundUpdatedEventObject: + properties: + refund: + type: optional + docs: The updated terminal refund. + source: + openapi: openapi/openapi.json TestWebhookSubscriptionResponse: docs: >- Defines the fields that are included in the response body of @@ -26491,6 +32979,13 @@ types: docs: Indicates the Square product used to process a transaction. source: openapi: openapi/openapi.json + TransactionType: + enum: + - DEBIT + - CREDIT + docs: The transaction type used in the disputed payment. + source: + openapi: openapi/openapi.json UnlinkCustomerFromGiftCardResponse: docs: >- A response that contains the unlinked `GiftCard` object. If the request @@ -27538,6 +34033,67 @@ types: docs: The ordinal of the [VendorContact](entity:VendorContact). source: openapi: openapi/openapi.json + VendorCreatedEvent: + docs: Published when a [Vendor](entity:Vendor) is created. + properties: + merchant_id: + type: optional> + docs: The ID of a seller associated with this event. + location_id: + type: optional> + docs: >- + The ID of a location associated with the event, if the event is + associated with the location of the seller. + type: + type: optional> + docs: The type of this event. The value is `"vendor.created".` + event_id: + type: optional> + docs: A unique ID for this event. + created_at: + type: optional + docs: >- + The RFC 3339-formatted time when the underlying event data object is + created. + access: read-only + data: + type: optional + docs: The data associated with this event. + source: + openapi: openapi/openapi.json + VendorCreatedEventData: + docs: Defines the `vendor.created` event data structure. + properties: + type: + type: optional> + docs: The type of the event data object. The value is `vendor` + id: + type: optional + docs: The ID of the event data object. + object: + type: optional + docs: An object containing the created vendor. + source: + openapi: openapi/openapi.json + VendorCreatedEventObject: + properties: + operation: + type: optional + docs: >- + The operation on the vendor that caused the event to be published. The + value is `CREATED`. + + See [Operation](#type-operation) for possible values + vendor: + type: optional + docs: The created vendor as the result of the specified operation. + source: + openapi: openapi/openapi.json + VendorCreatedEventObjectOperation: + type: literal<"CREATED"> + docs: >- + The operation that can be performed against a vendor to cause the event to + be published. VendorStatus: enum: - ACTIVE @@ -27547,6 +34103,67 @@ types: whether a [Vendor](entity:Vendor) is active or inactive. source: openapi: openapi/openapi.json + VendorUpdatedEvent: + docs: Published when a [Vendor](entity:Vendor) is updated. + properties: + merchant_id: + type: optional> + docs: The ID of a seller associated with this event. + location_id: + type: optional> + docs: >- + The ID of a seller location associated with this event, if the event + is associated with the location. + type: + type: optional> + docs: The type of this event. The value is `"vendor.updated".` + event_id: + type: optional> + docs: A unique ID for this webhoook event. + created_at: + type: optional + docs: >- + The RFC 3339-formatted time when the underlying event data object is + created. + access: read-only + data: + type: optional + docs: The data associated with this event. + source: + openapi: openapi/openapi.json + VendorUpdatedEventData: + docs: Defines the `vendor.updated` event data structure. + properties: + type: + type: optional> + docs: The type of the event data object. The value is `vendor`. + id: + type: optional + docs: The ID of the event data object. + object: + type: optional + docs: An object containing updated vendor. + source: + openapi: openapi/openapi.json + VendorUpdatedEventObject: + properties: + operation: + type: optional + docs: >- + The operation on the vendor that caused the event to be published. The + value is `UPDATED`. + + See [Operation](#type-operation) for possible values + vendor: + type: optional + docs: The updated vendor as the result of the specified operation. + source: + openapi: openapi/openapi.json + VendorUpdatedEventObjectOperation: + type: literal<"UPDATED"> + docs: >- + The operation that can be performed against a vendor to cause the event to + be published. VisibilityFilter: enum: - ALL @@ -27932,3 +34549,33 @@ types: - CatalogObjectBase source: openapi: openapi/openapi.json + GetLoyaltyAccountRequest: unknown + GetLoyaltyProgramRequest: unknown + GetLoyaltyPromotionRequest: unknown + GetLoyaltyRewardRequest: unknown + GetCardRequest: unknown + GetDisputeEvidenceRequest: unknown + GetDisputeRequest: unknown + V1GetPaymentRequest: unknown + V1GetSettlementRequest: unknown + GetCustomerGroupRequest: unknown + GetCustomerRequest: unknown + GetCustomerSegmentRequest: unknown + GetTransactionRequest: unknown + GetBookingRequest: unknown + GetBusinessBookingProfileRequest: unknown + GetTeamMemberBookingProfileRequest: unknown + GetSnippetRequest: unknown + GetInventoryAdjustmentRequest: unknown + GetInventoryPhysicalCountRequest: unknown + GetInventoryTransferRequest: unknown + GetVendorRequest: unknown + GetPaymentLinkRequest: unknown + GetGiftCardRequest: unknown + GetOrderRequest: unknown + GetEmployeeRequest: unknown + GetLocationRequest: unknown + GetMerchantRequest: unknown + GetTeamMemberRequest: unknown + GetWageSettingRequest: unknown + GetWebhookSubscriptionRequest: unknown diff --git a/.mock/definition/api.yml b/.mock/definition/api.yml index e2b13baba..fdfd69a54 100644 --- a/.mock/definition/api.yml +++ b/.mock/definition/api.yml @@ -10,7 +10,7 @@ headers: Square-Version: name: version env: VERSION - type: literal<"2025-05-21"> + type: literal<"2025-06-18"> auth-schemes: Bearer: scheme: bearer diff --git a/.mock/definition/locations.yml b/.mock/definition/locations.yml index 4c02572d6..49d646744 100644 --- a/.mock/definition/locations.yml +++ b/.mock/definition/locations.yml @@ -749,7 +749,6 @@ service: refunds: - id: id location_id: location_id - tender_id: tender_id reason: reason amount_money: {} status: PENDING diff --git a/.mock/definition/locations/transactions.yml b/.mock/definition/locations/transactions.yml index 1c7846b07..4c61f9bae 100644 --- a/.mock/definition/locations/transactions.yml +++ b/.mock/definition/locations/transactions.yml @@ -209,7 +209,6 @@ service: refunds: - id: id location_id: location_id - tender_id: tender_id reason: reason amount_money: {} status: PENDING diff --git a/.mock/definition/loyalty/programs.yml b/.mock/definition/loyalty/programs.yml index 0ac689c7d..eb39d23d7 100644 --- a/.mock/definition/loyalty/programs.yml +++ b/.mock/definition/loyalty/programs.yml @@ -45,10 +45,6 @@ service: - id: e1b39225-9da5-43d1-a5db-782cdd8ad94f points: 10 name: 10% off entire sale - definition: - scope: ORDER - discount_type: FIXED_PERCENTAGE - percentage_discount: '10' created_at: '2020-04-20T16:55:11Z' pricing_rule_reference: object_id: 74C4JSHESNLTB2A7ITO5HO6F @@ -123,10 +119,6 @@ service: - id: e1b39225-9da5-43d1-a5db-782cdd8ad94f points: 10 name: 10% off entire sale - definition: - scope: ORDER - discount_type: FIXED_PERCENTAGE - percentage_discount: '10' created_at: '2020-04-20T16:55:11Z' pricing_rule_reference: object_id: 74C4JSHESNLTB2A7ITO5HO6F diff --git a/.mock/definition/orders.yml b/.mock/definition/orders.yml index eda03149c..a39095aab 100644 --- a/.mock/definition/orders.yml +++ b/.mock/definition/orders.yml @@ -246,7 +246,6 @@ service: refunds: - id: id location_id: location_id - tender_id: tender_id reason: reason amount_money: {} status: PENDING @@ -369,7 +368,6 @@ service: refunds: - id: id location_id: location_id - tender_id: tender_id reason: reason amount_money: {} status: PENDING @@ -558,7 +556,6 @@ service: refunds: - id: id location_id: location_id - tender_id: tender_id reason: reason amount_money: {} status: PENDING @@ -833,7 +830,6 @@ service: refunds: - id: id location_id: location_id - tender_id: tender_id reason: reason amount_money: {} status: PENDING @@ -1023,7 +1019,6 @@ service: refunds: - id: id location_id: location_id - tender_id: tender_id reason: reason amount_money: {} status: PENDING @@ -1174,7 +1169,6 @@ service: refunds: - id: id location_id: location_id - tender_id: tender_id reason: reason amount_money: {} status: PENDING @@ -1413,7 +1407,6 @@ service: refunds: - id: id location_id: location_id - tender_id: tender_id reason: reason amount_money: {} status: PENDING @@ -1670,7 +1663,6 @@ service: refunds: - id: id location_id: location_id - tender_id: tender_id reason: reason amount_money: {} status: PENDING diff --git a/.mock/openapi/openapi.json b/.mock/openapi/openapi.json index bad389229..becb01f9c 100644 --- a/.mock/openapi/openapi.json +++ b/.mock/openapi/openapi.json @@ -146,7 +146,7 @@ "name": "Square-Version", "description": "Square Connect API versions", "schema": { - "default": "2025-05-21" + "default": "2025-06-18" } } ], @@ -251,13 +251,6 @@ } } }, - "AcceptDisputeRequest": { - "type": "object", - "description": "Defines the request parameters for the `AcceptDispute` endpoint.", - "x-release-status": "PUBLIC", - "properties": {}, - "example": {} - }, "AcceptDisputeResponse": { "type": "object", "description": "Defines the fields in an `AcceptDispute` response.", @@ -722,13 +715,6 @@ ], "x-release-status": "PUBLIC" }, - "AddGroupToCustomerRequest": { - "type": "object", - "description": "Defines the fields that are included in the request body of\na request to the [AddGroupToCustomer](api-endpoint:Customers-AddGroupToCustomer) endpoint.", - "x-release-status": "PUBLIC", - "properties": {}, - "example": {} - }, "AddGroupToCustomerResponse": { "type": "object", "description": "Defines the fields that are included in the response body of\na request to the [AddGroupToCustomer](api-endpoint:Customers-AddGroupToCustomer) endpoint.", @@ -1224,6 +1210,214 @@ } } }, + "BankAccountCreatedEvent": { + "type": "object", + "description": "Published when you link an external bank account to a Square\naccount in the Seller Dashboard. Square sets the initial status to\n`VERIFICATION_IN_PROGRESS` and publishes the event.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "location_id": { + "type": "string", + "description": "The ID of the target location associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"bank_account.created\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/BankAccountCreatedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-02-15T04:38:13Z", + "data": { + "id": "bact:cgvL1yv43VFjexample", + "object": { + "bank_account": { + "account_number_suffix": "526", + "account_type": "CHECKING", + "bank_name": "Bank Name", + "country": "US", + "creditable": true, + "currency": "USD", + "debitable": true, + "holder_name": "John Doe", + "id": "bact:cgvL1yv43VFjexample", + "location_id": "S8GWD5DBJ3HF3", + "primary_bank_identification_number": "101211111", + "status": "VERIFICATION_IN_PROGRESS", + "version": 1 + } + }, + "type": "bank_account" + }, + "event_id": "d214f854-adb1-4f56-b078-4b8697a3187a", + "location_id": "S8GWD5DBJ3HF3", + "merchant_id": "6SSW7HV8K2ST5", + "type": "bank_account.created" + }, + "x-webhook": { + "event": "bank_account.created", + "scopes": [ + "BANK_ACCOUNTS_READ" + ] + }, + "x-api": "#/components/x-apis/BankAccounts", + "x-since": "2020-02-26" + }, + "BankAccountCreatedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected object’s type, `\"bank_account\"`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the affected bank account." + }, + "object": { + "$ref": "#/components/schemas/BankAccountCreatedEventObject", + "description": "An object containing the created bank account.", + "nullable": true + } + } + }, + "BankAccountCreatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "bank_account": { + "$ref": "#/components/schemas/BankAccount", + "description": "The created bank account.", + "nullable": true + } + } + }, + "BankAccountDisabledEvent": { + "type": "object", + "description": "Published when Square sets the status of a\n[BankAccount](entity:BankAccount) to `DISABLED`.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "location_id": { + "type": "string", + "description": "The ID of the target location associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"bank_account.disabled\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was disabled, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/BankAccountDisabledEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-02-15T04:38:13Z", + "data": { + "id": "bact:cgvL1yv43VFjexample", + "object": { + "bank_account": { + "account_number_suffix": "526", + "account_type": "CHECKING", + "bank_name": "Bank Name", + "country": "US", + "creditable": true, + "currency": "USD", + "debitable": true, + "holder_name": "John Doe", + "id": "bact:cgvL1yv43VFjexample", + "location_id": "S8GWD5DBJ3HF3", + "primary_bank_identification_number": "101211111", + "status": "DISABLED", + "version": 5 + } + }, + "type": "bank_account" + }, + "event_id": "43e8b5c7-706f-49bf-8e2a-90fbe96af93e", + "location_id": "S8GWD5DBJ3HF3", + "merchant_id": "6SSW7HV8K2ST5", + "type": "bank_account.disabled" + }, + "x-webhook": { + "event": "bank_account.disabled", + "scopes": [ + "BANK_ACCOUNTS_READ" + ] + }, + "x-api": "#/components/x-apis/BankAccounts", + "x-since": "2020-02-26" + }, + "BankAccountDisabledEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected object’s type, `\"bank_account\"`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the affected bank account." + }, + "object": { + "$ref": "#/components/schemas/BankAccountDisabledEventObject", + "description": "An object containing the disabled bank account.", + "nullable": true + } + } + }, + "BankAccountDisabledEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "bank_account": { + "$ref": "#/components/schemas/BankAccount", + "description": "The disabled bank account.", + "nullable": true + } + } + }, "BankAccountPaymentDetails": { "type": "object", "description": "Additional details about BANK_ACCOUNT type payments.", @@ -1339,6 +1533,110 @@ "description": "Indicates the financial purpose of the bank account.", "x-release-status": "PUBLIC" }, + "BankAccountVerifiedEvent": { + "type": "object", + "description": "Published when Square sets the status of a\n[BankAccount](entity:BankAccount) to `VERIFIED`.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "location_id": { + "type": "string", + "description": "The ID of the target location associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"bank_account.verified\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was verified, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/BankAccountVerifiedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-02-15T04:38:13Z", + "data": { + "id": "bact:cgvL1yv43VFjexample", + "object": { + "bank_account": { + "account_number_suffix": "526", + "account_type": "CHECKING", + "bank_name": "Bank Name", + "country": "US", + "creditable": true, + "currency": "USD", + "debitable": true, + "holder_name": "John Doe", + "id": "bact:cgvL1yv43VFjexample", + "location_id": "S8GWD5DBJ3HF3", + "primary_bank_identification_number": "101211111", + "status": "VERIFIED", + "version": 4 + } + }, + "type": "bank_account" + }, + "event_id": "4166853c-0e4c-4202-8fd8-7e65a8f42389", + "location_id": "S8GWD5DBJ3HF3", + "merchant_id": "6SSW7HV8K2ST5", + "type": "bank_account.verified" + }, + "x-webhook": { + "event": "bank_account.verified", + "scopes": [ + "BANK_ACCOUNTS_READ" + ] + }, + "x-api": "#/components/x-apis/BankAccounts", + "x-since": "2020-02-26" + }, + "BankAccountVerifiedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected object’s type, `\"bank_account\"`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the affected bank account." + }, + "object": { + "$ref": "#/components/schemas/BankAccountVerifiedEventObject", + "description": "An object containing the verified bank account.", + "nullable": true + } + } + }, + "BankAccountVerifiedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "bank_account": { + "$ref": "#/components/schemas/BankAccount", + "description": "The verified bank account.", + "nullable": true + } + } + }, "BatchChangeInventoryRequest": { "type": "object", "x-release-status": "PUBLIC", @@ -2546,6 +2844,112 @@ "description": "Supported sources a booking was created from.", "x-release-status": "PUBLIC" }, + "BookingCreatedEvent": { + "type": "object", + "description": "Published when a booking is created.\n\nTo receive this event with buyer-level permissions, you must have `APPOINTMENTS_READ` set for the OAuth scope. \nTo receive this event with seller-level permissions, you must have `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` set for the OAuth scope.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target seller associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"booking.created\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/BookingCreatedEventData", + "description": "The data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-12-08T19:56:53Z", + "data": { + "id": "i2id2g3enyspi7:0", + "object": { + "booking": { + "appointment_segments": [ + { + "duration_minutes": 30, + "service_variation_id": "T3WUWYFJOVW2EU6XGRU5YG4A", + "service_variation_version": 1605808735978, + "team_member_id": "_4GsfYnqGHyurOwzWdKj" + } + ], + "created_at": "2020-12-08T19:56:53Z", + "customer_id": "SSKBT02ECWZXK6W3VWYC78E52R", + "customer_note": "", + "id": "i2id2g3enyspi7", + "location_id": "L9R0X9X5SGDBJ", + "seller_note": "", + "start_at": "2020-12-17T16:00:00Z", + "status": "ACCEPTED", + "updated_at": "2020-12-08T19:56:53Z", + "version": 0 + } + }, + "type": "booking" + }, + "event_id": "76193e8a-db85-53c6-b538-1837519cbc12", + "location_id": "L9R0X9X5SGDBJ", + "merchant_id": "GQQWA3J6A3AEZ", + "type": "booking.created" + }, + "x-webhook": { + "event": "booking.created", + "scopes": [ + "APPOINTMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/Bookings", + "x-since": "2020-12-16" + }, + "BookingCreatedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "The type of the event data object. The value is `\"booking\"`.", + "maxLength": 50, + "nullable": true + }, + "id": { + "type": "string", + "description": "The ID of the event data object.", + "maxLength": 192 + }, + "object": { + "$ref": "#/components/schemas/BookingCreatedEventObject", + "description": "An object containing the created booking.", + "nullable": true + } + } + }, + "BookingCreatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "booking": { + "$ref": "#/components/schemas/Booking", + "description": "The created booking.", + "nullable": true + } + } + }, "BookingCreatorDetails": { "type": "object", "description": "Information about a booking creator.", @@ -2589,6 +2993,386 @@ "description": "Supported types of a booking creator.", "x-release-status": "PUBLIC" }, + "BookingCustomAttributeDefinitionOwnedCreatedEvent": { + "type": "object", + "description": "Published when a booking [custom attribute definition](entity:CustomAttributeDefinition) \nis created by the subscribing application. Subscribe to this event to be notified \nwhen your application creates a booking custom attribute definition.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"booking.custom_attribute_definition.owned.created\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true + } + }, + "example": { + "created_at": "2022-04-21T21:40:49.943Z", + "data": { + "id": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-shampoo", + "object": { + "created_at": "2022-04-21T21:40:49Z", + "description": "The customer's favorite shampoo", + "key": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-shampoo", + "name": "Favorite Shampoo", + "schema": { + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + }, + "updated_at": "2022-04-21T21:40:49Z", + "version": 1, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute_definition" + }, + "event_id": "347ab320-c0ba-48f5-959a-4e147b9aefcf", + "merchant_id": "DM7VKY8Q63GNP", + "type": "booking.custom_attribute_definition.owned.created" + }, + "x-webhook": { + "event": "booking.custom_attribute_definition.owned.created", + "scopes": [ + "APPOINTMENTS_ALL_READ", + "APPOINTMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/BookingCustomAttributes", + "x-since": "2022-11-16" + }, + "BookingCustomAttributeDefinitionOwnedDeletedEvent": { + "type": "object", + "description": "Published when a booking [custom attribute definition](entity:CustomAttributeDefinition) \nis deleted by the subscribing application. Subscribe to this event to be notified \nwhen your application deletes a booking custom attribute definition.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"booking.custom_attribute_definition.owned.deleted\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true + } + }, + "example": { + "created_at": "2022-04-26T01:22:29Z", + "data": { + "deleted": true, + "id": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-shampoo", + "object": { + "created_at": "2022-04-21T21:40:49Z", + "description": "The customer's favorite shampoo", + "key": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-shampoo", + "name": "Favorite Shampoo", + "schema": { + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + }, + "updated_at": "2022-04-27T11:31:29Z", + "version": 3, + "visibility": "VISIBILITY_READ_ONLY" + }, + "type": "custom_attribute_definition" + }, + "event_id": "49363646-7ae7-49b5-aaa0-296610883c61", + "merchant_id": "DM7VKY8Q63GNP", + "type": "booking.custom_attribute_definition.owned.deleted" + }, + "x-webhook": { + "event": "booking.custom_attribute_definition.owned.deleted", + "scopes": [ + "APPOINTMENTS_ALL_READ", + "APPOINTMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/BookingCustomAttributes", + "x-since": "2022-11-16" + }, + "BookingCustomAttributeDefinitionOwnedUpdatedEvent": { + "type": "object", + "description": "Published when a booking [custom attribute definition](entity:CustomAttributeDefinition) \nis updated by the subscribing application. Subscribe to this event to be notified \nwhen your application updates a booking custom attribute definition.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"booking.custom_attribute_definition.owned.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true + } + }, + "example": { + "created_at": "2022-04-26T01:22:29Z", + "data": { + "id": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-shampoo", + "object": { + "created_at": "2022-04-21T21:57:39Z", + "description": "The customer's favorite shampoo", + "key": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-shampoo", + "name": "Favorite Shampoo", + "schema": { + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + }, + "updated_at": "2022-04-26T01:22:29Z", + "version": 2, + "visibility": "VISIBILITY_READ_ONLY" + }, + "type": "custom_attribute_definition" + }, + "event_id": "d914e6ef-9e37-4bca-a663-ecc55f5d98d3", + "merchant_id": "DM7VKY8Q63GNP", + "type": "booking.custom_attribute_definition.owned.updated" + }, + "x-webhook": { + "event": "booking.custom_attribute_definition.owned.updated", + "scopes": [ + "APPOINTMENTS_ALL_READ", + "APPOINTMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/BookingCustomAttributes", + "x-since": "2022-11-16" + }, + "BookingCustomAttributeDefinitionVisibleCreatedEvent": { + "type": "object", + "description": "Published when a booking [custom attribute definition](entity:CustomAttributeDefinition) \nwith the `visibility` field set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES` is created.\nAn application that subscribes to this event is notified when a booking custom attribute definition is created \nby any application for which the subscribing application has read access to the booking custom attribute definition.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"booking.custom_attribute_definition.visible.created\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true + } + }, + "example": { + "created_at": "2022-04-21T21:40:49.943Z", + "data": { + "id": "sq0idp-BushoY39o1X-GPxRRUWc0A:party-size", + "object": { + "created_at": "2022-04-21T21:40:49Z", + "description": "Number of party members", + "key": "sq0idp-BushoY39o1X-GPxRRUWc0A:party-size", + "name": "Party Size", + "schema": { + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number" + }, + "updated_at": "2022-04-21T21:40:49Z", + "version": 1, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute_definition" + }, + "event_id": "f679dc4f-3619-4764-a4de-94a54735cd32", + "merchant_id": "DM7VKY8Q63GNP", + "type": "booking.custom_attribute_definition.visible.created" + }, + "x-webhook": { + "event": "booking.custom_attribute_definition.visible.created", + "scopes": [ + "APPOINTMENTS_ALL_READ", + "APPOINTMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/BookingCustomAttributes", + "x-since": "2022-11-16" + }, + "BookingCustomAttributeDefinitionVisibleDeletedEvent": { + "type": "object", + "description": "Published when a booking [custom attribute definition](entity:CustomAttributeDefinition) \nwith the `visibility` field set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES` is deleted.\nAn application that subscribes to this event is notified when a booking custom attribute definition is deleted \nby any application for which the subscribing application has read access to the booking custom attribute definition.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"booking.custom_attribute_definition.visible.deleted\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true + } + }, + "example": { + "created_at": "2022-04-26T01:22:29Z", + "data": { + "deleted": true, + "id": "sq0idp-BushoY39o1X-GPxRRUWc0A:party-size", + "object": { + "created_at": "2022-04-21T21:40:49Z", + "description": "Number of party members", + "key": "sq0idp-BushoY39o1X-GPxRRUWc0A:party-size", + "name": "Party Size", + "schema": { + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number" + }, + "updated_at": "2022-04-27T11:31:29Z", + "version": 3, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute_definition" + }, + "event_id": "81c10a07-c329-4943-af20-7d70a300c7e6", + "merchant_id": "DM7VKY8Q63GNP", + "type": "booking.custom_attribute_definition.visible.deleted" + }, + "x-webhook": { + "event": "booking.custom_attribute_definition.visible.deleted", + "scopes": [ + "APPOINTMENTS_ALL_READ", + "APPOINTMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/BookingCustomAttributes", + "x-since": "2022-11-16" + }, + "BookingCustomAttributeDefinitionVisibleUpdatedEvent": { + "type": "object", + "description": "Published when a booking [custom attribute definition](entity:CustomAttributeDefinition) \nwith the `visibility` field set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES` is updated.\nAn application that subscribes to this event is notified when a booking custom attribute definition is updated \nby any application for which the subscribing application has read access to the booking custom attribute definition.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"booking.custom_attribute_definition.visible.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true + } + }, + "example": { + "created_at": "2022-04-26T01:22:29Z", + "data": { + "id": "sq0idp-BushoY39o1X-GPxRRUWc0A:party-size", + "object": { + "created_at": "2022-04-21T21:57:39Z", + "description": "Number of party members", + "key": "sq0idp-BushoY39o1X-GPxRRUWc0A:party-size", + "name": "Party Size", + "schema": { + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number" + }, + "updated_at": "2022-04-26T01:22:29Z", + "version": 2, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute_definition" + }, + "event_id": "ae376c21-d360-4694-96c7-1b27830f07d7", + "merchant_id": "DM7VKY8Q63GNP", + "type": "booking.custom_attribute_definition.visible.updated" + }, + "x-webhook": { + "event": "booking.custom_attribute_definition.visible.updated", + "scopes": [ + "APPOINTMENTS_ALL_READ", + "APPOINTMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/BookingCustomAttributes", + "x-since": "2022-11-16" + }, "BookingCustomAttributeDeleteRequest": { "type": "object", "description": "Represents an individual delete request in a [BulkDeleteBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkDeleteBookingCustomAttributes)\nrequest. An individual request contains a booking ID, the custom attribute to delete, and an optional idempotency key.", @@ -2633,6 +3417,125 @@ "errors": [] } }, + "BookingCustomAttributeOwnedDeletedEvent": { + "type": "object", + "description": "Published when a booking [custom attribute](entity:CustomAttribute) \nassociated with a [custom attribute definition](entity:CustomAttributeDefinition) that is\nowned by the subscribing application is deleted.\nSubscribe to this event to be notified \nwhen your application deletes a booking custom attribute.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"booking.custom_attribute.owned.deleted\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true + } + }, + "example": { + "created_at": "2022-04-26T01:22:29Z", + "data": { + "deleted": true, + "id": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-shampoo:BOOKING:TNQC0TYTWMRSFFQ157KK4V7MVR", + "object": { + "created_at": "2022-04-21T21:58:59Z", + "key": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-shampoo", + "updated_at": "2022-04-27T11:31:29Z", + "value": "Generic shampoo", + "version": 3, + "visibility": "VISIBILITY_READ_ONLY" + }, + "type": "custom_attribute" + }, + "event_id": "f57b27d4-a4d6-43de-9e58-bc6ff90525f1", + "merchant_id": "DM7VKY8Q63GNP", + "type": "booking.custom_attribute.owned.deleted" + }, + "x-webhook": { + "event": "booking.custom_attribute.owned.deleted", + "scopes": [ + "APPOINTMENTS_ALL_READ", + "APPOINTMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/BookingCustomAttributes", + "x-since": "2022-11-16" + }, + "BookingCustomAttributeOwnedUpdatedEvent": { + "type": "object", + "description": "Published when a booking [custom attribute](entity:CustomAttribute) \nis updated by the subscribing application. Subscribe to this event to be notified \nwhen your application updates a booking custom attribute.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"booking.custom_attribute.owned.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true + } + }, + "example": { + "created_at": "2022-04-21T21:40:54Z", + "data": { + "id": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-shampoo:BOOKING:TNQC0TYTWMRSFFQ157KK4V7MVR", + "object": { + "created_at": "2022-04-21T21:40:54Z", + "key": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-shampoo", + "updated_at": "2022-04-21T21:40:54Z", + "value": "Volume up", + "version": 1, + "visibility": "VISIBILITY_READ_ONLY" + }, + "type": "custom_attribute" + }, + "event_id": "e26ca6f2-97f8-426a-b4bf-873044617e94", + "merchant_id": "DM7VKY8Q63GNP", + "type": "booking.custom_attribute.owned.updated" + }, + "x-webhook": { + "event": "booking.custom_attribute.owned.updated", + "scopes": [ + "APPOINTMENTS_ALL_READ", + "APPOINTMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/BookingCustomAttributes", + "x-since": "2022-11-16" + }, "BookingCustomAttributeUpsertRequest": { "type": "object", "description": "Represents an individual upsert request in a [BulkUpsertBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkUpsertBookingCustomAttributes)\nrequest. An individual request contains a booking ID, the custom attribute to create or update,\nand an optional idempotency key.", @@ -2693,6 +3596,125 @@ "errors": [] } }, + "BookingCustomAttributeVisibleDeletedEvent": { + "type": "object", + "description": "Published when a booking [custom attribute](entity:CustomAttribute) with\nthe `visibility` field set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES` is deleted.\nAn application that subscribes to this event is notified when a booking custom attribute is deleted \nby any application for which the subscribing application has read access to the booking custom attribute.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"booking.custom_attribute.visible.deleted\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true + } + }, + "example": { + "created_at": "2022-04-26T01:22:29Z", + "data": { + "deleted": true, + "id": "sq0idp-BushoY39o1X-GPxRRUWc0A:party-size:BOOKING:TNQC0TYTWMRSFFQ157KK4V7MVR", + "object": { + "created_at": "2022-04-21T21:58:59Z", + "key": "sq0idp-BushoY39o1X-GPxRRUWc0A:party-size", + "updated_at": "2022-04-27T11:31:29Z", + "value": "10", + "version": 3, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute" + }, + "event_id": "18ef5adc-2efc-4ad9-9b1a-b274a607da3e", + "merchant_id": "DM7VKY8Q63GNP", + "type": "booking.custom_attribute.visible.deleted" + }, + "x-webhook": { + "event": "booking.custom_attribute.visible.deleted", + "scopes": [ + "APPOINTMENTS_ALL_READ", + "APPOINTMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/BookingCustomAttributes", + "x-since": "2022-11-16" + }, + "BookingCustomAttributeVisibleUpdatedEvent": { + "type": "object", + "description": "Published when a booking [custom attribute](entity:CustomAttribute) \nwith the `visibility` field set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES` is updated.\nAn application that subscribes to this event is notified when a booking custom attribute is updated \nby any application for which the subscribing application has read access to the booking custom attribute.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"booking.custom_attribute.visible.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true + } + }, + "example": { + "created_at": "2022-04-26T01:22:29Z", + "data": { + "id": "sq0idp-BushoY39o1X-GPxRRUWc0A:party-size:BOOKING:TNQC0TYTWMRSFFQ157KK4V7MVR", + "object": { + "created_at": "2022-04-21T21:40:54Z", + "key": "sq0idp-BushoY39o1X-GPxRRUWc0A:party-size", + "updated_at": "2022-04-26T01:22:29Z", + "value": "5", + "version": 2, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute" + }, + "event_id": "1cc2925c-f6e2-4fb6-a597-07c198de59e1", + "merchant_id": "DM7VKY8Q63GNP", + "type": "booking.custom_attribute.visible.updated" + }, + "x-webhook": { + "event": "booking.custom_attribute.visible.updated", + "scopes": [ + "APPOINTMENTS_ALL_READ", + "APPOINTMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/BookingCustomAttributes", + "x-since": "2022-11-16" + }, "BookingStatus": { "type": "string", "enum": [ @@ -2732,6 +3754,112 @@ "description": "Supported booking statuses.", "x-release-status": "PUBLIC" }, + "BookingUpdatedEvent": { + "type": "object", + "description": "Published when a booking is updated or cancelled.\n\nTo receive this event with buyer-level permissions, you must have `APPOINTMENTS_READ` set for the OAuth scope. \nTo receive this event with seller-level permissions, you must have `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` set for the OAuth scope.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target seller associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"booking.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/BookingUpdatedEventData", + "description": "The data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-12-08T20:05:00Z", + "data": { + "id": "i2id2g3enyspi7:1", + "object": { + "booking": { + "appointment_segments": [ + { + "duration_minutes": 30, + "service_variation_id": "T3WUWYFJOVW2EU6XGRU5YG4A", + "service_variation_version": 1605808735978, + "team_member_id": "_4GsfYnqGHyurOwzWdKj" + } + ], + "created_at": "2020-12-08T19:56:53Z", + "customer_id": "SSKBT02ECWZXK6W3VWYC78E52R", + "customer_note": "I would like to sit near the window please", + "id": "i2id2g3enyspi7", + "location_id": "L9R0X9X5SGDBJ", + "seller_note": "", + "start_at": "2020-12-17T16:00:00Z", + "status": "ACCEPTED", + "updated_at": "2020-12-08T20:05:00Z", + "version": 1 + } + }, + "type": "booking" + }, + "event_id": "d954ea4e-a393-52d4-bda6-bfd10cbd571f", + "location_id": "L9R0X9X5SGDBJ", + "merchant_id": "GQQWA3J6A3AEZ", + "type": "booking.updated" + }, + "x-webhook": { + "event": "booking.updated", + "scopes": [ + "APPOINTMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/Bookings", + "x-since": "2020-12-16" + }, + "BookingUpdatedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "The type of the event data object. The value is `\"booking\"`.", + "maxLength": 50, + "nullable": true + }, + "id": { + "type": "string", + "description": "The ID of the event data object.", + "maxLength": 192 + }, + "object": { + "$ref": "#/components/schemas/BookingUpdatedEventObject", + "description": "An object containing the updated booking.", + "nullable": true + } + } + }, + "BookingUpdatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "booking": { + "$ref": "#/components/schemas/Booking", + "description": "The updated booking.", + "nullable": true + } + } + }, "Break": { "type": "object", "description": "A record of a team member's break on a [timecard](entity:Timecard).", @@ -6002,14 +7130,6 @@ } } }, - "CancelLoyaltyPromotionRequest": { - "type": "object", - "description": "Represents a [CancelLoyaltyPromotion](api-endpoint:Loyalty-CancelLoyaltyPromotion) request.", - "x-release-status": "PUBLIC", - "x-params-example": "?program_id=d619f755-2d17-41f3-990d-c04ecedd64dd\u0026promotion_id=loypromo_f0f9b849-725e-378d-b810-511237e07b67", - "properties": {}, - "example": {} - }, "CancelLoyaltyPromotionResponse": { "type": "object", "description": "Represents a [CancelLoyaltyPromotion](api-endpoint:Loyalty-CancelLoyaltyPromotion) response.\nEither `loyalty_promotion` or `errors` is present in the response.", @@ -6097,13 +7217,6 @@ }, "example": {} }, - "CancelPaymentRequest": { - "type": "object", - "description": "Describes the request to cancel (void) a payment using\n[CancelPayment](api-endpoint:Payments-CancelPayment).\nYou can only cancel a payment that is approved (not completed).\nFor more information, see\n[Delayed capture of a payment](https://developer.squareup.com/docs/payments-api/take-payments/card-payments#delayed-capture-of-a-card-payment).", - "x-release-status": "PUBLIC", - "properties": {}, - "example": {} - }, "CancelPaymentResponse": { "type": "object", "description": "Defines the response returned by [CancelPayment](api-endpoint:Payments-CancelPayment).", @@ -6185,12 +7298,6 @@ } } }, - "CancelSubscriptionRequest": { - "type": "object", - "description": "Defines input parameters in a request to the \n[CancelSubscription](api-endpoint:Subscriptions-CancelSubscription) endpoint.", - "x-release-status": "PUBLIC", - "properties": {} - }, "CancelSubscriptionResponse": { "type": "object", "description": "Defines output parameters in a response from the \n[CancelSubscription](api-endpoint:Subscriptions-CancelSubscription) endpoint.", @@ -6240,12 +7347,6 @@ } } }, - "CancelTerminalActionRequest": { - "type": "object", - "x-release-status": "BETA", - "properties": {}, - "example": {} - }, "CancelTerminalActionResponse": { "type": "object", "x-release-status": "BETA", @@ -6281,12 +7382,6 @@ } } }, - "CancelTerminalCheckoutRequest": { - "type": "object", - "x-release-status": "PUBLIC", - "properties": {}, - "example": {} - }, "CancelTerminalCheckoutResponse": { "type": "object", "x-release-status": "PUBLIC", @@ -6328,12 +7423,6 @@ } } }, - "CancelTerminalRefundRequest": { - "type": "object", - "x-release-status": "PUBLIC", - "properties": {}, - "example": {} - }, "CancelTerminalRefundResponse": { "type": "object", "x-release-status": "PUBLIC", @@ -6380,19 +7469,6 @@ } } }, - "CaptureTransactionRequest": { - "type": "object", - "x-release-status": "DEPRECATED", - "properties": {}, - "x-sq-sdk-sample-code": { - "csharp": "/sdk_samples/CaptureTransaction/CaptureTransactionRequest.csharp", - "java": "/sdk_samples/CaptureTransaction/CaptureTransactionRequest.java", - "javascript": "/sdk_samples/CaptureTransaction/CaptureTransactionRequest.javascript", - "php": "/sdk_samples/CaptureTransaction/CaptureTransactionRequest.php", - "python": "/sdk_samples/CaptureTransaction/CaptureTransactionRequest.python", - "ruby": "/sdk_samples/CaptureTransaction/CaptureTransactionRequest.ruby" - } - }, "CaptureTransactionResponse": { "type": "object", "description": "Defines the fields that are included in the response body of\na request to the [CaptureTransaction](api-endpoint:Transactions-CaptureTransaction) endpoint.", @@ -6534,6 +7610,117 @@ } } }, + "CardAutomaticallyUpdatedEvent": { + "type": "object", + "description": "Published when Square automatically updates the expiration date or\nprimary account number (PAN) of a [card](entity:Card) or adds or removes an issuer alert.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target seller associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"card.automatically_updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CardAutomaticallyUpdatedEventData", + "description": "The data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-02-15T04:38:13Z", + "data": { + "id": "ccof:uIbfJXhXETSP197M3GB", + "object": { + "card": { + "billing_address": { + "address_line_1": "500 Electric Ave", + "address_line_2": "Suite 600", + "administrative_district_level_1": "NY", + "country": "US", + "locality": "New York", + "postal_code": "10003" + }, + "bin": "411111", + "card_brand": "VISA", + "card_type": "CREDIT", + "cardholder_name": "Amelia Earhart", + "customer_id": "VDKXEEKPJN48QDG3BGGFAK05P8", + "enabled": true, + "exp_month": 11, + "exp_year": 2022, + "fingerprint": "ex-p-cs80EK9Flz7LsCMv-szbptQ_ssAGrhemzSTsPFgt9nzyE6t7okiLIQc-qw_quqKX4Q", + "hsa_fsa": false, + "id": "ccof:uIbfJXhXETSP197M3GB", + "last_4": "1111", + "merchant_id": "6SSW7HV8K2ST5", + "prepaid_type": "NOT_PREPAID", + "reference_id": "user-id-2", + "version": 2 + } + }, + "type": "card" + }, + "event_id": "d214f854-adb1-4f56-b078-4b8697a3187a", + "merchant_id": "6SSW7HV8K2ST5", + "type": "card.automatically_updated" + }, + "x-webhook": { + "event": "card.automatically_updated", + "scopes": [ + "PAYMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/Cards", + "x-since": "2021-06-16" + }, + "CardAutomaticallyUpdatedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "The type of the event data object. The value is `\"card\"`.", + "maxLength": 50, + "nullable": true + }, + "id": { + "type": "string", + "description": "The ID of the event data object.", + "maxLength": 192 + }, + "object": { + "$ref": "#/components/schemas/CardAutomaticallyUpdatedEventObject", + "description": "An object containing the automatically updated card.", + "nullable": true + } + } + }, + "CardAutomaticallyUpdatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "card": { + "$ref": "#/components/schemas/Card", + "description": "The automatically updated card.", + "nullable": true + } + } + }, "CardBrand": { "type": "string", "enum": [ @@ -6637,6 +7824,359 @@ "description": "Indicates the brand for a co-branded card.", "x-release-status": "PUBLIC" }, + "CardCreatedEvent": { + "type": "object", + "description": "Published when a [card](entity:Card) is created or imported.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target seller associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"card.created\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CardCreatedEventData", + "description": "The data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-02-15T04:38:13Z", + "data": { + "id": "ccof:uIbfJXhXETSP197M3GB", + "object": { + "card": { + "billing_address": { + "address_line_1": "500 Electric Ave", + "address_line_2": "Suite 600", + "administrative_district_level_1": "NY", + "country": "US", + "locality": "New York", + "postal_code": "10003" + }, + "bin": "411111", + "card_brand": "VISA", + "card_type": "CREDIT", + "cardholder_name": "Amelia Earhart", + "customer_id": "VDKXEEKPJN48QDG3BGGFAK05P8", + "enabled": true, + "exp_month": 11, + "exp_year": 2022, + "fingerprint": "ex-p-cs80EK9Flz7LsCMv-szbptQ_ssAGrhemzSTsPFgt9nzyE6t7okiLIQc-qw_quqKX4Q", + "hsa_fsa": false, + "id": "ccof:uIbfJXhXETSP197M3GB", + "last_4": "1111", + "merchant_id": "6SSW7HV8K2ST5", + "prepaid_type": "NOT_PREPAID", + "reference_id": "user-id-1", + "version": 1 + } + }, + "type": "card" + }, + "event_id": "d214f854-adb1-4f56-b078-4b8697a3187a", + "merchant_id": "6SSW7HV8K2ST5", + "type": "card.created" + }, + "x-webhook": { + "event": "card.created", + "scopes": [ + "PAYMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/Cards", + "x-since": "2021-06-16" + }, + "CardCreatedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "The type of the event data object. The value is `\"card\"`.", + "maxLength": 50, + "nullable": true + }, + "id": { + "type": "string", + "description": "The ID of the event data object.", + "maxLength": 192 + }, + "object": { + "$ref": "#/components/schemas/CardCreatedEventObject", + "description": "An object containing the created card.", + "nullable": true + } + } + }, + "CardCreatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "card": { + "$ref": "#/components/schemas/Card", + "description": "The created card.", + "nullable": true + } + } + }, + "CardDisabledEvent": { + "type": "object", + "description": "Published when a [card](entity:Card) is disabled.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target seller associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"card.disabled\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CardDisabledEventData", + "description": "The data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-02-15T04:38:13Z", + "data": { + "id": "ccof:uIbfJXhXETSP197M3GB", + "object": { + "card": { + "billing_address": { + "address_line_1": "500 Electric Ave", + "address_line_2": "Suite 600", + "administrative_district_level_1": "NY", + "country": "US", + "locality": "New York", + "postal_code": "10003" + }, + "bin": "411111", + "card_brand": "VISA", + "card_type": "CREDIT", + "cardholder_name": "Amelia Earhart", + "customer_id": "VDKXEEKPJN48QDG3BGGFAK05P8", + "enabled": false, + "exp_month": 11, + "exp_year": 2022, + "fingerprint": "ex-p-cs80EK9Flz7LsCMv-szbptQ_ssAGrhemzSTsPFgt9nzyE6t7okiLIQc-qw_quqKX4Q", + "hsa_fsa": false, + "id": "ccof:uIbfJXhXETSP197M3GB", + "last_4": "1111", + "merchant_id": "6SSW7HV8K2ST5", + "prepaid_type": "NOT_PREPAID", + "reference_id": "user-id-1", + "version": 2 + } + }, + "type": "card" + }, + "event_id": "d214f854-adb1-4f56-b078-4b8697a3187a", + "merchant_id": "6SSW7HV8K2ST5", + "type": "card.disabled" + }, + "x-webhook": { + "event": "card.disabled", + "scopes": [ + "PAYMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/Cards", + "x-since": "2021-06-16" + }, + "CardDisabledEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "The type of the event data object. The value is `\"card\"`.", + "maxLength": 50, + "nullable": true + }, + "id": { + "type": "string", + "description": "The ID of the event data object.", + "maxLength": 192 + }, + "object": { + "$ref": "#/components/schemas/CardDisabledEventObject", + "description": "An object containing the disabled card.", + "nullable": true + } + } + }, + "CardDisabledEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "card": { + "$ref": "#/components/schemas/Card", + "description": "The disabled card.", + "nullable": true + } + } + }, + "CardForgottenEvent": { + "type": "object", + "description": "Published when a [card](entity:Card) is GDPR forgotten or vaulted.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target seller associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"card.forgotten\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CardForgottenEventData", + "description": "The data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-02-15T04:38:13Z", + "data": { + "id": "ccof:uIbfJXhXETSP197M3GB", + "object": { + "card": { + "customer_id": "VDKXEEKPJN48QDG3BGGFAK05P8", + "enabled": false, + "hsa_fsa": false, + "id": "ccof:uIbfJXhXETSP197M3GB", + "merchant_id": "6SSW7HV8K2ST5", + "reference_id": "user-id-1", + "version": 2 + } + }, + "type": "card" + }, + "event_id": "d214f854-adb1-4f56-b078-4b8697a3187a", + "merchant_id": "6SSW7HV8K2ST5", + "type": "card.forgotten" + }, + "x-webhook": { + "event": "card.forgotten", + "scopes": [ + "PAYMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/Cards", + "x-since": "2021-06-16" + }, + "CardForgottenEventCard": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "id": { + "type": "string", + "description": "Unique ID for this card. Generated by Square.", + "maxLength": 64, + "readOnly": true + }, + "customer_id": { + "type": "string", + "description": "The ID of a customer created using the Customers API associated with the card.", + "nullable": true + }, + "enabled": { + "type": "boolean", + "description": "Indicates whether or not a card can be used for payments.", + "nullable": true + }, + "reference_id": { + "type": "string", + "description": "An optional user-defined reference ID that associates this card with\nanother entity in an external system. For example, a customer ID from an\nexternal customer management system.", + "nullable": true + }, + "version": { + "type": "integer", + "description": "Current version number of the card. Increments with each card update. Requests to update an\nexisting Card object will be rejected unless the version in the request matches the current\nversion for the Card.", + "format": "int64" + }, + "merchant_id": { + "type": "string", + "description": "The ID of the merchant associated with the card.", + "nullable": true + } + } + }, + "CardForgottenEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "The type of the event data object. The value is `\"card\"`.", + "maxLength": 50, + "nullable": true + }, + "id": { + "type": "string", + "description": "The ID of the event data object.", + "maxLength": 192 + }, + "object": { + "$ref": "#/components/schemas/CardForgottenEventObject", + "description": "An object containing the forgotten card.", + "nullable": true + } + } + }, + "CardForgottenEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "card": { + "$ref": "#/components/schemas/CardForgottenEventCard", + "description": "The forgotten card.", + "nullable": true + } + } + }, "CardIssuerAlert": { "type": "string", "enum": [ @@ -6824,6 +8364,117 @@ "description": "Indicates a card's type, such as `CREDIT` or `DEBIT`.", "x-release-status": "PUBLIC" }, + "CardUpdatedEvent": { + "type": "object", + "description": "Published when a [card](entity:Card) is updated by the seller in the Square Dashboard.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target seller associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"card.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CardUpdatedEventData", + "description": "The data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-02-15T04:38:13Z", + "data": { + "id": "ccof:uIbfJXhXETSP197M3GB", + "object": { + "card": { + "billing_address": { + "address_line_1": "500 Electric Ave", + "address_line_2": "Suite 600", + "administrative_district_level_1": "NY", + "country": "US", + "locality": "New York", + "postal_code": "10003" + }, + "bin": "411111", + "card_brand": "VISA", + "card_type": "CREDIT", + "cardholder_name": "Amelia Earhart", + "customer_id": "VDKXEEKPJN48QDG3BGGFAK05P8", + "enabled": true, + "exp_month": 11, + "exp_year": 2022, + "fingerprint": "ex-p-cs80EK9Flz7LsCMv-szbptQ_ssAGrhemzSTsPFgt9nzyE6t7okiLIQc-qw_quqKX4Q", + "hsa_fsa": false, + "id": "ccof:uIbfJXhXETSP197M3GB", + "last_4": "1111", + "merchant_id": "6SSW7HV8K2ST5", + "prepaid_type": "NOT_PREPAID", + "reference_id": "user-id-2", + "version": 2 + } + }, + "type": "card" + }, + "event_id": "d214f854-adb1-4f56-b078-4b8697a3187a", + "merchant_id": "6SSW7HV8K2ST5", + "type": "card.updated" + }, + "x-webhook": { + "event": "card.updated", + "scopes": [ + "PAYMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/Cards", + "x-since": "2021-06-16" + }, + "CardUpdatedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "The type of the event data object. The value is `\"card\"`.", + "maxLength": 50, + "nullable": true + }, + "id": { + "type": "string", + "description": "The ID of the event data object.", + "maxLength": 192 + }, + "object": { + "$ref": "#/components/schemas/CardUpdatedEventObject", + "description": "An object containing the updated card.", + "nullable": true + } + } + }, + "CardUpdatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "card": { + "$ref": "#/components/schemas/Card", + "description": "The updated card.", + "nullable": true + } + } + }, "CashAppDetails": { "type": "object", "description": "Additional details about `WALLET` type payments with the `brand` of `CASH_APP`.", @@ -7750,19 +9401,6 @@ } } }, - "CatalogInfoRequest": { - "type": "object", - "x-release-status": "PUBLIC", - "properties": {}, - "x-sq-sdk-sample-code": { - "csharp": "/sdk_samples/Catalog/CatalogInfo/CatalogInfoRequest.csharp", - "java": "/sdk_samples/Catalog/CatalogInfo/CatalogInfoRequest.java", - "javascript": "/sdk_samples/Catalog/CatalogInfo/CatalogInfoRequest.javascript", - "php": "/sdk_samples/Catalog/CatalogInfo/CatalogInfoRequest.php", - "python": "/sdk_samples/Catalog/CatalogInfo/CatalogInfoRequest.python", - "ruby": "/sdk_samples/Catalog/CatalogInfo/CatalogInfoRequest.ruby" - } - }, "CatalogInfoResponse": { "type": "object", "x-release-status": "PUBLIC", @@ -9973,6 +11611,99 @@ } } }, + "CatalogVersionUpdatedEvent": { + "type": "object", + "description": "Published when the catalog is updated.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CatalogVersionUpdatedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2019-10-29T17:26:16.808603647Z", + "data": { + "id": "732b6677-1acb-4d81-b09c-5a3a49399d8f", + "object": { + "catalog_version": { + "updated_at": "2019-10-29T17:26:16.53Z" + } + }, + "type": "catalog_version" + }, + "event_id": "aeaaa5f6-c4fd-4e93-b688-71b50706266f", + "merchant_id": "6SSW7HV8K2ST5", + "type": "catalog.version.updated" + }, + "x-webhook": { + "event": "catalog.version.updated", + "scopes": [ + "ITEMS_READ" + ] + }, + "x-api": "#/components/x-apis/Catalog", + "x-since": "2019-09-25" + }, + "CatalogVersionUpdatedEventCatalogVersion": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "updated_at": { + "type": "string", + "description": "Last modification timestamp in RFC 3339 format.", + "readOnly": true + } + } + }, + "CatalogVersionUpdatedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected object’s type.", + "nullable": true + }, + "object": { + "$ref": "#/components/schemas/CatalogVersionUpdatedEventObject", + "description": "An object containing fields and values relevant to the event. Is absent if affected object was deleted.", + "nullable": true + } + } + }, + "CatalogVersionUpdatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "catalog_version": { + "$ref": "#/components/schemas/CatalogVersionUpdatedEventCatalogVersion", + "description": "The version of the object.", + "nullable": true + } + } + }, "CategoryPathToRootNode": { "type": "object", "description": "A node in the path from a retrieved category to its root node.", @@ -10092,140 +11823,6 @@ "description": "Supported timings when a pending change, as an action, takes place to a subscription.", "x-release-status": "BETA" }, - "ChargeRequest": { - "type": "object", - "description": "Defines the parameters that can be included in the body of\na request to the [Charge](api-endpoint:Transactions-Charge) endpoint.\n\nDeprecated - recommend using [CreatePayment](api-endpoint:Payments-CreatePayment)", - "x-release-status": "DEPRECATED", - "required": [ - "idempotency_key", - "amount_money" - ], - "properties": { - "idempotency_key": { - "type": "string", - "description": "A value you specify that uniquely identifies this\ntransaction among transactions you've created.\n\nIf you're unsure whether a particular transaction succeeded,\nyou can reattempt it with the same idempotency key without\nworrying about double-charging the buyer.\n\nSee [Idempotency keys](https://developer.squareup.com/docs/working-with-apis/idempotency) for more information.", - "minLength": 1, - "maxLength": 192 - }, - "amount_money": { - "$ref": "#/components/schemas/Money", - "description": "The amount of money to charge.\n\nNote that you specify the amount in the\n__smallest denomination of the applicable currency__. For example, US dollar\namounts are specified in cents. See\n[Working with monetary amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts) for details.\n\nThe value of `currency` must match the currency associated with the business\nthat is charging the card." - }, - "card_nonce": { - "type": "string", - "description": "A payment token generated from the [Card.tokenize()](https://developer.squareup.com/reference/sdks/web/payments/objects/Card#Card.tokenize) that represents the card\nto charge.\n\nThe application that provides a payment token to this endpoint must be the\n_same application_ that generated the payment token with the Web Payments SDK.\nOtherwise, the nonce is invalid.\n\nDo not provide a value for this field if you provide a value for\n`customer_card_id`.", - "maxLength": 192, - "nullable": true - }, - "customer_card_id": { - "type": "string", - "description": "The ID of the customer card on file to charge. Do\nnot provide a value for this field if you provide a value for `card_nonce`.\n\nIf you provide this value, you _must_ also provide a value for\n`customer_id`.", - "maxLength": 192, - "nullable": true - }, - "delay_capture": { - "type": "boolean", - "description": "If `true`, the request will only perform an Auth on the provided\ncard. You can then later perform either a Capture (with the\n[CaptureTransaction](api-endpoint:Transactions-CaptureTransaction) endpoint) or a Void\n(with the [VoidTransaction](api-endpoint:Transactions-VoidTransaction) endpoint).\n\nDefault value: `false`", - "nullable": true - }, - "reference_id": { - "type": "string", - "description": "An optional ID you can associate with the transaction for your own\npurposes (such as to associate the transaction with an entity ID in your\nown database).\n\nThis value cannot exceed 40 characters.", - "maxLength": 40, - "nullable": true - }, - "note": { - "type": "string", - "description": "An optional note to associate with the transaction.\n\nThis value cannot exceed 60 characters.", - "maxLength": 60, - "nullable": true - }, - "customer_id": { - "type": "string", - "description": "The ID of the customer to associate this transaction with. This field\nis required if you provide a value for `customer_card_id`, and optional\notherwise.", - "maxLength": 50, - "nullable": true - }, - "billing_address": { - "$ref": "#/components/schemas/Address", - "description": "The buyer's billing address. This value is optional, but this transaction\nis ineligible for chargeback protection if neither this parameter nor\n`shipping_address` is provided.", - "nullable": true - }, - "shipping_address": { - "$ref": "#/components/schemas/Address", - "description": "The buyer's shipping address, if available. This value is optional,\nbut this transaction is ineligible for chargeback protection if neither this\nparameter nor `billing_address` is provided.", - "nullable": true - }, - "buyer_email_address": { - "type": "string", - "description": "The buyer's email address, if available. This value is optional,\nbut this transaction is ineligible for chargeback protection if it is not\nprovided.", - "nullable": true - }, - "order_id": { - "type": "string", - "description": "The ID of the order to associate with this transaction.\n\nIf you provide this value, the `amount_money` value of your request must\n__exactly match__ the value of the order's `total_money` field.", - "maxLength": 192, - "nullable": true - }, - "additional_recipients": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ChargeRequestAdditionalRecipient" - }, - "description": "The basic primitive of multi-party transaction. The value is optional.\nThe transaction facilitated by you can be split from here.\n\nIf you provide this value, the `amount_money` value in your additional_recipients\nmust not be more than 90% of the `amount_money` value in the charge request.\nThe `location_id` must be the valid location of the app owner merchant.\n\nThis field requires the `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission.\n\nThis field is currently not supported in sandbox.", - "nullable": true - }, - "verification_token": { - "type": "string", - "description": "A token generated by SqPaymentForm's verifyBuyer() that represents\ncustomer's device info and 3ds challenge result.", - "nullable": true - } - }, - "example": { - "additional_recipients": [ - { - "amount_money": { - "amount": 20, - "currency": "USD" - }, - "description": "Application fees", - "location_id": "057P5VYJ4A5X1" - } - ], - "amount_money": { - "amount": 200, - "currency": "USD" - }, - "billing_address": { - "address_line_1": "500 Electric Ave", - "address_line_2": "Suite 600", - "administrative_district_level_1": "NY", - "country": "US", - "locality": "New York", - "postal_code": "10003" - }, - "card_nonce": "card_nonce_from_square_123", - "delay_capture": false, - "idempotency_key": "74ae1696-b1e3-4328-af6d-f1e04d947a13", - "note": "some optional note", - "reference_id": "some optional reference id", - "shipping_address": { - "address_line_1": "123 Main St", - "administrative_district_level_1": "CA", - "country": "US", - "locality": "San Francisco", - "postal_code": "94114" - } - }, - "x-sq-sdk-sample-code": { - "csharp": "/sdk_samples/Charge/ChargeRequest.csharp", - "java": "/sdk_samples/Charge/ChargeRequest.java", - "javascript": "/sdk_samples/Charge/ChargeRequest.javascript", - "php": "/sdk_samples/Charge/ChargeRequest.php", - "python": "/sdk_samples/Charge/ChargeRequest.python", - "ruby": "/sdk_samples/Charge/ChargeRequest.ruby" - } - }, "ChargeRequestAdditionalRecipient": { "type": "object", "description": "Represents an additional recipient (other than the merchant) entitled to a portion of the tender.\nSupport is currently limited to USD, CAD and GBP currencies", @@ -10254,74 +11851,6 @@ } } }, - "ChargeResponse": { - "type": "object", - "description": "Defines the fields that are included in the response body of\na request to the [Charge](api-endpoint:Transactions-Charge) endpoint.\n\nOne of `errors` or `transaction` is present in a given response (never both).", - "x-release-status": "DEPRECATED", - "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Error" - }, - "description": "Any errors that occurred during the request." - }, - "transaction": { - "$ref": "#/components/schemas/Transaction", - "description": "The created transaction." - } - }, - "example": { - "transaction": { - "created_at": "2016-03-10T22:57:56Z", - "id": "KnL67ZIwXCPtzOrqj0HrkxMF", - "location_id": "18YC4JDH91E1H", - "product": "EXTERNAL_API", - "reference_id": "some optional reference id", - "tenders": [ - { - "additional_recipients": [ - { - "amount_money": { - "amount": 20, - "currency": "USD" - }, - "description": "Application fees", - "location_id": "057P5VYJ4A5X1", - "receivable_id": "ISu5xwxJ5v0CMJTQq7RvqyMF" - } - ], - "amount_money": { - "amount": 200, - "currency": "USD" - }, - "card_details": { - "card": { - "card_brand": "VISA", - "last_4": "1111" - }, - "entry_method": "KEYED", - "status": "CAPTURED" - }, - "created_at": "2016-03-10T22:57:56Z", - "id": "MtZRYYdDrYNQbOvV7nbuBvMF", - "location_id": "18YC4JDH91E1H", - "note": "some optional note", - "transaction_id": "KnL67ZIwXCPtzOrqj0HrkxMF", - "type": "CARD" - } - ] - } - }, - "x-sq-sdk-sample-code": { - "csharp": "/sdk_samples/Charge/ChargeResponse.csharp", - "java": "/sdk_samples/Charge/ChargeResponse.java", - "javascript": "/sdk_samples/Charge/ChargeResponse.javascript", - "php": "/sdk_samples/Charge/ChargeResponse.php", - "python": "/sdk_samples/Charge/ChargeResponse.python", - "ruby": "/sdk_samples/Charge/ChargeResponse.ruby" - } - }, "Checkout": { "type": "object", "description": "Square Checkout lets merchants accept online payments for supported\npayment types using a checkout workflow hosted on squareup.com.", @@ -15420,108 +16949,6 @@ } } }, - "CreateRefundRequest": { - "type": "object", - "description": "Defines the body parameters that can be included in\na request to the [CreateRefund](api-endpoint:Transactions-CreateRefund) endpoint.\n\nDeprecated - recommend using [RefundPayment](api-endpoint:Refunds-RefundPayment)", - "x-release-status": "DEPRECATED", - "required": [ - "idempotency_key", - "tender_id", - "amount_money" - ], - "properties": { - "idempotency_key": { - "type": "string", - "description": "A value you specify that uniquely identifies this\nrefund among refunds you've created for the tender.\n\nIf you're unsure whether a particular refund succeeded,\nyou can reattempt it with the same idempotency key without\nworrying about duplicating the refund.\n\nSee [Idempotency keys](https://developer.squareup.com/docs/working-with-apis/idempotency) for more information.", - "minLength": 1, - "maxLength": 192 - }, - "tender_id": { - "type": "string", - "description": "The ID of the tender to refund.\n\nA [`Transaction`](entity:Transaction) has one or more `tenders` (i.e., methods\nof payment) associated with it, and you refund each tender separately with\nthe Connect API.", - "minLength": 1, - "maxLength": 192 - }, - "reason": { - "type": "string", - "description": "A description of the reason for the refund.\n\nDefault value: `Refund via API`", - "maxLength": 192 - }, - "amount_money": { - "$ref": "#/components/schemas/Money", - "description": "The amount of money to refund.\n\nNote that you specify the amount in the\n__smallest denomination of the applicable currency__. For example, US dollar\namounts are specified in cents. See\n[Working with monetary amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts) for details.\n\nThis amount cannot exceed the amount that was originally charged to the\ntender that corresponds to `tender_id`." - } - }, - "example": { - "amount_money": { - "amount": 100, - "currency": "USD" - }, - "idempotency_key": "86ae1696-b1e3-4328-af6d-f1e04d947ad2", - "reason": "a reason", - "tender_id": "MtZRYYdDrYNQbOvV7nbuBvMF" - }, - "x-sq-sdk-sample-code": { - "csharp": "/sdk_samples/CreateRefund/CreateRefundRequest.csharp", - "java": "/sdk_samples/CreateRefund/CreateRefundRequest.java", - "javascript": "/sdk_samples/CreateRefund/CreateRefundRequest.javascript", - "php": "/sdk_samples/CreateRefund/CreateRefundRequest.php", - "python": "/sdk_samples/CreateRefund/CreateRefundRequest.python", - "ruby": "/sdk_samples/CreateRefund/CreateRefundRequest.ruby" - } - }, - "CreateRefundResponse": { - "type": "object", - "description": "Defines the fields that are included in the response body of\na request to the [CreateRefund](api-endpoint:Transactions-CreateRefund) endpoint.\n\nOne of `errors` or `refund` is present in a given response (never both).", - "x-release-status": "DEPRECATED", - "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Error" - }, - "description": "Any errors that occurred during the request." - }, - "refund": { - "$ref": "#/components/schemas/Refund", - "description": "The created refund." - } - }, - "example": { - "refund": { - "additional_recipients": [ - { - "amount_money": { - "amount": 10, - "currency": "USD" - }, - "description": "Application fees", - "location_id": "057P5VYJ4A5X1", - "receivable_id": "ISu5xwxJ5v0CMJTQq7RvqyMF" - } - ], - "amount_money": { - "amount": 100, - "currency": "USD" - }, - "created_at": "2016-02-12T00:28:18Z", - "id": "b27436d1-7f8e-5610-45c6-417ef71434b4-SW", - "location_id": "18YC4JDH91E1H", - "reason": "some reason", - "status": "PENDING", - "tender_id": "MtZRYYdDrYNQbOvV7nbuBvMF", - "transaction_id": "KnL67ZIwXCPtzOrqj0HrkxMF" - } - }, - "x-sq-sdk-sample-code": { - "csharp": "/sdk_samples/CreateRefund/CreateRefundResponse.csharp", - "java": "/sdk_samples/CreateRefund/CreateRefundResponse.java", - "javascript": "/sdk_samples/CreateRefund/CreateRefundResponse.javascript", - "php": "/sdk_samples/CreateRefund/CreateRefundResponse.php", - "python": "/sdk_samples/CreateRefund/CreateRefundResponse.python", - "ruby": "/sdk_samples/CreateRefund/CreateRefundResponse.ruby" - } - }, "CreateScheduledShiftRequest": { "type": "object", "description": "Represents a [CreateScheduledShift](api-endpoint:Labor-CreateScheduledShift) request.", @@ -17452,6 +18879,40 @@ } } }, + "CustomAttributeDefinitionEventData": { + "type": "object", + "description": "Represents an object in the CustomAttributeDefinition event notification\npayload that contains the affected custom attribute definition.", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "The type of the event data object. The value is `\"custom_attribute_definition\"`.", + "maxLength": 50, + "nullable": true + }, + "id": { + "type": "string", + "description": "The ID of the event data object.", + "maxLength": 192 + }, + "object": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventDataObject", + "description": "An object containing the custom attribute definition.", + "nullable": true + } + } + }, + "CustomAttributeDefinitionEventDataObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "custom_attribute_definition": { + "$ref": "#/components/schemas/CustomAttributeDefinition", + "description": "The custom attribute definition.", + "nullable": true + } + } + }, "CustomAttributeDefinitionVisibility": { "type": "string", "enum": [ @@ -17476,6 +18937,39 @@ "description": "The level of permission that a seller or other applications requires to\nview this custom attribute definition.\nThe `Visibility` field controls who can read and write the custom attribute values\nand custom attribute definition.", "x-release-status": "PUBLIC" }, + "CustomAttributeEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "The type of the event data object. The value is `\"custom_attribute\"`.", + "maxLength": 50, + "nullable": true + }, + "id": { + "type": "string", + "description": "The ID of the event data object.", + "maxLength": 192 + }, + "object": { + "$ref": "#/components/schemas/CustomAttributeEventDataObject", + "description": "An object containing the custom attribute.", + "nullable": true + } + } + }, + "CustomAttributeEventDataObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "custom_attribute": { + "$ref": "#/components/schemas/CustomAttribute", + "description": "The custom attribute.", + "nullable": true + } + } + }, "CustomAttributeFilter": { "type": "object", "description": "Supported custom attribute query expressions for calling the\n[SearchCatalogItems](api-endpoint:Catalog-SearchCatalogItems)\nendpoint to search for items or item variations.", @@ -17656,6 +19150,154 @@ } } }, + "CustomerCreatedEvent": { + "type": "object", + "description": "Published when a [customer](entity:Customer) is created. Subscribe to this event to track customer profiles affected by a merge operation.\nFor more information, see [Use Customer Webhooks](https://developer.squareup.com/docs/customers-api/use-the-api/customer-webhooks).\n\nThe `customer` object in the event notification does not include the `segment_ids` field.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event. For this object, the value is `customer.created`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "The unique ID of the event, which is used for [idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices).", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomerCreatedEventData", + "description": "The data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2022-11-09T21:23:25Z", + "data": { + "id": "QPTXM8PQNX3Q726ZYHPMNP46XC", + "object": { + "customer": { + "address": { + "address_line_1": "1018 40th Street", + "administrative_district_level_1": "CA", + "locality": "Oakland", + "postal_code": "94608" + }, + "birthday": "1962-03-04", + "created_at": "2022-11-09T21:23:25.519Z", + "creation_source": "DIRECTORY", + "email_address": "jenkins+smorly@squareup.com", + "family_name": "Smorly", + "given_name": "Jenkins", + "group_ids": [ + "JGJCW9S0G68NE.APPOINTMENTS" + ], + "id": "QPTXM8PQNX3Q726ZYHPMNP46XC", + "phone_number": "+12126668929", + "preferences": { + "email_unsubscribed": false + }, + "updated_at": "2022-11-09T21:23:25Z", + "version": 0 + } + }, + "type": "customer" + }, + "event_id": "e12b5591-e0b6-4967-810a-307c7efcb1a7", + "merchant_id": "G7MMEBVW021Q4", + "type": "customer.created" + }, + "x-webhook": { + "event": "customer.created", + "scopes": [ + "CUSTOMERS_READ" + ] + }, + "x-api": "#/components/x-apis/Customers", + "x-since": "2021-02-26" + }, + "CustomerCreatedEventData": { + "type": "object", + "description": "The data associated with the event.", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "The type of object affected by the event. For this event, the value is `customer`.", + "maxLength": 50, + "nullable": true + }, + "id": { + "type": "string", + "description": "The ID of the new customer.", + "maxLength": 192 + }, + "object": { + "$ref": "#/components/schemas/CustomerCreatedEventObject", + "description": "An object that contains the new customer.", + "nullable": true + } + } + }, + "CustomerCreatedEventEventContext": { + "type": "object", + "description": "Information about the change that triggered the event.", + "x-release-status": "PUBLIC", + "properties": { + "merge": { + "$ref": "#/components/schemas/CustomerCreatedEventEventContextMerge", + "description": "Information about the merge operation associated with the event.", + "nullable": true + } + } + }, + "CustomerCreatedEventEventContextMerge": { + "type": "object", + "description": "Information about a merge operation, which creates a new customer using aggregated properties from two or more existing customers.", + "x-release-status": "PUBLIC", + "properties": { + "from_customer_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The IDs of the existing customers that were merged and then deleted.", + "nullable": true + }, + "to_customer_id": { + "type": "string", + "description": "The ID of the new customer created by the merge.", + "nullable": true + } + } + }, + "CustomerCreatedEventObject": { + "type": "object", + "description": "An object that contains the customer associated with the event.", + "x-release-status": "PUBLIC", + "properties": { + "customer": { + "$ref": "#/components/schemas/Customer", + "description": "The new customer.", + "nullable": true + }, + "event_context": { + "$ref": "#/components/schemas/CustomerCreatedEventEventContext", + "description": "Information about the change that triggered the event. This field is returned only if the customer is created by a merge operation.", + "nullable": true + } + } + }, "CustomerCreationSource": { "type": "string", "enum": [ @@ -17780,880 +19422,2018 @@ } } }, - "CustomerCustomAttributeFilter": { + "CustomerCustomAttributeDefinitionCreatedEvent": { "type": "object", - "description": "The custom attribute filter. Use this filter in a set of [custom attribute filters](entity:CustomerCustomAttributeFilters) to search\nbased on the value or last updated date of a customer-related [custom attribute](entity:CustomAttribute).", - "x-release-status": "PUBLIC", - "required": [ - "key" - ], + "description": "Published when a customer [custom attribute definition](entity:CustomAttributeDefinition) \nis created by the subscribing application.\n\nThis event is replaced by \n[customer.custom_attribute_definition.owned.created](webhook:customer.custom_attribute_definition.owned.created).", + "x-release-status": "DEPRECATED", "properties": { - "key": { + "merchant_id": { "type": "string", - "description": "The `key` of the [custom attribute](entity:CustomAttribute) to filter by. The key is the identifier of the custom attribute\n(and the corresponding custom attribute definition) and can be retrieved using the [Customer Custom Attributes API](api:CustomerCustomAttributes)." + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true }, - "filter": { - "$ref": "#/components/schemas/CustomerCustomAttributeFilterValue", - "description": "A filter that corresponds to the data type of the target custom attribute. For example, provide the `phone` filter to\nsearch based on the value of a `PhoneNumber`-type custom attribute. The data type is specified by the schema field of the custom attribute definition,\nwhich can be retrieved using the [Customer Custom Attributes API](api:CustomerCustomAttributes).\n\nYou must provide this `filter` field, the `updated_at` field, or both.", + "type": { + "type": "string", + "description": "The type of this event. The value is `\"customer.custom_attribute_definition.created\"`.", "nullable": true }, - "updated_at": { - "$ref": "#/components/schemas/TimeRange", - "description": "The date range for when the custom attribute was last updated. The date range can include `start_at`, `end_at`, or\nboth. Range boundaries are inclusive. Dates are specified as RFC 3339 timestamps.\n\nYou must provide this `updated_at` field, the `filter` field, or both." + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true } - } + }, + "example": { + "created_at": "2022-04-21T21:40:49.943Z", + "data": { + "id": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-drink", + "object": { + "created_at": "2022-04-21T21:40:49Z", + "description": "The customer's favorite drink", + "key": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-drink", + "name": "Favorite Drink", + "schema": { + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + }, + "updated_at": "2022-04-21T21:40:49Z", + "version": 1, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute_definition" + }, + "event_id": "347ab320-c0ba-48f5-959a-4e147b9aefcf", + "merchant_id": "DM7VKY8Q63GNP", + "type": "customer.custom_attribute_definition.created" + }, + "x-webhook": { + "event": "customer.custom_attribute_definition.created", + "scopes": [ + "CUSTOMERS_READ" + ] + }, + "x-api": "#/components/x-apis/CustomerCustomAttributes", + "x-since": "2022-05-12" }, - "CustomerCustomAttributeFilterValue": { + "CustomerCustomAttributeDefinitionCreatedPublicEvent": { "type": "object", - "description": "A type-specific filter used in a [custom attribute filter](entity:CustomerCustomAttributeFilter) to search based on the value \nof a customer-related [custom attribute](entity:CustomAttribute).", - "x-release-status": "PUBLIC", + "description": "Published when a customer [custom attribute definition](entity:CustomAttributeDefinition)\nthat is visible to all applications is created. A notification is sent when any application creates a custom\nattribute definition whose `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.\n\nThis event is replaced by \n[customer.custom_attribute_definition.visible.created](webhook:customer.custom_attribute_definition.visible.created),\nwhich applies to custom attribute definitions that are visible to the subscribing application.", + "x-release-status": "DEPRECATED", "properties": { - "email": { - "$ref": "#/components/schemas/CustomerTextFilter", - "description": "A filter for a query based on the value of an `Email`-type custom attribute. This filter is case-insensitive and can\ninclude `exact` or `fuzzy`, but not both.\n\nFor an `exact` match, provide the complete email address.\n\nFor a `fuzzy` match, provide a query expression containing one or more query tokens to match against the email address. Square removes\nany punctuation (including periods (.), underscores (_), and the @ symbol) and tokenizes the email addresses on spaces. A match is found\nif a tokenized email address contains all the tokens in the search query, irrespective of the token order. For example, `Steven gmail`\nmatches steven.jones@gmail.com and mygmail@stevensbakery.com.", + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", "nullable": true }, - "phone": { - "$ref": "#/components/schemas/CustomerTextFilter", - "description": "A filter for a query based on the value of a `PhoneNumber`-type custom attribute. This filter is case-insensitive and\ncan include `exact` or `fuzzy`, but not both.\n\nFor an `exact` match, provide the complete phone number. This is always an E.164-compliant phone number that starts\nwith the + sign followed by the country code and subscriber number. For example, the format for a US phone number is +12061112222.\n\nFor a `fuzzy` match, provide a query expression containing one or more query tokens to match against the phone number.\nSquare removes any punctuation and tokenizes the expression on spaces. A match is found if a tokenized phone number contains\nall the tokens in the search query, irrespective of the token order. For example, `415 123 45` is tokenized to `415`, `123`, and `45`,\nwhich matches +14151234567 and +12345674158, but does not match +1234156780. Similarly, the expression `415` matches\n+14151234567, +12345674158, and +1234156780.", + "type": { + "type": "string", + "description": "The type of this event. The value is `\"customer.custom_attribute_definition.public.created\"`.", "nullable": true }, - "text": { - "$ref": "#/components/schemas/CustomerTextFilter", - "description": "A filter for a query based on the value of a `String`-type custom attribute. This filter is case-insensitive and \ncan include `exact` or `fuzzy`, but not both.\n\nFor an `exact` match, provide the complete string.\n\nFor a `fuzzy` match, provide a query expression containing one or more query tokens in any order that contain complete words\nto match against the string. Square tokenizes the expression using a grammar-based tokenizer. For example, the expressions `quick brown`,\n`brown quick`, and `quick fox` match \"The quick brown fox jumps over the lazy dog\". However, `quick foxes` and `qui` do not match.", + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", "nullable": true }, - "selection": { - "$ref": "#/components/schemas/FilterValue", - "description": "A filter for a query based on the display name for a `Selection`-type custom attribute value. This filter is case-sensitive\nand can contain `any`, `all`, or both. The `none` condition is not supported.\n\nProvide the display name of each item that you want to search for. To find the display names for the selection, use the \n[Customer Custom Attributes API](api:CustomerCustomAttributes) to retrieve the corresponding custom attribute definition\nand then check the `schema.items.names` field. For more information, see\n[Search based on selection](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#custom-attribute-value-filter-selection).\n\nNote that when a `Selection`-type custom attribute is assigned to a customer profile, the custom attribute value is a list of one\nor more UUIDs (sourced from the `schema.items.enum` field) that map to the item names. These UUIDs are unique per seller.", + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event that triggered the event notification.", "nullable": true + } + }, + "example": { + "created_at": "2022-04-21T21:40:49.943Z", + "data": { + "id": "sq0idp-BushoY39o1X-GPxRRUWc0A:shirt-size", + "object": { + "created_at": "2022-04-21T21:40:49Z", + "description": "The customer's shirt size", + "key": "sq0idp-BushoY39o1X-GPxRRUWc0A:shirt-size", + "name": "Shirt Size", + "schema": { + "items": { + "enum": [ + "9492bdda-ab4d-4eeb-8496-0986c8f78499", + "6b96fba7-d8a5-ae72-48f4-8c3ee875633f", + "4032c1a2-d749-4c75-9c30-be6472cd2e08" + ], + "names": [ + "Small", + "Medium", + "Large" + ] + }, + "maxItems": 1, + "type": "array", + "uniqueItems": true + }, + "updated_at": "2022-04-21T21:40:49Z", + "version": 1, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute_definition" }, - "date": { - "$ref": "#/components/schemas/TimeRange", - "description": "A filter for a query based on the value of a `Date`-type custom attribute.\n\nProvide a date range for this filter using `start_at`, `end_at`, or both. Range boundaries are inclusive. Dates can be specified\nin `YYYY-MM-DD` format or as RFC 3339 timestamps.", + "event_id": "f679dc4f-3619-4764-a4de-94a54735cd32", + "merchant_id": "DM7VKY8Q63GNP", + "type": "customer.custom_attribute_definition.public.created" + }, + "x-webhook": { + "event": "customer.custom_attribute_definition.public.created", + "scopes": [ + "CUSTOMERS_READ" + ] + }, + "x-api": "#/components/x-apis/CustomerCustomAttributes", + "x-since": "2022-05-12" + }, + "CustomerCustomAttributeDefinitionDeletedEvent": { + "type": "object", + "description": "Published when a customer [custom attribute definition](entity:CustomAttributeDefinition)\ncreated by the subscribing application is deleted. A custom attribute definition can only be deleted by\nthe application that created it.\n\nThis event is replaced by \n[customer.custom_attribute_definition.owned.deleted](webhook:customer.custom_attribute_definition.owned.deleted).", + "x-release-status": "DEPRECATED", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", "nullable": true }, - "number": { - "$ref": "#/components/schemas/FloatNumberRange", - "description": "A filter for a query based on the value of a `Number`-type custom attribute, which can be an integer or a decimal with up to\n5 digits of precision.\n\nProvide a numerical range for this filter using `start_at`, `end_at`, or both. Range boundaries are inclusive. Numbers are specified\nas decimals or integers. The absolute value of range boundaries must not exceed `(2^63-1)/10^5`, or 92233720368547.", + "type": { + "type": "string", + "description": "The type of this event. The value is `\"customer.custom_attribute_definition.deleted\"`.", "nullable": true }, - "boolean": { - "type": "boolean", - "description": "A filter for a query based on the value of a `Boolean`-type custom attribute.", + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", "nullable": true }, - "address": { - "$ref": "#/components/schemas/CustomerAddressFilter", - "description": "A filter for a query based on the value of an `Address`-type custom attribute. The filter can include `postal_code`, `country`, or both.", + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event that triggered the event notification.", "nullable": true } - } - }, - "CustomerCustomAttributeFilters": { - "type": "object", - "description": "The custom attribute filters in a set of [customer filters](entity:CustomerFilter) used in a search query. Use this filter\nto search based on [custom attributes](entity:CustomAttribute) that are assigned to customer profiles. For more information, see\n[Search by custom attribute](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-custom-attribute).", - "x-release-status": "PUBLIC", - "properties": { - "filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomerCustomAttributeFilter" + }, + "example": { + "created_at": "2022-04-26T01:22:29Z", + "data": { + "deleted": true, + "id": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-drink", + "object": { + "created_at": "2022-04-21T21:40:49Z", + "description": "The customer's favorite drink", + "key": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-drink", + "name": "Favorite Drink", + "schema": { + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + }, + "updated_at": "2022-04-27T11:31:29Z", + "version": 3, + "visibility": "VISIBILITY_READ_ONLY" }, - "description": "The custom attribute filters. Each filter must specify `key` and include the `filter` field with a type-specific filter,\nthe `updated_at` field, or both. The provided keys must be unique within the list of custom attribute filters.", - "nullable": true - } - } + "type": "custom_attribute_definition" + }, + "event_id": "49363646-7ae7-49b5-aaa0-296610883c61", + "merchant_id": "DM7VKY8Q63GNP", + "type": "customer.custom_attribute_definition.deleted" + }, + "x-webhook": { + "event": "customer.custom_attribute_definition.deleted", + "scopes": [ + "CUSTOMERS_READ" + ] + }, + "x-api": "#/components/x-apis/CustomerCustomAttributes", + "x-since": "2022-05-12" }, - "CustomerDetails": { + "CustomerCustomAttributeDefinitionDeletedPublicEvent": { "type": "object", - "description": "Details about the customer making the payment.", - "x-release-status": "PUBLIC", + "description": "Published when a customer [custom attribute definition](entity:CustomAttributeDefinition)\nthat is visible to all applications is deleted. A notification is sent when any application deletes a custom\nattribute definition whose `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.\n\nThis event is replaced by \n[customer.custom_attribute_definition.visible.deleted](webhook:customer.custom_attribute_definition.visible.deleted),\nwhich applies to custom attribute definitions that are visible to the subscribing application.", + "x-release-status": "DEPRECATED", "properties": { - "customer_initiated": { - "type": "boolean", - "description": "Indicates whether the customer initiated the payment.", + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", "nullable": true }, - "seller_keyed_in": { - "type": "boolean", - "description": "Indicates that the seller keyed in payment details on behalf of the customer.\nThis is used to flag a payment as Mail Order / Telephone Order (MOTO).", + "type": { + "type": "string", + "description": "The type of this event. The value is `\"customer.custom_attribute_definition.public.deleted\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event that triggered the event notification.", "nullable": true } - } + }, + "example": { + "created_at": "2022-04-26T01:22:29Z", + "data": { + "deleted": true, + "id": "sq0idp-BushoY39o1X-GPxRRUWc0A:shirt-size", + "object": { + "created_at": "2022-04-21T21:40:49Z", + "description": "The customer's t-shirt size", + "key": "sq0idp-BushoY39o1X-GPxRRUWc0A:shirt-size", + "name": "T-Shirt Size", + "schema": { + "items": { + "enum": [ + "9492bdda-ab4d-4eeb-8496-0986c8f78499", + "6b96fba7-d8a5-ae72-48f4-8c3ee875633f", + "4032c1a2-d749-4c75-9c30-be6472cd2e08", + "89ca2c01-e4e3-43d6-b846-1495c4e8f97b", + "4f985a76-08fc-44b1-9ec4-b1904685c3a5" + ], + "names": [ + "Small", + "Medium", + "Large", + "Extra Large", + "Extra Small" + ] + }, + "maxItems": 1, + "type": "array", + "uniqueItems": true + }, + "updated_at": "2022-04-27T11:31:29Z", + "version": 3, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute_definition" + }, + "event_id": "81c10a07-c329-4943-af20-7d70a300c7e6", + "merchant_id": "DM7VKY8Q63GNP", + "type": "customer.custom_attribute_definition.public.deleted" + }, + "x-webhook": { + "event": "customer.custom_attribute_definition.public.deleted", + "scopes": [ + "CUSTOMERS_READ" + ] + }, + "x-api": "#/components/x-apis/CustomerCustomAttributes", + "x-since": "2022-05-12" }, - "CustomerFilter": { + "CustomerCustomAttributeDefinitionOwnedCreatedEvent": { "type": "object", - "description": "Represents the filtering criteria in a [search query](entity:CustomerQuery) that defines how to filter\ncustomer profiles returned in [SearchCustomers](api-endpoint:Customers-SearchCustomers) results.", + "description": "Published when a customer [custom attribute definition](entity:CustomAttributeDefinition) \nis created by the subscribing application.", "x-release-status": "PUBLIC", "properties": { - "creation_source": { - "$ref": "#/components/schemas/CustomerCreationSourceFilter", - "description": "A filter to select customers based on their creation source.", + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", "nullable": true }, - "created_at": { - "$ref": "#/components/schemas/TimeRange", - "description": "A filter to select customers based on when they were created." - }, - "updated_at": { - "$ref": "#/components/schemas/TimeRange", - "description": "A filter to select customers based on when they were last updated." + "type": { + "type": "string", + "description": "The type of this event. The value is `\"customer.custom_attribute_definition.owned.created\"`.", + "nullable": true }, - "email_address": { - "$ref": "#/components/schemas/CustomerTextFilter", - "description": "A filter to [select customers by their email address](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-email-address) \nvisible to the seller. \nThis filter is case-insensitive.\n\nFor [exact matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#exact-search-by-email-address), this\nfilter causes the search to return customer profiles \nwhose `email_address` field value are identical to the email address provided\nin the query.\n\nFor [fuzzy matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#fuzzy-search-by-email-address), \nthis filter causes the search to return customer profiles \nwhose `email_address` field value has a token-wise partial match against the filtering \nexpression in the query. For example, with `Steven gmail` provided in a search\nquery, the search returns customers whose email address is `steven.johnson@gmail.com` \nor `mygmail@stevensbakery.com`. Square removes any punctuation (including periods (.),\nunderscores (_), and the @ symbol) and tokenizes the email addresses on spaces. A match is\nfound if a tokenized email address contains all the tokens in the search query, \nirrespective of the token order.", + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", "nullable": true }, - "phone_number": { - "$ref": "#/components/schemas/CustomerTextFilter", - "description": "A filter to [select customers by their phone numbers](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-phone-number)\nvisible to the seller.\n\nFor [exact matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#exact-search-by-phone-number),\nthis filter returns customers whose phone number matches the specified query expression. The number in the query must be of an\nE.164-compliant form. In particular, it must include the leading `+` sign followed by a country code and then a subscriber number.\nFor example, the standard E.164 form of a US phone number is `+12062223333` and an E.164-compliant variation is `+1 (206) 222-3333`.\nTo match the query expression, stored customer phone numbers are converted to the standard E.164 form.\n\nFor [fuzzy matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#fuzzy-search-by-phone-number),\nthis filter returns customers whose phone number matches the token or tokens provided in the query expression. For example, with `415`\nprovided in a search query, the search returns customers with the phone numbers `+1-415-212-1200`, `+1-212-415-1234`, and `+1 (551) 234-1567`.\nSimilarly, a search query of `415 123` returns customers with the phone numbers `+1-212-415-1234` and `+1 (551) 234-1567` but not\n`+1-212-415-1200`. A match is found if a tokenized phone number contains all the tokens in the search query, irrespective of the token order.", + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event that triggered the event notification.", "nullable": true + } + }, + "example": { + "created_at": "2022-04-21T21:40:49.943Z", + "data": { + "id": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-drink", + "object": { + "created_at": "2022-04-21T21:40:49Z", + "description": "The customer's favorite drink", + "key": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-drink", + "name": "Favorite Drink", + "schema": { + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + }, + "updated_at": "2022-04-21T21:40:49Z", + "version": 1, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute_definition" }, - "reference_id": { - "$ref": "#/components/schemas/CustomerTextFilter", - "description": "A filter to [select customers by their reference IDs](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-reference-id).\nThis filter is case-insensitive.\n\n[Exact matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#exact-search-by-reference-id) \nof a customer's reference ID against a query's reference ID is evaluated as an\nexact match between two strings, character by character in the given order.\n\n[Fuzzy matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#fuzzy-search-by-reference-id) \nof stored reference IDs against queried reference IDs works \nexactly the same as fuzzy matching on email addresses. Non-alphanumeric characters \nare replaced by spaces to tokenize stored and queried reference IDs. A match is found\nif a tokenized stored reference ID contains all tokens specified in any order in the query. For example,\na query of `NYC M` matches customer profiles with the `reference_id` value of `NYC_M_35_JOHNSON`\nand `NYC_27_MURRAY`.", + "event_id": "347ab320-c0ba-48f5-959a-4e147b9aefcf", + "merchant_id": "DM7VKY8Q63GNP", + "type": "customer.custom_attribute_definition.owned.created" + }, + "x-webhook": { + "event": "customer.custom_attribute_definition.owned.created", + "scopes": [ + "CUSTOMERS_READ" + ] + }, + "x-api": "#/components/x-apis/CustomerCustomAttributes", + "x-since": "2022-08-17" + }, + "CustomerCustomAttributeDefinitionOwnedDeletedEvent": { + "type": "object", + "description": "Published when a customer [custom attribute definition](entity:CustomAttributeDefinition)\ncreated by the subscribing application is deleted. A custom attribute definition can only be deleted by\nthe application that created it.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", "nullable": true }, - "group_ids": { - "$ref": "#/components/schemas/FilterValue", - "description": "A filter to select customers based on the [groups](entity:CustomerGroup) they belong to.\nGroup membership is controlled by sellers and developers.\n\nThe `group_ids` filter has the following syntax:\n```\n\"group_ids\": {\n\"any\": [\"{group_a_id}\", \"{group_b_id}\", ...],\n\"all\": [\"{group_1_id}\", \"{group_2_id}\", ...],\n\"none\": [\"{group_i_id}\", \"{group_ii_id}\", ...]\n}\n```\n\nYou can use any combination of the `any`, `all`, and `none` fields in the filter.\nWith `any`, the search returns customers in groups `a` or `b` or any other group specified in the list.\nWith `all`, the search returns customers in groups `1` and `2` and all other groups specified in the list.\nWith `none`, the search returns customers not in groups `i` or `ii` or any other group specified in the list.\n\nIf any of the search conditions are not met, including when an invalid or non-existent group ID is provided,\nthe result is an empty object (`{}`).", + "type": { + "type": "string", + "description": "The type of this event. The value is `\"customer.custom_attribute_definition.owned.deleted\"`.", "nullable": true }, - "custom_attribute": { - "$ref": "#/components/schemas/CustomerCustomAttributeFilters", - "description": "A filter to select customers based on one or more custom attributes. \nThis filter can contain up to 10 custom attribute filters. Each custom attribute filter specifies filtering criteria for a target custom\nattribute. If multiple custom attribute filters are provided, they are combined as an `AND` operation.\n\nTo be valid for a search, the custom attributes must be visible to the requesting application. For more information, including example queries,\nsee [Search by custom attribute](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-custom-attribute).\n\nSquare returns matching customer profiles, which do not contain custom attributes. To retrieve customer-related custom attributes,\nuse the [Customer Custom Attributes API](api:CustomerCustomAttributes). For example, you can call\n[RetrieveCustomerCustomAttribute](api-endpoint:CustomerCustomAttributes-RetrieveCustomerCustomAttribute) using a customer ID from the result set.", + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", "nullable": true }, - "segment_ids": { - "$ref": "#/components/schemas/FilterValue", - "description": " A filter to select customers based on the [segments](entity:CustomerSegment) they belong to.\nSegment membership is dynamic and adjusts automatically based on whether customers meet the segment criteria.\n\nYou can provide up to three segment IDs in the filter, using any combination of the `all`, `any`, and `none` fields.\nFor the following example, the results include customers who belong to both segment A and segment B but do not belong to segment C.\n\n```\n\"segment_ids\": {\n\"all\": [\"{segment_A_id}\", \"{segment_B_id}\"],\n\"none\": [\"{segment_C_id}\"]\n}\n```\n\nIf an invalid or non-existent segment ID is provided in the filter, Square stops processing the request\nand returns a `400 BAD_REQUEST` error that includes the segment ID.", + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event that triggered the event notification.", "nullable": true } - } + }, + "example": { + "created_at": "2022-04-26T01:22:29Z", + "data": { + "deleted": true, + "id": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-drink", + "object": { + "created_at": "2022-04-21T21:40:49Z", + "description": "The customer's favorite drink", + "key": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-drink", + "name": "Favorite Drink", + "schema": { + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + }, + "updated_at": "2022-04-27T11:31:29Z", + "version": 3, + "visibility": "VISIBILITY_READ_ONLY" + }, + "type": "custom_attribute_definition" + }, + "event_id": "49363646-7ae7-49b5-aaa0-296610883c61", + "merchant_id": "DM7VKY8Q63GNP", + "type": "customer.custom_attribute_definition.owned.deleted" + }, + "x-webhook": { + "event": "customer.custom_attribute_definition.owned.deleted", + "scopes": [ + "CUSTOMERS_READ" + ] + }, + "x-api": "#/components/x-apis/CustomerCustomAttributes", + "x-since": "2022-08-17" }, - "CustomerGroup": { + "CustomerCustomAttributeDefinitionOwnedUpdatedEvent": { "type": "object", - "description": "Represents a group of customer profiles. \n\nCustomer groups can be created, be modified, and have their membership defined using \nthe Customers API or within the Customer Directory in the Square Seller Dashboard or Point of Sale.", + "description": "Published when a customer [custom attribute definition](entity:CustomAttributeDefinition)\ncreated by the subscribing application is updated. A custom attribute definition can only be updated by\nthe application that created it.", "x-release-status": "PUBLIC", - "required": [ - "name" - ], "properties": { - "id": { + "merchant_id": { "type": "string", - "description": "A unique Square-generated ID for the customer group.", - "maxLength": 255, - "readOnly": true + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true }, - "name": { + "type": { "type": "string", - "description": "The name of the customer group." + "description": "The type of this event. The value is `\"customer.custom_attribute_definition.owned.updated\"`.", + "nullable": true }, - "created_at": { + "event_id": { "type": "string", - "description": "The timestamp when the customer group was created, in RFC 3339 format.", - "readOnly": true + "description": "A unique ID for the event notification.", + "nullable": true }, - "updated_at": { + "created_at": { "type": "string", - "description": "The timestamp when the customer group was last updated, in RFC 3339 format.", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true } - } - }, - "CustomerInclusionExclusion": { - "type": "string", - "enum": [ - "INCLUDE", - "EXCLUDE" - ], - "x-enum-elements": [ - { - "name": "INCLUDE", - "description": "Customers should be included in the result set when they match the\nfiltering criteria." + }, + "example": { + "created_at": "2022-04-26T01:22:29Z", + "data": { + "id": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-drink", + "object": { + "created_at": "2022-04-21T21:57:39Z", + "description": "The customer's favorite drink", + "key": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-drink", + "name": "Favorite Drink", + "schema": { + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + }, + "updated_at": "2022-04-26T01:22:29Z", + "version": 2, + "visibility": "VISIBILITY_READ_ONLY" + }, + "type": "custom_attribute_definition" }, - { - "name": "EXCLUDE", - "description": "Customers should be excluded from the result set when they match\nthe filtering criteria." - } - ], - "description": "Indicates whether customers should be included in, or excluded from,\nthe result set when they match the filtering criteria.", - "x-release-status": "PUBLIC" + "event_id": "d914e6ef-9e37-4bca-a663-ecc55f5d98d3", + "merchant_id": "DM7VKY8Q63GNP", + "type": "customer.custom_attribute_definition.owned.updated" + }, + "x-webhook": { + "event": "customer.custom_attribute_definition.owned.updated", + "scopes": [ + "CUSTOMERS_READ" + ] + }, + "x-api": "#/components/x-apis/CustomerCustomAttributes", + "x-since": "2022-08-17" }, - "CustomerPreferences": { + "CustomerCustomAttributeDefinitionUpdatedEvent": { "type": "object", - "description": "Represents communication preferences for the customer profile.", - "x-release-status": "PUBLIC", + "description": "Published when a customer [custom attribute definition](entity:CustomAttributeDefinition)\ncreated by the subscribing application is updated. A custom attribute definition can only be updated by\nthe application that created it.\n\nThis event is replaced by \n[customer.custom_attribute_definition.owned.updated](webhook:customer.custom_attribute_definition.owned.updated).", + "x-release-status": "DEPRECATED", "properties": { - "email_unsubscribed": { - "type": "boolean", - "description": "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.", + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"customer.custom_attribute_definition.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event that triggered the event notification.", "nullable": true } - } + }, + "example": { + "created_at": "2022-04-26T01:22:29Z", + "data": { + "id": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-drink", + "object": { + "created_at": "2022-04-21T21:57:39Z", + "description": "The customer's favorite drink", + "key": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-drink", + "name": "Favorite Drink", + "schema": { + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + }, + "updated_at": "2022-04-26T01:22:29Z", + "version": 2, + "visibility": "VISIBILITY_READ_ONLY" + }, + "type": "custom_attribute_definition" + }, + "event_id": "d914e6ef-9e37-4bca-a663-ecc55f5d98d3", + "merchant_id": "DM7VKY8Q63GNP", + "type": "customer.custom_attribute_definition.updated" + }, + "x-webhook": { + "event": "customer.custom_attribute_definition.updated", + "scopes": [ + "CUSTOMERS_READ" + ] + }, + "x-api": "#/components/x-apis/CustomerCustomAttributes", + "x-since": "2022-05-12" }, - "CustomerQuery": { + "CustomerCustomAttributeDefinitionUpdatedPublicEvent": { "type": "object", - "description": "Represents filtering and sorting criteria for a [SearchCustomers](api-endpoint:Customers-SearchCustomers) request.", - "x-release-status": "PUBLIC", + "description": "Published when a customer [custom attribute definition](entity:CustomAttributeDefinition)\nthat is visible to all applications is updated. A notification is sent when any application updates a custom\nattribute definition whose `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.\n\nThis event is replaced by \n[customer.custom_attribute_definition.visible.updated](webhook:customer.custom_attribute_definition.visible.updated),\nwhich applies to custom attribute definitions that are visible to the subscribing application.", + "x-release-status": "DEPRECATED", "properties": { - "filter": { - "$ref": "#/components/schemas/CustomerFilter", - "description": "The filtering criteria for the search query. A query can contain multiple filters in any combination.\nMultiple filters are combined as `AND` statements.\n\n__Note:__ Combining multiple filters as `OR` statements is not supported. Instead, send multiple single-filter\nsearches and join the result sets.", + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", "nullable": true }, - "sort": { - "$ref": "#/components/schemas/CustomerSort", - "description": "Sorting criteria for query results. The default behavior is to sort \ncustomers alphabetically by `given_name` and `family_name`.", + "type": { + "type": "string", + "description": "The type of this event. The value is `\"customer.custom_attribute_definition.public.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event that triggered the event notification.", "nullable": true } - } + }, + "example": { + "created_at": "2022-04-26T01:22:29Z", + "data": { + "id": "sq0idp-BushoY39o1X-GPxRRUWc0A:shirt-size", + "object": { + "created_at": "2022-04-21T21:57:39Z", + "description": "The customer's t-shirt size", + "key": "sq0idp-BushoY39o1X-GPxRRUWc0A:shirt-size", + "name": "T-Shirt Size", + "schema": { + "items": { + "enum": [ + "9492bdda-ab4d-4eeb-8496-0986c8f78499", + "6b96fba7-d8a5-ae72-48f4-8c3ee875633f", + "4032c1a2-d749-4c75-9c30-be6472cd2e08", + "89ca2c01-e4e3-43d6-b846-1495c4e8f97b", + "4f985a76-08fc-44b1-9ec4-b1904685c3a5" + ], + "names": [ + "Small", + "Medium", + "Large", + "Extra Large", + "Extra Small" + ] + }, + "maxItems": 1, + "type": "array", + "uniqueItems": true + }, + "updated_at": "2022-04-26T01:22:29Z", + "version": 2, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute_definition" + }, + "event_id": "ae376c21-d360-4694-96c7-1b27830f07d7", + "merchant_id": "DM7VKY8Q63GNP", + "type": "customer.custom_attribute_definition.public.updated" + }, + "x-webhook": { + "event": "customer.custom_attribute_definition.public.updated", + "scopes": [ + "CUSTOMERS_READ" + ] + }, + "x-api": "#/components/x-apis/CustomerCustomAttributes", + "x-since": "2022-05-12" }, - "CustomerSegment": { + "CustomerCustomAttributeDefinitionVisibleCreatedEvent": { "type": "object", - "description": "Represents a group of customer profiles that match one or more predefined filter criteria. \n\nSegments (also known as Smart Groups) are defined and created within the Customer Directory in the\nSquare Seller Dashboard or Point of Sale.", + "description": "Published when a customer [custom attribute definition](entity:CustomAttributeDefinition)\nthat is visible to the subscribing application is created. A notification is sent when your application\ncreates a custom attribute definition or another application creates a custom attribute definition whose\n`visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "PUBLIC", - "required": [ - "name" - ], "properties": { - "id": { + "merchant_id": { "type": "string", - "description": "A unique Square-generated ID for the segment.", - "maxLength": 255, - "readOnly": true + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true }, - "name": { + "type": { "type": "string", - "description": "The name of the segment.", - "readOnly": true + "description": "The type of this event. The value is `\"customer.custom_attribute_definition.visible.created\"`.", + "nullable": true }, - "created_at": { + "event_id": { "type": "string", - "description": "The timestamp when the segment was created, in RFC 3339 format.", - "readOnly": true + "description": "A unique ID for the event notification.", + "nullable": true }, - "updated_at": { + "created_at": { "type": "string", - "description": "The timestamp when the segment was last updated, in RFC 3339 format.", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true } - } + }, + "example": { + "created_at": "2022-04-21T21:40:49.943Z", + "data": { + "id": "sq0idp-BushoY39o1X-GPxRRUWc0A:shirt-size", + "object": { + "created_at": "2022-04-21T21:40:49Z", + "description": "The customer's shirt size", + "key": "sq0idp-BushoY39o1X-GPxRRUWc0A:shirt-size", + "name": "Shirt Size", + "schema": { + "items": { + "enum": [ + "9492bdda-ab4d-4eeb-8496-0986c8f78499", + "6b96fba7-d8a5-ae72-48f4-8c3ee875633f", + "4032c1a2-d749-4c75-9c30-be6472cd2e08" + ], + "names": [ + "Small", + "Medium", + "Large" + ] + }, + "maxItems": 1, + "type": "array", + "uniqueItems": true + }, + "updated_at": "2022-04-21T21:40:49Z", + "version": 1, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute_definition" + }, + "event_id": "f679dc4f-3619-4764-a4de-94a54735cd32", + "merchant_id": "DM7VKY8Q63GNP", + "type": "customer.custom_attribute_definition.visible.created" + }, + "x-webhook": { + "event": "customer.custom_attribute_definition.visible.created", + "scopes": [ + "CUSTOMERS_READ" + ] + }, + "x-api": "#/components/x-apis/CustomerCustomAttributes", + "x-since": "2022-08-17" }, - "CustomerSort": { + "CustomerCustomAttributeDefinitionVisibleDeletedEvent": { "type": "object", - "description": "Represents the sorting criteria in a [search query](entity:CustomerQuery) that defines how to sort\ncustomer profiles returned in [SearchCustomers](api-endpoint:Customers-SearchCustomers) results.", + "description": "Published when a customer [custom attribute definition](entity:CustomAttributeDefinition)\nthat is visible to the subscribing application is deleted. A custom attribute definition can only be deleted\nby the application that created it. A notification is sent when your application deletes a custom attribute\ndefinition or when another application deletes a custom attribute definition whose `visibility` is\n`VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "PUBLIC", "properties": { - "field": { - "$ref": "#/components/schemas/CustomerSortField", - "description": "Indicates the fields to use as the sort key, which is either the default set of fields or `created_at`.\n\nThe default value is `DEFAULT`.\nSee [CustomerSortField](#type-customersortfield) for possible values", + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", "nullable": true }, - "order": { - "$ref": "#/components/schemas/SortOrder", - "description": "Indicates the order in which results should be sorted based on the\nsort field value. Strings use standard alphabetic comparison\nto determine order. Strings representing numbers are sorted as strings.\n\nThe default value is `ASC`.\nSee [SortOrder](#type-sortorder) for possible values", + "type": { + "type": "string", + "description": "The type of this event. The value is `\"customer.custom_attribute_definition.visible.deleted\"`.", "nullable": true - } - } - }, - "CustomerSortField": { - "type": "string", - "enum": [ - "DEFAULT", - "CREATED_AT" - ], - "x-enum-elements": [ - { - "name": "DEFAULT", - "description": "Use the default sort key. By default, customers are sorted\nalphanumerically by concatenating their `given_name` and `family_name`. If\nneither name field is set, string comparison is performed using one of the\nremaining fields in the following order: `company_name`, `email`,\n`phone_number`." }, - { - "name": "CREATED_AT", - "description": "Use the creation date attribute (`created_at`) of customer profiles as the sort key." + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true } - ], - "description": "Specifies customer attributes as the sort key to customer profiles returned from a search.", - "x-release-status": "PUBLIC" + }, + "example": { + "created_at": "2022-04-26T01:22:29Z", + "data": { + "deleted": true, + "id": "sq0idp-BushoY39o1X-GPxRRUWc0A:shirt-size", + "object": { + "created_at": "2022-04-21T21:40:49Z", + "description": "The customer's t-shirt size", + "key": "sq0idp-BushoY39o1X-GPxRRUWc0A:shirt-size", + "name": "T-Shirt Size", + "schema": { + "items": { + "enum": [ + "9492bdda-ab4d-4eeb-8496-0986c8f78499", + "6b96fba7-d8a5-ae72-48f4-8c3ee875633f", + "4032c1a2-d749-4c75-9c30-be6472cd2e08", + "89ca2c01-e4e3-43d6-b846-1495c4e8f97b", + "4f985a76-08fc-44b1-9ec4-b1904685c3a5" + ], + "names": [ + "Small", + "Medium", + "Large", + "Extra Large", + "Extra Small" + ] + }, + "maxItems": 1, + "type": "array", + "uniqueItems": true + }, + "updated_at": "2022-04-27T11:31:29Z", + "version": 3, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute_definition" + }, + "event_id": "81c10a07-c329-4943-af20-7d70a300c7e6", + "merchant_id": "DM7VKY8Q63GNP", + "type": "customer.custom_attribute_definition.visible.deleted" + }, + "x-webhook": { + "event": "customer.custom_attribute_definition.visible.deleted", + "scopes": [ + "CUSTOMERS_READ" + ] + }, + "x-api": "#/components/x-apis/CustomerCustomAttributes", + "x-since": "2022-08-17" }, - "CustomerTaxIds": { + "CustomerCustomAttributeDefinitionVisibleUpdatedEvent": { "type": "object", - "description": "Represents the tax ID associated with a [customer profile](entity:Customer). The corresponding `tax_ids` field is available only for customers of sellers in EU countries or the United Kingdom. \nFor more information, see [Customer tax IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids).", + "description": "Published when a customer [custom attribute definition](entity:CustomAttributeDefinition)\nthat is visible to the subscribing application is updated. A custom attribute definition can only be updated\nby the application that created it. A notification is sent when your application updates a custom\nattribute definition or when another application updates a custom attribute definition whose `visibility` is\n`VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.", "x-release-status": "PUBLIC", "properties": { - "eu_vat": { + "merchant_id": { "type": "string", - "description": "The EU VAT identification number for the customer. For example, `IE3426675K`. The ID can contain alphanumeric characters only.", - "maxLength": 20, + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"customer.custom_attribute_definition.visible.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event that triggered the event notification.", "nullable": true } - } + }, + "example": { + "created_at": "2022-04-26T01:22:29Z", + "data": { + "id": "sq0idp-BushoY39o1X-GPxRRUWc0A:shirt-size", + "object": { + "created_at": "2022-04-21T21:57:39Z", + "description": "The customer's t-shirt size", + "key": "sq0idp-BushoY39o1X-GPxRRUWc0A:shirt-size", + "name": "T-Shirt Size", + "schema": { + "items": { + "enum": [ + "9492bdda-ab4d-4eeb-8496-0986c8f78499", + "6b96fba7-d8a5-ae72-48f4-8c3ee875633f", + "4032c1a2-d749-4c75-9c30-be6472cd2e08", + "89ca2c01-e4e3-43d6-b846-1495c4e8f97b", + "4f985a76-08fc-44b1-9ec4-b1904685c3a5" + ], + "names": [ + "Small", + "Medium", + "Large", + "Extra Large", + "Extra Small" + ] + }, + "maxItems": 1, + "type": "array", + "uniqueItems": true + }, + "updated_at": "2022-04-26T01:22:29Z", + "version": 2, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute_definition" + }, + "event_id": "ae376c21-d360-4694-96c7-1b27830f07d7", + "merchant_id": "DM7VKY8Q63GNP", + "type": "customer.custom_attribute_definition.visible.updated" + }, + "x-webhook": { + "event": "customer.custom_attribute_definition.visible.updated", + "scopes": [ + "CUSTOMERS_READ" + ] + }, + "x-api": "#/components/x-apis/CustomerCustomAttributes", + "x-since": "2022-08-17" }, - "CustomerTextFilter": { + "CustomerCustomAttributeDeletedEvent": { "type": "object", - "description": "A filter to select customers based on exact or fuzzy matching of\ncustomer attributes against a specified query. Depending on the customer attributes, \nthe filter can be case-sensitive. This filter can be exact or fuzzy, but it cannot be both.", - "x-release-status": "PUBLIC", + "description": "Published when a customer [custom attribute](entity:CustomAttribute) owned by the\nsubscribing application is deleted. Custom attributes are owned by the application that created the\ncorresponding [custom attribute definition](entity:CustomAttributeDefinition). Custom attributes whose\n`visibility` is `VISIBILITY_READ_WRITE_VALUES` can be deleted by any application.\n\nThis event is replaced by \n[customer.custom_attribute.owned.deleted](webhook:customer.custom_attribute.owned.deleted).", + "x-release-status": "DEPRECATED", "properties": { - "exact": { + "merchant_id": { "type": "string", - "description": "Use the exact filter to select customers whose attributes match exactly the specified query.", + "description": "The ID of the seller associated with the event that triggered the event notification.", "nullable": true }, - "fuzzy": { + "type": { "type": "string", - "description": "Use the fuzzy filter to select customers whose attributes match the specified query \nin a fuzzy manner. When the fuzzy option is used, search queries are tokenized, and then \neach query token must be matched somewhere in the searched attribute. For single token queries, \nthis is effectively the same behavior as a partial match operation.", + "description": "The type of this event. The value is `\"customer.custom_attribute.deleted\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeEventData", + "description": "The data associated with the event that triggered the event notification.", "nullable": true } - } + }, + "example": { + "created_at": "2022-04-26T01:22:29Z", + "data": { + "deleted": true, + "id": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-drink:CUSTOMER:TNQC0TYTWMRSFFQ157KK4V7MVR", + "object": { + "created_at": "2022-04-21T21:58:59Z", + "key": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-drink", + "updated_at": "2022-04-27T11:31:29Z", + "value": "Medium coffee, 2 sugars", + "version": 3, + "visibility": "VISIBILITY_READ_ONLY" + }, + "type": "custom_attribute" + }, + "event_id": "f57b27d4-a4d6-43de-9e58-bc6ff90525f1", + "merchant_id": "DM7VKY8Q63GNP", + "type": "customer.custom_attribute.deleted" + }, + "x-webhook": { + "event": "customer.custom_attribute.deleted", + "scopes": [ + "CUSTOMERS_READ" + ] + }, + "x-api": "#/components/x-apis/CustomerCustomAttributes", + "x-since": "2022-05-12" }, - "DataCollectionOptions": { + "CustomerCustomAttributeDeletedPublicEvent": { "type": "object", - "x-release-status": "BETA", - "required": [ - "title", - "body", - "input_type" - ], + "description": "Published when a customer [custom attribute](entity:CustomAttribute) that is visible\nto all applications is deleted. A notification is sent when any application deletes a custom attribute\nwhose `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.\n\nThis event is replaced by \n[customer.custom_attribute.visible.deleted](webhook:customer.custom_attribute.visible.deleted),\nwhich applies to custom attributes that are visible to the subscribing application.", + "x-release-status": "DEPRECATED", "properties": { - "title": { + "merchant_id": { "type": "string", - "description": "The title text to display in the data collection flow on the Terminal.", - "minLength": 1, - "maxLength": 250 + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true }, - "body": { + "type": { "type": "string", - "description": "The body text to display under the title in the data collection screen flow on the\nTerminal.", - "minLength": 1, - "maxLength": 10000 + "description": "The type of this event. The value is `\"customer.custom_attribute.public.deleted\"`.", + "nullable": true }, - "input_type": { - "$ref": "#/components/schemas/DataCollectionOptionsInputType", - "description": "Represents the type of the input text.\nSee [InputType](#type-inputtype) for possible values" + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true }, - "collected_data": { - "$ref": "#/components/schemas/CollectedData", - "description": "The buyer’s input text from the data collection screen.", + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", "readOnly": true - } - } - }, - "DataCollectionOptionsInputType": { - "type": "string", - "enum": [ - "EMAIL", - "PHONE_NUMBER" - ], - "x-enum-elements": [ - { - "name": "EMAIL", - "description": "This value is used to represent an input text that contains a email validation on the\nclient." }, - { - "name": "PHONE_NUMBER", - "description": "This value is used to represent an input text that contains a phone number validation on\nthe client." + "data": { + "$ref": "#/components/schemas/CustomAttributeEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true } - ], - "description": "Describes the input type of the data.", - "x-release-status": "BETA" + }, + "example": { + "created_at": "2022-04-26T01:22:29Z", + "data": { + "deleted": true, + "id": "sq0idp-BushoY39o1X-GPxRRUWc0A:shirt-size:CUSTOMER:TNQC0TYTWMRSFFQ157KK4V7MVR", + "object": { + "created_at": "2022-04-21T21:58:59Z", + "key": "sq0idp-BushoY39o1X-GPxRRUWc0A:shirt-size", + "updated_at": "2022-04-27T11:31:29Z", + "value": [ + "4032c1a2-d749-4c75-9c30-be6472cd2e08" + ], + "version": 3, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute" + }, + "event_id": "18ef5adc-2efc-4ad9-9b1a-b274a607da3e", + "merchant_id": "DM7VKY8Q63GNP", + "type": "customer.custom_attribute.public.deleted" + }, + "x-webhook": { + "event": "customer.custom_attribute.public.deleted", + "scopes": [ + "CUSTOMERS_READ" + ] + }, + "x-api": "#/components/x-apis/CustomerCustomAttributes", + "x-since": "2022-05-12" }, - "DateRange": { + "CustomerCustomAttributeFilter": { "type": "object", - "description": "A range defined by two dates. Used for filtering a query for Connect v2\nobjects that have date properties.", + "description": "The custom attribute filter. Use this filter in a set of [custom attribute filters](entity:CustomerCustomAttributeFilters) to search\nbased on the value or last updated date of a customer-related [custom attribute](entity:CustomAttribute).", "x-release-status": "PUBLIC", + "required": [ + "key" + ], "properties": { - "start_date": { + "key": { "type": "string", - "description": "A string in `YYYY-MM-DD` format, such as `2017-10-31`, per the ISO 8601\nextended format for calendar dates.\nThe beginning of a date range (inclusive).", - "nullable": true + "description": "The `key` of the [custom attribute](entity:CustomAttribute) to filter by. The key is the identifier of the custom attribute\n(and the corresponding custom attribute definition) and can be retrieved using the [Customer Custom Attributes API](api:CustomerCustomAttributes)." }, - "end_date": { - "type": "string", - "description": "A string in `YYYY-MM-DD` format, such as `2017-10-31`, per the ISO 8601\nextended format for calendar dates.\nThe end of a date range (inclusive).", + "filter": { + "$ref": "#/components/schemas/CustomerCustomAttributeFilterValue", + "description": "A filter that corresponds to the data type of the target custom attribute. For example, provide the `phone` filter to\nsearch based on the value of a `PhoneNumber`-type custom attribute. The data type is specified by the schema field of the custom attribute definition,\nwhich can be retrieved using the [Customer Custom Attributes API](api:CustomerCustomAttributes).\n\nYou must provide this `filter` field, the `updated_at` field, or both.", "nullable": true + }, + "updated_at": { + "$ref": "#/components/schemas/TimeRange", + "description": "The date range for when the custom attribute was last updated. The date range can include `start_at`, `end_at`, or\nboth. Range boundaries are inclusive. Dates are specified as RFC 3339 timestamps.\n\nYou must provide this `updated_at` field, the `filter` field, or both." } } }, - "DayOfWeek": { - "type": "string", - "enum": [ - "SUN", - "MON", - "TUE", - "WED", - "THU", - "FRI", - "SAT" - ], - "x-enum-elements": [ - { - "name": "SUN", - "description": "Sunday" + "CustomerCustomAttributeFilterValue": { + "type": "object", + "description": "A type-specific filter used in a [custom attribute filter](entity:CustomerCustomAttributeFilter) to search based on the value \nof a customer-related [custom attribute](entity:CustomAttribute).", + "x-release-status": "PUBLIC", + "properties": { + "email": { + "$ref": "#/components/schemas/CustomerTextFilter", + "description": "A filter for a query based on the value of an `Email`-type custom attribute. This filter is case-insensitive and can\ninclude `exact` or `fuzzy`, but not both.\n\nFor an `exact` match, provide the complete email address.\n\nFor a `fuzzy` match, provide a query expression containing one or more query tokens to match against the email address. Square removes\nany punctuation (including periods (.), underscores (_), and the @ symbol) and tokenizes the email addresses on spaces. A match is found\nif a tokenized email address contains all the tokens in the search query, irrespective of the token order. For example, `Steven gmail`\nmatches steven.jones@gmail.com and mygmail@stevensbakery.com.", + "nullable": true }, - { - "name": "MON", - "description": "Monday" + "phone": { + "$ref": "#/components/schemas/CustomerTextFilter", + "description": "A filter for a query based on the value of a `PhoneNumber`-type custom attribute. This filter is case-insensitive and\ncan include `exact` or `fuzzy`, but not both.\n\nFor an `exact` match, provide the complete phone number. This is always an E.164-compliant phone number that starts\nwith the + sign followed by the country code and subscriber number. For example, the format for a US phone number is +12061112222.\n\nFor a `fuzzy` match, provide a query expression containing one or more query tokens to match against the phone number.\nSquare removes any punctuation and tokenizes the expression on spaces. A match is found if a tokenized phone number contains\nall the tokens in the search query, irrespective of the token order. For example, `415 123 45` is tokenized to `415`, `123`, and `45`,\nwhich matches +14151234567 and +12345674158, but does not match +1234156780. Similarly, the expression `415` matches\n+14151234567, +12345674158, and +1234156780.", + "nullable": true }, - { - "name": "TUE", - "description": "Tuesday" + "text": { + "$ref": "#/components/schemas/CustomerTextFilter", + "description": "A filter for a query based on the value of a `String`-type custom attribute. This filter is case-insensitive and \ncan include `exact` or `fuzzy`, but not both.\n\nFor an `exact` match, provide the complete string.\n\nFor a `fuzzy` match, provide a query expression containing one or more query tokens in any order that contain complete words\nto match against the string. Square tokenizes the expression using a grammar-based tokenizer. For example, the expressions `quick brown`,\n`brown quick`, and `quick fox` match \"The quick brown fox jumps over the lazy dog\". However, `quick foxes` and `qui` do not match.", + "nullable": true }, - { - "name": "WED", - "description": "Wednesday" + "selection": { + "$ref": "#/components/schemas/FilterValue", + "description": "A filter for a query based on the display name for a `Selection`-type custom attribute value. This filter is case-sensitive\nand can contain `any`, `all`, or both. The `none` condition is not supported.\n\nProvide the display name of each item that you want to search for. To find the display names for the selection, use the \n[Customer Custom Attributes API](api:CustomerCustomAttributes) to retrieve the corresponding custom attribute definition\nand then check the `schema.items.names` field. For more information, see\n[Search based on selection](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#custom-attribute-value-filter-selection).\n\nNote that when a `Selection`-type custom attribute is assigned to a customer profile, the custom attribute value is a list of one\nor more UUIDs (sourced from the `schema.items.enum` field) that map to the item names. These UUIDs are unique per seller.", + "nullable": true }, - { - "name": "THU", - "description": "Thursday" + "date": { + "$ref": "#/components/schemas/TimeRange", + "description": "A filter for a query based on the value of a `Date`-type custom attribute.\n\nProvide a date range for this filter using `start_at`, `end_at`, or both. Range boundaries are inclusive. Dates can be specified\nin `YYYY-MM-DD` format or as RFC 3339 timestamps.", + "nullable": true }, - { - "name": "FRI", - "description": "Friday" + "number": { + "$ref": "#/components/schemas/FloatNumberRange", + "description": "A filter for a query based on the value of a `Number`-type custom attribute, which can be an integer or a decimal with up to\n5 digits of precision.\n\nProvide a numerical range for this filter using `start_at`, `end_at`, or both. Range boundaries are inclusive. Numbers are specified\nas decimals or integers. The absolute value of range boundaries must not exceed `(2^63-1)/10^5`, or 92233720368547.", + "nullable": true }, - { - "name": "SAT", - "description": "Saturday" + "boolean": { + "type": "boolean", + "description": "A filter for a query based on the value of a `Boolean`-type custom attribute.", + "nullable": true + }, + "address": { + "$ref": "#/components/schemas/CustomerAddressFilter", + "description": "A filter for a query based on the value of an `Address`-type custom attribute. The filter can include `postal_code`, `country`, or both.", + "nullable": true } - ], - "description": "Indicates the specific day of the week.", - "x-release-status": "PUBLIC" - }, - "DeleteBookingCustomAttributeDefinitionRequest": { - "type": "object", - "description": "Represents a [DeleteBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-DeleteBookingCustomAttributeDefinition) request.", - "x-release-status": "PUBLIC", - "properties": {} + } }, - "DeleteBookingCustomAttributeDefinitionResponse": { + "CustomerCustomAttributeFilters": { "type": "object", - "description": "Represents a [DeleteBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-DeleteBookingCustomAttributeDefinition) response\ncontaining error messages when errors occurred during the request. The successful response does not contain any payload.", + "description": "The custom attribute filters in a set of [customer filters](entity:CustomerFilter) used in a search query. Use this filter\nto search based on [custom attributes](entity:CustomAttribute) that are assigned to customer profiles. For more information, see\n[Search by custom attribute](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-custom-attribute).", "x-release-status": "PUBLIC", "properties": { - "errors": { + "filters": { "type": "array", "items": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/CustomerCustomAttributeFilter" }, - "description": "Any errors that occurred during the request." + "description": "The custom attribute filters. Each filter must specify `key` and include the `filter` field with a type-specific filter,\nthe `updated_at` field, or both. The provided keys must be unique within the list of custom attribute filters.", + "nullable": true } - }, - "example": { - "errors": [] } }, - "DeleteBookingCustomAttributeRequest": { - "type": "object", - "description": "Represents a [DeleteBookingCustomAttribute](api-endpoint:BookingCustomAttributes-DeleteBookingCustomAttribute) request.", - "x-release-status": "PUBLIC", - "properties": {} - }, - "DeleteBookingCustomAttributeResponse": { + "CustomerCustomAttributeOwnedDeletedEvent": { "type": "object", - "description": "Represents a [DeleteBookingCustomAttribute](api-endpoint:BookingCustomAttributes-DeleteBookingCustomAttribute) response.\nEither an empty object `{}` (for a successful deletion) or `errors` is present in the response.", + "description": "Published when a customer [custom attribute](entity:CustomAttribute) owned by the\nsubscribing application is deleted. Custom attributes are owned by the application that created the\ncorresponding [custom attribute definition](entity:CustomAttributeDefinition). Custom attributes whose\n`visibility` is `VISIBILITY_READ_WRITE_VALUES` can be deleted by any application.", "x-release-status": "PUBLIC", "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Error" - }, - "description": "Any errors that occurred during the request." + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"customer.custom_attribute.owned.deleted\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true } }, "example": { - "errors": [] - } - }, - "DeleteBreakTypeRequest": { - "type": "object", - "description": "A request to delete a `BreakType`.", - "x-release-status": "PUBLIC", - "properties": {} - }, - "DeleteBreakTypeResponse": { - "type": "object", - "description": "The response to a request to delete a `BreakType`. The response might contain a set \nof `Error` objects if the request resulted in errors.", - "x-release-status": "PUBLIC", - "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Error" + "created_at": "2022-04-26T01:22:29Z", + "data": { + "deleted": true, + "id": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-drink:CUSTOMER:TNQC0TYTWMRSFFQ157KK4V7MVR", + "object": { + "created_at": "2022-04-21T21:58:59Z", + "key": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-drink", + "updated_at": "2022-04-27T11:31:29Z", + "value": "Medium coffee, 2 sugars", + "version": 3, + "visibility": "VISIBILITY_READ_ONLY" }, - "description": "Any errors that occurred during the request." - } + "type": "custom_attribute" + }, + "event_id": "f57b27d4-a4d6-43de-9e58-bc6ff90525f1", + "merchant_id": "DM7VKY8Q63GNP", + "type": "customer.custom_attribute.owned.deleted" }, - "example": {} + "x-webhook": { + "event": "customer.custom_attribute.owned.deleted", + "scopes": [ + "CUSTOMERS_READ" + ] + }, + "x-api": "#/components/x-apis/CustomerCustomAttributes", + "x-since": "2022-08-17" }, - "DeleteCatalogObjectRequest": { - "type": "object", - "x-release-status": "PUBLIC", - "properties": {}, - "x-sq-sdk-sample-code": { - "csharp": "/sdk_samples/Catalog/DeleteCatalogObject/DeleteCatalogObjectRequest.csharp", - "java": "/sdk_samples/Catalog/DeleteCatalogObject/DeleteCatalogObjectRequest.java", - "javascript": "/sdk_samples/Catalog/DeleteCatalogObject/DeleteCatalogObjectRequest.javascript", - "php": "/sdk_samples/Catalog/DeleteCatalogObject/DeleteCatalogObjectRequest.php", - "python": "/sdk_samples/Catalog/DeleteCatalogObject/DeleteCatalogObjectRequest.python", - "ruby": "/sdk_samples/Catalog/DeleteCatalogObject/DeleteCatalogObjectRequest.ruby" - } - }, - "DeleteCatalogObjectResponse": { + "CustomerCustomAttributeOwnedUpdatedEvent": { "type": "object", + "description": "Published when a customer [custom attribute](entity:CustomAttribute) owned by the\nsubscribing application is created or updated. Custom attributes are owned by the application that created\nthe corresponding [custom attribute definition](entity:CustomAttributeDefinition). Custom attributes whose\n`visibility` is `VISIBILITY_READ_WRITE_VALUES` can be created or updated by any application.", "x-release-status": "PUBLIC", "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Error" - }, - "description": "Any errors that occurred during the request." + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true }, - "deleted_object_ids": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The IDs of all catalog objects deleted by this request.\nMultiple IDs may be returned when associated objects are also deleted, for example\na catalog item variation will be deleted (and its ID included in this field)\nwhen its parent catalog item is deleted." + "type": { + "type": "string", + "description": "The type of this event. The value is `\"customer.custom_attribute.owned.updated\"`.", + "nullable": true }, - "deleted_at": { + "event_id": { "type": "string", - "description": "The database [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nof this deletion in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`." + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true } }, "example": { - "deleted_at": "2016-11-16T22:25:24.878Z", - "deleted_object_ids": [ - "7SB3ZQYJ5GDMVFL7JK46JCHT", - "KQLFFHA6K6J3YQAQAWDQAL57" + "created_at": "2022-04-21T21:40:54Z", + "data": { + "id": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-drink:CUSTOMER:TNQC0TYTWMRSFFQ157KK4V7MVR", + "object": { + "created_at": "2022-04-21T21:40:54Z", + "key": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-drink", + "updated_at": "2022-04-21T21:40:54Z", + "value": "Double-shot breve", + "version": 1, + "visibility": "VISIBILITY_READ_ONLY" + }, + "type": "custom_attribute" + }, + "event_id": "e26ca6f2-97f8-426a-b4bf-873044617e94", + "merchant_id": "DM7VKY8Q63GNP", + "type": "customer.custom_attribute.owned.updated" + }, + "x-webhook": { + "event": "customer.custom_attribute.owned.updated", + "scopes": [ + "CUSTOMERS_READ" ] }, - "x-sq-sdk-sample-code": { - "csharp": "/sdk_samples/Catalog/DeleteCatalogObject/DeleteCatalogObjectResponse.csharp", - "java": "/sdk_samples/Catalog/DeleteCatalogObject/DeleteCatalogObjectResponse.java", - "javascript": "/sdk_samples/Catalog/DeleteCatalogObject/DeleteCatalogObjectResponse.javascript", - "php": "/sdk_samples/Catalog/DeleteCatalogObject/DeleteCatalogObjectResponse.php", - "python": "/sdk_samples/Catalog/DeleteCatalogObject/DeleteCatalogObjectResponse.python", - "ruby": "/sdk_samples/Catalog/DeleteCatalogObject/DeleteCatalogObjectResponse.ruby" - } + "x-api": "#/components/x-apis/CustomerCustomAttributes", + "x-since": "2022-08-17" }, - "DeleteCustomerCardRequest": { + "CustomerCustomAttributeUpdatedEvent": { "type": "object", - "description": "Defines the fields that are included in requests to the\n`DeleteCustomerCard` endpoint.", + "description": "Published when a customer [custom attribute](entity:CustomAttribute) owned by the\nsubscribing application is created or updated. Custom attributes are owned by the application that created\nthe corresponding [custom attribute definition](entity:CustomAttributeDefinition). Custom attributes whose\n`visibility` is `VISIBILITY_READ_WRITE_VALUES` can be created or updated by any application.\n\nThis event is replaced by \n[customer.custom_attribute.owned.updated](webhook:customer.custom_attribute.owned.updated).", "x-release-status": "DEPRECATED", - "properties": {}, - "x-sq-sdk-sample-code": { - "csharp": "/sdk_samples/DeleteCustomerCard/DeleteCustomerCardRequest.csharp", - "java": "/sdk_samples/DeleteCustomerCard/DeleteCustomerCardRequest.java", - "javascript": "/sdk_samples/DeleteCustomerCard/DeleteCustomerCardRequest.javascript", - "php": "/sdk_samples/DeleteCustomerCard/DeleteCustomerCardRequest.php", - "python": "/sdk_samples/DeleteCustomerCard/DeleteCustomerCardRequest.python", - "ruby": "/sdk_samples/DeleteCustomerCard/DeleteCustomerCardRequest.ruby" - } + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"customer.custom_attribute.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true + } + }, + "example": { + "created_at": "2022-04-21T21:40:54Z", + "data": { + "id": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-drink:CUSTOMER:TNQC0TYTWMRSFFQ157KK4V7MVR", + "object": { + "created_at": "2022-04-21T21:40:54Z", + "key": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-drink", + "updated_at": "2022-04-21T21:40:54Z", + "value": "Double-shot breve", + "version": 1, + "visibility": "VISIBILITY_READ_ONLY" + }, + "type": "custom_attribute" + }, + "event_id": "e26ca6f2-97f8-426a-b4bf-873044617e94", + "merchant_id": "DM7VKY8Q63GNP", + "type": "customer.custom_attribute.updated" + }, + "x-webhook": { + "event": "customer.custom_attribute.updated", + "scopes": [ + "CUSTOMERS_READ" + ] + }, + "x-api": "#/components/x-apis/CustomerCustomAttributes", + "x-since": "2022-05-12" }, - "DeleteCustomerCardResponse": { + "CustomerCustomAttributeUpdatedPublicEvent": { "type": "object", - "description": "Defines the fields that are included in the response body of\na request to the `DeleteCustomerCard` endpoint.", + "description": "Published when a customer [custom attribute](entity:CustomAttribute) that is visible\nto all applications is created or updated. A notification is sent when any application creates or updates\na custom attribute whose `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.\n\nThis event is replaced by \n[customer.custom_attribute.visible.updated](webhook:customer.custom_attribute.visible.updated),\nwhich applies to custom attributes that are visible to the subscribing application.", "x-release-status": "DEPRECATED", "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Error" - }, - "description": "Any errors that occurred during the request." + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"customer.custom_attribute.public.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true } }, - "example": {}, - "x-sq-sdk-sample-code": { - "csharp": "/sdk_samples/DeleteCustomerCard/DeleteCustomerCardResponse.csharp", - "java": "/sdk_samples/DeleteCustomerCard/DeleteCustomerCardResponse.java", - "javascript": "/sdk_samples/DeleteCustomerCard/DeleteCustomerCardResponse.javascript", - "php": "/sdk_samples/DeleteCustomerCard/DeleteCustomerCardResponse.php", - "python": "/sdk_samples/DeleteCustomerCard/DeleteCustomerCardResponse.python", - "ruby": "/sdk_samples/DeleteCustomerCard/DeleteCustomerCardResponse.ruby" - } - }, - "DeleteCustomerCustomAttributeDefinitionRequest": { - "type": "object", - "description": "Represents a [DeleteCustomerCustomAttributeDefinition](api-endpoint:CustomerCustomAttributes-DeleteCustomerCustomAttributeDefinition) request.", - "x-release-status": "PUBLIC", - "x-params-example": "?key=favoritemovie", - "properties": {} + "example": { + "created_at": "2022-04-26T01:22:29Z", + "data": { + "id": "sq0idp-BushoY39o1X-GPxRRUWc0A:shirt-size:CUSTOMER:TNQC0TYTWMRSFFQ157KK4V7MVR", + "object": { + "created_at": "2022-04-21T21:40:54Z", + "key": "sq0idp-BushoY39o1X-GPxRRUWc0A:shirt-size", + "updated_at": "2022-04-26T01:22:29Z", + "value": [ + "4032c1a2-d749-4c75-9c30-be6472cd2e08" + ], + "version": 2, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute" + }, + "event_id": "1cc2925c-f6e2-4fb6-a597-07c198de59e1", + "merchant_id": "DM7VKY8Q63GNP", + "type": "customer.custom_attribute.public.updated" + }, + "x-webhook": { + "event": "customer.custom_attribute.public.updated", + "scopes": [ + "CUSTOMERS_READ" + ] + }, + "x-api": "#/components/x-apis/CustomerCustomAttributes", + "x-since": "2022-05-12" }, - "DeleteCustomerCustomAttributeDefinitionResponse": { + "CustomerCustomAttributeVisibleDeletedEvent": { "type": "object", - "description": "Represents a response from a delete request containing error messages if there are any.", + "description": "Published when a customer [custom attribute](entity:CustomAttribute) that is visible to the\nsubscribing application is deleted. A notification is sent when:\n- Your application deletes a custom attribute owned by your application, regardless of the `visibility` setting.\n- Any application deletes a custom attribute whose `visibility` is `VISIBILITY_READ_ONLY`\nor `VISIBILITY_READ_WRITE_VALUES`.\n\nCustom attributes set to `VISIBILITY_READ_WRITE_VALUES` can be deleted by any application, but those set to\n`VISIBILITY_READ_ONLY` or `VISIBILITY_HIDDEN` can only be deleted by the owner. Custom attributes are owned\nby the application that created the corresponding [custom attribute definition](entity:CustomAttributeDefinition).", "x-release-status": "PUBLIC", "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Error" - }, - "description": "Any errors that occurred during the request." + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"customer.custom_attribute.visible.deleted\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true } }, - "example": {} - }, - "DeleteCustomerCustomAttributeRequest": { - "type": "object", - "description": "Represents a [DeleteCustomerCustomAttribute](api-endpoint:CustomerCustomAttributes-DeleteCustomerCustomAttribute) request.", - "x-release-status": "PUBLIC", - "x-params-example": "?customer_id=Z57QXKM2FGXEQDV42W8RBZY7BR\u0026key=favoritemovie", - "properties": {} + "example": { + "created_at": "2022-04-26T01:22:29Z", + "data": { + "deleted": true, + "id": "sq0idp-BushoY39o1X-GPxRRUWc0A:shirt-size:CUSTOMER:TNQC0TYTWMRSFFQ157KK4V7MVR", + "object": { + "created_at": "2022-04-21T21:58:59Z", + "key": "sq0idp-BushoY39o1X-GPxRRUWc0A:shirt-size", + "updated_at": "2022-04-27T11:31:29Z", + "value": [ + "4032c1a2-d749-4c75-9c30-be6472cd2e08" + ], + "version": 3, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute" + }, + "event_id": "18ef5adc-2efc-4ad9-9b1a-b274a607da3e", + "merchant_id": "DM7VKY8Q63GNP", + "type": "customer.custom_attribute.visible.deleted" + }, + "x-webhook": { + "event": "customer.custom_attribute.visible.deleted", + "scopes": [ + "CUSTOMERS_READ" + ] + }, + "x-api": "#/components/x-apis/CustomerCustomAttributes", + "x-since": "2022-08-17" }, - "DeleteCustomerCustomAttributeResponse": { + "CustomerCustomAttributeVisibleUpdatedEvent": { "type": "object", - "description": "Represents a [DeleteCustomerCustomAttribute](api-endpoint:CustomerCustomAttributes-DeleteCustomerCustomAttribute) response.\nEither an empty object `{}` (for a successful deletion) or `errors` is present in the response.", + "description": "Published when a customer [custom attribute](entity:CustomAttribute) that is visible to the\nsubscribing application is created or updated. A notification is sent when:\n- Your application creates or updates a custom attribute owned by your application, regardless of the `visibility` setting.\n- Any application creates or updates a custom attribute whose `visibility` is `VISIBILITY_READ_ONLY`\nor `VISIBILITY_READ_WRITE_VALUES`.\n\nCustom attributes set to `VISIBILITY_READ_WRITE_VALUES` can be created or updated by any application, but those set to\n`VISIBILITY_READ_ONLY` or `VISIBILITY_HIDDEN` can only be created or updated by the owner. Custom attributes are owned\nby the application that created the corresponding [custom attribute definition](entity:CustomAttributeDefinition).", "x-release-status": "PUBLIC", "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Error" - }, - "description": "Any errors that occurred during the request." + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"customer.custom_attribute.visible.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true } }, - "example": {} - }, - "DeleteCustomerGroupRequest": { - "type": "object", - "description": "Defines the fields that can be included in a request to the\n[DeleteCustomerGroup](api-endpoint:CustomerGroups-DeleteCustomerGroup) endpoint.", - "x-release-status": "PUBLIC", - "properties": {}, - "example": {} + "example": { + "created_at": "2022-04-26T01:22:29Z", + "data": { + "id": "sq0idp-BushoY39o1X-GPxRRUWc0A:shirt-size:CUSTOMER:TNQC0TYTWMRSFFQ157KK4V7MVR", + "object": { + "created_at": "2022-04-21T21:40:54Z", + "key": "sq0idp-BushoY39o1X-GPxRRUWc0A:shirt-size", + "updated_at": "2022-04-26T01:22:29Z", + "value": [ + "4032c1a2-d749-4c75-9c30-be6472cd2e08" + ], + "version": 2, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute" + }, + "event_id": "1cc2925c-f6e2-4fb6-a597-07c198de59e1", + "merchant_id": "DM7VKY8Q63GNP", + "type": "customer.custom_attribute.visible.updated" + }, + "x-webhook": { + "event": "customer.custom_attribute.visible.updated", + "scopes": [ + "CUSTOMERS_READ" + ] + }, + "x-api": "#/components/x-apis/CustomerCustomAttributes", + "x-since": "2022-08-17" }, - "DeleteCustomerGroupResponse": { + "CustomerDeletedEvent": { "type": "object", - "description": "Defines the fields that are included in the response body of\na request to the [DeleteCustomerGroup](api-endpoint:CustomerGroups-DeleteCustomerGroup) endpoint.", + "description": "Published when a [customer](entity:Customer) is deleted. For more information, see [Use Customer Webhooks](https://developer.squareup.com/docs/customers-api/use-the-api/customer-webhooks).\n\nThe `customer` object in the event notification does not include the following fields: `group_ids` and `segment_ids`.", "x-release-status": "PUBLIC", "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Error" - }, - "description": "Any errors that occurred during the request." + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event. For this object, the value is `customer.deleted`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "The unique ID of the event, which is used for [idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices).", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomerDeletedEventData", + "description": "The data associated with the event.", + "nullable": true } }, - "example": {} + "example": { + "created_at": "2022-11-09T21:26:50Z", + "data": { + "deleted": true, + "id": "QPTXM8PQNX3Q726ZYHPMNP46XC", + "object": { + "customer": { + "address": { + "address_line_1": "1018 1st Street", + "administrative_district_level_1": "NY", + "locality": "Brooklyn", + "postal_code": "11215" + }, + "birthday": "1962-03-04", + "creation_source": "IMPORT", + "email_address": "jenkins+smorly@squareup.com", + "family_name": "Smiley", + "given_name": "Jenkins", + "id": "QPTXM8PQNX3Q726ZYHPMNP46XC", + "phone_number": "+12126668929", + "preferences": { + "email_unsubscribed": false + }, + "version": 3 + } + }, + "type": "customer" + }, + "event_id": "8e84fec8-f04b-46f0-b66d-dbb8b59590fa", + "merchant_id": "G7MMEBVW021Q4", + "type": "customer.deleted" + }, + "x-webhook": { + "event": "customer.deleted", + "scopes": [ + "CUSTOMERS_READ" + ] + }, + "x-api": "#/components/x-apis/Customers", + "x-since": "2021-02-26" }, - "DeleteCustomerRequest": { + "CustomerDeletedEventData": { "type": "object", - "description": "Defines the fields that are included in a request to the `DeleteCustomer`\nendpoint.", + "description": "The data associated with the event.", "x-release-status": "PUBLIC", - "x-params-example": "?version=11", "properties": { - "version": { - "type": "integer", - "description": "The current version of the customer profile.\n\nAs a best practice, you should include this parameter to enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) control. For more information, see [Delete a customer profile](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#delete-customer-profile).", - "format": "int64" + "type": { + "type": "string", + "description": "The type of object affected by the event. For this event, the value is `customer`.", + "maxLength": 50, + "nullable": true + }, + "id": { + "type": "string", + "description": "The ID of the deleted customer.", + "maxLength": 192 + }, + "object": { + "$ref": "#/components/schemas/CustomerDeletedEventObject", + "description": "An object that contains the deleted customer.", + "nullable": true } - }, - "x-sq-sdk-sample-code": { - "csharp": "/sdk_samples/DeleteCustomer/DeleteCustomerRequest.csharp", - "java": "/sdk_samples/DeleteCustomer/DeleteCustomerRequest.java", - "javascript": "/sdk_samples/DeleteCustomer/DeleteCustomerRequest.javascript", - "php": "/sdk_samples/DeleteCustomer/DeleteCustomerRequest.php", - "python": "/sdk_samples/DeleteCustomer/DeleteCustomerRequest.python", - "ruby": "/sdk_samples/DeleteCustomer/DeleteCustomerRequest.ruby" } }, - "DeleteCustomerResponse": { + "CustomerDeletedEventEventContext": { "type": "object", - "description": "Defines the fields that are included in the response body of\na request to the `DeleteCustomer` endpoint.", + "description": "Information about the change that triggered the event.", "x-release-status": "PUBLIC", "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Error" - }, - "description": "Any errors that occurred during the request." + "merge": { + "$ref": "#/components/schemas/CustomerDeletedEventEventContextMerge", + "description": "Information about the merge operation associated with the event.", + "nullable": true } - }, - "example": {}, - "x-sq-sdk-sample-code": { - "csharp": "/sdk_samples/DeleteCustomer/DeleteCustomerResponse.csharp", - "java": "/sdk_samples/DeleteCustomer/DeleteCustomerResponse.java", - "javascript": "/sdk_samples/DeleteCustomer/DeleteCustomerResponse.javascript", - "php": "/sdk_samples/DeleteCustomer/DeleteCustomerResponse.php", - "python": "/sdk_samples/DeleteCustomer/DeleteCustomerResponse.python", - "ruby": "/sdk_samples/DeleteCustomer/DeleteCustomerResponse.ruby" } }, - "DeleteDisputeEvidenceRequest": { - "type": "object", - "description": "Defines the parameters for a `DeleteDisputeEvidence` request.", - "x-release-status": "PUBLIC", - "x-params-example": "?dispute_id=bVTprrwk0gygTLZ96VX1oB\u0026evidence_id=CpfnkwGselCwS8QFvxN6", - "properties": {}, - "example": {} - }, - "DeleteDisputeEvidenceResponse": { + "CustomerDeletedEventEventContextMerge": { "type": "object", - "description": "Defines the fields in a `DeleteDisputeEvidence` response.", + "description": "Information about a merge operation, which creates a new customer using aggregated properties from two or more existing customers.", "x-release-status": "PUBLIC", "properties": { - "errors": { + "from_customer_ids": { "type": "array", "items": { - "$ref": "#/components/schemas/Error" + "type": "string" }, - "description": "Information about errors encountered during the request." + "description": "The IDs of the existing customers that were merged and then deleted.", + "nullable": true + }, + "to_customer_id": { + "type": "string", + "description": "The ID of the new customer created by the merge.", + "nullable": true } - }, - "example": {} - }, - "DeleteInvoiceAttachmentRequest": { - "type": "object", - "description": "Represents a [DeleteInvoiceAttachment](api-endpoint:Invoices-DeleteInvoiceAttachment) request.", - "x-release-status": "PUBLIC", - "properties": {} + } }, - "DeleteInvoiceAttachmentResponse": { + "CustomerDeletedEventObject": { "type": "object", - "description": "Represents a [DeleteInvoiceAttachment](api-endpoint:Invoices-DeleteInvoiceAttachment) response.", + "description": "An object that contains the customer associated with the event.", "x-release-status": "PUBLIC", "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Error" - }, - "description": "Information about errors encountered during the request." + "customer": { + "$ref": "#/components/schemas/Customer", + "description": "The deleted customer.", + "nullable": true + }, + "event_context": { + "$ref": "#/components/schemas/CustomerDeletedEventEventContext", + "description": "Information about the change that triggered the event. This field is returned only if the customer is deleted by a merge operation.", + "nullable": true } - }, - "example": {} + } }, - "DeleteInvoiceRequest": { + "CustomerDetails": { "type": "object", - "description": "Describes a `DeleteInvoice` request.", + "description": "Details about the customer making the payment.", "x-release-status": "PUBLIC", "properties": { - "version": { - "type": "integer", - "description": "The version of the [invoice](entity:Invoice) to delete.\nIf you do not know the version, you can call [GetInvoice](api-endpoint:Invoices-GetInvoice) or \n[ListInvoices](api-endpoint:Invoices-ListInvoices)." + "customer_initiated": { + "type": "boolean", + "description": "Indicates whether the customer initiated the payment.", + "nullable": true + }, + "seller_keyed_in": { + "type": "boolean", + "description": "Indicates that the seller keyed in payment details on behalf of the customer.\nThis is used to flag a payment as Mail Order / Telephone Order (MOTO).", + "nullable": true } } }, - "DeleteInvoiceResponse": { + "CustomerFilter": { "type": "object", - "description": "Describes a `DeleteInvoice` response.", + "description": "Represents the filtering criteria in a [search query](entity:CustomerQuery) that defines how to filter\ncustomer profiles returned in [SearchCustomers](api-endpoint:Customers-SearchCustomers) results.", "x-release-status": "PUBLIC", "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Error" - }, - "description": "Information about errors encountered during the request." + "creation_source": { + "$ref": "#/components/schemas/CustomerCreationSourceFilter", + "description": "A filter to select customers based on their creation source.", + "nullable": true + }, + "created_at": { + "$ref": "#/components/schemas/TimeRange", + "description": "A filter to select customers based on when they were created." + }, + "updated_at": { + "$ref": "#/components/schemas/TimeRange", + "description": "A filter to select customers based on when they were last updated." + }, + "email_address": { + "$ref": "#/components/schemas/CustomerTextFilter", + "description": "A filter to [select customers by their email address](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-email-address) \nvisible to the seller. \nThis filter is case-insensitive.\n\nFor [exact matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#exact-search-by-email-address), this\nfilter causes the search to return customer profiles \nwhose `email_address` field value are identical to the email address provided\nin the query.\n\nFor [fuzzy matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#fuzzy-search-by-email-address), \nthis filter causes the search to return customer profiles \nwhose `email_address` field value has a token-wise partial match against the filtering \nexpression in the query. For example, with `Steven gmail` provided in a search\nquery, the search returns customers whose email address is `steven.johnson@gmail.com` \nor `mygmail@stevensbakery.com`. Square removes any punctuation (including periods (.),\nunderscores (_), and the @ symbol) and tokenizes the email addresses on spaces. A match is\nfound if a tokenized email address contains all the tokens in the search query, \nirrespective of the token order.", + "nullable": true + }, + "phone_number": { + "$ref": "#/components/schemas/CustomerTextFilter", + "description": "A filter to [select customers by their phone numbers](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-phone-number)\nvisible to the seller.\n\nFor [exact matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#exact-search-by-phone-number),\nthis filter returns customers whose phone number matches the specified query expression. The number in the query must be of an\nE.164-compliant form. In particular, it must include the leading `+` sign followed by a country code and then a subscriber number.\nFor example, the standard E.164 form of a US phone number is `+12062223333` and an E.164-compliant variation is `+1 (206) 222-3333`.\nTo match the query expression, stored customer phone numbers are converted to the standard E.164 form.\n\nFor [fuzzy matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#fuzzy-search-by-phone-number),\nthis filter returns customers whose phone number matches the token or tokens provided in the query expression. For example, with `415`\nprovided in a search query, the search returns customers with the phone numbers `+1-415-212-1200`, `+1-212-415-1234`, and `+1 (551) 234-1567`.\nSimilarly, a search query of `415 123` returns customers with the phone numbers `+1-212-415-1234` and `+1 (551) 234-1567` but not\n`+1-212-415-1200`. A match is found if a tokenized phone number contains all the tokens in the search query, irrespective of the token order.", + "nullable": true + }, + "reference_id": { + "$ref": "#/components/schemas/CustomerTextFilter", + "description": "A filter to [select customers by their reference IDs](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-reference-id).\nThis filter is case-insensitive.\n\n[Exact matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#exact-search-by-reference-id) \nof a customer's reference ID against a query's reference ID is evaluated as an\nexact match between two strings, character by character in the given order.\n\n[Fuzzy matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#fuzzy-search-by-reference-id) \nof stored reference IDs against queried reference IDs works \nexactly the same as fuzzy matching on email addresses. Non-alphanumeric characters \nare replaced by spaces to tokenize stored and queried reference IDs. A match is found\nif a tokenized stored reference ID contains all tokens specified in any order in the query. For example,\na query of `NYC M` matches customer profiles with the `reference_id` value of `NYC_M_35_JOHNSON`\nand `NYC_27_MURRAY`.", + "nullable": true + }, + "group_ids": { + "$ref": "#/components/schemas/FilterValue", + "description": "A filter to select customers based on the [groups](entity:CustomerGroup) they belong to.\nGroup membership is controlled by sellers and developers.\n\nThe `group_ids` filter has the following syntax:\n```\n\"group_ids\": {\n\"any\": [\"{group_a_id}\", \"{group_b_id}\", ...],\n\"all\": [\"{group_1_id}\", \"{group_2_id}\", ...],\n\"none\": [\"{group_i_id}\", \"{group_ii_id}\", ...]\n}\n```\n\nYou can use any combination of the `any`, `all`, and `none` fields in the filter.\nWith `any`, the search returns customers in groups `a` or `b` or any other group specified in the list.\nWith `all`, the search returns customers in groups `1` and `2` and all other groups specified in the list.\nWith `none`, the search returns customers not in groups `i` or `ii` or any other group specified in the list.\n\nIf any of the search conditions are not met, including when an invalid or non-existent group ID is provided,\nthe result is an empty object (`{}`).", + "nullable": true + }, + "custom_attribute": { + "$ref": "#/components/schemas/CustomerCustomAttributeFilters", + "description": "A filter to select customers based on one or more custom attributes. \nThis filter can contain up to 10 custom attribute filters. Each custom attribute filter specifies filtering criteria for a target custom\nattribute. If multiple custom attribute filters are provided, they are combined as an `AND` operation.\n\nTo be valid for a search, the custom attributes must be visible to the requesting application. For more information, including example queries,\nsee [Search by custom attribute](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-custom-attribute).\n\nSquare returns matching customer profiles, which do not contain custom attributes. To retrieve customer-related custom attributes,\nuse the [Customer Custom Attributes API](api:CustomerCustomAttributes). For example, you can call\n[RetrieveCustomerCustomAttribute](api-endpoint:CustomerCustomAttributes-RetrieveCustomerCustomAttribute) using a customer ID from the result set.", + "nullable": true + }, + "segment_ids": { + "$ref": "#/components/schemas/FilterValue", + "description": " A filter to select customers based on the [segments](entity:CustomerSegment) they belong to.\nSegment membership is dynamic and adjusts automatically based on whether customers meet the segment criteria.\n\nYou can provide up to three segment IDs in the filter, using any combination of the `all`, `any`, and `none` fields.\nFor the following example, the results include customers who belong to both segment A and segment B but do not belong to segment C.\n\n```\n\"segment_ids\": {\n\"all\": [\"{segment_A_id}\", \"{segment_B_id}\"],\n\"none\": [\"{segment_C_id}\"]\n}\n```\n\nIf an invalid or non-existent segment ID is provided in the filter, Square stops processing the request\nand returns a `400 BAD_REQUEST` error that includes the segment ID.", + "nullable": true } - }, - "example": {} - }, - "DeleteLocationCustomAttributeDefinitionRequest": { - "type": "object", - "description": "Represents a [DeleteLocationCustomAttributeDefinition](api-endpoint:LocationCustomAttributes-DeleteLocationCustomAttributeDefinition) request.", - "x-release-status": "BETA", - "x-params-example": "?key=bestseller", - "properties": {} + } }, - "DeleteLocationCustomAttributeDefinitionResponse": { + "CustomerGroup": { "type": "object", - "description": "Represents a response from a delete request containing error messages if there are any.", - "x-release-status": "BETA", + "description": "Represents a group of customer profiles. \n\nCustomer groups can be created, be modified, and have their membership defined using \nthe Customers API or within the Customer Directory in the Square Seller Dashboard or Point of Sale.", + "x-release-status": "PUBLIC", + "required": [ + "name" + ], "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Error" - }, - "description": "Any errors that occurred during the request." + "id": { + "type": "string", + "description": "A unique Square-generated ID for the customer group.", + "maxLength": 255, + "readOnly": true + }, + "name": { + "type": "string", + "description": "The name of the customer group." + }, + "created_at": { + "type": "string", + "description": "The timestamp when the customer group was created, in RFC 3339 format.", + "readOnly": true + }, + "updated_at": { + "type": "string", + "description": "The timestamp when the customer group was last updated, in RFC 3339 format.", + "readOnly": true } - }, - "example": {} - }, - "DeleteLocationCustomAttributeRequest": { - "type": "object", - "description": "Represents a [DeleteLocationCustomAttribute](api-endpoint:LocationCustomAttributes-DeleteLocationCustomAttribute) request.", - "x-release-status": "BETA", - "x-params-example": "?location_id=L0TBCBTB7P8RQ\u0026key=bestseller", - "properties": {} + } }, - "DeleteLocationCustomAttributeResponse": { - "type": "object", - "description": "Represents a [DeleteLocationCustomAttribute](api-endpoint:LocationCustomAttributes-DeleteLocationCustomAttribute) response.\nEither an empty object `{}` (for a successful deletion) or `errors` is present in the response.", - "x-release-status": "BETA", - "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Error" - }, - "description": "Any errors that occurred during the request." + "CustomerInclusionExclusion": { + "type": "string", + "enum": [ + "INCLUDE", + "EXCLUDE" + ], + "x-enum-elements": [ + { + "name": "INCLUDE", + "description": "Customers should be included in the result set when they match the\nfiltering criteria." + }, + { + "name": "EXCLUDE", + "description": "Customers should be excluded from the result set when they match\nthe filtering criteria." } - }, - "example": {} + ], + "description": "Indicates whether customers should be included in, or excluded from,\nthe result set when they match the filtering criteria.", + "x-release-status": "PUBLIC" }, - "DeleteLoyaltyRewardRequest": { + "CustomerPreferences": { "type": "object", - "description": "A request to delete a loyalty reward.", + "description": "Represents communication preferences for the customer profile.", "x-release-status": "PUBLIC", - "x-params-example": "?reward_id=9f18ac21-233a-31c3-be77-b45840f5a810", - "properties": {} + "properties": { + "email_unsubscribed": { + "type": "boolean", + "description": "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.", + "nullable": true + } + } }, - "DeleteLoyaltyRewardResponse": { + "CustomerQuery": { "type": "object", - "description": "A response returned by the API call.", + "description": "Represents filtering and sorting criteria for a [SearchCustomers](api-endpoint:Customers-SearchCustomers) request.", "x-release-status": "PUBLIC", "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Error" - }, - "description": "Any errors that occurred during the request." + "filter": { + "$ref": "#/components/schemas/CustomerFilter", + "description": "The filtering criteria for the search query. A query can contain multiple filters in any combination.\nMultiple filters are combined as `AND` statements.\n\n__Note:__ Combining multiple filters as `OR` statements is not supported. Instead, send multiple single-filter\nsearches and join the result sets.", + "nullable": true + }, + "sort": { + "$ref": "#/components/schemas/CustomerSort", + "description": "Sorting criteria for query results. The default behavior is to sort \ncustomers alphabetically by `given_name` and `family_name`.", + "nullable": true } - }, - "example": {} - }, - "DeleteMerchantCustomAttributeDefinitionRequest": { - "type": "object", - "description": "Represents a [DeleteMerchantCustomAttributeDefinition](api-endpoint:MerchantCustomAttributes-DeleteMerchantCustomAttributeDefinition) request.", - "x-release-status": "BETA", - "x-params-example": "?key=alternative_seller_name", - "properties": {} + } }, - "DeleteMerchantCustomAttributeDefinitionResponse": { + "CustomerSegment": { "type": "object", - "description": "Represents a response from a delete request containing error messages if there are any.", - "x-release-status": "BETA", + "description": "Represents a group of customer profiles that match one or more predefined filter criteria. \n\nSegments (also known as Smart Groups) are defined and created within the Customer Directory in the\nSquare Seller Dashboard or Point of Sale.", + "x-release-status": "PUBLIC", + "required": [ + "name" + ], "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Error" - }, - "description": "Any errors that occurred during the request." + "id": { + "type": "string", + "description": "A unique Square-generated ID for the segment.", + "maxLength": 255, + "readOnly": true + }, + "name": { + "type": "string", + "description": "The name of the segment.", + "readOnly": true + }, + "created_at": { + "type": "string", + "description": "The timestamp when the segment was created, in RFC 3339 format.", + "readOnly": true + }, + "updated_at": { + "type": "string", + "description": "The timestamp when the segment was last updated, in RFC 3339 format.", + "readOnly": true + } + } + }, + "CustomerSort": { + "type": "object", + "description": "Represents the sorting criteria in a [search query](entity:CustomerQuery) that defines how to sort\ncustomer profiles returned in [SearchCustomers](api-endpoint:Customers-SearchCustomers) results.", + "x-release-status": "PUBLIC", + "properties": { + "field": { + "$ref": "#/components/schemas/CustomerSortField", + "description": "Indicates the fields to use as the sort key, which is either the default set of fields or `created_at`.\n\nThe default value is `DEFAULT`.\nSee [CustomerSortField](#type-customersortfield) for possible values", + "nullable": true + }, + "order": { + "$ref": "#/components/schemas/SortOrder", + "description": "Indicates the order in which results should be sorted based on the\nsort field value. Strings use standard alphabetic comparison\nto determine order. Strings representing numbers are sorted as strings.\n\nThe default value is `ASC`.\nSee [SortOrder](#type-sortorder) for possible values", + "nullable": true + } + } + }, + "CustomerSortField": { + "type": "string", + "enum": [ + "DEFAULT", + "CREATED_AT" + ], + "x-enum-elements": [ + { + "name": "DEFAULT", + "description": "Use the default sort key. By default, customers are sorted\nalphanumerically by concatenating their `given_name` and `family_name`. If\nneither name field is set, string comparison is performed using one of the\nremaining fields in the following order: `company_name`, `email`,\n`phone_number`." + }, + { + "name": "CREATED_AT", + "description": "Use the creation date attribute (`created_at`) of customer profiles as the sort key." + } + ], + "description": "Specifies customer attributes as the sort key to customer profiles returned from a search.", + "x-release-status": "PUBLIC" + }, + "CustomerTaxIds": { + "type": "object", + "description": "Represents the tax ID associated with a [customer profile](entity:Customer). The corresponding `tax_ids` field is available only for customers of sellers in EU countries or the United Kingdom. \nFor more information, see [Customer tax IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids).", + "x-release-status": "PUBLIC", + "properties": { + "eu_vat": { + "type": "string", + "description": "The EU VAT identification number for the customer. For example, `IE3426675K`. The ID can contain alphanumeric characters only.", + "maxLength": 20, + "nullable": true + } + } + }, + "CustomerTextFilter": { + "type": "object", + "description": "A filter to select customers based on exact or fuzzy matching of\ncustomer attributes against a specified query. Depending on the customer attributes, \nthe filter can be case-sensitive. This filter can be exact or fuzzy, but it cannot be both.", + "x-release-status": "PUBLIC", + "properties": { + "exact": { + "type": "string", + "description": "Use the exact filter to select customers whose attributes match exactly the specified query.", + "nullable": true + }, + "fuzzy": { + "type": "string", + "description": "Use the fuzzy filter to select customers whose attributes match the specified query \nin a fuzzy manner. When the fuzzy option is used, search queries are tokenized, and then \neach query token must be matched somewhere in the searched attribute. For single token queries, \nthis is effectively the same behavior as a partial match operation.", + "nullable": true + } + } + }, + "CustomerUpdatedEvent": { + "type": "object", + "description": "Published when a [customer](entity:Customer) is updated. For more information, see [Use Customer Webhooks](https://developer.squareup.com/docs/customers-api/use-the-api/customer-webhooks).\n\nUpdates to the 'segment_ids' customer field does not invoke a `customer.updated` event. In addition, the `customer` object in the event notification does not include this field.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event. For this object, the value is `customer.updated`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "The unique ID of the event, which is used for [idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices).", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomerUpdatedEventData", + "description": "The data associated with the event.", + "nullable": true } }, - "example": {} + "example": { + "created_at": "2022-11-09T21:38:29Z", + "data": { + "id": "A0AP25A6SCVTH8JES9BX01GXM4", + "object": { + "customer": { + "created_at": "2022-07-09T18:23:01.795Z", + "creation_source": "THIRD_PARTY", + "email_address": "jenkins+smorly@squareup.com", + "family_name": "Smorly", + "given_name": "Jenkins", + "id": "A0AP25A6SCVTH8JES9BX01GXM4", + "phone_number": "+13477947111", + "preferences": { + "email_unsubscribed": false + }, + "updated_at": "2022-11-09T21:38:30Z", + "version": 1 + } + }, + "type": "customer" + }, + "event_id": "b4ce4698-00de-4b5d-a771-4941b3913b34", + "merchant_id": "G7MMEBVW021Q4", + "type": "customer.updated" + }, + "x-webhook": { + "event": "customer.updated", + "scopes": [ + "CUSTOMERS_READ" + ] + }, + "x-api": "#/components/x-apis/Customers", + "x-since": "2021-02-26" }, - "DeleteMerchantCustomAttributeRequest": { + "CustomerUpdatedEventData": { "type": "object", - "description": "Represents a [DeleteMerchantCustomAttribute](api-endpoint:MerchantCustomAttributes-DeleteMerchantCustomAttribute) request.", - "x-release-status": "BETA", - "x-params-example": "?merchant_id=DM7VKY8Q63GNP\u0026key=alternative_seller_name", - "properties": {} + "description": "The data associated with the event.", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "The type of object affected by the event. For this event, the value is `customer`.", + "maxLength": 50, + "nullable": true + }, + "id": { + "type": "string", + "description": "The ID of the updated customer.", + "maxLength": 192 + }, + "object": { + "$ref": "#/components/schemas/CustomerUpdatedEventObject", + "description": "An object that contains the updated customer.", + "nullable": true + } + } }, - "DeleteMerchantCustomAttributeResponse": { + "CustomerUpdatedEventObject": { + "type": "object", + "description": "An object that contains the customer associated with the event.", + "x-release-status": "PUBLIC", + "properties": { + "customer": { + "$ref": "#/components/schemas/Customer", + "description": "The updated customer.", + "nullable": true + } + } + }, + "DataCollectionOptions": { "type": "object", - "description": "Represents a [DeleteMerchantCustomAttribute](api-endpoint:MerchantCustomAttributes-DeleteMerchantCustomAttribute) response.\nEither an empty object `{}` (for a successful deletion) or `errors` is present in the response.", "x-release-status": "BETA", + "required": [ + "title", + "body", + "input_type" + ], + "properties": { + "title": { + "type": "string", + "description": "The title text to display in the data collection flow on the Terminal.", + "minLength": 1, + "maxLength": 250 + }, + "body": { + "type": "string", + "description": "The body text to display under the title in the data collection screen flow on the\nTerminal.", + "minLength": 1, + "maxLength": 10000 + }, + "input_type": { + "$ref": "#/components/schemas/DataCollectionOptionsInputType", + "description": "Represents the type of the input text.\nSee [InputType](#type-inputtype) for possible values" + }, + "collected_data": { + "$ref": "#/components/schemas/CollectedData", + "description": "The buyer’s input text from the data collection screen.", + "readOnly": true + } + } + }, + "DataCollectionOptionsInputType": { + "type": "string", + "enum": [ + "EMAIL", + "PHONE_NUMBER" + ], + "x-enum-elements": [ + { + "name": "EMAIL", + "description": "This value is used to represent an input text that contains a email validation on the\nclient." + }, + { + "name": "PHONE_NUMBER", + "description": "This value is used to represent an input text that contains a phone number validation on\nthe client." + } + ], + "description": "Describes the input type of the data.", + "x-release-status": "BETA" + }, + "DateRange": { + "type": "object", + "description": "A range defined by two dates. Used for filtering a query for Connect v2\nobjects that have date properties.", + "x-release-status": "PUBLIC", + "properties": { + "start_date": { + "type": "string", + "description": "A string in `YYYY-MM-DD` format, such as `2017-10-31`, per the ISO 8601\nextended format for calendar dates.\nThe beginning of a date range (inclusive).", + "nullable": true + }, + "end_date": { + "type": "string", + "description": "A string in `YYYY-MM-DD` format, such as `2017-10-31`, per the ISO 8601\nextended format for calendar dates.\nThe end of a date range (inclusive).", + "nullable": true + } + } + }, + "DayOfWeek": { + "type": "string", + "enum": [ + "SUN", + "MON", + "TUE", + "WED", + "THU", + "FRI", + "SAT" + ], + "x-enum-elements": [ + { + "name": "SUN", + "description": "Sunday" + }, + { + "name": "MON", + "description": "Monday" + }, + { + "name": "TUE", + "description": "Tuesday" + }, + { + "name": "WED", + "description": "Wednesday" + }, + { + "name": "THU", + "description": "Thursday" + }, + { + "name": "FRI", + "description": "Friday" + }, + { + "name": "SAT", + "description": "Saturday" + } + ], + "description": "Indicates the specific day of the week.", + "x-release-status": "PUBLIC" + }, + "DeleteBookingCustomAttributeDefinitionResponse": { + "type": "object", + "description": "Represents a [DeleteBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-DeleteBookingCustomAttributeDefinition) response\ncontaining error messages when errors occurred during the request. The successful response does not contain any payload.", + "x-release-status": "PUBLIC", "properties": { "errors": { "type": "array", @@ -18663,19 +21443,14 @@ "description": "Any errors that occurred during the request." } }, - "example": {} - }, - "DeleteOrderCustomAttributeDefinitionRequest": { - "type": "object", - "description": "Represents a delete request for an order custom attribute definition.", - "x-release-status": "BETA", - "x-params-example": "?key=table-number", - "properties": {} + "example": { + "errors": [] + } }, - "DeleteOrderCustomAttributeDefinitionResponse": { + "DeleteBookingCustomAttributeResponse": { "type": "object", - "description": "Represents a response from deleting an order custom attribute definition.", - "x-release-status": "BETA", + "description": "Represents a [DeleteBookingCustomAttribute](api-endpoint:BookingCustomAttributes-DeleteBookingCustomAttribute) response.\nEither an empty object `{}` (for a successful deletion) or `errors` is present in the response.", + "x-release-status": "PUBLIC", "properties": { "errors": { "type": "array", @@ -18685,19 +21460,14 @@ "description": "Any errors that occurred during the request." } }, - "example": {} - }, - "DeleteOrderCustomAttributeRequest": { - "type": "object", - "description": "Represents a delete request for an order custom attribute.", - "x-release-status": "BETA", - "x-params-example": "?order_id=7BbXGEIWNldxAzrtGf9GPVZTwZ4F\u0026key=seat-number", - "properties": {} + "example": { + "errors": [] + } }, - "DeleteOrderCustomAttributeResponse": { + "DeleteBreakTypeResponse": { "type": "object", - "description": "Represents a response from deleting an order custom attribute.", - "x-release-status": "BETA", + "description": "The response to a request to delete a `BreakType`. The response might contain a set \nof `Error` objects if the request resulted in errors.", + "x-release-status": "PUBLIC", "properties": { "errors": { "type": "array", @@ -18709,12 +21479,7 @@ }, "example": {} }, - "DeletePaymentLinkRequest": { - "type": "object", - "x-release-status": "PUBLIC", - "properties": {} - }, - "DeletePaymentLinkResponse": { + "DeleteCatalogObjectResponse": { "type": "object", "x-release-status": "PUBLIC", "properties": { @@ -18722,32 +21487,64 @@ "type": "array", "items": { "$ref": "#/components/schemas/Error" - } + }, + "description": "Any errors that occurred during the request." }, - "id": { - "type": "string", - "description": "The ID of the link that is deleted." + "deleted_object_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The IDs of all catalog objects deleted by this request.\nMultiple IDs may be returned when associated objects are also deleted, for example\na catalog item variation will be deleted (and its ID included in this field)\nwhen its parent catalog item is deleted." }, - "cancelled_order_id": { + "deleted_at": { "type": "string", - "description": "The ID of the order that is canceled. When a payment link is deleted, Square updates the\nthe `state` (of the order that the checkout link created) to CANCELED." + "description": "The database [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nof this deletion in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`." } }, "example": { - "cancelled_order_id": "asx8LgZ6MRzD0fObfkJ6obBmSh4F", - "id": "MQASNYL6QB6DFCJ3" + "deleted_at": "2016-11-16T22:25:24.878Z", + "deleted_object_ids": [ + "7SB3ZQYJ5GDMVFL7JK46JCHT", + "KQLFFHA6K6J3YQAQAWDQAL57" + ] + }, + "x-sq-sdk-sample-code": { + "csharp": "/sdk_samples/Catalog/DeleteCatalogObject/DeleteCatalogObjectResponse.csharp", + "java": "/sdk_samples/Catalog/DeleteCatalogObject/DeleteCatalogObjectResponse.java", + "javascript": "/sdk_samples/Catalog/DeleteCatalogObject/DeleteCatalogObjectResponse.javascript", + "php": "/sdk_samples/Catalog/DeleteCatalogObject/DeleteCatalogObjectResponse.php", + "python": "/sdk_samples/Catalog/DeleteCatalogObject/DeleteCatalogObjectResponse.python", + "ruby": "/sdk_samples/Catalog/DeleteCatalogObject/DeleteCatalogObjectResponse.ruby" } }, - "DeleteShiftRequest": { + "DeleteCustomerCardResponse": { "type": "object", - "description": "A request to delete a `Shift`.", + "description": "Defines the fields that are included in the response body of\na request to the `DeleteCustomerCard` endpoint.", "x-release-status": "DEPRECATED", - "properties": {} + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Error" + }, + "description": "Any errors that occurred during the request." + } + }, + "example": {}, + "x-sq-sdk-sample-code": { + "csharp": "/sdk_samples/DeleteCustomerCard/DeleteCustomerCardResponse.csharp", + "java": "/sdk_samples/DeleteCustomerCard/DeleteCustomerCardResponse.java", + "javascript": "/sdk_samples/DeleteCustomerCard/DeleteCustomerCardResponse.javascript", + "php": "/sdk_samples/DeleteCustomerCard/DeleteCustomerCardResponse.php", + "python": "/sdk_samples/DeleteCustomerCard/DeleteCustomerCardResponse.python", + "ruby": "/sdk_samples/DeleteCustomerCard/DeleteCustomerCardResponse.ruby" + } }, - "DeleteShiftResponse": { + "DeleteCustomerCustomAttributeDefinitionResponse": { "type": "object", - "description": "The response to a request to delete a `Shift`. The response might contain a set of \n`Error` objects if the request resulted in errors.", - "x-release-status": "DEPRECATED", + "description": "Represents a response from a delete request containing error messages if there are any.", + "x-release-status": "PUBLIC", "properties": { "errors": { "type": "array", @@ -18759,15 +21556,24 @@ }, "example": {} }, - "DeleteSnippetRequest": { + "DeleteCustomerCustomAttributeResponse": { "type": "object", - "description": "Represents a `DeleteSnippet` request.", + "description": "Represents a [DeleteCustomerCustomAttribute](api-endpoint:CustomerCustomAttributes-DeleteCustomerCustomAttribute) response.\nEither an empty object `{}` (for a successful deletion) or `errors` is present in the response.", "x-release-status": "PUBLIC", - "properties": {} + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Error" + }, + "description": "Any errors that occurred during the request." + } + }, + "example": {} }, - "DeleteSnippetResponse": { + "DeleteCustomerGroupResponse": { "type": "object", - "description": "Represents a `DeleteSnippet` response.", + "description": "Defines the fields that are included in the response body of\na request to the [DeleteCustomerGroup](api-endpoint:CustomerGroups-DeleteCustomerGroup) endpoint.", "x-release-status": "PUBLIC", "properties": { "errors": { @@ -18780,65 +21586,32 @@ }, "example": {} }, - "DeleteSubscriptionActionRequest": { - "type": "object", - "description": "Defines input parameters in a call to the \n[DeleteSubscriptionAction](api-endpoint:Subscriptions-DeleteSubscriptionAction)\nendpoint.", - "x-release-status": "BETA", - "properties": {} - }, - "DeleteSubscriptionActionResponse": { + "DeleteCustomerResponse": { "type": "object", - "description": "Defines output parameters in a response of the [DeleteSubscriptionAction](api-endpoint:Subscriptions-DeleteSubscriptionAction)\nendpoint.", - "x-release-status": "BETA", + "description": "Defines the fields that are included in the response body of\na request to the `DeleteCustomer` endpoint.", + "x-release-status": "PUBLIC", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/Error" }, - "description": "Errors encountered during the request." - }, - "subscription": { - "$ref": "#/components/schemas/Subscription", - "description": "The subscription that has the specified action deleted." + "description": "Any errors that occurred during the request." } }, - "example": { - "subscription": { - "card_id": "ccof:IkWfpLj4tNHMyFii3GB", - "charged_through_date": "2023-11-20", - "created_at": "2022-07-27T21:53:10Z", - "customer_id": "JDKYHBWT1D4F8MFH63DBMEN8Y4", - "id": "8151fc89-da15-4eb9-a685-1a70883cebfc", - "invoice_ids": [ - "inv:0-ChCHu2mZEabLeeHahQnXDjZQECY", - "inv:0-ChrcX_i3sNmfsHTGKhI4Wg2mceA" - ], - "location_id": "S8GWD5R9QB376", - "paid_until_date": "2024-08-01", - "plan_variation_id": "6JHXF3B2CW3YKHDV4XEM674H", - "price_override_money": { - "amount": 25000, - "currency": "USD" - }, - "source": { - "name": "My Application" - }, - "start_date": "2022-07-27", - "status": "ACTIVE", - "timezone": "America/Los_Angeles" - } + "example": {}, + "x-sq-sdk-sample-code": { + "csharp": "/sdk_samples/DeleteCustomer/DeleteCustomerResponse.csharp", + "java": "/sdk_samples/DeleteCustomer/DeleteCustomerResponse.java", + "javascript": "/sdk_samples/DeleteCustomer/DeleteCustomerResponse.javascript", + "php": "/sdk_samples/DeleteCustomer/DeleteCustomerResponse.php", + "python": "/sdk_samples/DeleteCustomer/DeleteCustomerResponse.python", + "ruby": "/sdk_samples/DeleteCustomer/DeleteCustomerResponse.ruby" } }, - "DeleteTimecardRequest": { - "type": "object", - "description": "A request to delete a `Timecard`.", - "x-release-status": "PUBLIC", - "properties": {} - }, - "DeleteTimecardResponse": { + "DeleteDisputeEvidenceResponse": { "type": "object", - "description": "The response to a request to delete a `Timecard`. The response might contain a set of \n`Error` objects if the request resulted in errors.", + "description": "Defines the fields in a `DeleteDisputeEvidence` response.", "x-release-status": "PUBLIC", "properties": { "errors": { @@ -18846,20 +21619,14 @@ "items": { "$ref": "#/components/schemas/Error" }, - "description": "Any errors that occurred during the request." + "description": "Information about errors encountered during the request." } }, "example": {} }, - "DeleteWebhookSubscriptionRequest": { - "type": "object", - "description": "Deletes a [Subscription](entity:WebhookSubscription).", - "x-release-status": "PUBLIC", - "properties": {} - }, - "DeleteWebhookSubscriptionResponse": { + "DeleteInvoiceAttachmentResponse": { "type": "object", - "description": "Defines the fields that are included in the response body of\na request to the [DeleteWebhookSubscription](api-endpoint:WebhookSubscriptions-DeleteWebhookSubscription) endpoint.", + "description": "Represents a [DeleteInvoiceAttachment](api-endpoint:Invoices-DeleteInvoiceAttachment) response.", "x-release-status": "PUBLIC", "properties": { "errors": { @@ -18867,43 +21634,30 @@ "items": { "$ref": "#/components/schemas/Error" }, - "description": "Information on errors encountered during the request." + "description": "Information about errors encountered during the request." } }, "example": {} }, - "DeprecatedCreateDisputeEvidenceFileRequest": { + "DeleteInvoiceResponse": { "type": "object", - "description": "Defines the parameters for a `DeprecatedCreateDisputeEvidenceFile` request.", + "description": "Describes a `DeleteInvoice` response.", "x-release-status": "PUBLIC", - "required": [ - "idempotency_key" - ], "properties": { - "idempotency_key": { - "type": "string", - "description": "The Unique ID. For more information, see [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency).", - "minLength": 1, - "maxLength": 45 - }, - "evidence_type": { - "$ref": "#/components/schemas/DisputeEvidenceType", - "description": "The type of evidence you are uploading.\nSee [DisputeEvidenceType](#type-disputeevidencetype) for possible values", - "nullable": true - }, - "content_type": { - "type": "string", - "description": "The MIME type of the uploaded file.\nThe type can be image/heic, image/heif, image/jpeg, application/pdf, image/png, or image/tiff.", - "minLength": 1, - "maxLength": 40, - "nullable": true + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Error" + }, + "description": "Information about errors encountered during the request." } - } + }, + "example": {} }, - "DeprecatedCreateDisputeEvidenceFileResponse": { + "DeleteLocationCustomAttributeDefinitionResponse": { "type": "object", - "description": "Defines the fields in a `DeprecatedCreateDisputeEvidenceFile` response.", - "x-release-status": "PUBLIC", + "description": "Represents a response from a delete request containing error messages if there are any.", + "x-release-status": "BETA", "properties": { "errors": { "type": "array", @@ -18911,61 +21665,142 @@ "$ref": "#/components/schemas/Error" }, "description": "Any errors that occurred during the request." - }, - "evidence": { - "$ref": "#/components/schemas/DisputeEvidence", - "description": "The metadata of the newly uploaded dispute evidence." } }, - "example": { - "evidence": { - "dispute_id": "bVTprrwk0gygTLZ96VX1oB", - "evidence_file": { - "filename": "evidence.tiff", - "filetype": "image/tiff" + "example": {} + }, + "DeleteLocationCustomAttributeResponse": { + "type": "object", + "description": "Represents a [DeleteLocationCustomAttribute](api-endpoint:LocationCustomAttributes-DeleteLocationCustomAttribute) response.\nEither an empty object `{}` (for a successful deletion) or `errors` is present in the response.", + "x-release-status": "BETA", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Error" }, - "evidence_id": "TOomLInj6iWmP3N8qfCXrB", - "evidence_type": "GENERIC_EVIDENCE", - "uploaded_at": "2018-10-18T16:01:10.000Z" + "description": "Any errors that occurred during the request." } - } + }, + "example": {} }, - "DeprecatedCreateDisputeEvidenceTextRequest": { + "DeleteLoyaltyRewardResponse": { "type": "object", - "description": "Defines the parameters for a `DeprecatedCreateDisputeEvidenceText` request.", + "description": "A response returned by the API call.", "x-release-status": "PUBLIC", - "required": [ - "idempotency_key", - "evidence_text" - ], "properties": { - "idempotency_key": { - "type": "string", - "description": "The Unique ID. For more information, see [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency).", - "minLength": 1, - "maxLength": 45 + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Error" + }, + "description": "Any errors that occurred during the request." + } + }, + "example": {} + }, + "DeleteMerchantCustomAttributeDefinitionResponse": { + "type": "object", + "description": "Represents a response from a delete request containing error messages if there are any.", + "x-release-status": "BETA", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Error" + }, + "description": "Any errors that occurred during the request." + } + }, + "example": {} + }, + "DeleteMerchantCustomAttributeResponse": { + "type": "object", + "description": "Represents a [DeleteMerchantCustomAttribute](api-endpoint:MerchantCustomAttributes-DeleteMerchantCustomAttribute) response.\nEither an empty object `{}` (for a successful deletion) or `errors` is present in the response.", + "x-release-status": "BETA", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Error" + }, + "description": "Any errors that occurred during the request." + } + }, + "example": {} + }, + "DeleteOrderCustomAttributeDefinitionResponse": { + "type": "object", + "description": "Represents a response from deleting an order custom attribute definition.", + "x-release-status": "BETA", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Error" + }, + "description": "Any errors that occurred during the request." + } + }, + "example": {} + }, + "DeleteOrderCustomAttributeResponse": { + "type": "object", + "description": "Represents a response from deleting an order custom attribute.", + "x-release-status": "BETA", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Error" + }, + "description": "Any errors that occurred during the request." + } + }, + "example": {} + }, + "DeletePaymentLinkResponse": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Error" + } }, - "evidence_type": { - "$ref": "#/components/schemas/DisputeEvidenceType", - "description": "The type of evidence you are uploading.\nSee [DisputeEvidenceType](#type-disputeevidencetype) for possible values", - "nullable": true + "id": { + "type": "string", + "description": "The ID of the link that is deleted." }, - "evidence_text": { + "cancelled_order_id": { "type": "string", - "description": "The evidence string.", - "minLength": 1, - "maxLength": 500 + "description": "The ID of the order that is canceled. When a payment link is deleted, Square updates the\nthe `state` (of the order that the checkout link created) to CANCELED." } }, "example": { - "evidence_text": "1Z8888888888888888", - "evidence_type": "TRACKING_NUMBER", - "idempotency_key": "ed3ee3933d946f1514d505d173c82648" + "cancelled_order_id": "asx8LgZ6MRzD0fObfkJ6obBmSh4F", + "id": "MQASNYL6QB6DFCJ3" } }, - "DeprecatedCreateDisputeEvidenceTextResponse": { + "DeleteShiftResponse": { + "type": "object", + "description": "The response to a request to delete a `Shift`. The response might contain a set of \n`Error` objects if the request resulted in errors.", + "x-release-status": "DEPRECATED", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Error" + }, + "description": "Any errors that occurred during the request." + } + }, + "example": {} + }, + "DeleteSnippetResponse": { "type": "object", - "description": "Defines the fields in a `DeprecatedCreateDisputeEvidenceText` response.", + "description": "Represents a `DeleteSnippet` response.", "x-release-status": "PUBLIC", "properties": { "errors": { @@ -18974,22 +21809,84 @@ "$ref": "#/components/schemas/Error" }, "description": "Any errors that occurred during the request." + } + }, + "example": {} + }, + "DeleteSubscriptionActionResponse": { + "type": "object", + "description": "Defines output parameters in a response of the [DeleteSubscriptionAction](api-endpoint:Subscriptions-DeleteSubscriptionAction)\nendpoint.", + "x-release-status": "BETA", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Error" + }, + "description": "Errors encountered during the request." }, - "evidence": { - "$ref": "#/components/schemas/DisputeEvidence", - "description": "The newly uploaded dispute evidence metadata." + "subscription": { + "$ref": "#/components/schemas/Subscription", + "description": "The subscription that has the specified action deleted." } }, "example": { - "evidence": { - "dispute_id": "bVTprrwk0gygTLZ96VX1oB", - "evidence_text": "The customer purchased the item twice, on April 11 and April 28.", - "evidence_type": "REBUTTAL_EXPLANATION", - "id": "TOomLInj6iWmP3N8qfCXrB", - "uploaded_at": "2022-05-18T16:01:10.000Z" + "subscription": { + "card_id": "ccof:IkWfpLj4tNHMyFii3GB", + "charged_through_date": "2023-11-20", + "created_at": "2022-07-27T21:53:10Z", + "customer_id": "JDKYHBWT1D4F8MFH63DBMEN8Y4", + "id": "8151fc89-da15-4eb9-a685-1a70883cebfc", + "invoice_ids": [ + "inv:0-ChCHu2mZEabLeeHahQnXDjZQECY", + "inv:0-ChrcX_i3sNmfsHTGKhI4Wg2mceA" + ], + "location_id": "S8GWD5R9QB376", + "paid_until_date": "2024-08-01", + "plan_variation_id": "6JHXF3B2CW3YKHDV4XEM674H", + "price_override_money": { + "amount": 25000, + "currency": "USD" + }, + "source": { + "name": "My Application" + }, + "start_date": "2022-07-27", + "status": "ACTIVE", + "timezone": "America/Los_Angeles" } } }, + "DeleteTimecardResponse": { + "type": "object", + "description": "The response to a request to delete a `Timecard`. The response might contain a set of \n`Error` objects if the request resulted in errors.", + "x-release-status": "PUBLIC", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Error" + }, + "description": "Any errors that occurred during the request." + } + }, + "example": {} + }, + "DeleteWebhookSubscriptionResponse": { + "type": "object", + "description": "Defines the fields that are included in the response body of\na request to the [DeleteWebhookSubscription](api-endpoint:WebhookSubscriptions-DeleteWebhookSubscription) endpoint.", + "x-release-status": "PUBLIC", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Error" + }, + "description": "Information on errors encountered during the request." + } + }, + "example": {} + }, "Destination": { "type": "object", "description": "Information about the destination against which the payout was made.", @@ -19315,6 +22212,107 @@ } } }, + "DeviceCodePairedEvent": { + "type": "object", + "description": "Published when a Square Terminal has been paired with a\nTerminal API client and the device_id of the paired Square Terminal is\navailable.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "location_id": { + "type": "string", + "description": "The ID of the target location associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"device.code.paired\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "RFC 3339 timestamp of when the event was created.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/DeviceCodePairedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-04-10T14:41:58.036Z", + "data": { + "id": "05NK80TRSC2ZF", + "object": { + "device_code": { + "code": "ABCDEF", + "created_at": "2020-04-10T14:41:20.000Z", + "device_id": "907CS13101300122", + "id": "05NK80TRSC2ZF", + "location_id": "AR63EC48VXVBN", + "name": "Terminal API Device created on Apr 10, 2020", + "paired_at": "2020-04-10T14:41:50.000Z", + "product_type": "TERMINAL_API", + "status": "PAIRED", + "status_changed_at": "2020-04-10T14:41:50.000Z" + } + }, + "type": "device_code" + }, + "event_id": "84ccdb8a-da90-4b14-b6b0-c5a5abbccfe6", + "location_id": "AR63EC48VXVBN", + "merchant_id": "7NZR58EPNGNPC", + "type": "device.code.paired" + }, + "x-webhook": { + "event": "device.code.paired", + "scopes": [ + "DEVICE_CREDENTIAL_MANAGEMENT" + ] + }, + "x-api": "#/components/x-apis/Devices", + "x-since": "2020-04-22" + }, + "DeviceCodePairedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "Name of the paired object’s type, `\"device_code\"`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the paired device code." + }, + "object": { + "$ref": "#/components/schemas/DeviceCodePairedEventObject", + "description": "An object containing the paired device code.", + "nullable": true + } + } + }, + "DeviceCodePairedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "device_code": { + "$ref": "#/components/schemas/DeviceCode", + "description": "The created terminal checkout", + "nullable": true + } + } + }, "DeviceCodeStatus": { "type": "string", "enum": [ @@ -19344,11 +22342,6 @@ "description": "DeviceCode.Status enum.", "x-release-status": "PUBLIC" }, - "DeviceComponentDetails": { - "type": "object", - "x-release-status": "BETA", - "properties": {} - }, "DeviceComponentDetailsApplicationDetails": { "type": "object", "x-release-status": "BETA", @@ -19456,17 +22449,6 @@ } } }, - "DeviceComponentDetailsNetworkInterfaceDetails": { - "type": "object", - "x-release-status": "BETA", - "properties": { - "ip_address_v4": { - "type": "string", - "description": "The string representation of the device’s IPv4 address.", - "nullable": true - } - } - }, "DeviceComponentDetailsWiFiDetails": { "type": "object", "x-release-status": "BETA", @@ -19498,6 +22480,149 @@ } } }, + "DeviceCreatedEvent": { + "type": "object", + "description": "Published when a Device is created.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { + "type": "string", + "description": "The merchant the newly created device belongs to.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents. The value is `\"device.created\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A UUID that uniquely identifies this device creation event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The time when the device creation event was first created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/DeviceCreatedEventData", + "description": "The metadata associated with the device creation event.", + "nullable": true + } + }, + "example": { + "created_at": "2023-08-08T16:49:54.990909221Z", + "data": { + "id": "device:3136f66b-f4b0-3846-8722-7fcc55270e50", + "object": { + "device": { + "attributes": { + "manufacturer": "SQUARE", + "manufacturers_id": "3136f66b-f4b0-3846-8722-7fcc55270e50", + "merchant_token": "MLF2HW14529P1", + "model": "T2", + "name": "San Francisco Store - Device 901", + "type": "TERMINAL", + "updated_at": "2023-08-08T16:49:54.990909221Z", + "version": "9.9.3" + }, + "components": [ + { + "battery_details": { + "external_power": "AVAILABLE_INSUFFICIENT", + "visible_percent": 11 + }, + "type": "BATTERY" + }, + { + "card_reader_details": { + "version": "8.5.6" + }, + "type": "CARD_READER" + }, + { + "ethernet_details": { + "active": false, + "ip_address_v4": "109.208.212.40" + }, + "type": "ETHERNET" + }, + { + "type": "WIFI", + "wifi_details": { + "active": true, + "ip_address_v4": "187.180.54.247", + "secure_connection": "WPA/WPA2 PSK", + "signal_strength": { + "value": 3 + }, + "ssid": "San Francisco Store Wifi" + } + }, + { + "application_details": { + "application_type": "TERMINAL_API", + "device_code_id": "G5D3VSVAFYTPB", + "session_location": "LN6WR64FV0VEP", + "version": "8.6.1" + }, + "type": "APPLICATION" + }, + { + "type": "PRINTER" + } + ], + "id": "device:3136f66b-f4b0-3846-8722-7fcc55270e50", + "status": "AVAILABLE" + } + }, + "type": "device" + }, + "event_id": "e2744346-e23d-31e8-9f52-660116750760", + "merchant_id": "MLF2HW14529P1", + "type": "device.created" + }, + "x-webhook": { + "event": "device.created", + "scopes": [ + "DEVICES_READ" + ] + }, + "x-api": "#/components/x-apis/Devices", + "x-since": "2023-09-25" + }, + "DeviceCreatedEventData": { + "type": "object", + "x-release-status": "BETA", + "properties": { + "type": { + "type": "string", + "description": "The type of the event data object. The value is `\"device\"`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "The ID of the device." + }, + "object": { + "$ref": "#/components/schemas/DeviceCreatedEventObject", + "description": "An object containing the created device.", + "nullable": true + } + } + }, + "DeviceCreatedEventObject": { + "type": "object", + "x-release-status": "BETA", + "properties": { + "device": { + "$ref": "#/components/schemas/Device", + "description": "The created device.", + "nullable": true + } + } + }, "DeviceDetails": { "type": "object", "description": "Details about the device that took the payment.", @@ -19647,13 +22772,6 @@ } } }, - "DisableCardRequest": { - "type": "object", - "description": "Disables the card, preventing any further updates or charges. Disabling\nan already disabled card is allowed but has no effect. Accessible via\nHTTP requests at POST https://connect.squareup.com/v2/cards/{card_id}/disable", - "x-release-status": "PUBLIC", - "properties": {}, - "example": {} - }, "DisableCardResponse": { "type": "object", "description": "Defines the fields that are included in the response body of\na request to the [DisableCard](api-endpoint:Cards-DisableCard) endpoint.\n\nNote: if there are errors processing the request, the card field will not be\npresent.", @@ -19700,12 +22818,6 @@ } } }, - "DisableEventsRequest": { - "type": "object", - "description": "Disables [Event](entity:Event)s for your application.", - "x-release-status": "BETA", - "properties": {} - }, "DisableEventsResponse": { "type": "object", "description": "Defines the fields that are included in the response body of\na request to the [DisableEvents](api-endpoint:Events-DisableEvents) endpoint.\n\nNote: if there are errors processing the request, the events field will not be\npresent.", @@ -19721,12 +22833,6 @@ }, "example": {} }, - "DismissTerminalActionRequest": { - "type": "object", - "x-release-status": "BETA", - "properties": {}, - "example": {} - }, "DismissTerminalActionResponse": { "type": "object", "x-release-status": "BETA", @@ -19767,12 +22873,6 @@ } } }, - "DismissTerminalCheckoutRequest": { - "type": "object", - "x-release-status": "BETA", - "properties": {}, - "example": {} - }, "DismissTerminalCheckoutResponse": { "type": "object", "x-release-status": "BETA", @@ -19828,12 +22928,6 @@ } } }, - "DismissTerminalRefundRequest": { - "type": "object", - "x-release-status": "BETA", - "properties": {}, - "example": {} - }, "DismissTerminalRefundResponse": { "type": "object", "x-release-status": "BETA", @@ -20018,6 +23112,115 @@ } } }, + "DisputeCreatedEvent": { + "type": "object", + "description": "Published when a [Dispute](entity:Dispute) is created.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "location_id": { + "type": "string", + "description": "The ID of the target location associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/DisputeCreatedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-02-19T21:24:53.258Z", + "data": { + "id": "ORSEVtZAJxb37RA1EiGw", + "object": { + "dispute": { + "amount_money": { + "amount": 8801, + "currency": "USD" + }, + "brand_dispute_id": "r9rKGSBBQbywBNnWWIiGFg", + "card_brand": "VISA", + "created_at": "2020-02-19T21:24:53.258Z", + "disputed_payment": { + "payment_id": "fbmsaEOpoARDKxiSGH1fqPuqoqFZY" + }, + "due_at": "2020-03-04T00:00:00.000Z", + "id": "ORSEVtZAJxb37RA1EiGw", + "location_id": "VJDQQP3CG14EY", + "reason": "AMOUNT_DIFFERS", + "reported_at": "2020-02-19T00:00:00.000Z", + "state": "EVIDENCE_REQUIRED", + "updated_at": "2020-02-19T21:24:53.258Z", + "version": 1 + } + }, + "type": "dispute" + }, + "event_id": "ce8464b5-6628-4ac2-9264-e06c34df3e82", + "location_id": "VJDQQP3CG14EY", + "merchant_id": "0HPGX5JYE6EE1", + "type": "dispute.created" + }, + "x-webhook": { + "event": "dispute.created", + "scopes": [ + "DISPUTES_READ" + ] + }, + "x-api": "#/components/x-apis/Disputes", + "x-since": "2020-02-26" + }, + "DisputeCreatedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected dispute's type.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the affected dispute." + }, + "object": { + "$ref": "#/components/schemas/DisputeCreatedEventObject", + "description": "An object containing fields and values relevant to the event.", + "nullable": true + } + } + }, + "DisputeCreatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "object": { + "$ref": "#/components/schemas/Dispute", + "description": "The dispute object.", + "nullable": true + } + } + }, "DisputeEvidence": { "type": "object", "x-release-status": "PUBLIC", @@ -20069,6 +23272,336 @@ } } }, + "DisputeEvidenceAddedEvent": { + "type": "object", + "description": "Published when evidence is added to a [Dispute](entity:Dispute)\nfrom the Disputes Dashboard in the Seller Dashboard, the Square Point of Sale app,\nor by calling either [CreateDisputeEvidenceFile](api-endpoint:Disputes-CreateDisputeEvidenceFile) or [CreateDisputeEvidenceText](api-endpoint:Disputes-CreateDisputeEvidenceText).", + "x-release-status": "DEPRECATED", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "location_id": { + "type": "string", + "description": "The ID of the target location associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/DisputeEvidenceAddedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-02-19T21:27:28.851Z", + "data": { + "id": "ORSEVtZAJxb37RA1EiGw", + "object": { + "dispute": { + "amount_money": { + "amount": 8801, + "currency": "USD" + }, + "brand_dispute_id": "r9rKGSBBQbywBNnWWIiGFg", + "card_brand": "VISA", + "created_at": "2020-02-19T21:24:53.258Z", + "dispute_id": "ORSEVtZAJxb37RA1EiGw", + "disputed_payment": { + "payment_id": "fbmsaEOpoARDKxiSGH1fqPuqoqFZY" + }, + "due_at": "2020-03-04T00:00:00.000Z", + "evidence_ids": [ + "oThqMsDS9bM0LdjZzVB4qB" + ], + "location_id": "VJDQQP3CG14EY", + "reason": "AMOUNT_DIFFERS", + "reported_date": "2020-02-19T00:00:00.000Z", + "state": "EVIDENCE_REQUIRED", + "updated_at": "2020-02-19T21:27:28.851Z", + "version": 2 + } + }, + "type": "dispute" + }, + "event_id": "6f606f30-53d0-495a-87f0-958576fc954f", + "location_id": "VJDQQP3CG14EY", + "merchant_id": "0HPGX5JYE6EE1", + "type": "dispute.evidence.added" + }, + "x-webhook": { + "event": "dispute.evidence.added", + "scopes": [ + "PAYMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/Disputes", + "x-since": "2020-02-26" + }, + "DisputeEvidenceAddedEventData": { + "type": "object", + "x-release-status": "DEPRECATED", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected dispute's type.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the affected dispute." + }, + "object": { + "$ref": "#/components/schemas/DisputeEvidenceAddedEventObject", + "description": "An object containing fields and values relevant to the event.", + "nullable": true + } + } + }, + "DisputeEvidenceAddedEventObject": { + "type": "object", + "x-release-status": "DEPRECATED", + "properties": { + "object": { + "$ref": "#/components/schemas/Dispute", + "description": "The dispute object.", + "nullable": true + } + } + }, + "DisputeEvidenceCreatedEvent": { + "type": "object", + "description": "Published when evidence is added to a [Dispute](entity:Dispute)\nfrom the Disputes Dashboard in the Seller Dashboard, the Square Point of Sale app,\nor by calling either [CreateDisputeEvidenceFile](api-endpoint:Disputes-CreateDisputeEvidenceFile) or [CreateDisputeEvidenceText](api-endpoint:Disputes-CreateDisputeEvidenceText).", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "location_id": { + "type": "string", + "description": "The ID of the target location associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/DisputeEvidenceCreatedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-02-19T21:27:28.851Z", + "data": { + "id": "ORSEVtZAJxb37RA1EiGw", + "object": { + "dispute": { + "amount_money": { + "amount": 8801, + "currency": "USD" + }, + "brand_dispute_id": "r9rKGSBBQbywBNnWWIiGFg", + "card_brand": "VISA", + "created_at": "2020-02-19T21:24:53.258Z", + "disputed_payment": { + "payment_id": "fbmsaEOpoARDKxiSGH1fqPuqoqFZY" + }, + "due_at": "2020-03-04T00:00:00.000Z", + "id": "ORSEVtZAJxb37RA1EiGw", + "location_id": "VJDQQP3CG14EY", + "reason": "AMOUNT_DIFFERS", + "reported_at": "2020-02-19T00:00:00.000Z", + "state": "EVIDENCE_REQUIRED", + "updated_at": "2020-02-19T21:27:28.851Z", + "version": 2 + } + }, + "type": "dispute" + }, + "event_id": "6f606f30-53d0-495a-87f0-958576fc954f", + "location_id": "VJDQQP3CG14EY", + "merchant_id": "0HPGX5JYE6EE1", + "type": "dispute.evidence.created" + }, + "x-webhook": { + "event": "dispute.evidence.created", + "scopes": [ + "DISPUTES_READ" + ] + }, + "x-api": "#/components/x-apis/Disputes", + "x-since": "2021-06-16" + }, + "DisputeEvidenceCreatedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected dispute's type.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the affected dispute." + }, + "object": { + "$ref": "#/components/schemas/DisputeEvidenceCreatedEventObject", + "description": "An object containing fields and values relevant to the event.", + "nullable": true + } + } + }, + "DisputeEvidenceCreatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "object": { + "$ref": "#/components/schemas/Dispute", + "description": "The dispute object.", + "nullable": true + } + } + }, + "DisputeEvidenceDeletedEvent": { + "type": "object", + "description": "Published when evidence is removed from a [Dispute](entity:Dispute)\nfrom the Disputes Dashboard in the Seller Dashboard, the Square Point of Sale app,\nor by calling [DeleteDisputeEvidence](api-endpoint:Disputes-DeleteDisputeEvidence).", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "location_id": { + "type": "string", + "description": "The ID of the target location associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/DisputeEvidenceDeletedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-02-19T21:31:55.186Z", + "data": { + "id": "ORSEVtZAJxb37RA1EiGw", + "object": { + "dispute": { + "amount_money": { + "amount": 8801, + "currency": "USD" + }, + "brand_dispute_id": "r9rKGSBBQbywBNnWWIiGFg", + "card_brand": "VISA", + "created_at": "2020-02-19T21:24:53.258Z", + "disputed_payment": { + "payment_id": "fbmsaEOpoARDKxiSGH1fqPuqoqFZY" + }, + "due_at": "2020-03-04T00:00:00.000Z", + "id": "ORSEVtZAJxb37RA1EiGw", + "location_id": "VJDQQP3CG14EY", + "reason": "AMOUNT_DIFFERS", + "reported_at": "2020-02-19T00:00:00.000Z", + "state": "EVIDENCE_REQUIRED", + "updated_at": "2020-02-19T21:31:55.186Z", + "version": 3 + } + }, + "type": "dispute" + }, + "event_id": "e3fd10cc-953b-4f97-83cd-d5b7fa799a8c", + "location_id": "VJDQQP3CG14EY", + "merchant_id": "0HPGX5JYE6EE1", + "type": "dispute.evidence.deleted" + }, + "x-webhook": { + "event": "dispute.evidence.deleted", + "scopes": [ + "DISPUTES_READ" + ] + }, + "x-api": "#/components/x-apis/Disputes", + "x-since": "2021-06-16" + }, + "DisputeEvidenceDeletedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected dispute's type.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the affected dispute." + }, + "object": { + "$ref": "#/components/schemas/DisputeEvidenceDeletedEventObject", + "description": "An object containing fields and values relevant to the event.", + "nullable": true + } + } + }, + "DisputeEvidenceDeletedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "object": { + "$ref": "#/components/schemas/Dispute", + "description": "The dispute object.", + "nullable": true + } + } + }, "DisputeEvidenceFile": { "type": "object", "description": "A file to be uploaded as dispute evidence.", @@ -20090,6 +23623,115 @@ } } }, + "DisputeEvidenceRemovedEvent": { + "type": "object", + "description": "Published when evidence is removed from a [Dispute](entity:Dispute)\nfrom the Disputes Dashboard in the Seller Dashboard, the Square Point of Sale app,\nor by calling [DeleteDisputeEvidence](api-endpoint:Disputes-DeleteDisputeEvidence).", + "x-release-status": "DEPRECATED", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "location_id": { + "type": "string", + "description": "The ID of the target location associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/DisputeEvidenceRemovedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-02-19T21:31:55.186Z", + "data": { + "id": "ORSEVtZAJxb37RA1EiGw", + "object": { + "dispute": { + "amount_money": { + "amount": 8801, + "currency": "USD" + }, + "brand_dispute_id": "r9rKGSBBQbywBNnWWIiGFg", + "card_brand": "VISA", + "created_at": "2020-02-19T21:24:53.258Z", + "dispute_id": "ORSEVtZAJxb37RA1EiGw", + "disputed_payment": { + "payment_id": "fbmsaEOpoARDKxiSGH1fqPuqoqFZY" + }, + "due_at": "2020-03-04T00:00:00.000Z", + "location_id": "VJDQQP3CG14EY", + "reason": "AMOUNT_DIFFERS", + "reported_date": "2020-02-19T00:00:00.000Z", + "state": "EVIDENCE_REQUIRED", + "updated_at": "2020-02-19T21:31:55.186Z", + "version": 3 + } + }, + "type": "dispute" + }, + "event_id": "e3fd10cc-953b-4f97-83cd-d5b7fa799a8c", + "location_id": "VJDQQP3CG14EY", + "merchant_id": "0HPGX5JYE6EE1", + "type": "dispute.evidence.removed" + }, + "x-webhook": { + "event": "dispute.evidence.removed", + "scopes": [ + "PAYMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/Disputes", + "x-since": "2020-02-26" + }, + "DisputeEvidenceRemovedEventData": { + "type": "object", + "x-release-status": "DEPRECATED", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected dispute's type.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the affected dispute." + }, + "object": { + "$ref": "#/components/schemas/DisputeEvidenceRemovedEventObject", + "description": "An object containing fields and values relevant to the event.", + "nullable": true + } + } + }, + "DisputeEvidenceRemovedEventObject": { + "type": "object", + "x-release-status": "DEPRECATED", + "properties": { + "object": { + "$ref": "#/components/schemas/Dispute", + "description": "The dispute object.", + "nullable": true + } + } + }, "DisputeEvidenceType": { "type": "string", "enum": [ @@ -20277,59 +23919,280 @@ "description": "The list of possible dispute states.", "x-release-status": "PUBLIC" }, - "DisputedPayment": { + "DisputeStateChangedEvent": { "type": "object", - "description": "The payment the cardholder disputed.", - "x-release-status": "PUBLIC", + "description": "Published when the state of a [Dispute](entity:Dispute) changes.\nThis includes the dispute resolution (WON, LOST) reported by the bank. The event\ndata includes details of what changed.", + "x-release-status": "DEPRECATED", "properties": { - "payment_id": { + "merchant_id": { "type": "string", - "description": "Square-generated unique ID of the payment being disputed.", - "minLength": 1, - "maxLength": 192, + "description": "The ID of the target merchant associated with the event.", "nullable": true - } - } - }, - "EcomVisibility": { - "type": "string", - "enum": [ - "UNINDEXED", - "UNAVAILABLE", - "HIDDEN", - "VISIBLE" - ], - "x-enum-elements": [ - { - "name": "UNINDEXED", - "description": "Item is not synced with Ecom (Weebly). This is the default state" - }, - { - "name": "UNAVAILABLE", - "description": "Item is synced but is unavailable within Ecom (Weebly) and Online Checkout" - }, - { - "name": "HIDDEN", - "description": "Option for seller to choose manually created Quick Amounts." }, - { - "name": "VISIBLE", - "description": "Item is synced but available within Ecom (Weebly) and Online Checkout but is hidden from Ecom Store." - } - ], - "description": "Determines item visibility in Ecom (Online Store) and Online Checkout.", - "x-release-status": "PUBLIC" - }, - "Employee": { - "type": "object", - "description": "An employee object that is used by the external API.\n\nDEPRECATED at version 2020-08-26. Replaced by [TeamMember](entity:TeamMember).", - "x-release-status": "DEPRECATED", - "properties": { - "id": { + "location_id": { "type": "string", - "description": "UUID for this object." + "description": "The ID of the target location associated with the event.", + "nullable": true }, - "first_name": { + "type": { + "type": "string", + "description": "The type of event this represents.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/DisputeStateChangedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-02-19T21:34:41.851Z", + "data": { + "id": "ORSEVtZAJxb37RA1EiGw", + "object": { + "dispute": { + "amount_money": { + "amount": 8801, + "currency": "USD" + }, + "brand_dispute_id": "r9rKGSBBQbywBNnWWIiGFg", + "card_brand": "VISA", + "created_at": "2020-02-19T21:24:53.258Z", + "dispute_id": "ORSEVtZAJxb37RA1EiGw", + "disputed_payment": { + "payment_id": "fbmsaEOpoARDKxiSGH1fqPuqoqFZY" + }, + "due_at": "2020-03-04T00:00:00.000Z", + "evidence_ids": [ + "Vjq6LG8b95cnnq1AoG5bP" + ], + "location_id": "VJDQQP3CG14EY", + "reason": "AMOUNT_DIFFERS", + "reported_date": "2020-02-19T00:00:00.000Z", + "state": "WON", + "updated_at": "2020-02-19T21:34:41.851Z", + "version": 6 + } + }, + "type": "dispute" + }, + "event_id": "e89ff114-1972-4be0-9481-a621f2385fff", + "location_id": "VJDQQP3CG14EY", + "merchant_id": "0HPGX5JYE6EE1", + "type": "dispute.state.changed" + }, + "x-webhook": { + "event": "dispute.state.changed", + "scopes": [ + "PAYMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/Disputes", + "x-since": "2020-02-26" + }, + "DisputeStateChangedEventData": { + "type": "object", + "x-release-status": "DEPRECATED", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected dispute's type.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the affected dispute." + }, + "object": { + "$ref": "#/components/schemas/DisputeStateChangedEventObject", + "description": "An object containing fields and values relevant to the event.", + "nullable": true + } + } + }, + "DisputeStateChangedEventObject": { + "type": "object", + "x-release-status": "DEPRECATED", + "properties": { + "object": { + "$ref": "#/components/schemas/Dispute", + "description": "The dispute object.", + "nullable": true + } + } + }, + "DisputeStateUpdatedEvent": { + "type": "object", + "description": "Published when the state of a [Dispute](entity:Dispute) changes.\nThis includes the dispute resolution (WON, LOST) reported by the bank. The event\ndata includes details of what changed.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "location_id": { + "type": "string", + "description": "The ID of the target location associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/DisputeStateUpdatedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-02-19T21:34:41.851Z", + "data": { + "id": "ORSEVtZAJxb37RA1EiGw", + "object": { + "dispute": { + "amount_money": { + "amount": 8801, + "currency": "USD" + }, + "brand_dispute_id": "r9rKGSBBQbywBNnWWIiGFg", + "card_brand": "VISA", + "created_at": "2020-02-19T21:24:53.258Z", + "disputed_payment": { + "payment_id": "fbmsaEOpoARDKxiSGH1fqPuqoqFZY" + }, + "due_at": "2020-03-04T00:00:00.000Z", + "id": "ORSEVtZAJxb37RA1EiGw", + "location_id": "VJDQQP3CG14EY", + "reason": "AMOUNT_DIFFERS", + "reported_at": "2020-02-19T00:00:00.000Z", + "state": "WON", + "updated_at": "2020-02-19T21:34:41.851Z", + "version": 6 + } + }, + "type": "dispute" + }, + "event_id": "e89ff114-1972-4be0-9481-a621f2385fff", + "location_id": "VJDQQP3CG14EY", + "merchant_id": "0HPGX5JYE6EE1", + "type": "dispute.state.updated" + }, + "x-webhook": { + "event": "dispute.state.updated", + "scopes": [ + "DISPUTES_READ" + ] + }, + "x-api": "#/components/x-apis/Disputes", + "x-since": "2021-06-16" + }, + "DisputeStateUpdatedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected dispute's type.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the affected dispute." + }, + "object": { + "$ref": "#/components/schemas/DisputeStateUpdatedEventObject", + "description": "An object containing fields and values relevant to the event.", + "nullable": true + } + } + }, + "DisputeStateUpdatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "object": { + "$ref": "#/components/schemas/Dispute", + "description": "The dispute object.", + "nullable": true + } + } + }, + "DisputedPayment": { + "type": "object", + "description": "The payment the cardholder disputed.", + "x-release-status": "PUBLIC", + "properties": { + "payment_id": { + "type": "string", + "description": "Square-generated unique ID of the payment being disputed.", + "minLength": 1, + "maxLength": 192, + "nullable": true + } + } + }, + "EcomVisibility": { + "type": "string", + "enum": [ + "UNINDEXED", + "UNAVAILABLE", + "HIDDEN", + "VISIBLE" + ], + "x-enum-elements": [ + { + "name": "UNINDEXED", + "description": "Item is not synced with Ecom (Weebly). This is the default state" + }, + { + "name": "UNAVAILABLE", + "description": "Item is synced but is unavailable within Ecom (Weebly) and Online Checkout" + }, + { + "name": "HIDDEN", + "description": "Option for seller to choose manually created Quick Amounts." + }, + { + "name": "VISIBLE", + "description": "Item is synced but available within Ecom (Weebly) and Online Checkout but is hidden from Ecom Store." + } + ], + "description": "Determines item visibility in Ecom (Online Store) and Online Checkout.", + "x-release-status": "PUBLIC" + }, + "Employee": { + "type": "object", + "description": "An employee object that is used by the external API.\n\nDEPRECATED at version 2020-08-26. Replaced by [TeamMember](entity:TeamMember).", + "x-release-status": "DEPRECATED", + "properties": { + "id": { + "type": "string", + "description": "UUID for this object." + }, + "first_name": { "type": "string", "description": "The employee's first name.", "nullable": true @@ -20424,12 +24287,6 @@ } } }, - "EnableEventsRequest": { - "type": "object", - "description": "Enables [Event](entity:Event)s for your application.", - "x-release-status": "BETA", - "properties": {} - }, "EnableEventsResponse": { "type": "object", "description": "Defines the fields that are included in the response body of\na request to the [EnableEvents](api-endpoint:Events-EnableEvents) endpoint.\n\nNote: if there are errors processing the request, the events field will not be\npresent.", @@ -22242,12 +26099,6 @@ "description": "The type of fulfillment.", "x-release-status": "PUBLIC" }, - "GetBankAccountByV1IdRequest": { - "type": "object", - "description": "Request object for fetching a specific `BankAccount`\nby the object ID.", - "x-release-status": "PUBLIC", - "properties": {} - }, "GetBankAccountByV1IdResponse": { "type": "object", "description": "Response object returned by GetBankAccountByV1Id.", @@ -22283,12 +26134,6 @@ } } }, - "GetBankAccountRequest": { - "type": "object", - "description": "Request object to fetch a specific `BankAccount`\nby the object ID.", - "x-release-status": "PUBLIC", - "properties": {} - }, "GetBankAccountResponse": { "type": "object", "description": "Response object returned by `GetBankAccount`.", @@ -22324,12 +26169,6 @@ } } }, - "GetBreakTypeRequest": { - "type": "object", - "description": "A request to get a `BreakType` by ID.", - "x-release-status": "PUBLIC", - "properties": {} - }, "GetBreakTypeResponse": { "type": "object", "description": "The response to a request to get a `BreakType`. The response contains\nthe requested `BreakType` objects and might contain a set of `Error` objects if\nthe request resulted in errors.", @@ -22360,12 +26199,6 @@ } } }, - "GetDeviceCodeRequest": { - "type": "object", - "x-release-status": "PUBLIC", - "properties": {}, - "example": {} - }, "GetDeviceCodeResponse": { "type": "object", "x-release-status": "PUBLIC", @@ -22397,12 +26230,6 @@ } } }, - "GetDeviceRequest": { - "type": "object", - "x-release-status": "BETA", - "properties": {}, - "example": {} - }, "GetDeviceResponse": { "type": "object", "x-release-status": "BETA", @@ -22479,12 +26306,6 @@ } } }, - "GetEmployeeWageRequest": { - "type": "object", - "description": "A request to get an `EmployeeWage`.", - "x-release-status": "DEPRECATED", - "properties": {} - }, "GetEmployeeWageResponse": { "type": "object", "description": "A response to a request to get an `EmployeeWage`. The response contains\nthe requested `EmployeeWage` objects and might contain a set of `Error` objects if\nthe request resulted in errors.", @@ -22514,12 +26335,6 @@ } } }, - "GetInvoiceRequest": { - "type": "object", - "description": "Describes a `GetInvoice` request.", - "x-release-status": "PUBLIC", - "properties": {} - }, "GetInvoiceResponse": { "type": "object", "description": "Describes a `GetInvoice` response.", @@ -22608,13 +26423,6 @@ } } }, - "GetPaymentRefundRequest": { - "type": "object", - "description": "Describes a request to retrieve a refund using\n[GetPaymentRefund](api-endpoint:Refunds-GetPaymentRefund).", - "x-release-status": "PUBLIC", - "properties": {}, - "example": {} - }, "GetPaymentRefundResponse": { "type": "object", "description": "Defines the response returned by [GetRefund](api-endpoint:Refunds-GetPaymentRefund).\n\nNote: If there are errors processing the request, the refund field might not be\npresent or it might be present in a FAILED state.", @@ -22659,13 +26467,6 @@ } } }, - "GetPaymentRequest": { - "type": "object", - "description": "Describes a request to retrieve a payment using \n[GetPayment](api-endpoint:Payments-GetPayment).", - "x-release-status": "PUBLIC", - "properties": {}, - "example": {} - }, "GetPaymentResponse": { "type": "object", "description": "Defines the response returned by [GetPayment](api-endpoint:Payments-GetPayment).", @@ -22752,12 +26553,6 @@ } } }, - "GetPayoutRequest": { - "type": "object", - "x-release-status": "PUBLIC", - "properties": {}, - "example": {} - }, "GetPayoutResponse": { "type": "object", "x-release-status": "PUBLIC", @@ -22795,12 +26590,6 @@ } } }, - "GetShiftRequest": { - "type": "object", - "description": "A request to get a `Shift` by ID.", - "x-release-status": "DEPRECATED", - "properties": {} - }, "GetShiftResponse": { "type": "object", "description": "A response to a request to get a `Shift`. The response contains\nthe requested `Shift` object and might contain a set of `Error` objects if\nthe request resulted in errors.", @@ -22858,12 +26647,6 @@ } } }, - "GetTeamMemberWageRequest": { - "type": "object", - "description": "A request to get a `TeamMemberWage`.", - "x-release-status": "PUBLIC", - "properties": {} - }, "GetTeamMemberWageResponse": { "type": "object", "description": "A response to a request to get a `TeamMemberWage`. The response contains\nthe requested `TeamMemberWage` objects and might contain a set of `Error` objects if\nthe request resulted in errors.", @@ -22895,12 +26678,6 @@ } } }, - "GetTerminalActionRequest": { - "type": "object", - "x-release-status": "BETA", - "properties": {}, - "example": {} - }, "GetTerminalActionResponse": { "type": "object", "x-release-status": "BETA", @@ -22935,12 +26712,6 @@ } } }, - "GetTerminalCheckoutRequest": { - "type": "object", - "x-release-status": "PUBLIC", - "properties": {}, - "example": {} - }, "GetTerminalCheckoutResponse": { "type": "object", "x-release-status": "PUBLIC", @@ -22982,12 +26753,6 @@ } } }, - "GetTerminalRefundRequest": { - "type": "object", - "x-release-status": "PUBLIC", - "properties": {}, - "example": {} - }, "GetTerminalRefundResponse": { "type": "object", "x-release-status": "PUBLIC", @@ -23240,1973 +27005,5013 @@ } } }, - "GiftCardActivityAdjustDecrement": { + "GiftCardActivityAdjustDecrement": { + "type": "object", + "description": "Represents details about an `ADJUST_DECREMENT` [gift card activity type](entity:GiftCardActivityType).", + "x-release-status": "PUBLIC", + "required": [ + "amount_money", + "reason" + ], + "properties": { + "amount_money": { + "$ref": "#/components/schemas/Money", + "description": "The amount deducted from the gift card balance. This value is a positive integer." + }, + "reason": { + "$ref": "#/components/schemas/GiftCardActivityAdjustDecrementReason", + "description": "The reason the gift card balance was adjusted.\nSee [Reason](#type-reason) for possible values" + } + } + }, + "GiftCardActivityAdjustDecrementReason": { + "type": "string", + "enum": [ + "SUSPICIOUS_ACTIVITY", + "BALANCE_ACCIDENTALLY_INCREASED", + "SUPPORT_ISSUE", + "PURCHASE_WAS_REFUNDED" + ], + "x-enum-elements": [ + { + "name": "SUSPICIOUS_ACTIVITY", + "description": "The balance was decreased because the seller detected suspicious or fraudulent activity\non the gift card." + }, + { + "name": "BALANCE_ACCIDENTALLY_INCREASED", + "description": "The balance was decreased to reverse an unintentional balance increase." + }, + { + "name": "SUPPORT_ISSUE", + "description": "The balance was decreased to accommodate support issues." + }, + { + "name": "PURCHASE_WAS_REFUNDED", + "description": "The balance was decreased because the order used to purchase or reload the\ngift card was refunded." + } + ], + "description": "Indicates the reason for deducting money from a [gift card](entity:GiftCard).", + "x-release-status": "PUBLIC" + }, + "GiftCardActivityAdjustIncrement": { + "type": "object", + "description": "Represents details about an `ADJUST_INCREMENT` [gift card activity type](entity:GiftCardActivityType).", + "x-release-status": "PUBLIC", + "required": [ + "amount_money", + "reason" + ], + "properties": { + "amount_money": { + "$ref": "#/components/schemas/Money", + "description": "The amount added to the gift card balance. This value is a positive integer." + }, + "reason": { + "$ref": "#/components/schemas/GiftCardActivityAdjustIncrementReason", + "description": "The reason the gift card balance was adjusted.\nSee [Reason](#type-reason) for possible values" + } + } + }, + "GiftCardActivityAdjustIncrementReason": { + "type": "string", + "enum": [ + "COMPLIMENTARY", + "SUPPORT_ISSUE", + "TRANSACTION_VOIDED" + ], + "x-enum-elements": [ + { + "name": "COMPLIMENTARY", + "description": "The seller gifted a complimentary gift card balance increase." + }, + { + "name": "SUPPORT_ISSUE", + "description": "The seller increased the gift card balance \nto accommodate support issues." + }, + { + "name": "TRANSACTION_VOIDED", + "description": "The transaction is voided." + } + ], + "description": "Indicates the reason for adding money to a [gift card](entity:GiftCard).", + "x-release-status": "PUBLIC" + }, + "GiftCardActivityBlock": { + "type": "object", + "description": "Represents details about a `BLOCK` [gift card activity type](entity:GiftCardActivityType).", + "x-release-status": "PUBLIC", + "required": [ + "reason" + ], + "properties": { + "reason": { + "$ref": "#/components/schemas/GiftCardActivityBlockReason", + "description": "The reason the gift card was blocked.\nSee [Reason](#type-reason) for possible values" + } + } + }, + "GiftCardActivityBlockReason": { + "type": "string", + "enum": [ + "CHARGEBACK_BLOCK" + ], + "x-enum-elements": [ + { + "name": "CHARGEBACK_BLOCK", + "description": "The gift card is blocked because the buyer initiated a chargeback on the gift card purchase." + } + ], + "description": "Indicates the reason for blocking a [gift card](entity:GiftCard).", + "x-release-status": "PUBLIC" + }, + "GiftCardActivityClearBalance": { + "type": "object", + "description": "Represents details about a `CLEAR_BALANCE` [gift card activity type](entity:GiftCardActivityType).", + "x-release-status": "PUBLIC", + "required": [ + "reason" + ], + "properties": { + "reason": { + "$ref": "#/components/schemas/GiftCardActivityClearBalanceReason", + "description": "The reason the gift card balance was cleared.\nSee [Reason](#type-reason) for possible values" + } + } + }, + "GiftCardActivityClearBalanceReason": { + "type": "string", + "enum": [ + "SUSPICIOUS_ACTIVITY", + "REUSE_GIFTCARD", + "UNKNOWN_REASON" + ], + "x-enum-elements": [ + { + "name": "SUSPICIOUS_ACTIVITY", + "description": "The seller suspects suspicious activity." + }, + { + "name": "REUSE_GIFTCARD", + "description": "The seller cleared the balance to reuse the gift card." + }, + { + "name": "UNKNOWN_REASON", + "description": "The gift card balance was cleared for an unknown reason.\n\nThis reason is read-only and cannot be used to create a `CLEAR_BALANCE` activity using the Gift Card Activities API." + } + ], + "description": "Indicates the reason for clearing the balance of a [gift card](entity:GiftCard).", + "x-release-status": "PUBLIC" + }, + "GiftCardActivityCreatedEvent": { + "type": "object", + "description": "Published when a [gift card activity](entity:GiftCardActivity) is created.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the Square seller associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event. For this event, the value is `gift_card.activity.created`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "The unique ID of the event, which is used for \n[idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices).", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/GiftCardActivityCreatedEventData", + "description": "The data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-12-17T03:41:35.157Z", + "data": { + "id": "gcact_c8f8cbf1f24b448d8ecf39ed03f97864", + "object": { + "gift_card_activity": { + "activate_activity_details": { + "amount_money": { + "amount": 1000, + "currency": "USD" + }, + "line_item_uid": "eIWl7X0nMuO9Ewbh0ChIx", + "order_id": "jJNGHm4gLI6XkFbwtiSLqK72KkAZY" + }, + "created_at": "2020-12-17T01:41:35.157Z", + "gift_card_balance_money": { + "amount": 1000, + "currency": "USD" + }, + "gift_card_gan": "7783320007480908", + "gift_card_id": "gftc:00113070ba5745f0b2377c1b9570cb03", + "id": "gcact_c8f8cbf1f24b448d8ecf39ed03f97864", + "location_id": "81FN9BNFZTKS4", + "type": "ACTIVATE" + } + }, + "type": "gift_card_activity" + }, + "event_id": "875f2038-6015-492e-9f29-d040b3809e49", + "merchant_id": "C337NFWQT2A6W", + "type": "gift_card.activity.created" + }, + "x-webhook": { + "event": "gift_card.activity.created", + "scopes": [ + "GIFTCARDS_READ" + ] + }, + "x-api": "#/components/x-apis/GiftCardActivities", + "x-since": "2021-06-16" + }, + "GiftCardActivityCreatedEventData": { + "type": "object", + "description": "Represents the data associated with a `gift_card.activity.created` event.", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "The type of object affected by the event. For this event, the value is `gift_card_activity`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "The ID of the new gift card activity." + }, + "object": { + "$ref": "#/components/schemas/GiftCardActivityCreatedEventObject", + "description": "An object that contains the new gift card activity.", + "nullable": true + } + } + }, + "GiftCardActivityCreatedEventObject": { + "type": "object", + "description": "An object that contains the gift card activity associated with a \n`gift_card.activity.created` event.", + "x-release-status": "PUBLIC", + "properties": { + "gift_card_activity": { + "$ref": "#/components/schemas/GiftCardActivity", + "description": "The new gift card activity.", + "nullable": true + } + } + }, + "GiftCardActivityDeactivate": { + "type": "object", + "description": "Represents details about a `DEACTIVATE` [gift card activity type](entity:GiftCardActivityType).", + "x-release-status": "PUBLIC", + "required": [ + "reason" + ], + "properties": { + "reason": { + "$ref": "#/components/schemas/GiftCardActivityDeactivateReason", + "description": "The reason the gift card was deactivated.\nSee [Reason](#type-reason) for possible values" + } + } + }, + "GiftCardActivityDeactivateReason": { + "type": "string", + "enum": [ + "SUSPICIOUS_ACTIVITY", + "UNKNOWN_REASON", + "CHARGEBACK_DEACTIVATE" + ], + "x-enum-elements": [ + { + "name": "SUSPICIOUS_ACTIVITY", + "description": "The seller suspects suspicious activity." + }, + { + "name": "UNKNOWN_REASON", + "description": "The gift card was deactivated for an unknown reason.\n\nThis reason is read-only and cannot be used to create a `DEACTIVATE` activity using the Gift Card Activities API." + }, + { + "name": "CHARGEBACK_DEACTIVATE", + "description": "A chargeback on the gift card purchase (or the gift card load) was ruled in favor of the buyer.\n\nThis reason is read-only and cannot be used to create a `DEACTIVATE` activity using the Gift Card Activities API." + } + ], + "description": "Indicates the reason for deactivating a [gift card](entity:GiftCard).", + "x-release-status": "PUBLIC" + }, + "GiftCardActivityImport": { + "type": "object", + "description": "Represents details about an `IMPORT` [gift card activity type](entity:GiftCardActivityType).\nThis activity type is used when Square imports a third-party gift card, in which case the \n`gan_source` of the gift card is set to `OTHER`.", + "x-release-status": "PUBLIC", + "required": [ + "amount_money" + ], + "properties": { + "amount_money": { + "$ref": "#/components/schemas/Money", + "description": "The balance amount on the imported gift card." + } + } + }, + "GiftCardActivityImportReversal": { + "type": "object", + "description": "Represents details about an `IMPORT_REVERSAL` [gift card activity type](entity:GiftCardActivityType).", + "x-release-status": "PUBLIC", + "required": [ + "amount_money" + ], + "properties": { + "amount_money": { + "$ref": "#/components/schemas/Money", + "description": "The amount of money cleared from the third-party gift card when \nthe import was reversed." + } + } + }, + "GiftCardActivityLoad": { + "type": "object", + "description": "Represents details about a `LOAD` [gift card activity type](entity:GiftCardActivityType).", + "x-release-status": "PUBLIC", + "properties": { + "amount_money": { + "$ref": "#/components/schemas/Money", + "description": "The amount added to the gift card. This value is a positive integer.\n\nApplications that use a custom order processing system must specify this amount in the \n[CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request.", + "nullable": true + }, + "order_id": { + "type": "string", + "description": "The ID of the [order](entity:Order) that contains the `GIFT_CARD` line item.\n\nApplications that use the Square Orders API to process orders must specify the order ID in the \n[CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request.", + "nullable": true + }, + "line_item_uid": { + "type": "string", + "description": "The UID of the `GIFT_CARD` line item in the order that represents the additional funds for the gift card.\n\nApplications that use the Square Orders API to process orders must specify the line item UID\nin the [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request.", + "nullable": true + }, + "reference_id": { + "type": "string", + "description": "A client-specified ID that associates the gift card activity with an entity in another system. \n\nApplications that use a custom order processing system can use this field to track information related to \nan order or payment.", + "nullable": true + }, + "buyer_payment_instrument_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The payment instrument IDs used to process the order for the additional funds, such as a credit card ID \nor bank account ID. \n\nApplications that use a custom order processing system must specify payment instrument IDs in \nthe [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request.\nSquare uses this information to perform compliance checks. \n\nFor applications that use the Square Orders API to process payments, Square has the necessary \ninstrument IDs to perform compliance checks.\n\nEach buyer payment instrument ID can contain a maximum of 255 characters.", + "nullable": true + } + } + }, + "GiftCardActivityRedeem": { + "type": "object", + "description": "Represents details about a `REDEEM` [gift card activity type](entity:GiftCardActivityType).", + "x-release-status": "PUBLIC", + "required": [ + "amount_money" + ], + "properties": { + "amount_money": { + "$ref": "#/components/schemas/Money", + "description": "The amount deducted from the gift card for the redemption. This value is a positive integer.\n\nApplications that use a custom payment processing system must specify this amount in the \n[CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request." + }, + "payment_id": { + "type": "string", + "description": "The ID of the payment that represents the gift card redemption. Square populates this field \nif the payment was processed by Square.", + "readOnly": true + }, + "reference_id": { + "type": "string", + "description": "A client-specified ID that associates the gift card activity with an entity in another system. \n\nApplications that use a custom payment processing system can use this field to track information\nrelated to an order or payment.", + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/GiftCardActivityRedeemStatus", + "description": "The status of the gift card redemption. Gift cards redeemed from Square Point of Sale or the \nSquare Seller Dashboard use a two-state process: `PENDING` \nto `COMPLETED` or `PENDING` to `CANCELED`. Gift cards redeemed using the Gift Card Activities API \nalways have a `COMPLETED` status.\nSee [Status](#type-status) for possible values", + "readOnly": true + } + } + }, + "GiftCardActivityRedeemStatus": { + "type": "string", + "enum": [ + "PENDING", + "COMPLETED", + "CANCELED" + ], + "x-enum-elements": [ + { + "name": "PENDING", + "description": "The gift card redemption is pending. `PENDING` is a temporary status that applies when a \ngift card is redeemed from Square Point of Sale or another Square product. A `PENDING` status is updated to \n`COMPLETED` if the payment is captured or `CANCELED` if the authorization is voided." + }, + { + "name": "COMPLETED", + "description": "The gift card redemption is completed." + }, + { + "name": "CANCELED", + "description": "The gift card redemption is canceled. A redemption is canceled if the authorization \non the gift card is voided." + } + ], + "description": "Indicates the status of a [gift card](entity:GiftCard) redemption. This status is relevant only for\nredemptions made from Square products (such as Square Point of Sale) because Square products use a \ntwo-state process. Gift cards redeemed using the Gift Card Activities API always have a `COMPLETED` status.", + "x-release-status": "PUBLIC" + }, + "GiftCardActivityRefund": { + "type": "object", + "description": "Represents details about a `REFUND` [gift card activity type](entity:GiftCardActivityType).", + "x-release-status": "PUBLIC", + "properties": { + "redeem_activity_id": { + "type": "string", + "description": "The ID of the refunded `REDEEM` gift card activity. Square populates this field if the \n`payment_id` in the corresponding [RefundPayment](api-endpoint:Refunds-RefundPayment) request \nrepresents a gift card redemption.\n\nFor applications that use a custom payment processing system, this field is required when creating\na `REFUND` activity. The provided `REDEEM` activity ID must be linked to the same gift card.", + "nullable": true + }, + "amount_money": { + "$ref": "#/components/schemas/Money", + "description": "The amount added to the gift card for the refund. This value is a positive integer.\n\nThis field is required when creating a `REFUND` activity. The amount can represent a full or partial refund.", + "nullable": true + }, + "reference_id": { + "type": "string", + "description": "A client-specified ID that associates the gift card activity with an entity in another system.", + "nullable": true + }, + "payment_id": { + "type": "string", + "description": "The ID of the refunded payment. Square populates this field if the refund is for a \npayment processed by Square. This field matches the `payment_id` in the corresponding\n[RefundPayment](api-endpoint:Refunds-RefundPayment) request.", + "readOnly": true + } + } + }, + "GiftCardActivityTransferBalanceFrom": { + "type": "object", + "description": "Represents details about a `TRANSFER_BALANCE_FROM` [gift card activity type](entity:GiftCardActivityType).", + "x-release-status": "PUBLIC", + "required": [ + "transfer_to_gift_card_id", + "amount_money" + ], + "properties": { + "transfer_to_gift_card_id": { + "type": "string", + "description": "The ID of the gift card to which the specified amount was transferred." + }, + "amount_money": { + "$ref": "#/components/schemas/Money", + "description": "The amount deducted from the gift card for the transfer. This value is a positive integer." + } + } + }, + "GiftCardActivityTransferBalanceTo": { + "type": "object", + "description": "Represents details about a `TRANSFER_BALANCE_TO` [gift card activity type](entity:GiftCardActivityType).", + "x-release-status": "PUBLIC", + "required": [ + "transfer_from_gift_card_id", + "amount_money" + ], + "properties": { + "transfer_from_gift_card_id": { + "type": "string", + "description": "The ID of the gift card from which the specified amount was transferred." + }, + "amount_money": { + "$ref": "#/components/schemas/Money", + "description": "The amount added to the gift card balance for the transfer. This value is a positive integer." + } + } + }, + "GiftCardActivityType": { + "type": "string", + "enum": [ + "ACTIVATE", + "LOAD", + "REDEEM", + "CLEAR_BALANCE", + "DEACTIVATE", + "ADJUST_INCREMENT", + "ADJUST_DECREMENT", + "REFUND", + "UNLINKED_ACTIVITY_REFUND", + "IMPORT", + "BLOCK", + "UNBLOCK", + "IMPORT_REVERSAL", + "TRANSFER_BALANCE_FROM", + "TRANSFER_BALANCE_TO" + ], + "x-enum-elements": [ + { + "name": "ACTIVATE", + "description": "Activated a gift card with a balance. When a gift card is activated, Square changes \nthe gift card state from `PENDING` to `ACTIVE`. A gift card must be in the `ACTIVE` state \nto be used for other balance-changing activities." + }, + { + "name": "LOAD", + "description": "Loaded a gift card with additional funds." + }, + { + "name": "REDEEM", + "description": "Redeemed a gift card for a purchase." + }, + { + "name": "CLEAR_BALANCE", + "description": "Set the balance of a gift card to zero." + }, + { + "name": "DEACTIVATE", + "description": "Permanently blocked a gift card from balance-changing activities." + }, + { + "name": "ADJUST_INCREMENT", + "description": "Added money to a gift card outside of a typical `ACTIVATE`, `LOAD`, or `REFUND` activity flow." + }, + { + "name": "ADJUST_DECREMENT", + "description": "Deducted money from a gift card outside of a typical `REDEEM` activity flow." + }, + { + "name": "REFUND", + "description": "Added money to a gift card from a refunded transaction. A `REFUND` activity might be linked to \na Square payment, depending on how the payment and refund are processed. For example:\n- A payment processed by Square can be refunded to a `PENDING` or `ACTIVE` gift card using the Square\nSeller Dashboard, Square Point of Sale, or Refunds API.\n- A payment processed using a custom processing system can be refunded to the same gift card." + }, + { + "name": "UNLINKED_ACTIVITY_REFUND", + "description": "Added money to a gift card from a refunded transaction that was processed using a custom payment\nprocessing system and not linked to the gift card." + }, + { + "name": "IMPORT", + "description": "Imported a third-party gift card with a balance. `IMPORT` activities are managed \nby Square and cannot be created using the Gift Card Activities API." + }, + { + "name": "BLOCK", + "description": "Temporarily blocked a gift card from balance-changing activities. `BLOCK` activities \nare managed by Square and cannot be created using the Gift Card Activities API." + }, + { + "name": "UNBLOCK", + "description": "Unblocked a gift card, which enables it to resume balance-changing activities. `UNBLOCK` \nactivities are managed by Square and cannot be created using the Gift Card Activities API." + }, + { + "name": "IMPORT_REVERSAL", + "description": "Reversed the import of a third-party gift card, which sets the gift card state to \n`PENDING` and clears the balance. `IMPORT_REVERSAL` activities are managed by Square and \ncannot be created using the Gift Card Activities API." + }, + { + "name": "TRANSFER_BALANCE_FROM", + "description": "Deducted money from a gift card as the result of a transfer to the balance of another gift card.\n`TRANSFER_BALANCE_FROM` activities are managed by Square and cannot be created using the Gift Card Activities API." + }, + { + "name": "TRANSFER_BALANCE_TO", + "description": "Added money to a gift card as the result of a transfer from the balance of another gift card.\n`TRANSFER_BALANCE_TO` activities are managed by Square and cannot be created using the Gift Card Activities API." + } + ], + "description": "Indicates the type of [gift card activity](entity:GiftCardActivity).", + "x-release-status": "PUBLIC" + }, + "GiftCardActivityUnblock": { + "type": "object", + "description": "Represents details about an `UNBLOCK` [gift card activity type](entity:GiftCardActivityType).", + "x-release-status": "PUBLIC", + "required": [ + "reason" + ], + "properties": { + "reason": { + "$ref": "#/components/schemas/GiftCardActivityUnblockReason", + "description": "The reason the gift card was unblocked.\nSee [Reason](#type-reason) for possible values" + } + } + }, + "GiftCardActivityUnblockReason": { + "type": "string", + "enum": [ + "CHARGEBACK_UNBLOCK" + ], + "x-enum-elements": [ + { + "name": "CHARGEBACK_UNBLOCK", + "description": "The gift card is unblocked because a chargeback was ruled in favor of the seller." + } + ], + "description": "Indicates the reason for unblocking a [gift card](entity:GiftCard).", + "x-release-status": "PUBLIC" + }, + "GiftCardActivityUnlinkedActivityRefund": { + "type": "object", + "description": "Represents details about an `UNLINKED_ACTIVITY_REFUND` [gift card activity type](entity:GiftCardActivityType).", + "x-release-status": "PUBLIC", + "required": [ + "amount_money" + ], + "properties": { + "amount_money": { + "$ref": "#/components/schemas/Money", + "description": "The amount added to the gift card for the refund. This value is a positive integer." + }, + "reference_id": { + "type": "string", + "description": "A client-specified ID that associates the gift card activity with an entity in another system.", + "nullable": true + }, + "payment_id": { + "type": "string", + "description": "The ID of the refunded payment. This field is not used starting in Square version 2022-06-16.", + "readOnly": true + } + } + }, + "GiftCardActivityUpdatedEvent": { + "type": "object", + "description": "Published when a [gift card activity](entity:GiftCardActivity) is updated. \nSubscribe to this event to be notified about the following changes:\n- An update to the `REDEEM` activity for a gift card redemption made from a Square product (such as Square Point of Sale). \nThese redemptions are initially assigned a `PENDING` state, but then change to a `COMPLETED` or `CANCELED` state.\n- An update to the `IMPORT` activity for an imported gift card when the balance is later adjusted by Square.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the Square seller associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event. For this event, the value is `gift_card.activity.updated`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "The unique ID of the event, which is used for \n[idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices).", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/GiftCardActivityUpdatedEventData", + "description": "The data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-12-17T03:41:35.157Z", + "data": { + "id": "gcact_c8f8cbf1f24b448d8ecf39ed03f97864", + "object": { + "gift_card_activity": { + "created_at": "2020-12-17T01:41:35.157Z", + "gift_card_balance_money": { + "amount": 1500, + "currency": "USD" + }, + "gift_card_gan": "7783320007480908", + "gift_card_id": "gftc:00113070ba5745f0b2377c1b9570cb03", + "id": "gcact_c8f8cbf1f24b448d8ecf39ed03f97864", + "import_activity_details": { + "amount_money": { + "amount": 1500, + "currency": "USD" + } + }, + "location_id": "81FN9BNFZTKS4", + "type": "IMPORT" + } + }, + "type": "gift_card_activity" + }, + "event_id": "875f2038-6015-492e-9f29-d040b3809e49", + "merchant_id": "C337NFWQT2A6W", + "type": "gift_card.activity.updated" + }, + "x-webhook": { + "event": "gift_card.activity.updated", + "scopes": [ + "GIFTCARDS_READ" + ] + }, + "x-api": "#/components/x-apis/GiftCardActivities", + "x-since": "2022-06-16" + }, + "GiftCardActivityUpdatedEventData": { + "type": "object", + "description": "The data associated with a `gift_card.activity.updated` event.", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "The type of object affected by the event. For this event, the value is `gift_card_activity`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "The ID of the updated gift card activity." + }, + "object": { + "$ref": "#/components/schemas/GiftCardActivityUpdatedEventObject", + "description": "An object that contains the updated gift card activity.", + "nullable": true + } + } + }, + "GiftCardActivityUpdatedEventObject": { + "type": "object", + "description": "An object that contains the gift card activity associated with a \n`gift_card.activity.updated` event.", + "x-release-status": "PUBLIC", + "properties": { + "gift_card_activity": { + "$ref": "#/components/schemas/GiftCardActivity", + "description": "The updated gift card activity.", + "nullable": true + } + } + }, + "GiftCardCreatedEvent": { + "type": "object", + "description": "Published when a [gift card](entity:GiftCard) is created.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the Square seller associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event. For this event, the value is `gift_card.created`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "The unique ID of the event, which is used for \n[idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices).", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/GiftCardCreatedEventData", + "description": "The data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-12-17T01:41:35.157Z", + "data": { + "id": "gftc:00113070ba5745f0b2377c1b9570cb03", + "object": { + "gift_card": { + "balance_money": { + "amount": 0, + "currency": "USD" + }, + "created_at": "2020-12-17T01:41:35.157Z", + "gan": "7783320007480908", + "gan_source": "SQUARE", + "id": "gftc:00113070ba5745f0b2377c1b9570cb03", + "state": "NOT_ACTIVE", + "type": "DIGITAL" + } + }, + "type": "gift_card" + }, + "event_id": "875f2038-6015-492e-9f29-d040b3809e49", + "merchant_id": "C337NFWQT2A6W", + "type": "gift_card.created" + }, + "x-webhook": { + "event": "gift_card.created", + "scopes": [ + "GIFTCARDS_READ" + ] + }, + "x-api": "#/components/x-apis/GiftCards", + "x-since": "2021-06-16" + }, + "GiftCardCreatedEventData": { + "type": "object", + "description": "The data associated with a `gift_card.created` event.", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "The type of object affected by the event. For this event, the value is `gift_card`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "The ID of the new gift card." + }, + "object": { + "$ref": "#/components/schemas/GiftCardCreatedEventObject", + "description": "An object that contains the new gift card.", + "nullable": true + } + } + }, + "GiftCardCreatedEventObject": { + "type": "object", + "description": "An object that contains the gift card associated with a `gift_card.created` event.", + "x-release-status": "PUBLIC", + "properties": { + "gift_card": { + "$ref": "#/components/schemas/GiftCard", + "description": "The new gift card.", + "nullable": true + } + } + }, + "GiftCardCustomerLinkedEvent": { + "type": "object", + "description": "Published when a [customer](entity:Customer) is linked to a [gift card](entity:GiftCard).", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the Square seller associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event. For this event, the value is `gift_card.customer_linked`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "The unique ID of the event, which is used for \n[idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices).", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/GiftCardCustomerLinkedEventData", + "description": "The data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-12-17T03:41:35.157Z", + "data": { + "id": "gftc:00113070ba5745f0b2377c1b9570cb03", + "object": { + "gift_card": { + "balance_money": { + "amount": 1500, + "currency": "USD" + }, + "created_at": "2020-12-17T01:41:35.157Z", + "customer_ids": [ + "QPTXM8PQNX3Q726ZYHPMNP46XC" + ], + "gan": "7783320007480908", + "gan_source": "SQUARE", + "id": "gftc:00113070ba5745f0b2377c1b9570cb03", + "state": "ACTIVE", + "type": "DIGITAL" + }, + "linked_customer_id": "QPTXM8PQNX3Q726ZYHPMNP46XC" + }, + "type": "gift_card" + }, + "event_id": "875f2038-6015-492e-9f29-d040b3809e49", + "merchant_id": "C337NFWQT2A6W", + "type": "gift_card.customer_linked" + }, + "x-webhook": { + "event": "gift_card.customer_linked", + "scopes": [ + "GIFTCARDS_READ" + ] + }, + "x-api": "#/components/x-apis/GiftCards", + "x-since": "2021-06-16" + }, + "GiftCardCustomerLinkedEventData": { + "type": "object", + "description": "The data associated with a `gift_card.customer_linked` event.", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "The type of object affected by the event. For this event, the value is `gift_card`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "The ID of the updated gift card." + }, + "object": { + "$ref": "#/components/schemas/GiftCardCustomerLinkedEventObject", + "description": "An object that contains the updated gift card and the ID of the linked customer.", + "nullable": true + } + } + }, + "GiftCardCustomerLinkedEventObject": { + "type": "object", + "description": "An object that contains the gift card and customer ID associated with a \n`gift_card.customer_linked` event.", + "x-release-status": "PUBLIC", + "properties": { + "gift_card": { + "$ref": "#/components/schemas/GiftCard", + "description": "The gift card with the updated `customer_ids` field.", + "nullable": true + }, + "linked_customer_id": { + "type": "string", + "description": "The ID of the linked [customer](entity:Customer).", + "nullable": true + } + } + }, + "GiftCardCustomerUnlinkedEvent": { + "type": "object", + "description": "Published when a [customer](entity:Customer) is unlinked from a [gift card](entity:GiftCard).", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the Square seller associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event. For this event, the value is `gift_card.customer_unlinked`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "The unique ID of the event, which is used for \n[idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices).", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/GiftCardCustomerUnlinkedEventData", + "description": "The data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-12-17T03:41:35.157Z", + "data": { + "id": "gftc:00113070ba5745f0b2377c1b9570cb03", + "object": { + "gift_card": { + "balance_money": { + "amount": 1500, + "currency": "USD" + }, + "created_at": "2020-12-17T01:41:35.157Z", + "gan": "7783320007480908", + "gan_source": "SQUARE", + "id": "gftc:00113070ba5745f0b2377c1b9570cb03", + "state": "ACTIVE", + "type": "DIGITAL" + }, + "unlinked_customer_id": "QPTXM8PQNX3Q726ZYHPMNP46XC" + }, + "type": "gift_card" + }, + "event_id": "875f2038-6015-492e-9f29-d040b3809e49", + "merchant_id": "C337NFWQT2A6W", + "type": "gift_card.customer_unlinked" + }, + "x-webhook": { + "event": "gift_card.customer_unlinked", + "scopes": [ + "GIFTCARDS_READ" + ] + }, + "x-api": "#/components/x-apis/GiftCards", + "x-since": "2021-06-16" + }, + "GiftCardCustomerUnlinkedEventData": { + "type": "object", + "description": "The data associated with a `gift_card.customer_unlinked` event.", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "The type of object affected by the event. For this event, the value is `gift_card`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "The ID of the updated gift card." + }, + "object": { + "$ref": "#/components/schemas/GiftCardCustomerUnlinkedEventObject", + "description": "An object that contains the updated gift card and the ID of the unlinked customer.", + "nullable": true + } + } + }, + "GiftCardCustomerUnlinkedEventObject": { + "type": "object", + "description": "An object that contains the gift card and the customer ID associated with a \n`gift_card.customer_linked` event.", + "x-release-status": "PUBLIC", + "properties": { + "gift_card": { + "$ref": "#/components/schemas/GiftCard", + "description": "The gift card with the updated `customer_ids` field. \nThe field is removed if the gift card is not linked to any customers.", + "nullable": true + }, + "unlinked_customer_id": { + "type": "string", + "description": "The ID of the unlinked [customer](entity:Customer).", + "nullable": true + } + } + }, + "GiftCardGANSource": { + "type": "string", + "enum": [ + "SQUARE", + "OTHER" + ], + "x-enum-elements": [ + { + "name": "SQUARE", + "description": "The GAN is generated by Square." + }, + { + "name": "OTHER", + "description": "The GAN is provided by a non-Square system. For more information, see \n[Custom GANs](https://developer.squareup.com/docs/gift-cards/using-gift-cards-api#custom-gans) or \n[Third-party gift cards](https://developer.squareup.com/docs/gift-cards/using-gift-cards-api#third-party-gift-cards)." + } + ], + "description": "Indicates the source that generated the gift card \naccount number (GAN).", + "x-release-status": "PUBLIC" + }, + "GiftCardStatus": { + "type": "string", + "enum": [ + "ACTIVE", + "DEACTIVATED", + "BLOCKED", + "PENDING" + ], + "x-enum-elements": [ + { + "name": "ACTIVE", + "description": "The gift card is active and can be used as a payment source." + }, + { + "name": "DEACTIVATED", + "description": "Any activity that changes the gift card balance is permanently forbidden." + }, + { + "name": "BLOCKED", + "description": "Any activity that changes the gift card balance is temporarily forbidden." + }, + { + "name": "PENDING", + "description": "The gift card is pending activation.\nThis is the initial state when a gift card is created. Typically, you'll call\n[CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) to create an\n`ACTIVATE` activity that activates the gift card with an initial balance before first use." + } + ], + "description": "Indicates the gift card state.", + "x-release-status": "PUBLIC" + }, + "GiftCardType": { + "type": "string", + "enum": [ + "PHYSICAL", + "DIGITAL" + ], + "x-enum-elements": [ + { + "name": "PHYSICAL", + "description": "A plastic gift card." + }, + { + "name": "DIGITAL", + "description": "A digital gift card." + } + ], + "description": "Indicates the gift card type.", + "x-release-status": "PUBLIC" + }, + "GiftCardUpdatedEvent": { + "type": "object", + "description": "Published when a [gift card](entity:GiftCard) is updated. This includes\nchanges to the state, balance, and customer association.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the Square seller associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. For this event, the value is `gift_card.updated`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "The unique ID of the event, which is used for \n[idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices).", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/GiftCardUpdatedEventData", + "description": "The data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-12-17T02:41:35.157Z", + "data": { + "id": "gftc:00113070ba5745f0b2377c1b9570cb03", + "object": { + "gift_card": { + "balance_money": { + "amount": 3000, + "currency": "USD" + }, + "created_at": "2020-12-17T01:41:35.157Z", + "gan": "7783320007480908", + "gan_source": "SQUARE", + "id": "gftc:00113070ba5745f0b2377c1b9570cb03", + "state": "ACTIVE", + "type": "DIGITAL" + } + }, + "type": "gift_card" + }, + "event_id": "875f2038-6015-492e-9f29-d040b3809e49", + "merchant_id": "C337NFWQT2A6W", + "type": "gift_card.updated" + }, + "x-webhook": { + "event": "gift_card.updated", + "scopes": [ + "GIFTCARDS_READ" + ] + }, + "x-api": "#/components/x-apis/GiftCards", + "x-since": "2021-06-16" + }, + "GiftCardUpdatedEventData": { + "type": "object", + "description": "The data associated with a `gift_card.updated` event.", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "The type of object affected by the event. For this event, the value is `gift_card`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "The ID of the updated gift card." + }, + "object": { + "$ref": "#/components/schemas/GiftCardUpdatedEventObject", + "description": "An object that contains the updated gift card.", + "nullable": true + } + } + }, + "GiftCardUpdatedEventObject": { + "type": "object", + "description": "An object that contains the gift card associated with a `gift_card.updated` event.", + "x-release-status": "PUBLIC", + "properties": { + "gift_card": { + "$ref": "#/components/schemas/GiftCard", + "description": "The gift card with the updated `balance_money`, `state`, or `customer_ids` field. \nSome events can affect both `balance_money` and `state`.", + "nullable": true + } + } + }, + "InventoryAdjustment": { + "type": "object", + "description": "Represents a change in state or quantity of product inventory at a\nparticular time and location.", + "x-release-status": "PUBLIC", + "properties": { + "id": { + "type": "string", + "description": "A unique ID generated by Square for the\n`InventoryAdjustment`.", + "maxLength": 100 + }, + "reference_id": { + "type": "string", + "description": "An optional ID provided by the application to tie the\n`InventoryAdjustment` to an external\nsystem.", + "maxLength": 255, + "nullable": true + }, + "from_state": { + "$ref": "#/components/schemas/InventoryState", + "description": "The [inventory state](entity:InventoryState) of the related quantity\nof items before the adjustment.\nSee [InventoryState](#type-inventorystate) for possible values", + "nullable": true + }, + "to_state": { + "$ref": "#/components/schemas/InventoryState", + "description": "The [inventory state](entity:InventoryState) of the related quantity\nof items after the adjustment.\nSee [InventoryState](#type-inventorystate) for possible values", + "nullable": true + }, + "location_id": { + "type": "string", + "description": "The Square-generated ID of the [Location](entity:Location) where the related\nquantity of items is being tracked.", + "maxLength": 100, + "nullable": true + }, + "catalog_object_id": { + "type": "string", + "description": "The Square-generated ID of the\n[CatalogObject](entity:CatalogObject) being tracked.", + "maxLength": 100, + "nullable": true + }, + "catalog_object_type": { + "type": "string", + "description": "The [type](entity:CatalogObjectType) of the [CatalogObject](entity:CatalogObject) being tracked. \n\nThe Inventory API supports setting and reading the `\"catalog_object_type\": \"ITEM_VARIATION\"` field value. \nIn addition, it can also read the `\"catalog_object_type\": \"ITEM\"` field value that is set by the Square Restaurants app.", + "maxLength": 14, + "nullable": true + }, + "quantity": { + "type": "string", + "description": "The number of items affected by the adjustment as a decimal string.\nCan support up to 5 digits after the decimal point.", + "maxLength": 26, + "nullable": true + }, + "total_price_money": { + "$ref": "#/components/schemas/Money", + "description": "The total price paid for goods associated with the\nadjustment. Present if and only if `to_state` is `SOLD`. Always\nnon-negative.", + "readOnly": true + }, + "occurred_at": { + "type": "string", + "description": "A client-generated RFC 3339-formatted timestamp that indicates when\nthe inventory adjustment took place. For inventory adjustment updates, the `occurred_at`\ntimestamp cannot be older than 24 hours or in the future relative to the\ntime of the request.", + "maxLength": 34, + "nullable": true + }, + "created_at": { + "type": "string", + "description": "An RFC 3339-formatted timestamp that indicates when the inventory adjustment is received.", + "maxLength": 34, + "readOnly": true + }, + "source": { + "$ref": "#/components/schemas/SourceApplication", + "description": "Information about the application that caused the\ninventory adjustment.", + "readOnly": true + }, + "employee_id": { + "type": "string", + "description": "The Square-generated ID of the [Employee](entity:Employee) responsible for the\ninventory adjustment.", + "maxLength": 100, + "nullable": true + }, + "team_member_id": { + "type": "string", + "description": "The Square-generated ID of the [Team Member](entity:TeamMember) responsible for the\ninventory adjustment.", + "maxLength": 100, + "nullable": true + }, + "transaction_id": { + "type": "string", + "description": "The Square-generated ID of the [Transaction](entity:Transaction) that\ncaused the adjustment. Only relevant for payment-related state\ntransitions.", + "maxLength": 255, + "readOnly": true + }, + "refund_id": { + "type": "string", + "description": "The Square-generated ID of the [Refund](entity:Refund) that\ncaused the adjustment. Only relevant for refund-related state\ntransitions.", + "maxLength": 255, + "readOnly": true + }, + "purchase_order_id": { + "type": "string", + "description": "The Square-generated ID of the purchase order that caused the\nadjustment. Only relevant for state transitions from the Square for Retail\napp.", + "maxLength": 100, + "readOnly": true + }, + "goods_receipt_id": { + "type": "string", + "description": "The Square-generated ID of the goods receipt that caused the\nadjustment. Only relevant for state transitions from the Square for Retail\napp.", + "maxLength": 100, + "readOnly": true + }, + "adjustment_group": { + "$ref": "#/components/schemas/InventoryAdjustmentGroup", + "description": "An adjustment group bundling the related adjustments of item variations through stock conversions in a single inventory event.", + "readOnly": true, + "x-release-status": "BETA" + } + } + }, + "InventoryAdjustmentGroup": { + "type": "object", + "x-release-status": "BETA", + "properties": { + "id": { + "type": "string", + "description": "A unique ID generated by Square for the\n`InventoryAdjustmentGroup`.", + "maxLength": 100, + "readOnly": true + }, + "root_adjustment_id": { + "type": "string", + "description": "The inventory adjustment of the composed variation.", + "maxLength": 100, + "readOnly": true + }, + "from_state": { + "$ref": "#/components/schemas/InventoryState", + "description": "Representative `from_state` for adjustments within the group. For example, for a group adjustment from `IN_STOCK` to `SOLD`,\nthere can be two component adjustments in the group: one from `IN_STOCK`to `COMPOSED` and the other one from `COMPOSED` to `SOLD`.\nHere, the representative `from_state` for the `InventoryAdjustmentGroup` is `IN_STOCK`.\nSee [InventoryState](#type-inventorystate) for possible values", + "readOnly": true + }, + "to_state": { + "$ref": "#/components/schemas/InventoryState", + "description": "Representative `to_state` for adjustments within group. For example, for a group adjustment from `IN_STOCK` to `SOLD`,\nthe two component adjustments in the group can be from `IN_STOCK` to `COMPOSED` and from `COMPOSED` to `SOLD`.\nHere, the representative `to_state` of the `InventoryAdjustmentGroup` is `SOLD`.\nSee [InventoryState](#type-inventorystate) for possible values", + "readOnly": true + } + } + }, + "InventoryAlertType": { + "type": "string", + "enum": [ + "NONE", + "LOW_QUANTITY" + ], + "x-enum-elements": [ + { + "name": "NONE", + "description": "The variation does not display an alert." + }, + { + "name": "LOW_QUANTITY", + "description": "The variation generates an alert when its quantity is low." + } + ], + "description": "Indicates whether Square should alert the merchant when the inventory quantity of a CatalogItemVariation is low.", + "x-release-status": "PUBLIC" + }, + "InventoryChange": { + "type": "object", + "description": "Represents a single physical count, inventory, adjustment, or transfer\nthat is part of the history of inventory changes for a particular\n[CatalogObject](entity:CatalogObject) instance.", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "$ref": "#/components/schemas/InventoryChangeType", + "description": "Indicates how the inventory change is applied. See\n[InventoryChangeType](entity:InventoryChangeType) for all possible values.\nSee [InventoryChangeType](#type-inventorychangetype) for possible values", + "nullable": true + }, + "physical_count": { + "$ref": "#/components/schemas/InventoryPhysicalCount", + "description": "Contains details about the physical count when `type` is\n`PHYSICAL_COUNT`, and is unset for all other change types.", + "nullable": true + }, + "adjustment": { + "$ref": "#/components/schemas/InventoryAdjustment", + "description": "Contains details about the inventory adjustment when `type` is\n`ADJUSTMENT`, and is unset for all other change types.", + "nullable": true + }, + "transfer": { + "$ref": "#/components/schemas/InventoryTransfer", + "description": "Contains details about the inventory transfer when `type` is\n`TRANSFER`, and is unset for all other change types.\n\n_Note:_ An [InventoryTransfer](entity:InventoryTransfer) object can only be set in the input to the\n[BatchChangeInventory](api-endpoint:Inventory-BatchChangeInventory) endpoint when the seller has an active Retail Plus subscription.", + "nullable": true + }, + "measurement_unit": { + "$ref": "#/components/schemas/CatalogMeasurementUnit", + "description": "The [CatalogMeasurementUnit](entity:CatalogMeasurementUnit) object representing the catalog measurement unit associated with the inventory change.", + "readOnly": true + }, + "measurement_unit_id": { + "type": "string", + "description": "The ID of the [CatalogMeasurementUnit](entity:CatalogMeasurementUnit) object representing the catalog measurement unit associated with the inventory change.", + "readOnly": true + } + } + }, + "InventoryChangeType": { + "type": "string", + "enum": [ + "PHYSICAL_COUNT", + "ADJUSTMENT", + "TRANSFER" + ], + "x-enum-elements": [ + { + "name": "PHYSICAL_COUNT", + "description": "The change occurred as part of a physical count update." + }, + { + "name": "ADJUSTMENT", + "description": "The change occurred as part of the normal lifecycle of goods\n(e.g., as an inventory adjustment)." + }, + { + "name": "TRANSFER", + "description": "The change occurred as part of an inventory transfer." + } + ], + "description": "Indicates how the inventory change was applied to a tracked product quantity.", + "x-release-status": "PUBLIC" + }, + "InventoryCount": { + "type": "object", + "description": "Represents Square-estimated quantity of items in a particular state at a\nparticular seller location based on the known history of physical counts and\ninventory adjustments.", + "x-release-status": "PUBLIC", + "properties": { + "catalog_object_id": { + "type": "string", + "description": "The Square-generated ID of the\n[CatalogObject](entity:CatalogObject) being tracked.", + "maxLength": 100, + "nullable": true + }, + "catalog_object_type": { + "type": "string", + "description": "The [type](entity:CatalogObjectType) of the [CatalogObject](entity:CatalogObject) being tracked. \n\nThe Inventory API supports setting and reading the `\"catalog_object_type\": \"ITEM_VARIATION\"` field value. \nIn addition, it can also read the `\"catalog_object_type\": \"ITEM\"` field value that is set by the Square Restaurants app.", + "maxLength": 14, + "nullable": true + }, + "state": { + "$ref": "#/components/schemas/InventoryState", + "description": "The current [inventory state](entity:InventoryState) for the related\nquantity of items.\nSee [InventoryState](#type-inventorystate) for possible values", + "nullable": true + }, + "location_id": { + "type": "string", + "description": "The Square-generated ID of the [Location](entity:Location) where the related\nquantity of items is being tracked.", + "maxLength": 100, + "nullable": true + }, + "quantity": { + "type": "string", + "description": "The number of items affected by the estimated count as a decimal string.\nCan support up to 5 digits after the decimal point.", + "maxLength": 26, + "nullable": true + }, + "calculated_at": { + "type": "string", + "description": "An RFC 3339-formatted timestamp that indicates when the most recent physical count or adjustment affecting\nthe estimated count is received.", + "maxLength": 34, + "readOnly": true + }, + "is_estimated": { + "type": "boolean", + "description": "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\nany of these endpoints: [BatchChangeInventory](api-endpoint:Inventory-BatchChangeInventory),\n[BatchRetrieveInventoryChanges](api-endpoint:Inventory-BatchRetrieveInventoryChanges),\n[BatchRetrieveInventoryCounts](api-endpoint:Inventory-BatchRetrieveInventoryCounts), and\n[RetrieveInventoryChanges](api-endpoint:Inventory-RetrieveInventoryChanges).", + "readOnly": true, + "x-release-status": "BETA" + } + } + }, + "InventoryCountUpdatedEvent": { + "type": "object", + "description": "Published when the quantity is updated for a\n[CatalogItemVariation](entity:CatalogItemVariation).", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/InventoryCountUpdatedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2019-10-29T18:38:45.455006797Z", + "data": { + "id": "84e4ac73-d605-4dbd-a9e5-ffff794ddb9d", + "object": { + "inventory_counts": [ + { + "calculated_at": "2019-10-29T18:38:45.10296Z", + "catalog_object_id": "FGQ5JJWT2PYTHF35CKZ2DSKP", + "catalog_object_type": "ITEM_VARIATION", + "location_id": "YYQR03DGCTXA4", + "quantity": "10", + "state": "IN_STOCK" + } + ] + }, + "type": "inventory_counts" + }, + "event_id": "df5f3813-a913-45a1-94e9-fdc3f7d5e3b6", + "merchant_id": "6SSW7HV8K2ST5", + "type": "inventory.count.updated" + }, + "x-webhook": { + "event": "inventory.count.updated", + "scopes": [ + "INVENTORY_READ" + ] + }, + "x-api": "#/components/x-apis/Inventory", + "x-since": "2019-06-12" + }, + "InventoryCountUpdatedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected object’s type. For this event, the value is `inventory_counts`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the affected object." + }, + "object": { + "$ref": "#/components/schemas/InventoryCountUpdatedEventObject", + "description": "An object containing fields and values relevant to the event. Is absent if affected object was deleted.", + "nullable": true + } + } + }, + "InventoryCountUpdatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "inventory_counts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InventoryCount" + }, + "description": "The inventory counts.", + "nullable": true + } + } + }, + "InventoryPhysicalCount": { + "type": "object", + "description": "Represents the quantity of an item variation that is physically present\nat a specific location, verified by a seller or a seller's employee. For example,\na physical count might come from an employee counting the item variations on\nhand or from syncing with an external system.", + "x-release-status": "PUBLIC", + "properties": { + "id": { + "type": "string", + "description": "A unique Square-generated ID for the\n[InventoryPhysicalCount](entity:InventoryPhysicalCount).", + "maxLength": 100 + }, + "reference_id": { + "type": "string", + "description": "An optional ID provided by the application to tie the\n[InventoryPhysicalCount](entity:InventoryPhysicalCount) to an external\nsystem.", + "maxLength": 255, + "nullable": true + }, + "catalog_object_id": { + "type": "string", + "description": "The Square-generated ID of the\n[CatalogObject](entity:CatalogObject) being tracked.", + "maxLength": 100, + "nullable": true + }, + "catalog_object_type": { + "type": "string", + "description": "The [type](entity:CatalogObjectType) of the [CatalogObject](entity:CatalogObject) being tracked. \n\nThe Inventory API supports setting and reading the `\"catalog_object_type\": \"ITEM_VARIATION\"` field value. \nIn addition, it can also read the `\"catalog_object_type\": \"ITEM\"` field value that is set by the Square Restaurants app.", + "maxLength": 14, + "nullable": true + }, + "state": { + "$ref": "#/components/schemas/InventoryState", + "description": "The current [inventory state](entity:InventoryState) for the related\nquantity of items.\nSee [InventoryState](#type-inventorystate) for possible values", + "nullable": true + }, + "location_id": { + "type": "string", + "description": "The Square-generated ID of the [Location](entity:Location) where the related\nquantity of items is being tracked.", + "maxLength": 100, + "nullable": true + }, + "quantity": { + "type": "string", + "description": "The number of items affected by the physical count as a decimal string.\nThe number can support up to 5 digits after the decimal point.", + "maxLength": 26, + "nullable": true + }, + "source": { + "$ref": "#/components/schemas/SourceApplication", + "description": "Information about the application with which the\nphysical count is submitted.", + "readOnly": true + }, + "employee_id": { + "type": "string", + "description": "The Square-generated ID of the [Employee](entity:Employee) responsible for the\nphysical count.", + "maxLength": 100, + "nullable": true + }, + "team_member_id": { + "type": "string", + "description": "The Square-generated ID of the [Team Member](entity:TeamMember) responsible for the\nphysical count.", + "maxLength": 100, + "nullable": true + }, + "occurred_at": { + "type": "string", + "description": "A client-generated RFC 3339-formatted timestamp that indicates when\nthe physical count was examined. For physical count updates, the `occurred_at`\ntimestamp cannot be older than 24 hours or in the future relative to the\ntime of the request.", + "maxLength": 34, + "nullable": true + }, + "created_at": { + "type": "string", + "description": "An RFC 3339-formatted timestamp that indicates when the physical count is received.", + "maxLength": 34, + "readOnly": true + } + } + }, + "InventoryState": { + "type": "string", + "enum": [ + "CUSTOM", + "IN_STOCK", + "SOLD", + "RETURNED_BY_CUSTOMER", + "RESERVED_FOR_SALE", + "SOLD_ONLINE", + "ORDERED_FROM_VENDOR", + "RECEIVED_FROM_VENDOR", + "IN_TRANSIT_TO", + "NONE", + "WASTE", + "UNLINKED_RETURN", + "COMPOSED", + "DECOMPOSED", + "SUPPORTED_BY_NEWER_VERSION", + "IN_TRANSIT" + ], + "x-enum-elements": [ + { + "name": "CUSTOM", + "description": "The related quantity of items are in a custom state. **READ-ONLY**:\nthe Inventory API cannot move quantities to or from this state." + }, + { + "name": "IN_STOCK", + "description": "The related quantity of items are on hand and available for sale." + }, + { + "name": "SOLD", + "description": "The related quantity of items were sold as part of an itemized\ntransaction. Quantities in the `SOLD` state are no longer tracked." + }, + { + "name": "RETURNED_BY_CUSTOMER", + "description": "The related quantity of items were returned through the Square Point\nof Sale application, but are not yet available for sale. **READ-ONLY**:\nthe Inventory API cannot move quantities to or from this state." + }, + { + "name": "RESERVED_FOR_SALE", + "description": "The related quantity of items are on hand, but not currently\navailable for sale. **READ-ONLY**: the Inventory API cannot move\nquantities to or from this state." + }, + { + "name": "SOLD_ONLINE", + "description": "The related quantity of items were sold online. **READ-ONLY**: the\nInventory API cannot move quantities to or from this state." + }, + { + "name": "ORDERED_FROM_VENDOR", + "description": "The related quantity of items were ordered from a vendor but not yet\nreceived. **READ-ONLY**: the Inventory API cannot move quantities to or\nfrom this state." + }, + { + "name": "RECEIVED_FROM_VENDOR", + "description": "The related quantity of items were received from a vendor but are\nnot yet available for sale. **READ-ONLY**: the Inventory API cannot move\nquantities to or from this state." + }, + { + "name": "IN_TRANSIT_TO", + "description": "Replaced by `IN_TRANSIT` to represent quantities\nof items that are in transit between locations." + }, + { + "name": "NONE", + "description": "A placeholder indicating that the related quantity of items are not\ncurrently tracked in Square. Transferring quantities from the `NONE` state\nto a tracked state (e.g., `IN_STOCK`) introduces stock into the system." + }, + { + "name": "WASTE", + "description": "The related quantity of items are lost or damaged and cannot be\nsold." + }, + { + "name": "UNLINKED_RETURN", + "description": "The related quantity of items were returned but not linked to a\nprevious transaction. Unlinked returns are not tracked in Square.\nTransferring a quantity from `UNLINKED_RETURN` to a tracked state (e.g.,\n`IN_STOCK`) introduces new stock into the system." + }, + { + "name": "COMPOSED", + "description": "The related quantity of items that are part of a composition consisting one or more components." + }, + { + "name": "DECOMPOSED", + "description": "The related quantity of items that are part of a component." + }, + { + "name": "SUPPORTED_BY_NEWER_VERSION", + "description": "This state is not supported by this version of the Square API. We recommend that you upgrade the client to use the appropriate version of the Square API supporting this state." + }, + { + "name": "IN_TRANSIT", + "description": "The related quantity of items are in transit between locations. **READ-ONLY:** the Inventory API cannot currently be used to move quantities to or from this inventory state." + } + ], + "description": "Indicates the state of a tracked item quantity in the lifecycle of goods.", + "x-release-status": "PUBLIC" + }, + "InventoryTransfer": { + "type": "object", + "description": "Represents the transfer of a quantity of product inventory at a\nparticular time from one location to another.", + "x-release-status": "PUBLIC", + "properties": { + "id": { + "type": "string", + "description": "A unique ID generated by Square for the\n`InventoryTransfer`.", + "maxLength": 100 + }, + "reference_id": { + "type": "string", + "description": "An optional ID provided by the application to tie the\n`InventoryTransfer` to an external system.", + "maxLength": 255, + "nullable": true + }, + "state": { + "$ref": "#/components/schemas/InventoryState", + "description": "The [inventory state](entity:InventoryState) for the quantity of\nitems being transferred.\nSee [InventoryState](#type-inventorystate) for possible values", + "nullable": true + }, + "from_location_id": { + "type": "string", + "description": "The Square-generated ID of the [Location](entity:Location) where the related\nquantity of items was tracked before the transfer.", + "maxLength": 100, + "nullable": true + }, + "to_location_id": { + "type": "string", + "description": "The Square-generated ID of the [Location](entity:Location) where the related\nquantity of items was tracked after the transfer.", + "maxLength": 100, + "nullable": true + }, + "catalog_object_id": { + "type": "string", + "description": "The Square-generated ID of the\n[CatalogObject](entity:CatalogObject) being tracked.", + "maxLength": 100, + "nullable": true + }, + "catalog_object_type": { + "type": "string", + "description": "The [type](entity:CatalogObjectType) of the [CatalogObject](entity:CatalogObject) being tracked. \n\nThe Inventory API supports setting and reading the `\"catalog_object_type\": \"ITEM_VARIATION\"` field value. \nIn addition, it can also read the `\"catalog_object_type\": \"ITEM\"` field value that is set by the Square Restaurants app.", + "maxLength": 14, + "nullable": true + }, + "quantity": { + "type": "string", + "description": "The number of items affected by the transfer as a decimal string.\nCan support up to 5 digits after the decimal point.", + "maxLength": 26, + "nullable": true + }, + "occurred_at": { + "type": "string", + "description": "A client-generated RFC 3339-formatted timestamp that indicates when\nthe transfer took place. For write actions, the `occurred_at` timestamp\ncannot be older than 24 hours or in the future relative to the time of the\nrequest.", + "maxLength": 34, + "nullable": true + }, + "created_at": { + "type": "string", + "description": "An RFC 3339-formatted timestamp that indicates when Square\nreceived the transfer request.", + "maxLength": 34, + "readOnly": true + }, + "source": { + "$ref": "#/components/schemas/SourceApplication", + "description": "Information about the application that initiated the\ninventory transfer.", + "readOnly": true + }, + "employee_id": { + "type": "string", + "description": "The Square-generated ID of the [Employee](entity:Employee) responsible for the\ninventory transfer.", + "maxLength": 100, + "nullable": true + }, + "team_member_id": { + "type": "string", + "description": "The Square-generated ID of the [Team Member](entity:TeamMember) responsible for the\ninventory transfer.", + "maxLength": 100, + "nullable": true + } + } + }, + "Invoice": { + "type": "object", + "description": "Stores information about an invoice. You use the Invoices API to create and manage\ninvoices. For more information, see [Invoices API Overview](https://developer.squareup.com/docs/invoices-api/overview).", + "x-release-status": "PUBLIC", + "properties": { + "id": { + "type": "string", + "description": "The Square-assigned ID of the invoice.", + "readOnly": true + }, + "version": { + "type": "integer", + "description": "The Square-assigned version number, which is incremented each time an update is committed to the invoice." + }, + "location_id": { + "type": "string", + "description": "The ID of the location that this invoice is associated with. \n\nIf specified in a `CreateInvoice` request, the value must match the `location_id` of the associated order.", + "minLength": 1, + "maxLength": 255, + "nullable": true + }, + "order_id": { + "type": "string", + "description": "The ID of the [order](entity:Order) for which the invoice is created. \nThis field is required when creating an invoice, and the order must be in the `OPEN` state.\n\nTo view the line items and other information for the associated order, call the \n[RetrieveOrder](api-endpoint:Orders-RetrieveOrder) endpoint using the order ID.", + "minLength": 1, + "maxLength": 255, + "nullable": true + }, + "primary_recipient": { + "$ref": "#/components/schemas/InvoiceRecipient", + "description": "The customer who receives the invoice. This customer data is displayed on the invoice and used by Square to deliver the invoice. \n\nThis field is required to publish an invoice, and it must specify the `customer_id`.", + "nullable": true + }, + "payment_requests": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InvoicePaymentRequest" + }, + "description": "The payment schedule for the invoice, represented by one or more payment requests that\ndefine payment settings, such as amount due and due date. An invoice supports the following payment request combinations:\n- One balance\n- One deposit with one balance\n- 2–12 installments \n- One deposit with 2–12 installments\n\nThis field is required when creating an invoice. It must contain at least one payment request. \nAll payment requests for the invoice must equal the total order amount. For more information, see \n[Configuring payment requests](https://developer.squareup.com/docs/invoices-api/create-publish-invoices#payment-requests).\n\nAdding `INSTALLMENT` payment requests to an invoice requires an \n[Invoices Plus subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription).", + "nullable": true + }, + "delivery_method": { + "$ref": "#/components/schemas/InvoiceDeliveryMethod", + "description": "The delivery method that Square uses to send the invoice, reminders, and receipts to\nthe customer. After the invoice is published, Square processes the invoice based on the delivery\nmethod and payment request settings, either immediately or on the `scheduled_at` date, if specified.\nFor example, Square might send the invoice or receipt for an automatic payment. For invoices with\nautomatic payments, this field must be set to `EMAIL`.\n\nOne of the following is required when creating an invoice:\n- (Recommended) This `delivery_method` field. To configure an automatic payment, the\n`automatic_payment_source` field of the payment request is also required.\n- The deprecated `request_method` field of the payment request. Note that `invoice`\nobjects returned in responses do not include `request_method`.\nSee [InvoiceDeliveryMethod](#type-invoicedeliverymethod) for possible values", + "nullable": true + }, + "invoice_number": { + "type": "string", + "description": "A user-friendly invoice number that is displayed on the invoice. The value is unique within a location.\nIf not provided when creating an invoice, Square assigns a value.\nIt increments from 1 and is padded with zeros making it 7 characters long\n(for example, 0000001 and 0000002).", + "minLength": 1, + "maxLength": 191, + "nullable": true + }, + "title": { + "type": "string", + "description": "The title of the invoice, which is displayed on the invoice.", + "minLength": 1, + "maxLength": 255, + "nullable": true + }, + "description": { + "type": "string", + "description": "The description of the invoice, which is displayed on the invoice.", + "minLength": 1, + "maxLength": 65536, + "nullable": true + }, + "scheduled_at": { + "type": "string", + "description": "The timestamp when the invoice is scheduled for processing, in RFC 3339 format.\nAfter the invoice is published, Square processes the invoice on the specified date,\naccording to the delivery method and payment request settings.\n\nIf the field is not set, Square processes the invoice immediately after it is published.", + "nullable": true + }, + "public_url": { + "type": "string", + "description": "A temporary link to the Square-hosted payment page where the customer can pay the\ninvoice. If the link expires, customers can provide the email address or phone number\nassociated with the invoice and request a new link directly from the expired payment page. \n\nThis field is added after the invoice is published and reaches the scheduled date\n(if one is defined).", + "readOnly": true + }, + "next_payment_amount_money": { + "$ref": "#/components/schemas/Money", + "description": "The current amount due for the invoice. In addition to the\namount due on the next payment request, this includes any overdue payment amounts.", + "readOnly": true + }, + "status": { + "$ref": "#/components/schemas/InvoiceStatus", + "description": "The status of the invoice.\nSee [InvoiceStatus](#type-invoicestatus) for possible values", + "readOnly": true + }, + "timezone": { + "type": "string", + "description": "The time zone used to interpret calendar dates on the invoice, such as `due_date`.\nWhen an invoice is created, this field is set to the `timezone` specified for the seller\nlocation. The value cannot be changed.\n\nFor example, a payment `due_date` of 2021-03-09 with a `timezone` of America/Los\\_Angeles\nbecomes overdue at midnight on March 9 in America/Los\\_Angeles (which equals a UTC timestamp\nof 2021-03-10T08:00:00Z).", + "readOnly": true + }, + "created_at": { + "type": "string", + "description": "The timestamp when the invoice was created, in RFC 3339 format.", + "readOnly": true + }, + "updated_at": { + "type": "string", + "description": "The timestamp when the invoice was last updated, in RFC 3339 format.", + "readOnly": true + }, + "accepted_payment_methods": { + "$ref": "#/components/schemas/InvoiceAcceptedPaymentMethods", + "description": "The payment methods that customers can use to pay the invoice on the Square-hosted\ninvoice page. This setting is independent of any automatic payment requests for the invoice.\n\nThis field is required when creating an invoice and must set at least one payment method to `true`.", + "nullable": true + }, + "custom_fields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InvoiceCustomField" + }, + "description": "Additional seller-defined fields that are displayed on the invoice. For more information, see\n[Custom fields](https://developer.squareup.com/docs/invoices-api/overview#custom-fields).\n\nAdding custom fields to an invoice requires an \n[Invoices Plus subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription).\n\nMax: 2 custom fields", + "nullable": true + }, + "subscription_id": { + "type": "string", + "description": "The ID of the [subscription](entity:Subscription) associated with the invoice.\nThis field is present only on subscription billing invoices.", + "readOnly": true + }, + "sale_or_service_date": { + "type": "string", + "description": "The date of the sale or the date that the service is rendered, in `YYYY-MM-DD` format.\nThis field can be used to specify a past or future date which is displayed on the invoice.", + "nullable": true + }, + "payment_conditions": { + "type": "string", + "description": "**France only.** The payment terms and conditions that are displayed on the invoice. For more information, \nsee [Payment conditions](https://developer.squareup.com/docs/invoices-api/overview#payment-conditions).\n\nFor countries other than France, Square returns an `INVALID_REQUEST_ERROR` with a `BAD_REQUEST` code and \n\"Payment conditions are not supported for this location's country\" detail if this field is included in `CreateInvoice` or `UpdateInvoice` requests.", + "minLength": 1, + "maxLength": 2000, + "nullable": true + }, + "store_payment_method_enabled": { + "type": "boolean", + "description": "Indicates whether to allow a customer to save a credit or debit card as a card on file or a bank transfer as a\nbank account on file. If `true`, Square displays a __Save my card on file__ or __Save my bank on file__ checkbox on the\ninvoice payment page. Stored payment information can be used for future automatic payments. The default value is `false`.", + "nullable": true + }, + "attachments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InvoiceAttachment" + }, + "description": "Metadata about the attachments on the invoice. Invoice attachments are managed using the\n[CreateInvoiceAttachment](api-endpoint:Invoices-CreateInvoiceAttachment) and [DeleteInvoiceAttachment](api-endpoint:Invoices-DeleteInvoiceAttachment) endpoints.", + "readOnly": true + }, + "creator_team_member_id": { + "type": "string", + "description": "The ID of the [team member](entity:TeamMember) who created the invoice.\nThis field is present only on invoices created in the Square Dashboard or Square Invoices app by a logged-in team member.", + "readOnly": true + } + } + }, + "InvoiceAcceptedPaymentMethods": { + "type": "object", + "description": "The payment methods that customers can use to pay an [invoice](entity:Invoice) on the Square-hosted invoice payment page.", + "x-release-status": "PUBLIC", + "properties": { + "card": { + "type": "boolean", + "description": "Indicates whether credit card or debit card payments are accepted. The default value is `false`.", + "nullable": true + }, + "square_gift_card": { + "type": "boolean", + "description": "Indicates whether Square gift card payments are accepted. The default value is `false`.", + "nullable": true + }, + "bank_account": { + "type": "boolean", + "description": "Indicates whether ACH bank transfer payments are accepted. The default value is `false`.", + "nullable": true + }, + "buy_now_pay_later": { + "type": "boolean", + "description": "Indicates whether Afterpay (also known as Clearpay) payments are accepted. The default value is `false`.\n\nThis option is allowed only for invoices that have a single payment request of the `BALANCE` type. This payment method is\nsupported if the seller account accepts Afterpay payments and the seller location is in a country where Afterpay\ninvoice payments are supported. As a best practice, consider enabling an additional payment method when allowing\n`buy_now_pay_later` payments. For more information, including detailed requirements and processing limits, see\n[Buy Now Pay Later payments with Afterpay](https://developer.squareup.com/docs/invoices-api/overview#buy-now-pay-later).", + "nullable": true + }, + "cash_app_pay": { + "type": "boolean", + "description": "Indicates whether Cash App payments are accepted. The default value is `false`.\n\nThis payment method is supported only for seller [locations](entity:Location) in the United States.", + "nullable": true + } + } + }, + "InvoiceAttachment": { + "type": "object", + "description": "Represents a file attached to an [invoice](entity:Invoice).", + "x-release-status": "PUBLIC", + "properties": { + "id": { + "type": "string", + "description": "The Square-assigned ID of the attachment.", + "readOnly": true + }, + "filename": { + "type": "string", + "description": "The file name of the attachment, which is displayed on the invoice.", + "readOnly": true + }, + "description": { + "type": "string", + "description": "The description of the attachment, which is displayed on the invoice.\nThis field maps to the seller-defined **Message** field.", + "readOnly": true + }, + "filesize": { + "type": "integer", + "description": "The file size of the attachment in bytes.", + "readOnly": true + }, + "hash": { + "type": "string", + "description": "The MD5 hash that was generated from the file contents.", + "readOnly": true + }, + "mime_type": { + "type": "string", + "description": "The mime type of the attachment.\nThe following mime types are supported: \nimage/gif, image/jpeg, image/png, image/tiff, image/bmp, application/pdf.", + "readOnly": true + }, + "uploaded_at": { + "type": "string", + "description": "The timestamp when the attachment was uploaded, in RFC 3339 format.", + "readOnly": true + } + } + }, + "InvoiceAutomaticPaymentSource": { + "type": "string", + "enum": [ + "NONE", + "CARD_ON_FILE", + "BANK_ON_FILE" + ], + "x-enum-elements": [ + { + "name": "NONE", + "description": "An automatic payment is not configured for the payment request." + }, + { + "name": "CARD_ON_FILE", + "description": "Use a card on file as the automatic payment method. On the due date, Square charges the card\nfor the amount of the payment request.\n\nFor `CARD_ON_FILE` payments, the invoice delivery method must be `EMAIL` and `card_id` must be\nspecified for the payment request before the invoice can be published." + }, + { + "name": "BANK_ON_FILE", + "description": "Use a bank account on file as the automatic payment method. On the due date, Square charges the bank\naccount for the amount of the payment request if the buyer has approved the payment. The buyer receives a\nrequest to approve the payment when the invoice is sent or the invoice is updated.\n\nThis payment method applies only to invoices that sellers create in the Seller Dashboard or other\nSquare product. The bank account is provided by the customer during the payment flow. \n\nYou cannot set `BANK_ON_FILE` as a payment method using the Invoices API, but you can change a `BANK_ON_FILE`\npayment method to `NONE` or `CARD_ON_FILE`. For `BANK_ON_FILE` payments, the invoice delivery method must be `EMAIL`." + } + ], + "description": "Indicates the automatic payment method for an [invoice payment request](entity:InvoicePaymentRequest).", + "x-release-status": "PUBLIC" + }, + "InvoiceCanceledEvent": { + "type": "object", + "description": "Published when an [Invoice](entity:Invoice) is canceled.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"invoice.canceled\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/InvoiceCanceledEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-06-18T18:23:11Z", + "data": { + "id": "inv:0-ChCHu2mZEabLeeHahQnXDjZQECY", + "object": { + "invoice": { + "accepted_payment_methods": { + "bank_account": false, + "buy_now_pay_later": false, + "card": true, + "cash_app_pay": false, + "square_gift_card": false + }, + "created_at": "2020-06-18T17:45:13Z", + "custom_fields": [ + { + "label": "Event Reference Number", + "placement": "ABOVE_LINE_ITEMS", + "value": "Ref. #1234" + }, + { + "label": "Terms of Service", + "placement": "BELOW_LINE_ITEMS", + "value": "The terms of service are..." + } + ], + "delivery_method": "EMAIL", + "description": "We appreciate your business!", + "id": "inv:0-ChCHu2mZEabLeeHahQnXDjZQECY", + "invoice_number": "inv-100", + "location_id": "ES0RJRZYEC39A", + "order_id": "CAISENgvlJ6jLWAzERDzjyHVybY", + "payment_requests": [ + { + "automatic_payment_source": "NONE", + "computed_amount_money": { + "amount": 10000, + "currency": "USD" + }, + "due_date": "2030-01-24", + "reminders": [ + { + "message": "Your invoice is due tomorrow", + "relative_scheduled_days": -1, + "status": "PENDING", + "uid": "beebd363-e47f-4075-8785-c235aaa7df11" + } + ], + "request_type": "BALANCE", + "tipping_enabled": true, + "total_completed_amount_money": { + "amount": 0, + "currency": "USD" + }, + "uid": "2da7964f-f3d2-4f43-81e8-5aa220bf3355" + } + ], + "primary_recipient": { + "customer_id": "JDKYHBWT1D4F8MFH63DBMEN8Y4", + "email_address": "Amelia.Earhart@example.com", + "family_name": "Earhart", + "given_name": "Amelia", + "phone_number": "1-212-555-4240" + }, + "sale_or_service_date": "2030-01-24", + "scheduled_at": "2030-01-13T10:00:00Z", + "status": "CANCELED", + "store_payment_method_enabled": false, + "timezone": "America/Los_Angeles", + "title": "Event Planning Services", + "updated_at": "2020-06-18T18:23:11Z", + "version": 1 + } + }, + "type": "invoice" + }, + "event_id": "742ef00c-446b-4fca-b3d5-f177d816ee54", + "location_id": "ES0RJRZYEC39A", + "merchant_id": "031FEV2Q6VMPK", + "type": "invoice.canceled" + }, + "x-webhook": { + "event": "invoice.canceled", + "scopes": [ + "INVOICES_READ" + ] + }, + "x-api": "#/components/x-apis/Invoices", + "x-since": "2020-07-22" + }, + "InvoiceCanceledEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected object’s type, `\"invoice\"`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the affected invoice." + }, + "object": { + "$ref": "#/components/schemas/InvoiceCanceledEventObject", + "description": "An object containing the canceled invoice.", + "nullable": true + } + } + }, + "InvoiceCanceledEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "invoice": { + "$ref": "#/components/schemas/Invoice", + "description": "The related invoice.", + "nullable": true + } + } + }, + "InvoiceCreatedEvent": { + "type": "object", + "description": "Published when an [Invoice](entity:Invoice) is created.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"invoice.created\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/InvoiceCreatedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-06-18T17:45:13Z", + "data": { + "id": "inv:0-ChCHu2mZEabLeeHahQnXDjZQECY", + "object": { + "invoice": { + "accepted_payment_methods": { + "bank_account": false, + "buy_now_pay_later": false, + "card": true, + "cash_app_pay": false, + "square_gift_card": false + }, + "created_at": "2020-06-18T17:45:13Z", + "custom_fields": [ + { + "label": "Event Reference Number", + "placement": "ABOVE_LINE_ITEMS", + "value": "Ref. #1234" + }, + { + "label": "Terms of Service", + "placement": "BELOW_LINE_ITEMS", + "value": "The terms of service are..." + } + ], + "delivery_method": "EMAIL", + "description": "We appreciate your business!", + "id": "inv:0-ChCHu2mZEabLeeHahQnXDjZQECY", + "invoice_number": "inv-100", + "location_id": "ES0RJRZYEC39A", + "order_id": "CAISENgvlJ6jLWAzERDzjyHVybY", + "payment_requests": [ + { + "automatic_payment_source": "NONE", + "computed_amount_money": { + "amount": 10000, + "currency": "USD" + }, + "due_date": "2030-01-24", + "reminders": [ + { + "message": "Your invoice is due tomorrow", + "relative_scheduled_days": -1, + "status": "PENDING", + "uid": "beebd363-e47f-4075-8785-c235aaa7df11" + } + ], + "request_type": "BALANCE", + "tipping_enabled": true, + "total_completed_amount_money": { + "amount": 0, + "currency": "USD" + }, + "uid": "2da7964f-f3d2-4f43-81e8-5aa220bf3355" + } + ], + "primary_recipient": { + "customer_id": "JDKYHBWT1D4F8MFH63DBMEN8Y4", + "email_address": "Amelia.Earhart@example.com", + "family_name": "Earhart", + "given_name": "Amelia", + "phone_number": "1-212-555-4240" + }, + "sale_or_service_date": "2030-01-24", + "scheduled_at": "2030-01-13T10:00:00Z", + "status": "DRAFT", + "store_payment_method_enabled": false, + "timezone": "America/Los_Angeles", + "title": "Event Planning Services", + "updated_at": "2020-06-18T17:45:13Z", + "version": 0 + } + }, + "type": "invoice" + }, + "event_id": "012c1bfa-c239-4fc0-b16d-5809928b54fe", + "location_id": "ES0RJRZYEC39A", + "merchant_id": "031FEV2Q6VMPK", + "type": "invoice.created" + }, + "x-webhook": { + "event": "invoice.created", + "scopes": [ + "INVOICES_READ" + ] + }, + "x-api": "#/components/x-apis/Invoices", + "x-since": "2020-07-22" + }, + "InvoiceCreatedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected object’s type, `\"invoice\"`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the affected invoice." + }, + "object": { + "$ref": "#/components/schemas/InvoiceCreatedEventObject", + "description": "An object containing the created invoice.", + "nullable": true + } + } + }, + "InvoiceCreatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "invoice": { + "$ref": "#/components/schemas/Invoice", + "description": "The related invoice.", + "nullable": true + } + } + }, + "InvoiceCustomField": { + "type": "object", + "description": "An additional seller-defined and customer-facing field to include on the invoice. For more information, \nsee [Custom fields](https://developer.squareup.com/docs/invoices-api/overview#custom-fields).\n\nAdding custom fields to an invoice requires an \n[Invoices Plus subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription).", + "x-release-status": "PUBLIC", + "properties": { + "label": { + "type": "string", + "description": "The label or title of the custom field. This field is required for a custom field.", + "maxLength": 30, + "nullable": true + }, + "value": { + "type": "string", + "description": "The text of the custom field. If omitted, only the label is rendered.", + "maxLength": 2000, + "nullable": true + }, + "placement": { + "$ref": "#/components/schemas/InvoiceCustomFieldPlacement", + "description": "The location of the custom field on the invoice. This field is required for a custom field.\nSee [InvoiceCustomFieldPlacement](#type-invoicecustomfieldplacement) for possible values", + "nullable": true + } + } + }, + "InvoiceCustomFieldPlacement": { + "type": "string", + "enum": [ + "ABOVE_LINE_ITEMS", + "BELOW_LINE_ITEMS" + ], + "x-enum-elements": [ + { + "name": "ABOVE_LINE_ITEMS", + "description": "Render the custom field above the invoice line items." + }, + { + "name": "BELOW_LINE_ITEMS", + "description": "Render the custom field below the invoice line items." + } + ], + "description": "Indicates where to render a custom field on the Square-hosted invoice page and in emailed or PDF \ncopies of the invoice.", + "x-release-status": "PUBLIC" + }, + "InvoiceDeletedEvent": { + "type": "object", + "description": "Published when a draft [Invoice](entity:Invoice) is deleted.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"invoice.deleted\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/InvoiceDeletedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-06-18T18:23:11Z", + "data": { + "deleted": true, + "id": "inv:0-ChCHu2mZEabLeeHahQnXDjZQECY", + "type": "invoice" + }, + "event_id": "742ef00c-446b-4fca-b3d5-f177d816ee54", + "location_id": "ES0RJRZYEC39A", + "merchant_id": "031FEV2Q6VMPK", + "type": "invoice.deleted" + }, + "x-webhook": { + "event": "invoice.deleted", + "scopes": [ + "INVOICES_READ" + ] + }, + "x-api": "#/components/x-apis/Invoices", + "x-since": "2020-07-22" + }, + "InvoiceDeletedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected object’s type, `\"invoice\"`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the affected invoice." + }, + "deleted": { + "type": "boolean", + "description": "Indicates that the invoice was deleted.", + "nullable": true + } + } + }, + "InvoiceDeliveryMethod": { + "type": "string", + "enum": [ + "EMAIL", + "SHARE_MANUALLY", + "SMS" + ], + "x-enum-elements": [ + { + "name": "EMAIL", + "description": "Directs Square to send invoices, reminders, and receipts to the customer using email." + }, + { + "name": "SHARE_MANUALLY", + "description": "Directs Square to take no action on the invoice. In this case, the seller\nor application developer follows up with the customer for payment. For example,\na seller might collect a payment in the Seller Dashboard or Point of Sale (POS) application.\nThe seller might also share the URL of the Square-hosted invoice page (`public_url`) with the customer to request payment." + }, + { + "name": "SMS", + "description": "Directs Square to send invoices and receipts to the customer using SMS (text message).\n\nYou cannot set `SMS` as a delivery method using the Invoices API, but you can change an `SMS` delivery method to `EMAIL` or `SHARE_MANUALLY`." + } + ], + "description": "Indicates how Square delivers the [invoice](entity:Invoice) to the customer.", + "x-release-status": "PUBLIC" + }, + "InvoiceFilter": { + "type": "object", + "description": "Describes query filters to apply.", + "x-release-status": "PUBLIC", + "required": [ + "location_ids" + ], + "properties": { + "location_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Limits the search to the specified locations. A location is required. \nIn the current implementation, only one location can be specified." + }, + "customer_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Limits the search to the specified customers, within the specified locations. \nSpecifying a customer is optional. In the current implementation, \na maximum of one customer can be specified.", + "nullable": true + } + } + }, + "InvoicePaymentMadeEvent": { + "type": "object", + "description": "Published when a payment that is associated with an [invoice](entity:Invoice) is completed.\nFor more information about invoice payments, see [Pay an invoice](https://developer.squareup.com/docs/invoices-api/pay-refund-invoices#pay-invoice).", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"invoice.payment_made\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/InvoicePaymentMadeEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-06-18T18:23:11Z", + "data": { + "id": "inv:0-ChCHu2mZEabLeeHahQnXDjZQECY", + "object": { + "invoice": { + "accepted_payment_methods": { + "bank_account": false, + "buy_now_pay_later": false, + "card": true, + "cash_app_pay": false, + "square_gift_card": false + }, + "created_at": "2020-06-18T17:45:13Z", + "custom_fields": [ + { + "label": "Event Reference Number", + "placement": "ABOVE_LINE_ITEMS", + "value": "Ref. #1234" + }, + { + "label": "Terms of Service", + "placement": "BELOW_LINE_ITEMS", + "value": "The terms of service are..." + } + ], + "delivery_method": "EMAIL", + "description": "We appreciate your business!", + "id": "inv:0-ChCHu2mZEabLeeHahQnXDjZQECY", + "invoice_number": "inv-100", + "location_id": "ES0RJRZYEC39A", + "order_id": "CAISENgvlJ6jLWAzERDzjyHVybY", + "payment_requests": [ + { + "automatic_payment_source": "NONE", + "computed_amount_money": { + "amount": 10000, + "currency": "USD" + }, + "due_date": "2030-01-24", + "request_type": "BALANCE", + "tipping_enabled": false, + "total_completed_amount_money": { + "amount": 10000, + "currency": "USD" + }, + "uid": "2da7964f-f3d2-4f43-81e8-5aa220bf3355" + } + ], + "primary_recipient": { + "customer_id": "JDKYHBWT1D4F8MFH63DBMEN8Y4", + "email_address": "Amelia.Earhart@example.com", + "family_name": "Earhart", + "given_name": "Amelia", + "phone_number": "1-212-555-4240" + }, + "sale_or_service_date": "2030-01-24", + "status": "PAID", + "store_payment_method_enabled": false, + "timezone": "America/Los_Angeles", + "title": "Event Planning Services", + "updated_at": "2020-06-18T18:23:11Z", + "version": 3 + } + }, + "type": "invoice" + }, + "event_id": "891e3589-462f-4215-9b61-f6df2d4432b7", + "location_id": "ES0RJRZYEC39A", + "merchant_id": "031FEV2Q6VMPK", + "type": "invoice.payment_made" + }, + "x-webhook": { + "event": "invoice.payment_made", + "scopes": [ + "INVOICES_READ" + ] + }, + "x-api": "#/components/x-apis/Invoices", + "x-since": "2020-07-22" + }, + "InvoicePaymentMadeEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected object’s type, `\"invoice\"`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the affected invoice." + }, + "object": { + "$ref": "#/components/schemas/InvoicePaymentMadeEventObject", + "description": "An object containing the invoice that was paid.", + "nullable": true + } + } + }, + "InvoicePaymentMadeEventObject": { "type": "object", - "description": "Represents details about an `ADJUST_DECREMENT` [gift card activity type](entity:GiftCardActivityType).", "x-release-status": "PUBLIC", - "required": [ - "amount_money", - "reason" - ], "properties": { - "amount_money": { - "$ref": "#/components/schemas/Money", - "description": "The amount deducted from the gift card balance. This value is a positive integer." - }, - "reason": { - "$ref": "#/components/schemas/GiftCardActivityAdjustDecrementReason", - "description": "The reason the gift card balance was adjusted.\nSee [Reason](#type-reason) for possible values" + "invoice": { + "$ref": "#/components/schemas/Invoice", + "description": "The related invoice.", + "nullable": true } } }, - "GiftCardActivityAdjustDecrementReason": { - "type": "string", - "enum": [ - "SUSPICIOUS_ACTIVITY", - "BALANCE_ACCIDENTALLY_INCREASED", - "SUPPORT_ISSUE", - "PURCHASE_WAS_REFUNDED" - ], - "x-enum-elements": [ - { - "name": "SUSPICIOUS_ACTIVITY", - "description": "The balance was decreased because the seller detected suspicious or fraudulent activity\non the gift card." - }, - { - "name": "BALANCE_ACCIDENTALLY_INCREASED", - "description": "The balance was decreased to reverse an unintentional balance increase." - }, - { - "name": "SUPPORT_ISSUE", - "description": "The balance was decreased to accommodate support issues." - }, - { - "name": "PURCHASE_WAS_REFUNDED", - "description": "The balance was decreased because the order used to purchase or reload the\ngift card was refunded." - } - ], - "description": "Indicates the reason for deducting money from a [gift card](entity:GiftCard).", - "x-release-status": "PUBLIC" - }, - "GiftCardActivityAdjustIncrement": { + "InvoicePaymentReminder": { "type": "object", - "description": "Represents details about an `ADJUST_INCREMENT` [gift card activity type](entity:GiftCardActivityType).", + "description": "Describes a payment request reminder (automatic notification) that Square sends\nto the customer. You configure a reminder relative to the payment request\n`due_date`.", "x-release-status": "PUBLIC", - "required": [ - "amount_money", - "reason" - ], "properties": { - "amount_money": { - "$ref": "#/components/schemas/Money", - "description": "The amount added to the gift card balance. This value is a positive integer." + "uid": { + "type": "string", + "description": "A Square-assigned ID that uniquely identifies the reminder within the\n`InvoicePaymentRequest`.", + "readOnly": true }, - "reason": { - "$ref": "#/components/schemas/GiftCardActivityAdjustIncrementReason", - "description": "The reason the gift card balance was adjusted.\nSee [Reason](#type-reason) for possible values" + "relative_scheduled_days": { + "type": "integer", + "description": "The number of days before (a negative number) or after (a positive number)\nthe payment request `due_date` when the reminder is sent. For example, -3 indicates that\nthe reminder should be sent 3 days before the payment request `due_date`.", + "minimum": -32767, + "maximum": 32767, + "nullable": true + }, + "message": { + "type": "string", + "description": "The reminder message.", + "minLength": 1, + "maxLength": 1000, + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/InvoicePaymentReminderStatus", + "description": "The status of the reminder.\nSee [InvoicePaymentReminderStatus](#type-invoicepaymentreminderstatus) for possible values", + "readOnly": true + }, + "sent_at": { + "type": "string", + "description": "If sent, the timestamp when the reminder was sent, in RFC 3339 format.", + "readOnly": true } } }, - "GiftCardActivityAdjustIncrementReason": { + "InvoicePaymentReminderStatus": { "type": "string", "enum": [ - "COMPLIMENTARY", - "SUPPORT_ISSUE", - "TRANSACTION_VOIDED" + "PENDING", + "NOT_APPLICABLE", + "SENT" ], "x-enum-elements": [ { - "name": "COMPLIMENTARY", - "description": "The seller gifted a complimentary gift card balance increase." + "name": "PENDING", + "description": "The reminder will be sent on the `relative_scheduled_date` (if the invoice is published)." }, { - "name": "SUPPORT_ISSUE", - "description": "The seller increased the gift card balance \nto accommodate support issues." + "name": "NOT_APPLICABLE", + "description": "The reminder is not applicable and is not sent. The following are examples\nof when reminders are not applicable and are not sent:\n- You schedule a reminder to be sent before the invoice is published.\n- The invoice is configured with multiple payment requests and a payment request reminder\nis configured to be sent after the next payment request `due_date`.\n- Two reminders (for different payment requests) are configured to be sent on the\nsame date. Therefore, only one reminder is sent.\n- You configure a reminder to be sent on the date that the invoice is scheduled to be sent.\n- The payment request is already paid.\n- The invoice status is `CANCELED` or `FAILED`." }, { - "name": "TRANSACTION_VOIDED", - "description": "The transaction is voided." + "name": "SENT", + "description": "The reminder is sent." } ], - "description": "Indicates the reason for adding money to a [gift card](entity:GiftCard).", + "description": "The status of a payment request reminder.", "x-release-status": "PUBLIC" }, - "GiftCardActivityBlock": { + "InvoicePaymentRequest": { "type": "object", - "description": "Represents details about a `BLOCK` [gift card activity type](entity:GiftCardActivityType).", + "description": "Represents a payment request for an [invoice](entity:Invoice). Invoices can specify a maximum\nof 13 payment requests, with up to 12 `INSTALLMENT` request types. For more information, \nsee [Configuring payment requests](https://developer.squareup.com/docs/invoices-api/create-publish-invoices#payment-requests).\n\nAdding `INSTALLMENT` payment requests to an invoice requires an \n[Invoices Plus subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription).", "x-release-status": "PUBLIC", - "required": [ - "reason" - ], "properties": { - "reason": { - "$ref": "#/components/schemas/GiftCardActivityBlockReason", - "description": "The reason the gift card was blocked.\nSee [Reason](#type-reason) for possible values" + "uid": { + "type": "string", + "description": "The Square-generated ID of the payment request in an [invoice](entity:Invoice).", + "minLength": 1, + "maxLength": 255, + "nullable": true + }, + "request_method": { + "$ref": "#/components/schemas/InvoiceRequestMethod", + "description": "Indicates how Square processes the payment request. DEPRECATED at version 2021-01-21. Replaced by the\n`Invoice.delivery_method` and `InvoicePaymentRequest.automatic_payment_source` fields.\n\nOne of the following is required when creating an invoice:\n- (Recommended) The `delivery_method` field of the invoice. To configure an automatic payment, the\n`automatic_payment_source` field of the payment request is also required.\n- This `request_method` field. Note that `invoice` objects returned in responses do not include `request_method`.\nSee [InvoiceRequestMethod](#type-invoicerequestmethod) for possible values", + "x-release-status": "DEPRECATED", + "nullable": true + }, + "request_type": { + "$ref": "#/components/schemas/InvoiceRequestType", + "description": "Identifies the payment request type. This type defines how the payment request amount is determined. \nThis field is required to create a payment request.\nSee [InvoiceRequestType](#type-invoicerequesttype) for possible values", + "nullable": true + }, + "due_date": { + "type": "string", + "description": "The due date (in the invoice's time zone) for the payment request, in `YYYY-MM-DD` format. This field\nis required to create a payment request. If an `automatic_payment_source` is defined for the request, Square\ncharges the payment source on this date.\n\nAfter this date, the invoice becomes overdue. For example, a payment `due_date` of 2021-03-09 with a `timezone`\nof America/Los\\_Angeles becomes overdue at midnight on March 9 in America/Los\\_Angeles (which equals a UTC\ntimestamp of 2021-03-10T08:00:00Z).", + "nullable": true + }, + "fixed_amount_requested_money": { + "$ref": "#/components/schemas/Money", + "description": "If the payment request specifies `DEPOSIT` or `INSTALLMENT` as the `request_type`, \nthis indicates the request amount.\nYou cannot specify this when `request_type` is `BALANCE` or when the \npayment request includes the `percentage_requested` field.", + "nullable": true + }, + "percentage_requested": { + "type": "string", + "description": "Specifies the amount for the payment request in percentage:\n\n- When the payment `request_type` is `DEPOSIT`, it is the percentage of the order's total amount.\n- When the payment `request_type` is `INSTALLMENT`, it is the percentage of the order's total less \nthe deposit, if requested. The sum of the `percentage_requested` in all installment \npayment requests must be equal to 100.\n\nYou cannot specify this when the payment `request_type` is `BALANCE` or when the \npayment request specifies the `fixed_amount_requested_money` field.", + "nullable": true + }, + "tipping_enabled": { + "type": "boolean", + "description": "If set to true, the Square-hosted invoice page (the `public_url` field of the invoice) \nprovides a place for the customer to pay a tip. \n\nThis field is allowed only on the final payment request \nand the payment `request_type` must be `BALANCE` or `INSTALLMENT`.", + "nullable": true + }, + "automatic_payment_source": { + "$ref": "#/components/schemas/InvoiceAutomaticPaymentSource", + "description": "The payment method for an automatic payment.\n\nThe default value is `NONE`.\nSee [InvoiceAutomaticPaymentSource](#type-invoiceautomaticpaymentsource) for possible values", + "nullable": true + }, + "card_id": { + "type": "string", + "description": "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,\ncall [ListCards](api-endpoint:Cards-ListCards) and include the `customer_id` of the invoice recipient.", + "minLength": 1, + "maxLength": 255, + "nullable": true + }, + "reminders": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InvoicePaymentReminder" + }, + "description": "A list of one or more reminders to send for the payment request.", + "nullable": true + }, + "computed_amount_money": { + "$ref": "#/components/schemas/Money", + "description": "The amount of the payment request, computed using the order amount and information from the various payment\nrequest fields (`request_type`, `fixed_amount_requested_money`, and `percentage_requested`).", + "readOnly": true + }, + "total_completed_amount_money": { + "$ref": "#/components/schemas/Money", + "description": "The amount of money already paid for the specific payment request. \nThis amount might include a rounding adjustment if the most recent invoice payment \nwas in cash in a currency that rounds cash payments (such as, `CAD` or `AUD`).", + "readOnly": true + }, + "rounding_adjustment_included_money": { + "$ref": "#/components/schemas/Money", + "description": "If the most recent payment was a cash payment \nin a currency that rounds cash payments (such as, `CAD` or `AUD`) and the payment \nis rounded from `computed_amount_money` in the payment request, then this \nfield specifies the rounding adjustment applied. This amount \nmight be negative.", + "readOnly": true } } }, - "GiftCardActivityBlockReason": { - "type": "string", - "enum": [ - "CHARGEBACK_BLOCK" - ], - "x-enum-elements": [ - { - "name": "CHARGEBACK_BLOCK", - "description": "The gift card is blocked because the buyer initiated a chargeback on the gift card purchase." - } - ], - "description": "Indicates the reason for blocking a [gift card](entity:GiftCard).", - "x-release-status": "PUBLIC" - }, - "GiftCardActivityClearBalance": { + "InvoicePublishedEvent": { "type": "object", - "description": "Represents details about a `CLEAR_BALANCE` [gift card activity type](entity:GiftCardActivityType).", + "description": "Published when an [Invoice](entity:Invoice) transitions from a draft to a non-draft status.", "x-release-status": "PUBLIC", - "required": [ - "reason" - ], "properties": { - "reason": { - "$ref": "#/components/schemas/GiftCardActivityClearBalanceReason", - "description": "The reason the gift card balance was cleared.\nSee [Reason](#type-reason) for possible values" - } - } - }, - "GiftCardActivityClearBalanceReason": { - "type": "string", - "enum": [ - "SUSPICIOUS_ACTIVITY", - "REUSE_GIFTCARD", - "UNKNOWN_REASON" - ], - "x-enum-elements": [ - { - "name": "SUSPICIOUS_ACTIVITY", - "description": "The seller suspects suspicious activity." + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true }, - { - "name": "REUSE_GIFTCARD", - "description": "The seller cleared the balance to reuse the gift card." + "type": { + "type": "string", + "description": "The type of event this represents, `\"invoice.published\"`.", + "nullable": true }, - { - "name": "UNKNOWN_REASON", - "description": "The gift card balance was cleared for an unknown reason.\n\nThis reason is read-only and cannot be used to create a `CLEAR_BALANCE` activity using the Gift Card Activities API." + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/InvoicePublishedEventData", + "description": "Data associated with the event.", + "nullable": true } - ], - "description": "Indicates the reason for clearing the balance of a [gift card](entity:GiftCard).", - "x-release-status": "PUBLIC" + }, + "example": { + "created_at": "2020-06-18T18:23:11Z", + "data": { + "id": "inv:0-ChCHu2mZEabLeeHahQnXDjZQECY", + "object": { + "invoice": { + "accepted_payment_methods": { + "bank_account": false, + "buy_now_pay_later": false, + "card": true, + "cash_app_pay": false, + "square_gift_card": false + }, + "created_at": "2020-06-18T17:45:13Z", + "custom_fields": [ + { + "label": "Event Reference Number", + "placement": "ABOVE_LINE_ITEMS", + "value": "Ref. #1234" + }, + { + "label": "Terms of Service", + "placement": "BELOW_LINE_ITEMS", + "value": "The terms of service are..." + } + ], + "delivery_method": "EMAIL", + "description": "We appreciate your business!", + "id": "inv:0-ChCHu2mZEabLeeHahQnXDjZQECY", + "invoice_number": "inv-100", + "location_id": "ES0RJRZYEC39A", + "order_id": "CAISENgvlJ6jLWAzERDzjyHVybY", + "payment_requests": [ + { + "automatic_payment_source": "NONE", + "computed_amount_money": { + "amount": 10000, + "currency": "USD" + }, + "due_date": "2030-01-24", + "reminders": [ + { + "message": "Your invoice is due tomorrow", + "relative_scheduled_days": -1, + "status": "PENDING", + "uid": "beebd363-e47f-4075-8785-c235aaa7df11" + } + ], + "request_type": "BALANCE", + "tipping_enabled": true, + "total_completed_amount_money": { + "amount": 0, + "currency": "USD" + }, + "uid": "2da7964f-f3d2-4f43-81e8-5aa220bf3355" + } + ], + "primary_recipient": { + "customer_id": "JDKYHBWT1D4F8MFH63DBMEN8Y4", + "email_address": "Amelia.Earhart@example.com", + "family_name": "Earhart", + "given_name": "Amelia", + "phone_number": "1-212-555-4240" + }, + "sale_or_service_date": "2030-01-24", + "scheduled_at": "2030-01-13T10:00:00Z", + "status": "SCHEDULED", + "store_payment_method_enabled": false, + "timezone": "America/Los_Angeles", + "title": "Event Planning Services", + "updated_at": "2020-06-18T18:23:11Z", + "version": 1 + } + }, + "type": "invoice" + }, + "event_id": "52246644-98ba-411a-874c-ba35ccdb831c", + "location_id": "ES0RJRZYEC39A", + "merchant_id": "031FEV2Q6VMPK", + "type": "invoice.published" + }, + "x-webhook": { + "event": "invoice.published", + "scopes": [ + "INVOICES_READ" + ] + }, + "x-api": "#/components/x-apis/Invoices", + "x-since": "2020-07-22" }, - "GiftCardActivityDeactivate": { + "InvoicePublishedEventData": { "type": "object", - "description": "Represents details about a `DEACTIVATE` [gift card activity type](entity:GiftCardActivityType).", "x-release-status": "PUBLIC", - "required": [ - "reason" - ], "properties": { - "reason": { - "$ref": "#/components/schemas/GiftCardActivityDeactivateReason", - "description": "The reason the gift card was deactivated.\nSee [Reason](#type-reason) for possible values" - } - } - }, - "GiftCardActivityDeactivateReason": { - "type": "string", - "enum": [ - "SUSPICIOUS_ACTIVITY", - "UNKNOWN_REASON", - "CHARGEBACK_DEACTIVATE" - ], - "x-enum-elements": [ - { - "name": "SUSPICIOUS_ACTIVITY", - "description": "The seller suspects suspicious activity." + "type": { + "type": "string", + "description": "Name of the affected object’s type, `\"invoice\"`.", + "nullable": true }, - { - "name": "UNKNOWN_REASON", - "description": "The gift card was deactivated for an unknown reason.\n\nThis reason is read-only and cannot be used to create a `DEACTIVATE` activity using the Gift Card Activities API." + "id": { + "type": "string", + "description": "ID of the affected invoice." }, - { - "name": "CHARGEBACK_DEACTIVATE", - "description": "A chargeback on the gift card purchase (or the gift card load) was ruled in favor of the buyer.\n\nThis reason is read-only and cannot be used to create a `DEACTIVATE` activity using the Gift Card Activities API." + "object": { + "$ref": "#/components/schemas/InvoicePublishedEventObject", + "description": "An object containing the published invoice.", + "nullable": true } - ], - "description": "Indicates the reason for deactivating a [gift card](entity:GiftCard).", - "x-release-status": "PUBLIC" + } }, - "GiftCardActivityImport": { + "InvoicePublishedEventObject": { "type": "object", - "description": "Represents details about an `IMPORT` [gift card activity type](entity:GiftCardActivityType).\nThis activity type is used when Square imports a third-party gift card, in which case the \n`gan_source` of the gift card is set to `OTHER`.", "x-release-status": "PUBLIC", - "required": [ - "amount_money" - ], "properties": { - "amount_money": { - "$ref": "#/components/schemas/Money", - "description": "The balance amount on the imported gift card." + "invoice": { + "$ref": "#/components/schemas/Invoice", + "description": "The related invoice.", + "nullable": true } } }, - "GiftCardActivityImportReversal": { + "InvoiceQuery": { "type": "object", - "description": "Represents details about an `IMPORT_REVERSAL` [gift card activity type](entity:GiftCardActivityType).", + "description": "Describes query criteria for searching invoices.", "x-release-status": "PUBLIC", "required": [ - "amount_money" + "filter" ], "properties": { - "amount_money": { - "$ref": "#/components/schemas/Money", - "description": "The amount of money cleared from the third-party gift card when \nthe import was reversed." + "filter": { + "$ref": "#/components/schemas/InvoiceFilter", + "description": "Query filters to apply in searching invoices. \nFor more information, see [Search for invoices](https://developer.squareup.com/docs/invoices-api/retrieve-list-search-invoices#search-invoices)." + }, + "sort": { + "$ref": "#/components/schemas/InvoiceSort", + "description": "Describes the sort order for the search result.", + "nullable": true } } }, - "GiftCardActivityLoad": { + "InvoiceRecipient": { "type": "object", - "description": "Represents details about a `LOAD` [gift card activity type](entity:GiftCardActivityType).", + "description": "Represents a snapshot of customer data. This object stores customer data that is displayed on the invoice \nand that Square uses to deliver the invoice.\n\nWhen you provide a customer ID for a draft invoice, Square retrieves the associated customer profile and populates \nthe remaining `InvoiceRecipient` fields. You cannot update these fields after the invoice is published. \nSquare updates the customer ID in response to a merge operation, but does not update other fields.", "x-release-status": "PUBLIC", "properties": { - "amount_money": { - "$ref": "#/components/schemas/Money", - "description": "The amount added to the gift card. This value is a positive integer.\n\nApplications that use a custom order processing system must specify this amount in the \n[CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request.", + "customer_id": { + "type": "string", + "description": "The ID of the customer. This is the customer profile ID that \nyou provide when creating a draft invoice.", + "minLength": 1, + "maxLength": 255, "nullable": true }, - "order_id": { + "given_name": { "type": "string", - "description": "The ID of the [order](entity:Order) that contains the `GIFT_CARD` line item.\n\nApplications that use the Square Orders API to process orders must specify the order ID in the \n[CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request.", - "nullable": true + "description": "The recipient's given (that is, first) name.", + "readOnly": true }, - "line_item_uid": { + "family_name": { "type": "string", - "description": "The UID of the `GIFT_CARD` line item in the order that represents the additional funds for the gift card.\n\nApplications that use the Square Orders API to process orders must specify the line item UID\nin the [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request.", - "nullable": true + "description": "The recipient's family (that is, last) name.", + "readOnly": true }, - "reference_id": { + "email_address": { "type": "string", - "description": "A client-specified ID that associates the gift card activity with an entity in another system. \n\nApplications that use a custom order processing system can use this field to track information related to \nan order or payment.", - "nullable": true + "description": "The recipient's email address.", + "readOnly": true }, - "buyer_payment_instrument_ids": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The payment instrument IDs used to process the order for the additional funds, such as a credit card ID \nor bank account ID. \n\nApplications that use a custom order processing system must specify payment instrument IDs in \nthe [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request.\nSquare uses this information to perform compliance checks. \n\nFor applications that use the Square Orders API to process payments, Square has the necessary \ninstrument IDs to perform compliance checks.\n\nEach buyer payment instrument ID can contain a maximum of 255 characters.", - "nullable": true - } - } - }, - "GiftCardActivityRedeem": { - "type": "object", - "description": "Represents details about a `REDEEM` [gift card activity type](entity:GiftCardActivityType).", - "x-release-status": "PUBLIC", - "required": [ - "amount_money" - ], - "properties": { - "amount_money": { - "$ref": "#/components/schemas/Money", - "description": "The amount deducted from the gift card for the redemption. This value is a positive integer.\n\nApplications that use a custom payment processing system must specify this amount in the \n[CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request." + "address": { + "$ref": "#/components/schemas/Address", + "description": "The recipient's physical address.", + "readOnly": true }, - "payment_id": { + "phone_number": { "type": "string", - "description": "The ID of the payment that represents the gift card redemption. Square populates this field \nif the payment was processed by Square.", + "description": "The recipient's phone number.", "readOnly": true }, - "reference_id": { + "company_name": { "type": "string", - "description": "A client-specified ID that associates the gift card activity with an entity in another system. \n\nApplications that use a custom payment processing system can use this field to track information\nrelated to an order or payment.", - "nullable": true + "description": "The name of the recipient's company.", + "readOnly": true }, - "status": { - "$ref": "#/components/schemas/GiftCardActivityRedeemStatus", - "description": "The status of the gift card redemption. Gift cards redeemed from Square Point of Sale or the \nSquare Seller Dashboard use a two-state process: `PENDING` \nto `COMPLETED` or `PENDING` to `CANCELED`. Gift cards redeemed using the Gift Card Activities API \nalways have a `COMPLETED` status.\nSee [Status](#type-status) for possible values", + "tax_ids": { + "$ref": "#/components/schemas/InvoiceRecipientTaxIds", + "description": "The recipient's tax IDs. The country of the seller account determines whether this field \nis available for the customer. For more information, see [Invoice recipient tax IDs](https://developer.squareup.com/docs/invoices-api/overview#recipient-tax-ids).", "readOnly": true } } }, - "GiftCardActivityRedeemStatus": { - "type": "string", - "enum": [ - "PENDING", - "COMPLETED", - "CANCELED" - ], - "x-enum-elements": [ - { - "name": "PENDING", - "description": "The gift card redemption is pending. `PENDING` is a temporary status that applies when a \ngift card is redeemed from Square Point of Sale or another Square product. A `PENDING` status is updated to \n`COMPLETED` if the payment is captured or `CANCELED` if the authorization is voided." - }, - { - "name": "COMPLETED", - "description": "The gift card redemption is completed." - }, - { - "name": "CANCELED", - "description": "The gift card redemption is canceled. A redemption is canceled if the authorization \non the gift card is voided." + "InvoiceRecipientTaxIds": { + "type": "object", + "description": "Represents the tax IDs for an invoice recipient. The country of the seller account determines \nwhether the corresponding `tax_ids` field is available for the customer. For more information, \nsee [Invoice recipient tax IDs](https://developer.squareup.com/docs/invoices-api/overview#recipient-tax-ids).", + "x-release-status": "PUBLIC", + "properties": { + "eu_vat": { + "type": "string", + "description": "The EU VAT identification number for the invoice recipient. For example, `IE3426675K`.", + "readOnly": true } - ], - "description": "Indicates the status of a [gift card](entity:GiftCard) redemption. This status is relevant only for\nredemptions made from Square products (such as Square Point of Sale) because Square products use a \ntwo-state process. Gift cards redeemed using the Gift Card Activities API always have a `COMPLETED` status.", - "x-release-status": "PUBLIC" + } }, - "GiftCardActivityRefund": { + "InvoiceRefundedEvent": { "type": "object", - "description": "Represents details about a `REFUND` [gift card activity type](entity:GiftCardActivityType).", + "description": "Published when a refund is applied toward a payment of an [invoice](entity:Invoice). \nFor more information about invoice refunds, see [Refund an invoice](https://developer.squareup.com/docs/invoices-api/pay-refund-invoices#refund-invoice).", "x-release-status": "PUBLIC", "properties": { - "redeem_activity_id": { + "merchant_id": { "type": "string", - "description": "The ID of the refunded `REDEEM` gift card activity. Square populates this field if the \n`payment_id` in the corresponding [RefundPayment](api-endpoint:Refunds-RefundPayment) request \nrepresents a gift card redemption.\n\nFor applications that use a custom payment processing system, this field is required when creating\na `REFUND` activity. The provided `REDEEM` activity ID must be linked to the same gift card.", + "description": "The ID of the target merchant associated with the event.", "nullable": true }, - "amount_money": { - "$ref": "#/components/schemas/Money", - "description": "The amount added to the gift card for the refund. This value is a positive integer.\n\nThis field is required when creating a `REFUND` activity. The amount can represent a full or partial refund.", + "type": { + "type": "string", + "description": "The type of event this represents, `\"invoice.refunded\"`.", "nullable": true }, - "reference_id": { + "event_id": { "type": "string", - "description": "A client-specified ID that associates the gift card activity with an entity in another system.", + "description": "A unique ID for the event.", "nullable": true }, - "payment_id": { + "created_at": { "type": "string", - "description": "The ID of the refunded payment. Square populates this field if the refund is for a \npayment processed by Square. This field matches the `payment_id` in the corresponding\n[RefundPayment](api-endpoint:Refunds-RefundPayment) request.", + "description": "Timestamp of when the event was created, in RFC 3339 format.", "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/InvoiceRefundedEventData", + "description": "Data associated with the event.", + "nullable": true } - } + }, + "example": { + "created_at": "2020-06-18T18:23:11Z", + "data": { + "id": "inv:0-ChCHu2mZEabLeeHahQnXDjZQECY", + "object": { + "invoice": { + "accepted_payment_methods": { + "bank_account": false, + "buy_now_pay_later": false, + "card": true, + "cash_app_pay": false, + "square_gift_card": false + }, + "created_at": "2020-06-18T17:45:13Z", + "custom_fields": [ + { + "label": "Event Reference Number", + "placement": "ABOVE_LINE_ITEMS", + "value": "Ref. #1234" + }, + { + "label": "Terms of Service", + "placement": "BELOW_LINE_ITEMS", + "value": "The terms of service are..." + } + ], + "delivery_method": "EMAIL", + "description": "We appreciate your business!", + "id": "inv:0-ChCHu2mZEabLeeHahQnXDjZQECY", + "invoice_number": "inv-100", + "location_id": "ES0RJRZYEC39A", + "order_id": "CAISENgvlJ6jLWAzERDzjyHVybY", + "payment_requests": [ + { + "automatic_payment_source": "NONE", + "computed_amount_money": { + "amount": 10000, + "currency": "USD" + }, + "due_date": "2030-01-24", + "request_type": "BALANCE", + "tipping_enabled": false, + "total_completed_amount_money": { + "amount": 10000, + "currency": "USD" + }, + "uid": "2da7964f-f3d2-4f43-81e8-5aa220bf3355" + } + ], + "primary_recipient": { + "customer_id": "JDKYHBWT1D4F8MFH63DBMEN8Y4", + "email_address": "Amelia.Earhart@example.com", + "family_name": "Earhart", + "given_name": "Amelia", + "phone_number": "1-212-555-4240" + }, + "sale_or_service_date": "2030-01-24", + "status": "REFUNDED", + "store_payment_method_enabled": false, + "timezone": "America/Los_Angeles", + "title": "Event Planning Services", + "updated_at": "2020-06-18T18:23:11Z", + "version": 4 + } + }, + "type": "invoice" + }, + "event_id": "aedeb1fb-6c7d-4484-8106-866d97652388", + "location_id": "ES0RJRZYEC39A", + "merchant_id": "031FEV2Q6VMPK", + "type": "invoice.refunded" + }, + "x-webhook": { + "event": "invoice.refunded", + "scopes": [ + "INVOICES_READ" + ] + }, + "x-api": "#/components/x-apis/Invoices", + "x-since": "2020-07-22" }, - "GiftCardActivityTransferBalanceFrom": { + "InvoiceRefundedEventData": { "type": "object", - "description": "Represents details about a `TRANSFER_BALANCE_FROM` [gift card activity type](entity:GiftCardActivityType).", - "x-release-status": "PUBLIC", - "required": [ - "transfer_to_gift_card_id", - "amount_money" - ], + "x-release-status": "PUBLIC", "properties": { - "transfer_to_gift_card_id": { + "type": { "type": "string", - "description": "The ID of the gift card to which the specified amount was transferred." + "description": "Name of the affected object’s type, `\"invoice\"`.", + "nullable": true }, - "amount_money": { - "$ref": "#/components/schemas/Money", - "description": "The amount deducted from the gift card for the transfer. This value is a positive integer." + "id": { + "type": "string", + "description": "ID of the affected invoice." + }, + "object": { + "$ref": "#/components/schemas/InvoiceRefundedEventObject", + "description": "An object containing the refunded invoice.", + "nullable": true } } }, - "GiftCardActivityTransferBalanceTo": { + "InvoiceRefundedEventObject": { "type": "object", - "description": "Represents details about a `TRANSFER_BALANCE_TO` [gift card activity type](entity:GiftCardActivityType).", "x-release-status": "PUBLIC", - "required": [ - "transfer_from_gift_card_id", - "amount_money" - ], "properties": { - "transfer_from_gift_card_id": { - "type": "string", - "description": "The ID of the gift card from which the specified amount was transferred." - }, - "amount_money": { - "$ref": "#/components/schemas/Money", - "description": "The amount added to the gift card balance for the transfer. This value is a positive integer." + "invoice": { + "$ref": "#/components/schemas/Invoice", + "description": "The related invoice.", + "nullable": true } } }, - "GiftCardActivityType": { + "InvoiceRequestMethod": { "type": "string", "enum": [ - "ACTIVATE", - "LOAD", - "REDEEM", - "CLEAR_BALANCE", - "DEACTIVATE", - "ADJUST_INCREMENT", - "ADJUST_DECREMENT", - "REFUND", - "UNLINKED_ACTIVITY_REFUND", - "IMPORT", - "BLOCK", - "UNBLOCK", - "IMPORT_REVERSAL", - "TRANSFER_BALANCE_FROM", - "TRANSFER_BALANCE_TO" + "EMAIL", + "CHARGE_CARD_ON_FILE", + "SHARE_MANUALLY", + "CHARGE_BANK_ON_FILE", + "SMS", + "SMS_CHARGE_CARD_ON_FILE", + "SMS_CHARGE_BANK_ON_FILE" ], "x-enum-elements": [ { - "name": "ACTIVATE", - "description": "Activated a gift card with a balance. When a gift card is activated, Square changes \nthe gift card state from `PENDING` to `ACTIVE`. A gift card must be in the `ACTIVE` state \nto be used for other balance-changing activities." - }, - { - "name": "LOAD", - "description": "Loaded a gift card with additional funds." + "name": "EMAIL", + "description": "Directs Square to send invoices, reminders, and receipts to the customer using email.\nSquare sends the invoice after it is published (either immediately or at the `scheduled_at`\ntime, if specified in the [invoice](entity:Invoice))." }, { - "name": "REDEEM", - "description": "Redeemed a gift card for a purchase." + "name": "CHARGE_CARD_ON_FILE", + "description": "Directs Square to charge the card on file on the `due_date` specified in the payment request\nand to use email to send invoices, reminders, and receipts." }, { - "name": "CLEAR_BALANCE", - "description": "Set the balance of a gift card to zero." + "name": "SHARE_MANUALLY", + "description": "Directs Square to take no specific action on the invoice. In this case, the seller \n(or the application developer) follows up with the customer for payment. For example, \na seller might collect a payment in the Seller Dashboard or use the Point of Sale (POS) application. \nThe seller might also share the URL of the Square-hosted invoice page (`public_url`) with the customer requesting payment." }, { - "name": "DEACTIVATE", - "description": "Permanently blocked a gift card from balance-changing activities." + "name": "CHARGE_BANK_ON_FILE", + "description": "Directs Square to charge the customer's bank account on file and to use email to send invoices, reminders, and receipts.\nThe customer must approve the payment.\n\nThe bank on file payment method applies only to invoices that sellers create in the Seller Dashboard or other\nSquare product. The bank account is provided by the customer during the payment flow. You \ncannot set `CHARGE_BANK_ON_FILE` as a request method using the Invoices API." }, { - "name": "ADJUST_INCREMENT", - "description": "Added money to a gift card outside of a typical `ACTIVATE`, `LOAD`, or `REFUND` activity flow." + "name": "SMS", + "description": "Directs Square to send invoices and receipts to the customer using SMS (text message). Square sends the invoice\nafter it is published (either immediately or at the `scheduled_at` time, if specified in the [invoice](entity:Invoice)). \n\nYou cannot set `SMS` as a request method using the Invoices API." }, { - "name": "ADJUST_DECREMENT", - "description": "Deducted money from a gift card outside of a typical `REDEEM` activity flow." + "name": "SMS_CHARGE_CARD_ON_FILE", + "description": "Directs Square to charge the card on file on the `due_date` specified in the payment request and to\nuse SMS (text message) to send invoices and receipts. \n\nYou cannot set `SMS_CHARGE_CARD_ON_FILE` as a request method using the Invoices API." }, { - "name": "REFUND", - "description": "Added money to a gift card from a refunded transaction. A `REFUND` activity might be linked to \na Square payment, depending on how the payment and refund are processed. For example:\n- A payment processed by Square can be refunded to a `PENDING` or `ACTIVE` gift card using the Square\nSeller Dashboard, Square Point of Sale, or Refunds API.\n- A payment processed using a custom processing system can be refunded to the same gift card." - }, + "name": "SMS_CHARGE_BANK_ON_FILE", + "description": "Directs Square to charge the customer's bank account on file and to use SMS (text message) to send invoices and receipts.\nThe customer must approve the payment.\n\nThe bank on file payment method applies only to invoices that sellers create in the Seller Dashboard\nor other Square product. The bank account is provided by the customer during the payment flow. \nYou cannot set `SMS_CHARGE_BANK_ON_FILE` as a request method using the Invoices API." + } + ], + "description": "Specifies the action for Square to take for processing the invoice. For example, \nemail the invoice, charge a customer's card on file, or do nothing. DEPRECATED at\nversion 2021-01-21. The corresponding `request_method` field is replaced by the\n`Invoice.delivery_method` and `InvoicePaymentRequest.automatic_payment_source` fields.", + "x-release-status": "DEPRECATED" + }, + "InvoiceRequestType": { + "type": "string", + "enum": [ + "BALANCE", + "DEPOSIT", + "INSTALLMENT" + ], + "x-enum-elements": [ { - "name": "UNLINKED_ACTIVITY_REFUND", - "description": "Added money to a gift card from a refunded transaction that was processed using a custom payment\nprocessing system and not linked to the gift card." + "name": "BALANCE", + "description": "A request for a balance payment. The balance amount is computed as follows: \n\n- If the invoice specifies only a balance payment request, the balance amount is the \ntotal amount of the associated order. \n- If the invoice also specifies a deposit request, the balance amount is the amount \nremaining after the deposit.\n\n`INSTALLMENT` and `BALANCE` payment requests are not allowed in the same invoice." }, { - "name": "IMPORT", - "description": "Imported a third-party gift card with a balance. `IMPORT` activities are managed \nby Square and cannot be created using the Gift Card Activities API." + "name": "DEPOSIT", + "description": "A request for a deposit payment. You have the option of specifying \nan exact amount or a percentage of the total order amount. If you request a deposit, \nit must be due before any other payment requests." }, { - "name": "BLOCK", - "description": "Temporarily blocked a gift card from balance-changing activities. `BLOCK` activities \nare managed by Square and cannot be created using the Gift Card Activities API." + "name": "INSTALLMENT", + "description": "A request for an installment payment. Installments allow buyers to pay the invoice over time. Installments can optionally be combined with a deposit. \n\nAdding `INSTALLMENT` payment requests to an invoice requires an \n[Invoices Plus subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription)." + } + ], + "description": "Indicates the type of the payment request. For more information, see \n[Configuring payment requests](https://developer.squareup.com/docs/invoices-api/create-publish-invoices#payment-requests).", + "x-release-status": "PUBLIC" + }, + "InvoiceScheduledChargeFailedEvent": { + "type": "object", + "description": "Published when an automatic scheduled payment for an [Invoice](entity:Invoice) has failed.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true }, - { - "name": "UNBLOCK", - "description": "Unblocked a gift card, which enables it to resume balance-changing activities. `UNBLOCK` \nactivities are managed by Square and cannot be created using the Gift Card Activities API." + "type": { + "type": "string", + "description": "The type of event this represents, `\"invoice.scheduled_charge_failed\"`.", + "nullable": true }, - { - "name": "IMPORT_REVERSAL", - "description": "Reversed the import of a third-party gift card, which sets the gift card state to \n`PENDING` and clears the balance. `IMPORT_REVERSAL` activities are managed by Square and \ncannot be created using the Gift Card Activities API." + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true }, - { - "name": "TRANSFER_BALANCE_FROM", - "description": "Deducted money from a gift card as the result of a transfer to the balance of another gift card.\n`TRANSFER_BALANCE_FROM` activities are managed by Square and cannot be created using the Gift Card Activities API." + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true }, - { - "name": "TRANSFER_BALANCE_TO", - "description": "Added money to a gift card as the result of a transfer from the balance of another gift card.\n`TRANSFER_BALANCE_TO` activities are managed by Square and cannot be created using the Gift Card Activities API." + "data": { + "$ref": "#/components/schemas/InvoiceScheduledChargeFailedEventData", + "description": "Data associated with the event.", + "nullable": true } - ], - "description": "Indicates the type of [gift card activity](entity:GiftCardActivity).", - "x-release-status": "PUBLIC" + }, + "example": { + "created_at": "2020-06-18T18:23:11Z", + "data": { + "id": "inv:0-ChCHu2mZEabLeeHahQnXDjZQECY", + "object": { + "invoice": { + "accepted_payment_methods": { + "bank_account": false, + "buy_now_pay_later": false, + "card": true, + "cash_app_pay": false, + "square_gift_card": false + }, + "created_at": "2020-06-18T17:45:13Z", + "custom_fields": [ + { + "label": "Event Reference Number", + "placement": "ABOVE_LINE_ITEMS", + "value": "Ref. #1234" + }, + { + "label": "Terms of Service", + "placement": "BELOW_LINE_ITEMS", + "value": "The terms of service are..." + } + ], + "delivery_method": "EMAIL", + "description": "We appreciate your business!", + "id": "inv:0-ChCHu2mZEabLeeHahQnXDjZQECY", + "invoice_number": "inv-100", + "location_id": "ES0RJRZYEC39A", + "next_payment_amount_money": { + "amount": 10000, + "currency": "USD" + }, + "order_id": "CAISENgvlJ6jLWAzERDzjyHVybY", + "payment_requests": [ + { + "automatic_payment_source": "NONE", + "computed_amount_money": { + "amount": 10000, + "currency": "USD" + }, + "due_date": "2030-01-24", + "reminders": [ + { + "message": "Your invoice is due tomorrow", + "relative_scheduled_days": -1, + "status": "PENDING", + "uid": "beebd363-e47f-4075-8785-c235aaa7df11" + } + ], + "request_type": "BALANCE", + "tipping_enabled": false, + "total_completed_amount_money": { + "amount": 0, + "currency": "USD" + }, + "uid": "2da7964f-f3d2-4f43-81e8-5aa220bf3355" + } + ], + "primary_recipient": { + "customer_id": "JDKYHBWT1D4F8MFH63DBMEN8Y4", + "email_address": "Amelia.Earhart@example.com", + "family_name": "Earhart", + "given_name": "Amelia", + "phone_number": "1-212-555-4240" + }, + "sale_or_service_date": "2030-01-24", + "scheduled_at": "2030-01-13T10:00:00Z", + "status": "UNPAID", + "store_payment_method_enabled": false, + "timezone": "America/Los_Angeles", + "title": "Event Planning Services", + "updated_at": "2020-06-18T18:23:11Z", + "version": 4 + } + }, + "type": "invoice" + }, + "event_id": "3cabb64e-16ba-40c2-b605-5c51a06ec794", + "location_id": "ES0RJRZYEC39A", + "merchant_id": "031FEV2Q6VMPK", + "type": "invoice.scheduled_charge_failed" + }, + "x-webhook": { + "event": "invoice.scheduled_charge_failed", + "scopes": [ + "INVOICES_READ" + ] + }, + "x-api": "#/components/x-apis/Invoices", + "x-since": "2020-07-22" }, - "GiftCardActivityUnblock": { + "InvoiceScheduledChargeFailedEventData": { "type": "object", - "description": "Represents details about an `UNBLOCK` [gift card activity type](entity:GiftCardActivityType).", "x-release-status": "PUBLIC", - "required": [ - "reason" - ], "properties": { - "reason": { - "$ref": "#/components/schemas/GiftCardActivityUnblockReason", - "description": "The reason the gift card was unblocked.\nSee [Reason](#type-reason) for possible values" + "type": { + "type": "string", + "description": "Name of the affected object’s type, `\"invoice\"`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the affected invoice." + }, + "object": { + "$ref": "#/components/schemas/InvoiceScheduledChargeFailedEventObject", + "description": "An object containing the invoice that experienced the failed scheduled charge.", + "nullable": true } } }, - "GiftCardActivityUnblockReason": { - "type": "string", - "enum": [ - "CHARGEBACK_UNBLOCK" - ], - "x-enum-elements": [ - { - "name": "CHARGEBACK_UNBLOCK", - "description": "The gift card is unblocked because a chargeback was ruled in favor of the seller." + "InvoiceScheduledChargeFailedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "invoice": { + "$ref": "#/components/schemas/Invoice", + "description": "The related invoice.", + "nullable": true } - ], - "description": "Indicates the reason for unblocking a [gift card](entity:GiftCard).", - "x-release-status": "PUBLIC" + } }, - "GiftCardActivityUnlinkedActivityRefund": { + "InvoiceSort": { "type": "object", - "description": "Represents details about an `UNLINKED_ACTIVITY_REFUND` [gift card activity type](entity:GiftCardActivityType).", + "description": "Identifies the sort field and sort order.", "x-release-status": "PUBLIC", "required": [ - "amount_money" + "field" ], "properties": { - "amount_money": { - "$ref": "#/components/schemas/Money", - "description": "The amount added to the gift card for the refund. This value is a positive integer." + "field": { + "$ref": "#/components/schemas/InvoiceSortField", + "description": "The field to use for sorting.\nSee [InvoiceSortField](#type-invoicesortfield) for possible values" }, - "reference_id": { - "type": "string", - "description": "A client-specified ID that associates the gift card activity with an entity in another system.", + "order": { + "$ref": "#/components/schemas/SortOrder", + "description": "The order to use for sorting the results.\nSee [SortOrder](#type-sortorder) for possible values", "nullable": true - }, - "payment_id": { - "type": "string", - "description": "The ID of the refunded payment. This field is not used starting in Square version 2022-06-16.", - "readOnly": true } } }, - "GiftCardGANSource": { + "InvoiceSortField": { "type": "string", "enum": [ - "SQUARE", - "OTHER" + "INVOICE_SORT_DATE" ], "x-enum-elements": [ { - "name": "SQUARE", - "description": "The GAN is generated by Square." - }, - { - "name": "OTHER", - "description": "The GAN is provided by a non-Square system. For more information, see \n[Custom GANs](https://developer.squareup.com/docs/gift-cards/using-gift-cards-api#custom-gans) or \n[Third-party gift cards](https://developer.squareup.com/docs/gift-cards/using-gift-cards-api#third-party-gift-cards)." + "name": "INVOICE_SORT_DATE", + "description": "The field works as follows:\n\n- If the invoice is a draft, it uses the invoice `created_at` date.\n- If the invoice is scheduled for publication, it uses the `scheduled_at` date.\n- If the invoice is published, it uses the invoice publication date." } ], - "description": "Indicates the source that generated the gift card \naccount number (GAN).", + "description": "The field to use for sorting.", "x-release-status": "PUBLIC" }, - "GiftCardStatus": { + "InvoiceStatus": { "type": "string", "enum": [ - "ACTIVE", - "DEACTIVATED", - "BLOCKED", - "PENDING" + "DRAFT", + "UNPAID", + "SCHEDULED", + "PARTIALLY_PAID", + "PAID", + "PARTIALLY_REFUNDED", + "REFUNDED", + "CANCELED", + "FAILED", + "PAYMENT_PENDING" ], "x-enum-elements": [ { - "name": "ACTIVE", - "description": "The gift card is active and can be used as a payment source." + "name": "DRAFT", + "description": "The invoice is a draft. You must publish a draft invoice before Square can process it.\nA draft invoice has no `public_url`, so it is not available to customers." }, { - "name": "DEACTIVATED", - "description": "Any activity that changes the gift card balance is permanently forbidden." + "name": "UNPAID", + "description": "The invoice is published but not yet paid." }, { - "name": "BLOCKED", - "description": "Any activity that changes the gift card balance is temporarily forbidden." + "name": "SCHEDULED", + "description": "The invoice is scheduled to be processed. On the scheduled date,\nSquare sends the invoice, initiates an automatic payment, or takes no action, depending on\nthe delivery method and payment request settings. Square also sets the invoice status to the\nappropriate state: `UNPAID`, `PAID`, `PARTIALLY_PAID`, or `PAYMENT_PENDING`." }, { - "name": "PENDING", - "description": "The gift card is pending activation.\nThis is the initial state when a gift card is created. Typically, you'll call\n[CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) to create an\n`ACTIVATE` activity that activates the gift card with an initial balance before first use." - } - ], - "description": "Indicates the gift card state.", - "x-release-status": "PUBLIC" - }, - "GiftCardType": { - "type": "string", - "enum": [ - "PHYSICAL", - "DIGITAL" - ], - "x-enum-elements": [ + "name": "PARTIALLY_PAID", + "description": "A partial payment is received for the invoice." + }, { - "name": "PHYSICAL", - "description": "A plastic gift card." + "name": "PAID", + "description": "The customer paid the invoice in full." }, { - "name": "DIGITAL", - "description": "A digital gift card." + "name": "PARTIALLY_REFUNDED", + "description": "The invoice is paid (or partially paid) and some but not all the amount paid is\nrefunded." + }, + { + "name": "REFUNDED", + "description": "The full amount that the customer paid for the invoice is refunded." + }, + { + "name": "CANCELED", + "description": "The invoice is canceled. Square no longer requests payments from the customer.\nThe Square-hosted payment page is still accessible using the temporary `public_url`\nlink, but the invoice is shown as canceled and does not accept payment." + }, + { + "name": "FAILED", + "description": "Square canceled the invoice due to suspicious activity." + }, + { + "name": "PAYMENT_PENDING", + "description": "A payment on the invoice was initiated but has not yet been processed.\n\nWhen in this state, invoices cannot be updated and other payments cannot be initiated." } ], - "description": "Indicates the gift card type.", + "description": "Indicates the status of an [invoice](entity:Invoice).", "x-release-status": "PUBLIC" }, - "InventoryAdjustment": { + "InvoiceUpdatedEvent": { "type": "object", - "description": "Represents a change in state or quantity of product inventory at a\nparticular time and location.", + "description": "Published when an [Invoice](entity:Invoice) is updated.", "x-release-status": "PUBLIC", "properties": { - "id": { - "type": "string", - "description": "A unique ID generated by Square for the\n`InventoryAdjustment`.", - "maxLength": 100 - }, - "reference_id": { - "type": "string", - "description": "An optional ID provided by the application to tie the\n`InventoryAdjustment` to an external\nsystem.", - "maxLength": 255, - "nullable": true - }, - "from_state": { - "$ref": "#/components/schemas/InventoryState", - "description": "The [inventory state](entity:InventoryState) of the related quantity\nof items before the adjustment.\nSee [InventoryState](#type-inventorystate) for possible values", - "nullable": true - }, - "to_state": { - "$ref": "#/components/schemas/InventoryState", - "description": "The [inventory state](entity:InventoryState) of the related quantity\nof items after the adjustment.\nSee [InventoryState](#type-inventorystate) for possible values", - "nullable": true - }, - "location_id": { - "type": "string", - "description": "The Square-generated ID of the [Location](entity:Location) where the related\nquantity of items is being tracked.", - "maxLength": 100, - "nullable": true - }, - "catalog_object_id": { - "type": "string", - "description": "The Square-generated ID of the\n[CatalogObject](entity:CatalogObject) being tracked.", - "maxLength": 100, - "nullable": true - }, - "catalog_object_type": { + "merchant_id": { "type": "string", - "description": "The [type](entity:CatalogObjectType) of the [CatalogObject](entity:CatalogObject) being tracked. \n\nThe Inventory API supports setting and reading the `\"catalog_object_type\": \"ITEM_VARIATION\"` field value. \nIn addition, it can also read the `\"catalog_object_type\": \"ITEM\"` field value that is set by the Square Restaurants app.", - "maxLength": 14, + "description": "The ID of the target merchant associated with the event.", "nullable": true }, - "quantity": { + "type": { "type": "string", - "description": "The number of items affected by the adjustment as a decimal string.\nCan support up to 5 digits after the decimal point.", - "maxLength": 26, + "description": "The type of event this represents, `\"invoice.updated\"`.", "nullable": true }, - "total_price_money": { - "$ref": "#/components/schemas/Money", - "description": "The total price paid for goods associated with the\nadjustment. Present if and only if `to_state` is `SOLD`. Always\nnon-negative.", - "readOnly": true - }, - "occurred_at": { + "event_id": { "type": "string", - "description": "A client-generated RFC 3339-formatted timestamp that indicates when\nthe inventory adjustment took place. For inventory adjustment updates, the `occurred_at`\ntimestamp cannot be older than 24 hours or in the future relative to the\ntime of the request.", - "maxLength": 34, + "description": "A unique ID for the event.", "nullable": true }, "created_at": { "type": "string", - "description": "An RFC 3339-formatted timestamp that indicates when the inventory adjustment is received.", - "maxLength": 34, - "readOnly": true - }, - "source": { - "$ref": "#/components/schemas/SourceApplication", - "description": "Information about the application that caused the\ninventory adjustment.", + "description": "Timestamp of when the event was created, in RFC 3339 format.", "readOnly": true }, - "employee_id": { - "type": "string", - "description": "The Square-generated ID of the [Employee](entity:Employee) responsible for the\ninventory adjustment.", - "maxLength": 100, - "nullable": true - }, - "team_member_id": { - "type": "string", - "description": "The Square-generated ID of the [Team Member](entity:TeamMember) responsible for the\ninventory adjustment.", - "maxLength": 100, + "data": { + "$ref": "#/components/schemas/InvoiceUpdatedEventData", + "description": "Data associated with the event.", "nullable": true - }, - "transaction_id": { - "type": "string", - "description": "The Square-generated ID of the [Transaction](entity:Transaction) that\ncaused the adjustment. Only relevant for payment-related state\ntransitions.", - "maxLength": 255, - "readOnly": true - }, - "refund_id": { - "type": "string", - "description": "The Square-generated ID of the [Refund](entity:Refund) that\ncaused the adjustment. Only relevant for refund-related state\ntransitions.", - "maxLength": 255, - "readOnly": true - }, - "purchase_order_id": { - "type": "string", - "description": "The Square-generated ID of the purchase order that caused the\nadjustment. Only relevant for state transitions from the Square for Retail\napp.", - "maxLength": 100, - "readOnly": true - }, - "goods_receipt_id": { - "type": "string", - "description": "The Square-generated ID of the goods receipt that caused the\nadjustment. Only relevant for state transitions from the Square for Retail\napp.", - "maxLength": 100, - "readOnly": true - }, - "adjustment_group": { - "$ref": "#/components/schemas/InventoryAdjustmentGroup", - "description": "An adjustment group bundling the related adjustments of item variations through stock conversions in a single inventory event.", - "readOnly": true, - "x-release-status": "BETA" - } - } - }, - "InventoryAdjustmentGroup": { - "type": "object", - "x-release-status": "BETA", - "properties": { - "id": { - "type": "string", - "description": "A unique ID generated by Square for the\n`InventoryAdjustmentGroup`.", - "maxLength": 100, - "readOnly": true - }, - "root_adjustment_id": { - "type": "string", - "description": "The inventory adjustment of the composed variation.", - "maxLength": 100, - "readOnly": true - }, - "from_state": { - "$ref": "#/components/schemas/InventoryState", - "description": "Representative `from_state` for adjustments within the group. For example, for a group adjustment from `IN_STOCK` to `SOLD`,\nthere can be two component adjustments in the group: one from `IN_STOCK`to `COMPOSED` and the other one from `COMPOSED` to `SOLD`.\nHere, the representative `from_state` for the `InventoryAdjustmentGroup` is `IN_STOCK`.\nSee [InventoryState](#type-inventorystate) for possible values", - "readOnly": true - }, - "to_state": { - "$ref": "#/components/schemas/InventoryState", - "description": "Representative `to_state` for adjustments within group. For example, for a group adjustment from `IN_STOCK` to `SOLD`,\nthe two component adjustments in the group can be from `IN_STOCK` to `COMPOSED` and from `COMPOSED` to `SOLD`.\nHere, the representative `to_state` of the `InventoryAdjustmentGroup` is `SOLD`.\nSee [InventoryState](#type-inventorystate) for possible values", - "readOnly": true } - } - }, - "InventoryAlertType": { - "type": "string", - "enum": [ - "NONE", - "LOW_QUANTITY" - ], - "x-enum-elements": [ - { - "name": "NONE", - "description": "The variation does not display an alert." + }, + "example": { + "created_at": "2020-06-18T18:23:11Z", + "data": { + "id": "inv:0-ChCHu2mZEabLeeHahQnXDjZQECY", + "object": { + "invoice": { + "accepted_payment_methods": { + "bank_account": false, + "buy_now_pay_later": false, + "card": true, + "cash_app_pay": false, + "square_gift_card": false + }, + "attachments": [ + { + "description": "Service contract", + "filename": "terms_and_agreements.pdf", + "filesize": 81839, + "hash": "273ee02cb6f5f8a3a8ca23604930dd53", + "id": "inva:0-ChBIMZJ99MugJFCUBjUVfdwY", + "mime_type": "application/pdf", + "uploaded_at": "2023-03-03T00:07:52Z" + } + ], + "created_at": "2020-06-18T17:45:13Z", + "custom_fields": [ + { + "label": "Event Reference Number", + "placement": "ABOVE_LINE_ITEMS", + "value": "Ref. #1234" + }, + { + "label": "Terms of Service", + "placement": "BELOW_LINE_ITEMS", + "value": "The terms of service are..." + } + ], + "delivery_method": "EMAIL", + "description": "We appreciate your business!", + "id": "inv:0-ChCHu2mZEabLeeHahQnXDjZQECY", + "invoice_number": "inv-100", + "location_id": "ES0RJRZYEC39A", + "next_payment_amount_money": { + "amount": 10000, + "currency": "USD" + }, + "order_id": "CAISENgvlJ6jLWAzERDzjyHVybY", + "payment_requests": [ + { + "automatic_payment_source": "NONE", + "computed_amount_money": { + "amount": 10000, + "currency": "USD" + }, + "due_date": "2030-01-24", + "reminders": [ + { + "message": "Your invoice is due tomorrow", + "relative_scheduled_days": -1, + "status": "PENDING", + "uid": "beebd363-e47f-4075-8785-c235aaa7df11" + } + ], + "request_type": "BALANCE", + "tipping_enabled": false, + "total_completed_amount_money": { + "amount": 0, + "currency": "USD" + }, + "uid": "2da7964f-f3d2-4f43-81e8-5aa220bf3355" + } + ], + "primary_recipient": { + "customer_id": "JDKYHBWT1D4F8MFH63DBMEN8Y4", + "email_address": "Amelia.Earhart@example.com", + "family_name": "Earhart", + "given_name": "Amelia", + "phone_number": "1-212-555-4240" + }, + "sale_or_service_date": "2030-01-24", + "scheduled_at": "2030-01-13T10:00:00Z", + "status": "UNPAID", + "store_payment_method_enabled": false, + "timezone": "America/Los_Angeles", + "title": "Event Planning Services", + "updated_at": "2020-06-18T18:23:11Z", + "version": 2 + } + }, + "type": "invoice" }, - { - "name": "LOW_QUANTITY", - "description": "The variation generates an alert when its quantity is low." - } - ], - "description": "Indicates whether Square should alert the merchant when the inventory quantity of a CatalogItemVariation is low.", - "x-release-status": "PUBLIC" + "event_id": "0312a8c5-af0f-49f4-ba29-291ef08dcd7e", + "location_id": "ES0RJRZYEC39A", + "merchant_id": "031FEV2Q6VMPK", + "type": "invoice.updated" + }, + "x-webhook": { + "event": "invoice.updated", + "scopes": [ + "INVOICES_READ" + ] + }, + "x-api": "#/components/x-apis/Invoices", + "x-since": "2020-07-22" }, - "InventoryChange": { + "InvoiceUpdatedEventData": { "type": "object", - "description": "Represents a single physical count, inventory, adjustment, or transfer\nthat is part of the history of inventory changes for a particular\n[CatalogObject](entity:CatalogObject) instance.", "x-release-status": "PUBLIC", "properties": { "type": { - "$ref": "#/components/schemas/InventoryChangeType", - "description": "Indicates how the inventory change is applied. See\n[InventoryChangeType](entity:InventoryChangeType) for all possible values.\nSee [InventoryChangeType](#type-inventorychangetype) for possible values", - "nullable": true - }, - "physical_count": { - "$ref": "#/components/schemas/InventoryPhysicalCount", - "description": "Contains details about the physical count when `type` is\n`PHYSICAL_COUNT`, and is unset for all other change types.", + "type": "string", + "description": "Name of the affected object’s type, `\"invoice\"`.", "nullable": true }, - "adjustment": { - "$ref": "#/components/schemas/InventoryAdjustment", - "description": "Contains details about the inventory adjustment when `type` is\n`ADJUSTMENT`, and is unset for all other change types.", - "nullable": true + "id": { + "type": "string", + "description": "ID of the affected invoice." }, - "transfer": { - "$ref": "#/components/schemas/InventoryTransfer", - "description": "Contains details about the inventory transfer when `type` is\n`TRANSFER`, and is unset for all other change types.\n\n_Note:_ An [InventoryTransfer](entity:InventoryTransfer) object can only be set in the input to the\n[BatchChangeInventory](api-endpoint:Inventory-BatchChangeInventory) endpoint when the seller has an active Retail Plus subscription.", + "object": { + "$ref": "#/components/schemas/InvoiceUpdatedEventObject", + "description": "An object containing the updated invoice.", "nullable": true - }, - "measurement_unit": { - "$ref": "#/components/schemas/CatalogMeasurementUnit", - "description": "The [CatalogMeasurementUnit](entity:CatalogMeasurementUnit) object representing the catalog measurement unit associated with the inventory change.", - "readOnly": true - }, - "measurement_unit_id": { - "type": "string", - "description": "The ID of the [CatalogMeasurementUnit](entity:CatalogMeasurementUnit) object representing the catalog measurement unit associated with the inventory change.", - "readOnly": true } } }, - "InventoryChangeType": { - "type": "string", - "enum": [ - "PHYSICAL_COUNT", - "ADJUSTMENT", - "TRANSFER" - ], - "x-enum-elements": [ - { - "name": "PHYSICAL_COUNT", - "description": "The change occurred as part of a physical count update." - }, - { - "name": "ADJUSTMENT", - "description": "The change occurred as part of the normal lifecycle of goods\n(e.g., as an inventory adjustment)." - }, - { - "name": "TRANSFER", - "description": "The change occurred as part of an inventory transfer." + "InvoiceUpdatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "invoice": { + "$ref": "#/components/schemas/Invoice", + "description": "The related invoice.", + "nullable": true } - ], - "description": "Indicates how the inventory change was applied to a tracked product quantity.", - "x-release-status": "PUBLIC" + } }, - "InventoryCount": { + "ItemVariationLocationOverrides": { "type": "object", - "description": "Represents Square-estimated quantity of items in a particular state at a\nparticular seller location based on the known history of physical counts and\ninventory adjustments.", + "description": "Price and inventory alerting overrides for a `CatalogItemVariation` at a specific `Location`.", "x-release-status": "PUBLIC", "properties": { - "catalog_object_id": { + "location_id": { "type": "string", - "description": "The Square-generated ID of the\n[CatalogObject](entity:CatalogObject) being tracked.", - "maxLength": 100, + "description": "The ID of the `Location`. This can include locations that are deactivated.", "nullable": true }, - "catalog_object_type": { - "type": "string", - "description": "The [type](entity:CatalogObjectType) of the [CatalogObject](entity:CatalogObject) being tracked. \n\nThe Inventory API supports setting and reading the `\"catalog_object_type\": \"ITEM_VARIATION\"` field value. \nIn addition, it can also read the `\"catalog_object_type\": \"ITEM\"` field value that is set by the Square Restaurants app.", - "maxLength": 14, + "price_money": { + "$ref": "#/components/schemas/Money", + "description": "The price of the `CatalogItemVariation` at the given `Location`, or blank for variable pricing.", "nullable": true }, - "state": { - "$ref": "#/components/schemas/InventoryState", - "description": "The current [inventory state](entity:InventoryState) for the related\nquantity of items.\nSee [InventoryState](#type-inventorystate) for possible values", + "pricing_type": { + "$ref": "#/components/schemas/CatalogPricingType", + "description": "The pricing type (fixed or variable) for the `CatalogItemVariation` at the given `Location`.\nSee [CatalogPricingType](#type-catalogpricingtype) for possible values", "nullable": true }, - "location_id": { - "type": "string", - "description": "The Square-generated ID of the [Location](entity:Location) where the related\nquantity of items is being tracked.", - "maxLength": 100, + "track_inventory": { + "type": "boolean", + "description": "If `true`, inventory tracking is active for the `CatalogItemVariation` at this `Location`.", "nullable": true }, - "quantity": { - "type": "string", - "description": "The number of items affected by the estimated count as a decimal string.\nCan support up to 5 digits after the decimal point.", - "maxLength": 26, + "inventory_alert_type": { + "$ref": "#/components/schemas/InventoryAlertType", + "description": "Indicates whether the `CatalogItemVariation` displays an alert when its inventory\nquantity is less than or equal to its `inventory_alert_threshold`.\nSee [InventoryAlertType](#type-inventoryalerttype) for possible values", "nullable": true }, - "calculated_at": { - "type": "string", - "description": "An RFC 3339-formatted timestamp that indicates when the most recent physical count or adjustment affecting\nthe estimated count is received.", - "maxLength": 34, - "readOnly": true + "inventory_alert_threshold": { + "type": "integer", + "description": "If the inventory quantity for the variation is less than or equal to this value and `inventory_alert_type`\nis `LOW_QUANTITY`, the variation displays an alert in the merchant dashboard.\n\nThis value is always an integer.", + "format": "int64", + "nullable": true }, - "is_estimated": { + "sold_out": { "type": "boolean", - "description": "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\nany of these endpoints: [BatchChangeInventory](api-endpoint:Inventory-BatchChangeInventory),\n[BatchRetrieveInventoryChanges](api-endpoint:Inventory-BatchRetrieveInventoryChanges),\n[BatchRetrieveInventoryCounts](api-endpoint:Inventory-BatchRetrieveInventoryCounts), and\n[RetrieveInventoryChanges](api-endpoint:Inventory-RetrieveInventoryChanges).", - "readOnly": true, - "x-release-status": "BETA" + "description": "Indicates whether the overridden item variation is sold out at the specified location.\n\nWhen inventory tracking is enabled on the item variation either globally or at the specified location,\nthe item variation is automatically marked as sold out when its inventory count reaches zero. The seller\ncan manually set the item variation as sold out even when the inventory count is greater than zero.\nAttempts by an application to set this attribute are ignored. Regardless how the sold-out status is set,\napplications should treat its inventory count as zero when this attribute value is `true`.", + "readOnly": true + }, + "sold_out_valid_until": { + "type": "string", + "description": "The seller-assigned timestamp, of the RFC 3339 format, to indicate when this sold-out variation\nbecomes available again at the specified location. Attempts by an application to set this attribute are ignored.\nWhen the current time is later than this attribute value, the affected item variation is no longer sold out.", + "readOnly": true } } }, - "InventoryPhysicalCount": { + "Job": { "type": "object", - "description": "Represents the quantity of an item variation that is physically present\nat a specific location, verified by a seller or a seller's employee. For example,\na physical count might come from an employee counting the item variations on\nhand or from syncing with an external system.", - "x-release-status": "PUBLIC", + "description": "Represents a job that can be assigned to [team members](entity:TeamMember). This object defines the\njob's title and tip eligibility. Compensation is defined in a [job assignment](entity:JobAssignment)\nin a team member's wage setting.", + "x-release-status": "BETA", "properties": { "id": { "type": "string", - "description": "A unique Square-generated ID for the\n[InventoryPhysicalCount](entity:InventoryPhysicalCount).", - "maxLength": 100 + "description": "**Read only** The unique Square-assigned ID of the job. If you need a job ID for an API request,\ncall [ListJobs](api-endpoint:Team-ListJobs) or use the ID returned when you created the job.\nYou can also get job IDs from a team member's wage setting." }, - "reference_id": { + "title": { "type": "string", - "description": "An optional ID provided by the application to tie the\n[InventoryPhysicalCount](entity:InventoryPhysicalCount) to an external\nsystem.", - "maxLength": 255, + "description": "The title of the job.", + "maxLength": 150, "nullable": true }, - "catalog_object_id": { - "type": "string", - "description": "The Square-generated ID of the\n[CatalogObject](entity:CatalogObject) being tracked.", - "maxLength": 100, + "is_tip_eligible": { + "type": "boolean", + "description": "Indicates whether team members can earn tips for the job.", "nullable": true }, - "catalog_object_type": { + "created_at": { "type": "string", - "description": "The [type](entity:CatalogObjectType) of the [CatalogObject](entity:CatalogObject) being tracked. \n\nThe Inventory API supports setting and reading the `\"catalog_object_type\": \"ITEM_VARIATION\"` field value. \nIn addition, it can also read the `\"catalog_object_type\": \"ITEM\"` field value that is set by the Square Restaurants app.", - "maxLength": 14, - "nullable": true - }, - "state": { - "$ref": "#/components/schemas/InventoryState", - "description": "The current [inventory state](entity:InventoryState) for the related\nquantity of items.\nSee [InventoryState](#type-inventorystate) for possible values", - "nullable": true + "description": "The timestamp when the job was created, in RFC 3339 format.", + "readOnly": true }, - "location_id": { + "updated_at": { "type": "string", - "description": "The Square-generated ID of the [Location](entity:Location) where the related\nquantity of items is being tracked.", - "maxLength": 100, - "nullable": true + "description": "The timestamp when the job was last updated, in RFC 3339 format.", + "readOnly": true }, - "quantity": { + "version": { + "type": "integer", + "description": "**Read only** The current version of the job. Include this field in `UpdateJob` requests to enable\n[optimistic concurrency](https://developer.squareup.com/docs/working-with-apis/optimistic-concurrency)\ncontrol and avoid overwrites from concurrent requests. Requests fail if the provided version doesn't\nmatch the server version at the time of the request." + } + } + }, + "JobAssignment": { + "type": "object", + "description": "Represents a job assigned to a [team member](entity:TeamMember), including the compensation the team\nmember earns for the job. Job assignments are listed in the team member's [wage setting](entity:WageSetting).", + "x-release-status": "PUBLIC", + "required": [ + "pay_type" + ], + "properties": { + "job_title": { "type": "string", - "description": "The number of items affected by the physical count as a decimal string.\nThe number can support up to 5 digits after the decimal point.", - "maxLength": 26, + "description": "The title of the job.", "nullable": true }, - "source": { - "$ref": "#/components/schemas/SourceApplication", - "description": "Information about the application with which the\nphysical count is submitted.", - "readOnly": true + "pay_type": { + "$ref": "#/components/schemas/JobAssignmentPayType", + "description": "The current pay type for the job assignment used to\ncalculate the pay amount in a pay period.\nSee [JobAssignmentPayType](#type-jobassignmentpaytype) for possible values" }, - "employee_id": { - "type": "string", - "description": "The Square-generated ID of the [Employee](entity:Employee) responsible for the\nphysical count.", - "maxLength": 100, + "hourly_rate": { + "$ref": "#/components/schemas/Money", + "description": "The hourly pay rate of the job. For `SALARY` pay types, Square calculates the hourly rate based on\n`annual_rate` and `weekly_hours`.", "nullable": true }, - "team_member_id": { - "type": "string", - "description": "The Square-generated ID of the [Team Member](entity:TeamMember) responsible for the\nphysical count.", - "maxLength": 100, + "annual_rate": { + "$ref": "#/components/schemas/Money", + "description": "The total pay amount for a 12-month period on the job. Set if the job `PayType` is `SALARY`.", "nullable": true }, - "occurred_at": { - "type": "string", - "description": "A client-generated RFC 3339-formatted timestamp that indicates when\nthe physical count was examined. For physical count updates, the `occurred_at`\ntimestamp cannot be older than 24 hours or in the future relative to the\ntime of the request.", - "maxLength": 34, + "weekly_hours": { + "type": "integer", + "description": "The planned hours per week for the job. Set if the job `PayType` is `SALARY`.", "nullable": true }, - "created_at": { + "job_id": { "type": "string", - "description": "An RFC 3339-formatted timestamp that indicates when the physical count is received.", - "maxLength": 34, - "readOnly": true + "description": "The ID of the [job](entity:Job).", + "x-release-status": "BETA", + "nullable": true } } }, - "InventoryState": { + "JobAssignmentPayType": { "type": "string", "enum": [ - "CUSTOM", - "IN_STOCK", - "SOLD", - "RETURNED_BY_CUSTOMER", - "RESERVED_FOR_SALE", - "SOLD_ONLINE", - "ORDERED_FROM_VENDOR", - "RECEIVED_FROM_VENDOR", - "IN_TRANSIT_TO", "NONE", - "WASTE", - "UNLINKED_RETURN", - "COMPOSED", - "DECOMPOSED", - "SUPPORTED_BY_NEWER_VERSION", - "IN_TRANSIT" + "HOURLY", + "SALARY" ], "x-enum-elements": [ - { - "name": "CUSTOM", - "description": "The related quantity of items are in a custom state. **READ-ONLY**:\nthe Inventory API cannot move quantities to or from this state." - }, - { - "name": "IN_STOCK", - "description": "The related quantity of items are on hand and available for sale." - }, - { - "name": "SOLD", - "description": "The related quantity of items were sold as part of an itemized\ntransaction. Quantities in the `SOLD` state are no longer tracked." - }, - { - "name": "RETURNED_BY_CUSTOMER", - "description": "The related quantity of items were returned through the Square Point\nof Sale application, but are not yet available for sale. **READ-ONLY**:\nthe Inventory API cannot move quantities to or from this state." - }, - { - "name": "RESERVED_FOR_SALE", - "description": "The related quantity of items are on hand, but not currently\navailable for sale. **READ-ONLY**: the Inventory API cannot move\nquantities to or from this state." - }, - { - "name": "SOLD_ONLINE", - "description": "The related quantity of items were sold online. **READ-ONLY**: the\nInventory API cannot move quantities to or from this state." - }, - { - "name": "ORDERED_FROM_VENDOR", - "description": "The related quantity of items were ordered from a vendor but not yet\nreceived. **READ-ONLY**: the Inventory API cannot move quantities to or\nfrom this state." - }, - { - "name": "RECEIVED_FROM_VENDOR", - "description": "The related quantity of items were received from a vendor but are\nnot yet available for sale. **READ-ONLY**: the Inventory API cannot move\nquantities to or from this state." - }, - { - "name": "IN_TRANSIT_TO", - "description": "Replaced by `IN_TRANSIT` to represent quantities\nof items that are in transit between locations." - }, { "name": "NONE", - "description": "A placeholder indicating that the related quantity of items are not\ncurrently tracked in Square. Transferring quantities from the `NONE` state\nto a tracked state (e.g., `IN_STOCK`) introduces stock into the system." - }, - { - "name": "WASTE", - "description": "The related quantity of items are lost or damaged and cannot be\nsold." - }, - { - "name": "UNLINKED_RETURN", - "description": "The related quantity of items were returned but not linked to a\nprevious transaction. Unlinked returns are not tracked in Square.\nTransferring a quantity from `UNLINKED_RETURN` to a tracked state (e.g.,\n`IN_STOCK`) introduces new stock into the system." - }, - { - "name": "COMPOSED", - "description": "The related quantity of items that are part of a composition consisting one or more components." - }, - { - "name": "DECOMPOSED", - "description": "The related quantity of items that are part of a component." + "description": "The job does not have a defined pay type." }, { - "name": "SUPPORTED_BY_NEWER_VERSION", - "description": "This state is not supported by this version of the Square API. We recommend that you upgrade the client to use the appropriate version of the Square API supporting this state." + "name": "HOURLY", + "description": "The job pays an hourly rate." }, { - "name": "IN_TRANSIT", - "description": "The related quantity of items are in transit between locations. **READ-ONLY:** the Inventory API cannot currently be used to move quantities to or from this inventory state." + "name": "SALARY", + "description": "The job pays an annual salary." } ], - "description": "Indicates the state of a tracked item quantity in the lifecycle of goods.", + "description": "Enumerates the possible pay types that a job can be assigned.", "x-release-status": "PUBLIC" }, - "InventoryTransfer": { + "JobCreatedEvent": { "type": "object", - "description": "Represents the transfer of a quantity of product inventory at a\nparticular time from one location to another.", - "x-release-status": "PUBLIC", + "description": "Published when a Job is created.", + "x-release-status": "BETA", "properties": { - "id": { + "merchant_id": { "type": "string", - "description": "A unique ID generated by Square for the\n`InventoryTransfer`.", - "maxLength": 100 + "description": "The ID of the target merchant associated with the event.", + "nullable": true }, - "reference_id": { + "type": { "type": "string", - "description": "An optional ID provided by the application to tie the\n`InventoryTransfer` to an external system.", - "maxLength": 255, + "description": "The type of event this represents, `\"job.created\"`.", "nullable": true }, - "state": { - "$ref": "#/components/schemas/InventoryState", - "description": "The [inventory state](entity:InventoryState) for the quantity of\nitems being transferred.\nSee [InventoryState](#type-inventorystate) for possible values", + "event_id": { + "type": "string", + "description": "A unique ID for the event.", "nullable": true }, - "from_location_id": { + "created_at": { "type": "string", - "description": "The Square-generated ID of the [Location](entity:Location) where the related\nquantity of items was tracked before the transfer.", - "maxLength": 100, + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/JobCreatedEventData", + "description": "Data associated with the event.", "nullable": true + } + }, + "example": { + "created_at": "2024-12-20T01:16:04.253Z", + "data": { + "id": "9AMrnT51mWUa31uN4QziQZXF", + "object": { + "job": { + "created_at": "2024-12-20T01:15:55Z", + "id": "9AMrnT51mWUa31uN4QziQZXF", + "is_tip_eligible": true, + "title": "Cashier", + "updated_at": "2024-12-20T01:15:55Z", + "version": 1 + } + }, + "type": "job" }, - "to_location_id": { + "event_id": "91484f7e-63bc-4253-a86d-18e7ea0b0cfb", + "merchant_id": "0JV5BGNW4EG9R", + "type": "job.created" + }, + "x-webhook": { + "event": "job.created", + "scopes": [ + "EMPLOYEES_READ" + ] + }, + "x-api": "#/components/x-apis/Team", + "x-since": "2024-12-18" + }, + "JobCreatedEventData": { + "type": "object", + "x-release-status": "BETA", + "properties": { + "type": { "type": "string", - "description": "The Square-generated ID of the [Location](entity:Location) where the related\nquantity of items was tracked after the transfer.", - "maxLength": 100, + "description": "Name of the affected object’s type, `\"job\"`.", "nullable": true }, - "catalog_object_id": { + "id": { "type": "string", - "description": "The Square-generated ID of the\n[CatalogObject](entity:CatalogObject) being tracked.", - "maxLength": 100, - "nullable": true + "description": "ID of the created job." }, - "catalog_object_type": { + "object": { + "$ref": "#/components/schemas/JobCreatedEventObject", + "description": "An object containing the created job.", + "nullable": true + } + } + }, + "JobCreatedEventObject": { + "type": "object", + "x-release-status": "BETA", + "properties": { + "job": { + "$ref": "#/components/schemas/Job", + "description": "The created job.", + "nullable": true + } + } + }, + "JobUpdatedEvent": { + "type": "object", + "description": "Published when a Job is updated.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { "type": "string", - "description": "The [type](entity:CatalogObjectType) of the [CatalogObject](entity:CatalogObject) being tracked. \n\nThe Inventory API supports setting and reading the `\"catalog_object_type\": \"ITEM_VARIATION\"` field value. \nIn addition, it can also read the `\"catalog_object_type\": \"ITEM\"` field value that is set by the Square Restaurants app.", - "maxLength": 14, + "description": "The ID of the target merchant associated with the event.", "nullable": true }, - "quantity": { + "type": { "type": "string", - "description": "The number of items affected by the transfer as a decimal string.\nCan support up to 5 digits after the decimal point.", - "maxLength": 26, + "description": "The type of event this represents, `\"job.updated\"`.", "nullable": true }, - "occurred_at": { + "event_id": { "type": "string", - "description": "A client-generated RFC 3339-formatted timestamp that indicates when\nthe transfer took place. For write actions, the `occurred_at` timestamp\ncannot be older than 24 hours or in the future relative to the time of the\nrequest.", - "maxLength": 34, + "description": "A unique ID for the event.", "nullable": true }, "created_at": { "type": "string", - "description": "An RFC 3339-formatted timestamp that indicates when Square\nreceived the transfer request.", - "maxLength": 34, + "description": "Timestamp of when the event was created, in RFC 3339 format.", "readOnly": true }, - "source": { - "$ref": "#/components/schemas/SourceApplication", - "description": "Information about the application that initiated the\ninventory transfer.", - "readOnly": true + "data": { + "$ref": "#/components/schemas/JobUpdatedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2024-12-21T02:34:55.253Z", + "data": { + "id": "9AMrnT51mWUa31uN4QziQZXF", + "object": { + "job": { + "created_at": "2024-12-20T01:15:55Z", + "id": "9AMrnT51mWUa31uN4QziQZXF", + "is_tip_eligible": false, + "title": "Cashier", + "updated_at": "2024-12-21T02:34:14Z", + "version": 2 + } + }, + "type": "job" }, - "employee_id": { + "event_id": "91484f7e-63bc-4253-a86d-18e7ea0b0cfb", + "merchant_id": "0JV5BGNW4EG9R", + "type": "job.updated" + }, + "x-webhook": { + "event": "job.updated", + "scopes": [ + "EMPLOYEES_READ" + ] + }, + "x-api": "#/components/x-apis/Team", + "x-since": "2024-12-18" + }, + "JobUpdatedEventData": { + "type": "object", + "x-release-status": "BETA", + "properties": { + "type": { "type": "string", - "description": "The Square-generated ID of the [Employee](entity:Employee) responsible for the\ninventory transfer.", - "maxLength": 100, + "description": "Name of the affected object’s type, `\"job\"`.", "nullable": true }, - "team_member_id": { + "id": { "type": "string", - "description": "The Square-generated ID of the [Team Member](entity:TeamMember) responsible for the\ninventory transfer.", - "maxLength": 100, + "description": "ID of the updated job." + }, + "object": { + "$ref": "#/components/schemas/JobUpdatedEventObject", + "description": "An object containing the updated job.", "nullable": true } } }, - "Invoice": { + "JobUpdatedEventObject": { "type": "object", - "description": "Stores information about an invoice. You use the Invoices API to create and manage\ninvoices. For more information, see [Invoices API Overview](https://developer.squareup.com/docs/invoices-api/overview).", - "x-release-status": "PUBLIC", + "x-release-status": "BETA", "properties": { - "id": { + "job": { + "$ref": "#/components/schemas/Job", + "description": "The updated job.", + "nullable": true + } + } + }, + "LaborScheduledShiftCreatedEvent": { + "type": "object", + "description": "Published when a [ScheduledShift](entity:ScheduledShift) is created.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { "type": "string", - "description": "The Square-assigned ID of the invoice.", - "readOnly": true - }, - "version": { - "type": "integer", - "description": "The Square-assigned version number, which is incremented each time an update is committed to the invoice." + "description": "The ID of the merchant associated with the event.", + "nullable": true }, "location_id": { "type": "string", - "description": "The ID of the location that this invoice is associated with. \n\nIf specified in a `CreateInvoice` request, the value must match the `location_id` of the associated order.", - "minLength": 1, - "maxLength": 255, + "description": "The ID of the location associated with the event.", "nullable": true }, - "order_id": { + "type": { "type": "string", - "description": "The ID of the [order](entity:Order) for which the invoice is created. \nThis field is required when creating an invoice, and the order must be in the `OPEN` state.\n\nTo view the line items and other information for the associated order, call the \n[RetrieveOrder](api-endpoint:Orders-RetrieveOrder) endpoint using the order ID.", - "minLength": 1, - "maxLength": 255, + "description": "The type of event. For this event, the value is `labor.scheduled_shift.created`.", "nullable": true }, - "primary_recipient": { - "$ref": "#/components/schemas/InvoiceRecipient", - "description": "The customer who receives the invoice. This customer data is displayed on the invoice and used by Square to deliver the invoice. \n\nThis field is required to publish an invoice, and it must specify the `customer_id`.", + "event_id": { + "type": "string", + "description": "The unique ID for the event.", "nullable": true }, - "payment_requests": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InvoicePaymentRequest" - }, - "description": "The payment schedule for the invoice, represented by one or more payment requests that\ndefine payment settings, such as amount due and due date. An invoice supports the following payment request combinations:\n- One balance\n- One deposit with one balance\n- 2–12 installments \n- One deposit with 2–12 installments\n\nThis field is required when creating an invoice. It must contain at least one payment request. \nAll payment requests for the invoice must equal the total order amount. For more information, see \n[Configuring payment requests](https://developer.squareup.com/docs/invoices-api/create-publish-invoices#payment-requests).\n\nAdding `INSTALLMENT` payment requests to an invoice requires an \n[Invoices Plus subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription).", + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/LaborScheduledShiftCreatedEventData", + "description": "The data associated with the event.", "nullable": true + } + }, + "example": { + "created_at": "2025-02-11T18:02:00.084598063Z", + "data": { + "id": "509RM55G6R17F", + "object": { + "scheduled_shift": { + "created_at": "2025-02-11T18:02:00Z", + "draft_shift_details": { + "end_at": "2025-02-14T09:11:00-08:00", + "is_deleted": false, + "job_id": "ioeL1Mp7iZwCAWxeGMAT7ggB", + "location_id": "LR473RTW59VRY", + "notes": "Dont forget to prep the vegetables", + "start_at": "2025-02-13T23:11:00-08:00", + "team_member_id": "TMnsTAouYbvmp-8O", + "timezone": "America/Los_Angeles" + }, + "id": "509RM55G6R17F", + "updated_at": "2025-02-11T18:02:00Z", + "version": 1 + } + }, + "type": "scheduled_shift" }, - "delivery_method": { - "$ref": "#/components/schemas/InvoiceDeliveryMethod", - "description": "The delivery method that Square uses to send the invoice, reminders, and receipts to\nthe customer. After the invoice is published, Square processes the invoice based on the delivery\nmethod and payment request settings, either immediately or on the `scheduled_at` date, if specified.\nFor example, Square might send the invoice or receipt for an automatic payment. For invoices with\nautomatic payments, this field must be set to `EMAIL`.\n\nOne of the following is required when creating an invoice:\n- (Recommended) This `delivery_method` field. To configure an automatic payment, the\n`automatic_payment_source` field of the payment request is also required.\n- The deprecated `request_method` field of the payment request. Note that `invoice`\nobjects returned in responses do not include `request_method`.\nSee [InvoiceDeliveryMethod](#type-invoicedeliverymethod) for possible values", + "event_id": "d0fabe2e-791c-398e-a349-79f6ec7dfa69", + "merchant_id": "MLHZRVNSD91A1", + "type": "labor.scheduled_shift.created" + }, + "x-webhook": { + "event": "labor.scheduled_shift.created", + "scopes": [ + "TIMECARDS_READ" + ] + }, + "x-api": "#/components/x-apis/Labor", + "x-since": "2025-05-21" + }, + "LaborScheduledShiftCreatedEventData": { + "type": "object", + "x-release-status": "BETA", + "properties": { + "type": { + "type": "string", + "description": "The type of object affected by the event. For this event, the value is `scheduled_shift`.", + "maxLength": 50, "nullable": true }, - "invoice_number": { + "id": { "type": "string", - "description": "A user-friendly invoice number that is displayed on the invoice. The value is unique within a location.\nIf not provided when creating an invoice, Square assigns a value.\nIt increments from 1 and is padded with zeros making it 7 characters long\n(for example, 0000001 and 0000002).", - "minLength": 1, - "maxLength": 191, + "description": "The ID of the affected `ScheduledShift`.", + "maxLength": 255 + }, + "object": { + "$ref": "#/components/schemas/LaborScheduledShiftCreatedEventObject", + "description": "An object containing the affected `ScheduledShift`.", + "nullable": true + } + } + }, + "LaborScheduledShiftCreatedEventObject": { + "type": "object", + "x-release-status": "BETA", + "properties": { + "ScheduledShift": { + "$ref": "#/components/schemas/ScheduledShift", + "description": "The new `ScheduledShift`.", + "nullable": true + } + } + }, + "LaborScheduledShiftDeletedEvent": { + "type": "object", + "description": "Published when a [ScheduledShift](entity:ScheduledShift) is deleted.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the merchant associated with the event.", "nullable": true }, - "title": { + "location_id": { "type": "string", - "description": "The title of the invoice, which is displayed on the invoice.", - "minLength": 1, - "maxLength": 255, + "description": "The ID of the location associated with the event.", "nullable": true }, - "description": { + "type": { "type": "string", - "description": "The description of the invoice, which is displayed on the invoice.", - "minLength": 1, - "maxLength": 65536, + "description": "The type of event. For this event, the value is `labor.scheduled_shift.deleted`.", "nullable": true }, - "scheduled_at": { + "event_id": { "type": "string", - "description": "The timestamp when the invoice is scheduled for processing, in RFC 3339 format.\nAfter the invoice is published, Square processes the invoice on the specified date,\naccording to the delivery method and payment request settings.\n\nIf the field is not set, Square processes the invoice immediately after it is published.", + "description": "The unique ID for the event.", "nullable": true }, - "public_url": { + "created_at": { "type": "string", - "description": "A temporary link to the Square-hosted payment page where the customer can pay the\ninvoice. If the link expires, customers can provide the email address or phone number\nassociated with the invoice and request a new link directly from the expired payment page. \n\nThis field is added after the invoice is published and reaches the scheduled date\n(if one is defined).", + "description": "The timestamp of when the event was created, in RFC 3339 format.", "readOnly": true }, - "next_payment_amount_money": { - "$ref": "#/components/schemas/Money", - "description": "The current amount due for the invoice. In addition to the\namount due on the next payment request, this includes any overdue payment amounts.", - "readOnly": true - }, - "status": { - "$ref": "#/components/schemas/InvoiceStatus", - "description": "The status of the invoice.\nSee [InvoiceStatus](#type-invoicestatus) for possible values", - "readOnly": true + "data": { + "$ref": "#/components/schemas/LaborScheduledShiftDeletedEventData", + "description": "The data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2025-02-11T18:03:12.879368768Z", + "data": { + "deleted": true, + "id": "509RM55G6R17F", + "type": "scheduled_shift" }, - "timezone": { + "event_id": "58d3897e-951c-337f-ac01-84c20ed6007d", + "merchant_id": "MLHZRVNSD91A1", + "type": "labor.scheduled_shift.deleted" + }, + "x-webhook": { + "event": "labor.scheduled_shift.deleted", + "scopes": [ + "TIMECARDS_READ" + ] + }, + "x-api": "#/components/x-apis/Labor", + "x-since": "2025-05-21" + }, + "LaborScheduledShiftDeletedEventData": { + "type": "object", + "x-release-status": "BETA", + "properties": { + "type": { "type": "string", - "description": "The time zone used to interpret calendar dates on the invoice, such as `due_date`.\nWhen an invoice is created, this field is set to the `timezone` specified for the seller\nlocation. The value cannot be changed.\n\nFor example, a payment `due_date` of 2021-03-09 with a `timezone` of America/Los\\_Angeles\nbecomes overdue at midnight on March 9 in America/Los\\_Angeles (which equals a UTC timestamp\nof 2021-03-10T08:00:00Z).", - "readOnly": true + "description": "The type of object affected by the event. For this event, the value is `scheduled_shift`.", + "maxLength": 50, + "nullable": true }, - "created_at": { + "id": { "type": "string", - "description": "The timestamp when the invoice was created, in RFC 3339 format.", - "readOnly": true + "description": "The ID of the affected `ScheduledShift`.", + "maxLength": 255 }, - "updated_at": { + "deleted": { + "type": "boolean", + "description": "Is true if the affected object was deleted. Otherwise absent.", + "nullable": true + } + } + }, + "LaborScheduledShiftPublishedEvent": { + "type": "object", + "description": "Published when a [ScheduledShift](entity:ScheduledShift) is published.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { "type": "string", - "description": "The timestamp when the invoice was last updated, in RFC 3339 format.", - "readOnly": true - }, - "accepted_payment_methods": { - "$ref": "#/components/schemas/InvoiceAcceptedPaymentMethods", - "description": "The payment methods that customers can use to pay the invoice on the Square-hosted\ninvoice page. This setting is independent of any automatic payment requests for the invoice.\n\nThis field is required when creating an invoice and must set at least one payment method to `true`.", + "description": "The ID of the merchant associated with the event.", "nullable": true }, - "custom_fields": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InvoiceCustomField" - }, - "description": "Additional seller-defined fields that are displayed on the invoice. For more information, see\n[Custom fields](https://developer.squareup.com/docs/invoices-api/overview#custom-fields).\n\nAdding custom fields to an invoice requires an \n[Invoices Plus subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription).\n\nMax: 2 custom fields", + "location_id": { + "type": "string", + "description": "The ID of the location associated with the event.", "nullable": true }, - "subscription_id": { + "type": { "type": "string", - "description": "The ID of the [subscription](entity:Subscription) associated with the invoice.\nThis field is present only on subscription billing invoices.", - "readOnly": true + "description": "The type of event. For this event, the value is `labor.scheduled_shift.published`.", + "nullable": true }, - "sale_or_service_date": { + "event_id": { "type": "string", - "description": "The date of the sale or the date that the service is rendered, in `YYYY-MM-DD` format.\nThis field can be used to specify a past or future date which is displayed on the invoice.", + "description": "A unique ID for the event.", "nullable": true }, - "payment_conditions": { + "created_at": { "type": "string", - "description": "**France only.** The payment terms and conditions that are displayed on the invoice. For more information, \nsee [Payment conditions](https://developer.squareup.com/docs/invoices-api/overview#payment-conditions).\n\nFor countries other than France, Square returns an `INVALID_REQUEST_ERROR` with a `BAD_REQUEST` code and \n\"Payment conditions are not supported for this location's country\" detail if this field is included in `CreateInvoice` or `UpdateInvoice` requests.", - "minLength": 1, - "maxLength": 2000, - "nullable": true + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true }, - "store_payment_method_enabled": { - "type": "boolean", - "description": "Indicates whether to allow a customer to save a credit or debit card as a card on file or a bank transfer as a\nbank account on file. If `true`, Square displays a __Save my card on file__ or __Save my bank on file__ checkbox on the\ninvoice payment page. Stored payment information can be used for future automatic payments. The default value is `false`.", + "data": { + "$ref": "#/components/schemas/LaborScheduledShiftPublishedEventData", + "description": "The data associated with the event.", "nullable": true - }, - "attachments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InvoiceAttachment" + } + }, + "example": { + "created_at": "2025-02-11T18:54:08.044355293Z", + "data": { + "id": "WA09SDV3DNJ54", + "object": { + "scheduled_shift": { + "created_at": "2025-02-11T18:53:35Z", + "draft_shift_details": { + "end_at": "2025-02-14T09:11:00-08:00", + "is_deleted": false, + "job_id": "ioeL1Mp7iZwCAWxeGMAT7ggB", + "location_id": "LR473RTW59VRY", + "notes": "Dont forget to prep the vegetables", + "start_at": "2025-02-13T23:11:00-08:00", + "team_member_id": "TMnsTAouYbvmp-8O", + "timezone": "America/Los_Angeles" + }, + "id": "WA09SDV3DNJ54", + "published_shift_details": { + "end_at": "2025-02-14T09:11:00-08:00", + "is_deleted": false, + "job_id": "ioeL1Mp7iZwCAWxeGMAT7ggB", + "location_id": "LR473RTW59VRY", + "notes": "Dont forget to prep the vegetables", + "start_at": "2025-02-13T23:11:00-08:00", + "team_member_id": "TMnsTAouYbvmp-8O", + "timezone": "America/Los_Angeles" + }, + "updated_at": "2025-02-11T18:54:08Z", + "version": 2 + } }, - "description": "Metadata about the attachments on the invoice. Invoice attachments are managed using the\n[CreateInvoiceAttachment](api-endpoint:Invoices-CreateInvoiceAttachment) and [DeleteInvoiceAttachment](api-endpoint:Invoices-DeleteInvoiceAttachment) endpoints.", - "readOnly": true + "type": "scheduled_shift" }, - "creator_team_member_id": { - "type": "string", - "description": "The ID of the [team member](entity:TeamMember) who created the invoice.\nThis field is present only on invoices created in the Square Dashboard or Square Invoices app by a logged-in team member.", - "readOnly": true - } - } + "event_id": "4e31748e-1219-3f6f-a5c7-6fe3464705cd", + "merchant_id": "MLHZRVNSD91A1", + "type": "labor.scheduled_shift.published" + }, + "x-webhook": { + "event": "labor.scheduled_shift.published", + "scopes": [ + "TIMECARDS_READ" + ] + }, + "x-api": "#/components/x-apis/Labor", + "x-since": "2025-05-21" }, - "InvoiceAcceptedPaymentMethods": { + "LaborScheduledShiftPublishedEventData": { "type": "object", - "description": "The payment methods that customers can use to pay an [invoice](entity:Invoice) on the Square-hosted invoice payment page.", - "x-release-status": "PUBLIC", + "x-release-status": "BETA", "properties": { - "card": { - "type": "boolean", - "description": "Indicates whether credit card or debit card payments are accepted. The default value is `false`.", - "nullable": true - }, - "square_gift_card": { - "type": "boolean", - "description": "Indicates whether Square gift card payments are accepted. The default value is `false`.", + "type": { + "type": "string", + "description": "The type of object affected by the event. For this event, the value is `scheduled_shift`.", + "maxLength": 50, "nullable": true }, - "bank_account": { - "type": "boolean", - "description": "Indicates whether ACH bank transfer payments are accepted. The default value is `false`.", - "nullable": true + "id": { + "type": "string", + "description": "The ID of the affected `ScheduledShift`.", + "maxLength": 255 }, - "buy_now_pay_later": { - "type": "boolean", - "description": "Indicates whether Afterpay (also known as Clearpay) payments are accepted. The default value is `false`.\n\nThis option is allowed only for invoices that have a single payment request of the `BALANCE` type. This payment method is\nsupported if the seller account accepts Afterpay payments and the seller location is in a country where Afterpay\ninvoice payments are supported. As a best practice, consider enabling an additional payment method when allowing\n`buy_now_pay_later` payments. For more information, including detailed requirements and processing limits, see\n[Buy Now Pay Later payments with Afterpay](https://developer.squareup.com/docs/invoices-api/overview#buy-now-pay-later).", + "object": { + "$ref": "#/components/schemas/LaborScheduledShiftPublishedEventObject", + "description": "An object containing the affected `ScheduledShift`.", "nullable": true - }, - "cash_app_pay": { - "type": "boolean", - "description": "Indicates whether Cash App payments are accepted. The default value is `false`.\n\nThis payment method is supported only for seller [locations](entity:Location) in the United States.", + } + } + }, + "LaborScheduledShiftPublishedEventObject": { + "type": "object", + "x-release-status": "BETA", + "properties": { + "ScheduledShift": { + "$ref": "#/components/schemas/ScheduledShift", + "description": "The published `ScheduledShift`.", "nullable": true } } }, - "InvoiceAttachment": { + "LaborScheduledShiftUpdatedEvent": { "type": "object", - "description": "Represents a file attached to an [invoice](entity:Invoice).", - "x-release-status": "PUBLIC", + "description": "Published when a [ScheduledShift](entity:ScheduledShift) is updated.", + "x-release-status": "BETA", "properties": { - "id": { + "merchant_id": { "type": "string", - "description": "The Square-assigned ID of the attachment.", - "readOnly": true + "description": "The ID of the merchant associated with the event.", + "nullable": true }, - "filename": { + "location_id": { "type": "string", - "description": "The file name of the attachment, which is displayed on the invoice.", - "readOnly": true + "description": "The ID of the location associated with the event.", + "nullable": true }, - "description": { + "type": { "type": "string", - "description": "The description of the attachment, which is displayed on the invoice.\nThis field maps to the seller-defined **Message** field.", - "readOnly": true - }, - "filesize": { - "type": "integer", - "description": "The file size of the attachment in bytes.", - "readOnly": true + "description": "The type of event. For this event, the value is `labor.scheduled_shift.updated`.", + "nullable": true }, - "hash": { + "event_id": { "type": "string", - "description": "The MD5 hash that was generated from the file contents.", - "readOnly": true + "description": "The unique ID for the event.", + "nullable": true }, - "mime_type": { + "created_at": { "type": "string", - "description": "The mime type of the attachment.\nThe following mime types are supported: \nimage/gif, image/jpeg, image/png, image/tiff, image/bmp, application/pdf.", + "description": "The timestamp of when the event was created, in RFC 3339 format.", "readOnly": true }, - "uploaded_at": { - "type": "string", - "description": "The timestamp when the attachment was uploaded, in RFC 3339 format.", - "readOnly": true + "data": { + "$ref": "#/components/schemas/LaborScheduledShiftUpdatedEventData", + "description": "The data associated with the event.", + "nullable": true } - } - }, - "InvoiceAutomaticPaymentSource": { - "type": "string", - "enum": [ - "NONE", - "CARD_ON_FILE", - "BANK_ON_FILE" - ], - "x-enum-elements": [ - { - "name": "NONE", - "description": "An automatic payment is not configured for the payment request." - }, - { - "name": "CARD_ON_FILE", - "description": "Use a card on file as the automatic payment method. On the due date, Square charges the card\nfor the amount of the payment request.\n\nFor `CARD_ON_FILE` payments, the invoice delivery method must be `EMAIL` and `card_id` must be\nspecified for the payment request before the invoice can be published." + }, + "example": { + "created_at": "2025-02-11T18:54:08.044355293Z", + "data": { + "id": "WA09SDV3DNJ54", + "object": { + "scheduled_shift": { + "created_at": "2025-02-11T18:53:35Z", + "draft_shift_details": { + "end_at": "2025-02-14T09:11:00-08:00", + "is_deleted": false, + "job_id": "ioeL1Mp7iZwCAWxeGMAT7ggB", + "location_id": "LR473RTW59VRY", + "notes": "Dont forget to prep the vegetables", + "start_at": "2025-02-13T23:11:00-08:00", + "team_member_id": "TMnsTAouYbvmp-8O", + "timezone": "America/Los_Angeles" + }, + "id": "WA09SDV3DNJ54", + "published_shift_details": { + "end_at": "2025-02-14T09:11:00-08:00", + "is_deleted": false, + "job_id": "ioeL1Mp7iZwCAWxeGMAT7ggB", + "location_id": "LR473RTW59VRY", + "notes": "Dont forget to prep the vegetables", + "start_at": "2025-02-13T23:11:00-08:00", + "team_member_id": "TMnsTAouYbvmp-8O", + "timezone": "America/Los_Angeles" + }, + "updated_at": "2025-02-11T18:54:08Z", + "version": 2 + } + }, + "type": "scheduled_shift" }, - { - "name": "BANK_ON_FILE", - "description": "Use a bank account on file as the automatic payment method. On the due date, Square charges the bank\naccount for the amount of the payment request if the buyer has approved the payment. The buyer receives a\nrequest to approve the payment when the invoice is sent or the invoice is updated.\n\nThis payment method applies only to invoices that sellers create in the Seller Dashboard or other\nSquare product. The bank account is provided by the customer during the payment flow. \n\nYou cannot set `BANK_ON_FILE` as a payment method using the Invoices API, but you can change a `BANK_ON_FILE`\npayment method to `NONE` or `CARD_ON_FILE`. For `BANK_ON_FILE` payments, the invoice delivery method must be `EMAIL`." - } - ], - "description": "Indicates the automatic payment method for an [invoice payment request](entity:InvoicePaymentRequest).", - "x-release-status": "PUBLIC" + "event_id": "d7052271-25e7-303f-9684-3f994dc9eaa3", + "merchant_id": "MLHZRVNSD91A1", + "type": "labor.scheduled_shift.updated" + }, + "x-webhook": { + "event": "labor.scheduled_shift.updated", + "scopes": [ + "TIMECARDS_READ" + ] + }, + "x-api": "#/components/x-apis/Labor", + "x-since": "2025-05-21" }, - "InvoiceCustomField": { + "LaborScheduledShiftUpdatedEventData": { "type": "object", - "description": "An additional seller-defined and customer-facing field to include on the invoice. For more information, \nsee [Custom fields](https://developer.squareup.com/docs/invoices-api/overview#custom-fields).\n\nAdding custom fields to an invoice requires an \n[Invoices Plus subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription).", - "x-release-status": "PUBLIC", + "x-release-status": "BETA", "properties": { - "label": { + "type": { "type": "string", - "description": "The label or title of the custom field. This field is required for a custom field.", - "maxLength": 30, + "description": "The type of object affected by the event. For this event, the value is `scheduled_shift`.", + "maxLength": 50, "nullable": true }, - "value": { + "id": { "type": "string", - "description": "The text of the custom field. If omitted, only the label is rendered.", - "maxLength": 2000, - "nullable": true + "description": "The ID of the affected `ScheduledShift`.", + "maxLength": 255 }, - "placement": { - "$ref": "#/components/schemas/InvoiceCustomFieldPlacement", - "description": "The location of the custom field on the invoice. This field is required for a custom field.\nSee [InvoiceCustomFieldPlacement](#type-invoicecustomfieldplacement) for possible values", + "object": { + "$ref": "#/components/schemas/LaborScheduledShiftUpdatedEventObject", + "description": "An object containing the affected `ScheduledShift`.", "nullable": true } } }, - "InvoiceCustomFieldPlacement": { - "type": "string", - "enum": [ - "ABOVE_LINE_ITEMS", - "BELOW_LINE_ITEMS" - ], - "x-enum-elements": [ - { - "name": "ABOVE_LINE_ITEMS", - "description": "Render the custom field above the invoice line items." - }, - { - "name": "BELOW_LINE_ITEMS", - "description": "Render the custom field below the invoice line items." - } - ], - "description": "Indicates where to render a custom field on the Square-hosted invoice page and in emailed or PDF \ncopies of the invoice.", - "x-release-status": "PUBLIC" - }, - "InvoiceDeliveryMethod": { - "type": "string", - "enum": [ - "EMAIL", - "SHARE_MANUALLY", - "SMS" - ], - "x-enum-elements": [ - { - "name": "EMAIL", - "description": "Directs Square to send invoices, reminders, and receipts to the customer using email." - }, - { - "name": "SHARE_MANUALLY", - "description": "Directs Square to take no action on the invoice. In this case, the seller\nor application developer follows up with the customer for payment. For example,\na seller might collect a payment in the Seller Dashboard or Point of Sale (POS) application.\nThe seller might also share the URL of the Square-hosted invoice page (`public_url`) with the customer to request payment." - }, - { - "name": "SMS", - "description": "Directs Square to send invoices and receipts to the customer using SMS (text message).\n\nYou cannot set `SMS` as a delivery method using the Invoices API, but you can change an `SMS` delivery method to `EMAIL` or `SHARE_MANUALLY`." - } - ], - "description": "Indicates how Square delivers the [invoice](entity:Invoice) to the customer.", - "x-release-status": "PUBLIC" - }, - "InvoiceFilter": { + "LaborScheduledShiftUpdatedEventObject": { "type": "object", - "description": "Describes query filters to apply.", - "x-release-status": "PUBLIC", - "required": [ - "location_ids" - ], + "x-release-status": "BETA", "properties": { - "location_ids": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Limits the search to the specified locations. A location is required. \nIn the current implementation, only one location can be specified." - }, - "customer_ids": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Limits the search to the specified customers, within the specified locations. \nSpecifying a customer is optional. In the current implementation, \na maximum of one customer can be specified.", + "ScheduledShift": { + "$ref": "#/components/schemas/ScheduledShift", + "description": "The updated `ScheduledShift`.", "nullable": true } } }, - "InvoicePaymentReminder": { + "LaborShiftCreatedEvent": { "type": "object", - "description": "Describes a payment request reminder (automatic notification) that Square sends\nto the customer. You configure a reminder relative to the payment request\n`due_date`.", - "x-release-status": "PUBLIC", + "description": "Published when a worker starts a [Shift](entity:Shift).\n\nDeprecated at Square API version 2025-05-21. Replaced by `labor.timecard.created`.", + "x-release-status": "DEPRECATED", "properties": { - "uid": { + "merchant_id": { "type": "string", - "description": "A Square-assigned ID that uniquely identifies the reminder within the\n`InvoicePaymentRequest`.", - "readOnly": true - }, - "relative_scheduled_days": { - "type": "integer", - "description": "The number of days before (a negative number) or after (a positive number)\nthe payment request `due_date` when the reminder is sent. For example, -3 indicates that\nthe reminder should be sent 3 days before the payment request `due_date`.", - "minimum": -32767, - "maximum": 32767, + "description": "The ID of the merchant associated with the event.", "nullable": true }, - "message": { + "type": { "type": "string", - "description": "The reminder message.", - "minLength": 1, - "maxLength": 1000, + "description": "The type of event. For this event, the value is `labor.shift.created`.", "nullable": true }, - "status": { - "$ref": "#/components/schemas/InvoicePaymentReminderStatus", - "description": "The status of the reminder.\nSee [InvoicePaymentReminderStatus](#type-invoicepaymentreminderstatus) for possible values", - "readOnly": true + "event_id": { + "type": "string", + "description": "The unique ID for the event.", + "nullable": true }, - "sent_at": { + "created_at": { "type": "string", - "description": "If sent, the timestamp when the reminder was sent, in RFC 3339 format.", + "description": "The timestamp of when the event was created, in RFC 3339 format.", "readOnly": true - } - } - }, - "InvoicePaymentReminderStatus": { - "type": "string", - "enum": [ - "PENDING", - "NOT_APPLICABLE", - "SENT" - ], - "x-enum-elements": [ - { - "name": "PENDING", - "description": "The reminder will be sent on the `relative_scheduled_date` (if the invoice is published)." - }, - { - "name": "NOT_APPLICABLE", - "description": "The reminder is not applicable and is not sent. The following are examples\nof when reminders are not applicable and are not sent:\n- You schedule a reminder to be sent before the invoice is published.\n- The invoice is configured with multiple payment requests and a payment request reminder\nis configured to be sent after the next payment request `due_date`.\n- Two reminders (for different payment requests) are configured to be sent on the\nsame date. Therefore, only one reminder is sent.\n- You configure a reminder to be sent on the date that the invoice is scheduled to be sent.\n- The payment request is already paid.\n- The invoice status is `CANCELED` or `FAILED`." }, - { - "name": "SENT", - "description": "The reminder is sent." + "data": { + "$ref": "#/components/schemas/LaborShiftCreatedEventData", + "description": "The data associated with the event.", + "nullable": true } - ], - "description": "The status of a payment request reminder.", - "x-release-status": "PUBLIC" + }, + "example": { + "created_at": "2019-10-29T17:26:16.808603647Z", + "data": { + "id": "PY4YSMVKXFY9E", + "object": { + "shift": { + "created_at": "2019-11-06T19:14:55Z", + "declared_cash_tip_money": { + "amount": 500, + "currency": "USD" + }, + "employee_id": "AnuhZhsN95oT8f-eCn9D", + "end_at": "2019-01-25T18:11:00Z", + "id": "PY4YSMVKXFY9E", + "location_id": "NAQ1FHV6ZJ8YV", + "start_at": "2019-01-25T08:11:00Z", + "status": "OPEN", + "team_member_id": "AnuhZhsN95oT8f-eCn9D", + "timezone": "Etc/UTC", + "updated_at": "2019-11-06T19:14:55Z", + "version": 1, + "wage": { + "hourly_rate": { + "amount": 1100, + "currency": "USD" + }, + "job_id": "FzbJAtt9qEWncK1BWgVCxQ6M", + "tip_eligible": true, + "title": "Barista" + } + } + }, + "type": "shift" + }, + "event_id": "aeaaa5f6-c4fd-4e93-b688-71b50706266f", + "merchant_id": "6SSW7HV8K2ST5", + "type": "labor.shift.created" + }, + "x-webhook": { + "event": "labor.shift.created", + "scopes": [ + "TIMECARDS_READ" + ] + }, + "x-api": "#/components/x-apis/Labor", + "x-since": "2019-11-20" }, - "InvoicePaymentRequest": { + "LaborShiftCreatedEventData": { "type": "object", - "description": "Represents a payment request for an [invoice](entity:Invoice). Invoices can specify a maximum\nof 13 payment requests, with up to 12 `INSTALLMENT` request types. For more information, \nsee [Configuring payment requests](https://developer.squareup.com/docs/invoices-api/create-publish-invoices#payment-requests).\n\nAdding `INSTALLMENT` payment requests to an invoice requires an \n[Invoices Plus subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription).", - "x-release-status": "PUBLIC", + "x-release-status": "DEPRECATED", "properties": { - "uid": { + "type": { "type": "string", - "description": "The Square-generated ID of the payment request in an [invoice](entity:Invoice).", - "minLength": 1, - "maxLength": 255, - "nullable": true - }, - "request_method": { - "$ref": "#/components/schemas/InvoiceRequestMethod", - "description": "Indicates how Square processes the payment request. DEPRECATED at version 2021-01-21. Replaced by the\n`Invoice.delivery_method` and `InvoicePaymentRequest.automatic_payment_source` fields.\n\nOne of the following is required when creating an invoice:\n- (Recommended) The `delivery_method` field of the invoice. To configure an automatic payment, the\n`automatic_payment_source` field of the payment request is also required.\n- This `request_method` field. Note that `invoice` objects returned in responses do not include `request_method`.\nSee [InvoiceRequestMethod](#type-invoicerequestmethod) for possible values", - "x-release-status": "DEPRECATED", - "nullable": true - }, - "request_type": { - "$ref": "#/components/schemas/InvoiceRequestType", - "description": "Identifies the payment request type. This type defines how the payment request amount is determined. \nThis field is required to create a payment request.\nSee [InvoiceRequestType](#type-invoicerequesttype) for possible values", + "description": "The type of object affected by the event. For this event, the value is `shift`.", "nullable": true }, - "due_date": { + "id": { "type": "string", - "description": "The due date (in the invoice's time zone) for the payment request, in `YYYY-MM-DD` format. This field\nis required to create a payment request. If an `automatic_payment_source` is defined for the request, Square\ncharges the payment source on this date.\n\nAfter this date, the invoice becomes overdue. For example, a payment `due_date` of 2021-03-09 with a `timezone`\nof America/Los\\_Angeles becomes overdue at midnight on March 9 in America/Los\\_Angeles (which equals a UTC\ntimestamp of 2021-03-10T08:00:00Z).", - "nullable": true - }, - "fixed_amount_requested_money": { - "$ref": "#/components/schemas/Money", - "description": "If the payment request specifies `DEPOSIT` or `INSTALLMENT` as the `request_type`, \nthis indicates the request amount.\nYou cannot specify this when `request_type` is `BALANCE` or when the \npayment request includes the `percentage_requested` field.", - "nullable": true + "description": "The ID of the affected `Shift`." }, - "percentage_requested": { - "type": "string", - "description": "Specifies the amount for the payment request in percentage:\n\n- When the payment `request_type` is `DEPOSIT`, it is the percentage of the order's total amount.\n- When the payment `request_type` is `INSTALLMENT`, it is the percentage of the order's total less \nthe deposit, if requested. The sum of the `percentage_requested` in all installment \npayment requests must be equal to 100.\n\nYou cannot specify this when the payment `request_type` is `BALANCE` or when the \npayment request specifies the `fixed_amount_requested_money` field.", + "object": { + "$ref": "#/components/schemas/LaborShiftCreatedEventObject", + "description": "An object containing the affected `Shift`.", "nullable": true - }, - "tipping_enabled": { - "type": "boolean", - "description": "If set to true, the Square-hosted invoice page (the `public_url` field of the invoice) \nprovides a place for the customer to pay a tip. \n\nThis field is allowed only on the final payment request \nand the payment `request_type` must be `BALANCE` or `INSTALLMENT`.", + } + } + }, + "LaborShiftCreatedEventObject": { + "type": "object", + "x-release-status": "DEPRECATED", + "properties": { + "shift": { + "$ref": "#/components/schemas/Shift", + "description": "The new `Shift`.", "nullable": true - }, - "automatic_payment_source": { - "$ref": "#/components/schemas/InvoiceAutomaticPaymentSource", - "description": "The payment method for an automatic payment.\n\nThe default value is `NONE`.\nSee [InvoiceAutomaticPaymentSource](#type-invoiceautomaticpaymentsource) for possible values", + } + } + }, + "LaborShiftDeletedEvent": { + "type": "object", + "description": "Published when a [Shift](entity:Shift) is deleted.\n\nDeprecated at Square API version 2025-05-21. Replaced by `labor.timecard.deleted`.", + "x-release-status": "DEPRECATED", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the merchant associated with the event.", "nullable": true }, - "card_id": { + "type": { "type": "string", - "description": "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,\ncall [ListCards](api-endpoint:Cards-ListCards) and include the `customer_id` of the invoice recipient.", - "minLength": 1, - "maxLength": 255, + "description": "The type of event. For this event, the value is `labor.shift.deleted`.", "nullable": true }, - "reminders": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InvoicePaymentReminder" - }, - "description": "A list of one or more reminders to send for the payment request.", + "event_id": { + "type": "string", + "description": "The unique ID for the event.", "nullable": true }, - "computed_amount_money": { - "$ref": "#/components/schemas/Money", - "description": "The amount of the payment request, computed using the order amount and information from the various payment\nrequest fields (`request_type`, `fixed_amount_requested_money`, and `percentage_requested`).", - "readOnly": true - }, - "total_completed_amount_money": { - "$ref": "#/components/schemas/Money", - "description": "The amount of money already paid for the specific payment request. \nThis amount might include a rounding adjustment if the most recent invoice payment \nwas in cash in a currency that rounds cash payments (such as, `CAD` or `AUD`).", + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", "readOnly": true }, - "rounding_adjustment_included_money": { - "$ref": "#/components/schemas/Money", - "description": "If the most recent payment was a cash payment \nin a currency that rounds cash payments (such as, `CAD` or `AUD`) and the payment \nis rounded from `computed_amount_money` in the payment request, then this \nfield specifies the rounding adjustment applied. This amount \nmight be negative.", - "readOnly": true + "data": { + "$ref": "#/components/schemas/LaborShiftDeletedEventData", + "description": "The data associated with the event.", + "nullable": true } - } + }, + "example": { + "created_at": "2019-10-29T17:26:16.808603647Z", + "data": { + "deleted": true, + "id": "PY4YSMVKXFY9E", + "type": "labor" + }, + "event_id": "aeaaa5f6-c4fd-4e93-b688-71b50706266f", + "merchant_id": "6SSW7HV8K2ST5", + "type": "labor.shift.deleted" + }, + "x-webhook": { + "event": "labor.shift.deleted", + "scopes": [ + "TIMECARDS_READ" + ] + }, + "x-api": "#/components/x-apis/Labor", + "x-since": "2019-11-20" }, - "InvoiceQuery": { + "LaborShiftDeletedEventData": { "type": "object", - "description": "Describes query criteria for searching invoices.", - "x-release-status": "PUBLIC", - "required": [ - "filter" - ], + "x-release-status": "DEPRECATED", "properties": { - "filter": { - "$ref": "#/components/schemas/InvoiceFilter", - "description": "Query filters to apply in searching invoices. \nFor more information, see [Search for invoices](https://developer.squareup.com/docs/invoices-api/retrieve-list-search-invoices#search-invoices)." + "type": { + "type": "string", + "description": "The type of object affected by the event. For this event, the value is `shift`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "The ID of the affected `Shift`." }, - "sort": { - "$ref": "#/components/schemas/InvoiceSort", - "description": "Describes the sort order for the search result.", + "deleted": { + "type": "boolean", + "description": "Is true if the affected object was deleted. Otherwise absent.", "nullable": true } } }, - "InvoiceRecipient": { + "LaborShiftUpdatedEvent": { "type": "object", - "description": "Represents a snapshot of customer data. This object stores customer data that is displayed on the invoice \nand that Square uses to deliver the invoice.\n\nWhen you provide a customer ID for a draft invoice, Square retrieves the associated customer profile and populates \nthe remaining `InvoiceRecipient` fields. You cannot update these fields after the invoice is published. \nSquare updates the customer ID in response to a merge operation, but does not update other fields.", - "x-release-status": "PUBLIC", + "description": "Published when a [Shift](entity:Shift) is updated.\n\nDeprecated at Square API version 2025-05-21. Replaced by `labor.timecard.updated`.", + "x-release-status": "DEPRECATED", "properties": { - "customer_id": { + "merchant_id": { "type": "string", - "description": "The ID of the customer. This is the customer profile ID that \nyou provide when creating a draft invoice.", - "minLength": 1, - "maxLength": 255, + "description": "The ID of the merchant associated with the event.", "nullable": true }, - "given_name": { + "type": { "type": "string", - "description": "The recipient's given (that is, first) name.", - "readOnly": true + "description": "The type of event. For this event, the value is `labor.shift.updated`.", + "nullable": true }, - "family_name": { + "event_id": { "type": "string", - "description": "The recipient's family (that is, last) name.", - "readOnly": true + "description": "The unique ID for the event.", + "nullable": true }, - "email_address": { + "created_at": { "type": "string", - "description": "The recipient's email address.", + "description": "The timestamp of when the event was created, in RFC 3339 format.", "readOnly": true }, - "address": { - "$ref": "#/components/schemas/Address", - "description": "The recipient's physical address.", - "readOnly": true + "data": { + "$ref": "#/components/schemas/LaborShiftUpdatedEventData", + "description": "The data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2019-10-29T17:26:16.808603647Z", + "data": { + "id": "PY4YSMVKXFY9E", + "object": { + "shift": { + "breaks": [ + { + "break_type_id": "REGS1EQR1TPZ5", + "end_at": "2019-01-25T11:16:00Z", + "expected_duration": "PT5M", + "id": "0EGK74E8BJF62", + "is_paid": true, + "name": "Tea Break", + "start_at": "2019-01-25T11:11:00Z" + } + ], + "created_at": "2019-11-06T19:14:55Z", + "declared_cash_tip_money": { + "amount": 500, + "currency": "USD" + }, + "employee_id": "AnuhZhsN95oT8f-eCn9D", + "end_at": "2019-01-25T18:11:00Z", + "id": "PY4YSMVKXFY9E", + "location_id": "NAQ1FHV6ZJ8YV", + "start_at": "2019-01-25T08:11:00Z", + "status": "CLOSED", + "team_member_id": "AnuhZhsN95oT8f-eCn9D", + "timezone": "Etc/UTC", + "updated_at": "2019-11-06T19:14:55Z", + "version": 1, + "wage": { + "hourly_rate": { + "amount": 1100, + "currency": "USD" + }, + "job_id": "FzbJAtt9qEWncK1BWgVCxQ6M", + "tip_eligible": true, + "title": "Barista" + } + } + }, + "type": "shift" }, - "phone_number": { + "event_id": "aeaaa5f6-c4fd-4e93-b688-71b50706266f", + "merchant_id": "6SSW7HV8K2ST5", + "type": "labor.shift.updated" + }, + "x-webhook": { + "event": "labor.shift.updated", + "scopes": [ + "TIMECARDS_READ" + ] + }, + "x-api": "#/components/x-apis/Labor", + "x-since": "2019-11-20" + }, + "LaborShiftUpdatedEventData": { + "type": "object", + "x-release-status": "DEPRECATED", + "properties": { + "type": { "type": "string", - "description": "The recipient's phone number.", - "readOnly": true + "description": "The type of object affected by the event. For this event, the value is `shift`.", + "nullable": true }, - "company_name": { + "id": { "type": "string", - "description": "The name of the recipient's company.", - "readOnly": true + "description": "ID of the affected `Shift`." }, - "tax_ids": { - "$ref": "#/components/schemas/InvoiceRecipientTaxIds", - "description": "The recipient's tax IDs. The country of the seller account determines whether this field \nis available for the customer. For more information, see [Invoice recipient tax IDs](https://developer.squareup.com/docs/invoices-api/overview#recipient-tax-ids).", - "readOnly": true + "object": { + "$ref": "#/components/schemas/LaborShiftUpdatedEventObject", + "description": "An object containing the affected `Shift`.", + "nullable": true } } }, - "InvoiceRecipientTaxIds": { + "LaborShiftUpdatedEventObject": { "type": "object", - "description": "Represents the tax IDs for an invoice recipient. The country of the seller account determines \nwhether the corresponding `tax_ids` field is available for the customer. For more information, \nsee [Invoice recipient tax IDs](https://developer.squareup.com/docs/invoices-api/overview#recipient-tax-ids).", - "x-release-status": "PUBLIC", + "x-release-status": "DEPRECATED", "properties": { - "eu_vat": { - "type": "string", - "description": "The EU VAT identification number for the invoice recipient. For example, `IE3426675K`.", - "readOnly": true + "shift": { + "$ref": "#/components/schemas/Shift", + "description": "The updated `Shift`.", + "nullable": true } } }, - "InvoiceRequestMethod": { - "type": "string", - "enum": [ - "EMAIL", - "CHARGE_CARD_ON_FILE", - "SHARE_MANUALLY", - "CHARGE_BANK_ON_FILE", - "SMS", - "SMS_CHARGE_CARD_ON_FILE", - "SMS_CHARGE_BANK_ON_FILE" - ], - "x-enum-elements": [ - { - "name": "EMAIL", - "description": "Directs Square to send invoices, reminders, and receipts to the customer using email.\nSquare sends the invoice after it is published (either immediately or at the `scheduled_at`\ntime, if specified in the [invoice](entity:Invoice))." - }, - { - "name": "CHARGE_CARD_ON_FILE", - "description": "Directs Square to charge the card on file on the `due_date` specified in the payment request\nand to use email to send invoices, reminders, and receipts." - }, - { - "name": "SHARE_MANUALLY", - "description": "Directs Square to take no specific action on the invoice. In this case, the seller \n(or the application developer) follows up with the customer for payment. For example, \na seller might collect a payment in the Seller Dashboard or use the Point of Sale (POS) application. \nThe seller might also share the URL of the Square-hosted invoice page (`public_url`) with the customer requesting payment." + "LaborTimecardCreatedEvent": { + "type": "object", + "description": "Published when a worker starts a [Timecard](entity:Timecard).", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true }, - { - "name": "CHARGE_BANK_ON_FILE", - "description": "Directs Square to charge the customer's bank account on file and to use email to send invoices, reminders, and receipts.\nThe customer must approve the payment.\n\nThe bank on file payment method applies only to invoices that sellers create in the Seller Dashboard or other\nSquare product. The bank account is provided by the customer during the payment flow. You \ncannot set `CHARGE_BANK_ON_FILE` as a request method using the Invoices API." + "type": { + "type": "string", + "description": "The type of event. For this event, the value is `labor.timecard.created`.", + "nullable": true }, - { - "name": "SMS", - "description": "Directs Square to send invoices and receipts to the customer using SMS (text message). Square sends the invoice\nafter it is published (either immediately or at the `scheduled_at` time, if specified in the [invoice](entity:Invoice)). \n\nYou cannot set `SMS` as a request method using the Invoices API." + "event_id": { + "type": "string", + "description": "The unique ID for the event.", + "nullable": true }, - { - "name": "SMS_CHARGE_CARD_ON_FILE", - "description": "Directs Square to charge the card on file on the `due_date` specified in the payment request and to\nuse SMS (text message) to send invoices and receipts. \n\nYou cannot set `SMS_CHARGE_CARD_ON_FILE` as a request method using the Invoices API." + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true }, - { - "name": "SMS_CHARGE_BANK_ON_FILE", - "description": "Directs Square to charge the customer's bank account on file and to use SMS (text message) to send invoices and receipts.\nThe customer must approve the payment.\n\nThe bank on file payment method applies only to invoices that sellers create in the Seller Dashboard\nor other Square product. The bank account is provided by the customer during the payment flow. \nYou cannot set `SMS_CHARGE_BANK_ON_FILE` as a request method using the Invoices API." + "data": { + "$ref": "#/components/schemas/LaborTimecardCreatedEventData", + "description": "The data associated with the event.", + "nullable": true } - ], - "description": "Specifies the action for Square to take for processing the invoice. For example, \nemail the invoice, charge a customer's card on file, or do nothing. DEPRECATED at\nversion 2021-01-21. The corresponding `request_method` field is replaced by the\n`Invoice.delivery_method` and `InvoicePaymentRequest.automatic_payment_source` fields.", - "x-release-status": "DEPRECATED" - }, - "InvoiceRequestType": { - "type": "string", - "enum": [ - "BALANCE", - "DEPOSIT", - "INSTALLMENT" - ], - "x-enum-elements": [ - { - "name": "BALANCE", - "description": "A request for a balance payment. The balance amount is computed as follows: \n\n- If the invoice specifies only a balance payment request, the balance amount is the \ntotal amount of the associated order. \n- If the invoice also specifies a deposit request, the balance amount is the amount \nremaining after the deposit.\n\n`INSTALLMENT` and `BALANCE` payment requests are not allowed in the same invoice." - }, - { - "name": "DEPOSIT", - "description": "A request for a deposit payment. You have the option of specifying \nan exact amount or a percentage of the total order amount. If you request a deposit, \nit must be due before any other payment requests." + }, + "example": { + "created_at": "2019-10-29T17:26:16.808603647Z", + "data": { + "id": "PY4YSMVKXFY9E", + "object": { + "timecard": { + "created_at": "2019-11-06T19:14:55Z", + "declared_cash_tip_money": { + "amount": 500, + "currency": "USD" + }, + "end_at": "2019-01-25T18:11:00Z", + "id": "PY4YSMVKXFY9E", + "location_id": "NAQ1FHV6ZJ8YV", + "start_at": "2019-01-25T08:11:00Z", + "status": "OPEN", + "team_member_id": "AnuhZhsN95oT8f-eCn9D", + "timezone": "Etc/UTC", + "updated_at": "2019-11-06T19:14:55Z", + "version": 1, + "wage": { + "hourly_rate": { + "amount": 1100, + "currency": "USD" + }, + "job_id": "FzbJAtt9qEWncK1BWgVCxQ6M", + "tip_eligible": true, + "title": "Barista" + } + } + }, + "type": "timecard" }, - { - "name": "INSTALLMENT", - "description": "A request for an installment payment. Installments allow buyers to pay the invoice over time. Installments can optionally be combined with a deposit. \n\nAdding `INSTALLMENT` payment requests to an invoice requires an \n[Invoices Plus subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription)." - } - ], - "description": "Indicates the type of the payment request. For more information, see \n[Configuring payment requests](https://developer.squareup.com/docs/invoices-api/create-publish-invoices#payment-requests).", - "x-release-status": "PUBLIC" + "event_id": "aeaaa5f6-c4fd-4e93-b688-71b50706266f", + "merchant_id": "6SSW7HV8K2ST5", + "type": "labor.timecard.created" + }, + "x-webhook": { + "event": "labor.timecard.created", + "scopes": [ + "TIMECARDS_READ" + ] + }, + "x-api": "#/components/x-apis/Labor", + "x-since": "2025-05-21" }, - "InvoiceSort": { + "LaborTimecardCreatedEventData": { "type": "object", - "description": "Identifies the sort field and sort order.", "x-release-status": "PUBLIC", - "required": [ - "field" - ], "properties": { - "field": { - "$ref": "#/components/schemas/InvoiceSortField", - "description": "The field to use for sorting.\nSee [InvoiceSortField](#type-invoicesortfield) for possible values" + "type": { + "type": "string", + "description": "The type of object affected by the event. For this event, the value is `timecard`.", + "nullable": true }, - "order": { - "$ref": "#/components/schemas/SortOrder", - "description": "The order to use for sorting the results.\nSee [SortOrder](#type-sortorder) for possible values", + "id": { + "type": "string", + "description": "The ID of the affected `Timecard`." + }, + "object": { + "$ref": "#/components/schemas/LaborTimecardCreatedEventObject", + "description": "An object containing the affected `Timecard`.", "nullable": true } } }, - "InvoiceSortField": { - "type": "string", - "enum": [ - "INVOICE_SORT_DATE" - ], - "x-enum-elements": [ - { - "name": "INVOICE_SORT_DATE", - "description": "The field works as follows:\n\n- If the invoice is a draft, it uses the invoice `created_at` date.\n- If the invoice is scheduled for publication, it uses the `scheduled_at` date.\n- If the invoice is published, it uses the invoice publication date." - } - ], - "description": "The field to use for sorting.", - "x-release-status": "PUBLIC" - }, - "InvoiceStatus": { - "type": "string", - "enum": [ - "DRAFT", - "UNPAID", - "SCHEDULED", - "PARTIALLY_PAID", - "PAID", - "PARTIALLY_REFUNDED", - "REFUNDED", - "CANCELED", - "FAILED", - "PAYMENT_PENDING" - ], - "x-enum-elements": [ - { - "name": "DRAFT", - "description": "The invoice is a draft. You must publish a draft invoice before Square can process it.\nA draft invoice has no `public_url`, so it is not available to customers." - }, - { - "name": "UNPAID", - "description": "The invoice is published but not yet paid." - }, - { - "name": "SCHEDULED", - "description": "The invoice is scheduled to be processed. On the scheduled date,\nSquare sends the invoice, initiates an automatic payment, or takes no action, depending on\nthe delivery method and payment request settings. Square also sets the invoice status to the\nappropriate state: `UNPAID`, `PAID`, `PARTIALLY_PAID`, or `PAYMENT_PENDING`." - }, - { - "name": "PARTIALLY_PAID", - "description": "A partial payment is received for the invoice." - }, - { - "name": "PAID", - "description": "The customer paid the invoice in full." - }, - { - "name": "PARTIALLY_REFUNDED", - "description": "The invoice is paid (or partially paid) and some but not all the amount paid is\nrefunded." - }, - { - "name": "REFUNDED", - "description": "The full amount that the customer paid for the invoice is refunded." - }, - { - "name": "CANCELED", - "description": "The invoice is canceled. Square no longer requests payments from the customer.\nThe Square-hosted payment page is still accessible using the temporary `public_url`\nlink, but the invoice is shown as canceled and does not accept payment." - }, - { - "name": "FAILED", - "description": "Square canceled the invoice due to suspicious activity." - }, - { - "name": "PAYMENT_PENDING", - "description": "A payment on the invoice was initiated but has not yet been processed.\n\nWhen in this state, invoices cannot be updated and other payments cannot be initiated." + "LaborTimecardCreatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "timecard": { + "$ref": "#/components/schemas/Timecard", + "description": "The new `Timecard`.", + "nullable": true } - ], - "description": "Indicates the status of an [invoice](entity:Invoice).", - "x-release-status": "PUBLIC" + } }, - "ItemVariationLocationOverrides": { + "LaborTimecardDeletedEvent": { "type": "object", - "description": "Price and inventory alerting overrides for a `CatalogItemVariation` at a specific `Location`.", + "description": "Published when a [Timecard](entity:Timecard) is deleted.", "x-release-status": "PUBLIC", "properties": { - "location_id": { + "merchant_id": { "type": "string", - "description": "The ID of the `Location`. This can include locations that are deactivated.", + "description": "The ID of the merchant associated with the event.", "nullable": true }, - "price_money": { - "$ref": "#/components/schemas/Money", - "description": "The price of the `CatalogItemVariation` at the given `Location`, or blank for variable pricing.", + "type": { + "type": "string", + "description": "The type of event. For this event, the value is `labor.timecard.deleted`.", "nullable": true }, - "pricing_type": { - "$ref": "#/components/schemas/CatalogPricingType", - "description": "The pricing type (fixed or variable) for the `CatalogItemVariation` at the given `Location`.\nSee [CatalogPricingType](#type-catalogpricingtype) for possible values", + "event_id": { + "type": "string", + "description": "The unique ID for the event.", "nullable": true }, - "track_inventory": { - "type": "boolean", - "description": "If `true`, inventory tracking is active for the `CatalogItemVariation` at this `Location`.", - "nullable": true + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true }, - "inventory_alert_type": { - "$ref": "#/components/schemas/InventoryAlertType", - "description": "Indicates whether the `CatalogItemVariation` displays an alert when its inventory\nquantity is less than or equal to its `inventory_alert_threshold`.\nSee [InventoryAlertType](#type-inventoryalerttype) for possible values", + "data": { + "$ref": "#/components/schemas/LaborTimecardDeletedEventData", + "description": "The data associated with the event.", "nullable": true + } + }, + "example": { + "created_at": "2019-10-29T17:26:16.808603647Z", + "data": { + "deleted": true, + "id": "PY4YSMVKXFY9E", + "type": "labor" }, - "inventory_alert_threshold": { - "type": "integer", - "description": "If the inventory quantity for the variation is less than or equal to this value and `inventory_alert_type`\nis `LOW_QUANTITY`, the variation displays an alert in the merchant dashboard.\n\nThis value is always an integer.", - "format": "int64", + "event_id": "aeaaa5f6-c4fd-4e93-b688-71b50706266f", + "merchant_id": "6SSW7HV8K2ST5", + "type": "labor.timecard.deleted" + }, + "x-webhook": { + "event": "labor.timecard.deleted", + "scopes": [ + "TIMECARDS_READ" + ] + }, + "x-api": "#/components/x-apis/Labor", + "x-since": "2025-05-21" + }, + "LaborTimecardDeletedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "The type of object affected by the event. For this event, the value is `timecard`.", "nullable": true }, - "sold_out": { - "type": "boolean", - "description": "Indicates whether the overridden item variation is sold out at the specified location.\n\nWhen inventory tracking is enabled on the item variation either globally or at the specified location,\nthe item variation is automatically marked as sold out when its inventory count reaches zero. The seller\ncan manually set the item variation as sold out even when the inventory count is greater than zero.\nAttempts by an application to set this attribute are ignored. Regardless how the sold-out status is set,\napplications should treat its inventory count as zero when this attribute value is `true`.", - "readOnly": true - }, - "sold_out_valid_until": { + "id": { "type": "string", - "description": "The seller-assigned timestamp, of the RFC 3339 format, to indicate when this sold-out variation\nbecomes available again at the specified location. Attempts by an application to set this attribute are ignored.\nWhen the current time is later than this attribute value, the affected item variation is no longer sold out.", - "readOnly": true + "description": "The ID of the affected `Timecard`." + }, + "deleted": { + "type": "boolean", + "description": "Is true if the affected object was deleted. Otherwise absent.", + "nullable": true } } }, - "Job": { + "LaborTimecardUpdatedEvent": { "type": "object", - "description": "Represents a job that can be assigned to [team members](entity:TeamMember). This object defines the\njob's title and tip eligibility. Compensation is defined in a [job assignment](entity:JobAssignment)\nin a team member's wage setting.", - "x-release-status": "BETA", + "description": "Published when a [Timecard](entity:Timecard) is updated.", + "x-release-status": "PUBLIC", "properties": { - "id": { + "merchant_id": { "type": "string", - "description": "**Read only** The unique Square-assigned ID of the job. If you need a job ID for an API request,\ncall [ListJobs](api-endpoint:Team-ListJobs) or use the ID returned when you created the job.\nYou can also get job IDs from a team member's wage setting." + "description": "The ID of the merchant associated with the event.", + "nullable": true }, - "title": { + "type": { "type": "string", - "description": "The title of the job.", - "maxLength": 150, + "description": "The type of event. For this event, the value is `labor.timecard.updated`.", "nullable": true }, - "is_tip_eligible": { - "type": "boolean", - "description": "Indicates whether team members can earn tips for the job.", + "event_id": { + "type": "string", + "description": "The unique ID for the event.", "nullable": true }, "created_at": { "type": "string", - "description": "The timestamp when the job was created, in RFC 3339 format.", - "readOnly": true - }, - "updated_at": { - "type": "string", - "description": "The timestamp when the job was last updated, in RFC 3339 format.", + "description": "The timestamp of when the event was created, in RFC 3339 format.", "readOnly": true }, - "version": { - "type": "integer", - "description": "**Read only** The current version of the job. Include this field in `UpdateJob` requests to enable\n[optimistic concurrency](https://developer.squareup.com/docs/working-with-apis/optimistic-concurrency)\ncontrol and avoid overwrites from concurrent requests. Requests fail if the provided version doesn't\nmatch the server version at the time of the request." + "data": { + "$ref": "#/components/schemas/LaborTimecardUpdatedEventData", + "description": "The data associated with the event.", + "nullable": true } - } + }, + "example": { + "created_at": "2019-10-29T17:26:16.808603647Z", + "data": { + "id": "PY4YSMVKXFY9E", + "object": { + "timecard": { + "breaks": [ + { + "break_type_id": "REGS1EQR1TPZ5", + "end_at": "2019-01-25T11:16:00Z", + "expected_duration": "PT5M", + "id": "0EGK74E8BJF62", + "is_paid": true, + "name": "Tea Break", + "start_at": "2019-01-25T11:11:00Z" + } + ], + "created_at": "2019-11-06T19:14:55Z", + "declared_cash_tip_money": { + "amount": 500, + "currency": "USD" + }, + "end_at": "2019-01-25T18:11:00Z", + "id": "PY4YSMVKXFY9E", + "location_id": "NAQ1FHV6ZJ8YV", + "start_at": "2019-01-25T08:11:00Z", + "status": "CLOSED", + "team_member_id": "AnuhZhsN95oT8f-eCn9D", + "timezone": "Etc/UTC", + "updated_at": "2019-11-06T19:14:55Z", + "version": 1, + "wage": { + "hourly_rate": { + "amount": 1100, + "currency": "USD" + }, + "job_id": "FzbJAtt9qEWncK1BWgVCxQ6M", + "tip_eligible": true, + "title": "Barista" + } + } + }, + "type": "timecard" + }, + "event_id": "aeaaa5f6-c4fd-4e93-b688-71b50706266f", + "merchant_id": "6SSW7HV8K2ST5", + "type": "labor.timecard.updated" + }, + "x-webhook": { + "event": "labor.timecard.updated", + "scopes": [ + "TIMECARDS_READ" + ] + }, + "x-api": "#/components/x-apis/Labor", + "x-since": "2025-05-21" }, - "JobAssignment": { + "LaborTimecardUpdatedEventData": { "type": "object", - "description": "Represents a job assigned to a [team member](entity:TeamMember), including the compensation the team\nmember earns for the job. Job assignments are listed in the team member's [wage setting](entity:WageSetting).", "x-release-status": "PUBLIC", - "required": [ - "pay_type" - ], "properties": { - "job_title": { + "type": { "type": "string", - "description": "The title of the job.", - "nullable": true - }, - "pay_type": { - "$ref": "#/components/schemas/JobAssignmentPayType", - "description": "The current pay type for the job assignment used to\ncalculate the pay amount in a pay period.\nSee [JobAssignmentPayType](#type-jobassignmentpaytype) for possible values" - }, - "hourly_rate": { - "$ref": "#/components/schemas/Money", - "description": "The hourly pay rate of the job. For `SALARY` pay types, Square calculates the hourly rate based on\n`annual_rate` and `weekly_hours`.", - "nullable": true - }, - "annual_rate": { - "$ref": "#/components/schemas/Money", - "description": "The total pay amount for a 12-month period on the job. Set if the job `PayType` is `SALARY`.", - "nullable": true - }, - "weekly_hours": { - "type": "integer", - "description": "The planned hours per week for the job. Set if the job `PayType` is `SALARY`.", + "description": "The type of object affected by the event. For this event, the value is `timecard`.", "nullable": true }, - "job_id": { + "id": { "type": "string", - "description": "The ID of the [job](entity:Job).", - "x-release-status": "BETA", + "description": "The ID of the affected `Timecard`." + }, + "object": { + "$ref": "#/components/schemas/LaborTimecardUpdatedEventObject", + "description": "An object containing the affected `Timecard`.", "nullable": true } } }, - "JobAssignmentPayType": { - "type": "string", - "enum": [ - "NONE", - "HOURLY", - "SALARY" - ], - "x-enum-elements": [ - { - "name": "NONE", - "description": "The job does not have a defined pay type." - }, - { - "name": "HOURLY", - "description": "The job pays an hourly rate." - }, - { - "name": "SALARY", - "description": "The job pays an annual salary." + "LaborTimecardUpdatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "timecard": { + "$ref": "#/components/schemas/Timecard", + "description": "The updated `Timecard`.", + "nullable": true } - ], - "description": "Enumerates the possible pay types that a job can be assigned.", - "x-release-status": "PUBLIC" + } }, "LinkCustomerToGiftCardRequest": { "type": "object", @@ -25263,28 +32068,6 @@ } } }, - "ListBankAccountsRequest": { - "type": "object", - "description": "Request object for fetching all `BankAccount`\nobjects linked to a account.", - "x-release-status": "PUBLIC", - "properties": { - "cursor": { - "type": "string", - "description": "The pagination cursor returned by a previous call to this endpoint.\nUse it in the next `ListBankAccounts` request to retrieve the next set \nof results.\n\nSee the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information.", - "nullable": true - }, - "limit": { - "type": "integer", - "description": "Upper limit on the number of bank accounts to return in the response. \nCurrently, 1000 is the largest supported limit. You can specify a limit \nof up to 1000 bank accounts. This is also the default limit.", - "nullable": true - }, - "location_id": { - "type": "string", - "description": "Location ID. You can specify this optional filter \nto retrieve only the linked bank accounts belonging to a specific location.", - "nullable": true - } - } - }, "ListBankAccountsResponse": { "type": "object", "description": "Response object returned by ListBankAccounts.", @@ -25344,25 +32127,6 @@ ] } }, - "ListBookingCustomAttributeDefinitionsRequest": { - "type": "object", - "description": "Represents a [ListBookingCustomAttributeDefinitions](api-endpoint:BookingCustomAttributes-ListBookingCustomAttributeDefinitions) request.", - "x-release-status": "PUBLIC", - "properties": { - "limit": { - "type": "integer", - "description": "The maximum number of results to return in a single paged response. This limit is advisory.\nThe response might contain more or fewer results. The minimum value is 1 and the maximum value is 100.\nThe default value is 20. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "minimum": 1, - "maximum": 100, - "nullable": true - }, - "cursor": { - "type": "string", - "description": "The cursor returned in the paged response from the previous call to this endpoint.\nProvide this cursor to retrieve the next page of results for your original request.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "nullable": true - } - } - }, "ListBookingCustomAttributeDefinitionsResponse": { "type": "object", "description": "Represents a [ListBookingCustomAttributeDefinitions](api-endpoint:BookingCustomAttributes-ListBookingCustomAttributeDefinitions) response.\nEither `custom_attribute_definitions`, an empty object, or `errors` is present in the response.\nIf additional results are available, the `cursor` field is also present along with `custom_attribute_definitions`.", @@ -25418,30 +32182,6 @@ "errors": [] } }, - "ListBookingCustomAttributesRequest": { - "type": "object", - "description": "Represents a [ListBookingCustomAttributes](api-endpoint:BookingCustomAttributes-ListBookingCustomAttributes) request.", - "x-release-status": "PUBLIC", - "properties": { - "limit": { - "type": "integer", - "description": "The maximum number of results to return in a single paged response. This limit is advisory.\nThe response might contain more or fewer results. The minimum value is 1 and the maximum value is 100.\nThe default value is 20. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "minimum": 1, - "maximum": 100, - "nullable": true - }, - "cursor": { - "type": "string", - "description": "The cursor returned in the paged response from the previous call to this endpoint.\nProvide this cursor to retrieve the next page of results for your original request. For more\ninformation, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "nullable": true - }, - "with_definitions": { - "type": "boolean", - "description": "Indicates whether to return the [custom attribute definition](entity:CustomAttributeDefinition) in the `definition` field of each\ncustom attribute. Set this parameter to `true` to get the name and description of each custom\nattribute, information about the data type, or other definition details. The default value is `false`.", - "nullable": true - } - } - }, "ListBookingCustomAttributesResponse": { "type": "object", "description": "Represents a [ListBookingCustomAttributes](api-endpoint:BookingCustomAttributes-ListBookingCustomAttributes) response.\nEither `custom_attributes`, an empty object, or `errors` is present in the response. If additional\nresults are available, the `cursor` field is also present along with `custom_attributes`.", @@ -25488,53 +32228,6 @@ "errors": [] } }, - "ListBookingsRequest": { - "type": "object", - "x-release-status": "PUBLIC", - "properties": { - "limit": { - "type": "integer", - "description": "The maximum number of results per page to return in a paged response.", - "minimum": 1, - "maximum": 10000, - "nullable": true - }, - "cursor": { - "type": "string", - "description": "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.", - "maxLength": 65536, - "nullable": true - }, - "customer_id": { - "type": "string", - "description": "The [customer](entity:Customer) for whom to retrieve bookings. If this is not set, bookings for all customers are retrieved.", - "maxLength": 192, - "nullable": true - }, - "team_member_id": { - "type": "string", - "description": "The team member for whom to retrieve bookings. If this is not set, bookings of all members are retrieved.", - "maxLength": 32, - "nullable": true - }, - "location_id": { - "type": "string", - "description": "The location for which to retrieve bookings. If this is not set, all locations' bookings are retrieved.", - "maxLength": 32, - "nullable": true - }, - "start_at_min": { - "type": "string", - "description": "The RFC 3339 timestamp specifying the earliest of the start time. If this is not set, the current time is used.", - "nullable": true - }, - "start_at_max": { - "type": "string", - "description": "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.", - "nullable": true - } - } - }, "ListBookingsResponse": { "type": "object", "x-release-status": "PUBLIC", @@ -25586,31 +32279,6 @@ "errors": [] } }, - "ListBreakTypesRequest": { - "type": "object", - "description": "A request for a filtered set of `BreakType` objects.", - "x-release-status": "PUBLIC", - "x-params-example": "?location_id=PAA1RJZZKXBFG\u0026limit=2\u0026cursor=s4R0Z6ecFTzTC4jz8sUDBQTudX3KE313OT9fCt3VUgsXM4sMgED", - "properties": { - "location_id": { - "type": "string", - "description": "Filter the returned `BreakType` results to only those that are associated with the\nspecified location.", - "nullable": true - }, - "limit": { - "type": "integer", - "description": "The maximum number of `BreakType` results to return per page. The number can range between 1\nand 200. The default is 200.", - "minimum": 1, - "maximum": 200, - "nullable": true - }, - "cursor": { - "type": "string", - "description": "A pointer to the next page of `BreakType` results to fetch.", - "nullable": true - } - } - }, "ListBreakTypesResponse": { "type": "object", "description": "The response to a request for a set of `BreakType` objects. The response contains\nthe requested `BreakType` objects and might contain a set of `Error` objects if\nthe request resulted in errors.", @@ -25661,40 +32329,6 @@ "cursor": "2fofTniCgT0yIPAq26kmk0YyFQJZfbWkh73OOnlTHmTAx13NgED" } }, - "ListCardsRequest": { - "type": "object", - "description": "Retrieves details for a specific Card. Accessible via\nHTTP requests at GET https://connect.squareup.com/v2/cards", - "x-release-status": "PUBLIC", - "properties": { - "cursor": { - "type": "string", - "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this to retrieve the next set of results for your original query.\n\nSee [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information.", - "maxLength": 256, - "nullable": true - }, - "customer_id": { - "type": "string", - "description": "Limit results to cards associated with the customer supplied.\nBy default, all cards owned by the merchant are returned.", - "nullable": true - }, - "include_disabled": { - "type": "boolean", - "description": "Includes disabled cards.\nBy default, all enabled cards owned by the merchant are returned.", - "nullable": true - }, - "reference_id": { - "type": "string", - "description": "Limit results to cards associated with the reference_id supplied.", - "nullable": true - }, - "sort_order": { - "$ref": "#/components/schemas/SortOrder", - "description": "Sorts the returned list by when the card was created with the specified order.\nThis field defaults to ASC.\nSee [SortOrder](#type-sortorder) for possible values", - "nullable": true - } - }, - "example": {} - }, "ListCardsResponse": { "type": "object", "description": "Defines the fields that are included in the response body of\na request to the [ListCards](api-endpoint:Cards-ListCards) endpoint.\n\nNote: if there are errors processing the request, the card field will not be\npresent.", @@ -25750,32 +32384,6 @@ ] } }, - "ListCashDrawerShiftEventsRequest": { - "type": "object", - "x-release-status": "PUBLIC", - "required": [ - "location_id" - ], - "properties": { - "location_id": { - "type": "string", - "description": "The ID of the location to list cash drawer shifts for.", - "minLength": 1 - }, - "limit": { - "type": "integer", - "description": "Number of resources to be returned in a page of results (200 by\ndefault, 1000 max).", - "maximum": 1000, - "nullable": true - }, - "cursor": { - "type": "string", - "description": "Opaque cursor for fetching the next page of results.", - "nullable": true - } - }, - "example": {} - }, "ListCashDrawerShiftEventsResponse": { "type": "object", "x-release-status": "PUBLIC", @@ -25870,47 +32478,6 @@ ] } }, - "ListCashDrawerShiftsRequest": { - "type": "object", - "x-release-status": "PUBLIC", - "required": [ - "location_id" - ], - "properties": { - "location_id": { - "type": "string", - "description": "The ID of the location to query for a list of cash drawer shifts.", - "minLength": 1 - }, - "sort_order": { - "$ref": "#/components/schemas/SortOrder", - "description": "The order in which cash drawer shifts are listed in the response,\nbased on their opened_at field. Default value: ASC\nSee [SortOrder](#type-sortorder) for possible values", - "nullable": true - }, - "begin_time": { - "type": "string", - "description": "The inclusive start time of the query on opened_at, in ISO 8601 format.", - "nullable": true - }, - "end_time": { - "type": "string", - "description": "The exclusive end date of the query on opened_at, in ISO 8601 format.", - "nullable": true - }, - "limit": { - "type": "integer", - "description": "Number of cash drawer shift events in a page of results (200 by\ndefault, 1000 max).", - "maximum": 1000, - "nullable": true - }, - "cursor": { - "type": "string", - "description": "Opaque cursor for fetching the next page of results.", - "nullable": true - } - }, - "example": {} - }, "ListCashDrawerShiftsResponse": { "type": "object", "x-release-status": "PUBLIC", @@ -25959,38 +32526,6 @@ ] } }, - "ListCatalogRequest": { - "type": "object", - "x-release-status": "PUBLIC", - "x-params-example": "?types=category,tax", - "properties": { - "cursor": { - "type": "string", - "description": "The pagination cursor returned in the previous response. Leave unset for an initial request.\nThe page size is currently set to be 100.\nSee [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information.", - "nullable": true - }, - "types": { - "type": "string", - "description": "An optional case-insensitive, comma-separated list of object types to retrieve.\n\nThe valid values are defined in the [CatalogObjectType](entity:CatalogObjectType) enum, for example,\n`ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`,\n`MODIFIER`, `MODIFIER_LIST`, `IMAGE`, etc.\n\nIf this is unspecified, the operation returns objects of all the top level types at the version\nof the Square API used to make the request. Object types that are nested onto other object types\nare not included in the defaults.\n\nAt the current API version the default object types are:\nITEM, CATEGORY, TAX, DISCOUNT, MODIFIER_LIST, \nPRICING_RULE, PRODUCT_SET, TIME_PERIOD, MEASUREMENT_UNIT,\nSUBSCRIPTION_PLAN, ITEM_OPTION, CUSTOM_ATTRIBUTE_DEFINITION, QUICK_AMOUNT_SETTINGS.", - "nullable": true - }, - "catalog_version": { - "type": "integer", - "description": "The specific version of the catalog objects to be included in the response.\nThis allows you to retrieve historical versions of objects. The specified version value is matched against\nthe [CatalogObject](entity:CatalogObject)s' `version` attribute. If not included, results will be from the\ncurrent version of the catalog.", - "format": "int64", - "x-release-status": "BETA", - "nullable": true - } - }, - "x-sq-sdk-sample-code": { - "csharp": "/sdk_samples/Catalog/ListCatalog/ListCatalogRequest.csharp", - "java": "/sdk_samples/Catalog/ListCatalog/ListCatalogRequest.java", - "javascript": "/sdk_samples/Catalog/ListCatalog/ListCatalogRequest.javascript", - "php": "/sdk_samples/Catalog/ListCatalog/ListCatalogRequest.php", - "python": "/sdk_samples/Catalog/ListCatalog/ListCatalogRequest.python", - "ruby": "/sdk_samples/Catalog/ListCatalog/ListCatalogRequest.ruby" - } - }, "ListCatalogResponse": { "type": "object", "x-release-status": "PUBLIC", @@ -26053,26 +32588,6 @@ "ruby": "/sdk_samples/Catalog/ListCatalog/ListCatalogResponse.ruby" } }, - "ListCustomerCustomAttributeDefinitionsRequest": { - "type": "object", - "description": "Represents a [ListCustomerCustomAttributeDefinitions](api-endpoint:CustomerCustomAttributes-ListCustomerCustomAttributeDefinitions) request.", - "x-release-status": "PUBLIC", - "x-params-example": "?limit=2", - "properties": { - "limit": { - "type": "integer", - "description": "The maximum number of results to return in a single paged response. This limit is advisory.\nThe response might contain more or fewer results. The minimum value is 1 and the maximum value is 100.\nThe default value is 20. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "minimum": 1, - "maximum": 100, - "nullable": true - }, - "cursor": { - "type": "string", - "description": "The cursor returned in the paged response from the previous call to this endpoint.\nProvide this cursor to retrieve the next page of results for your original request.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "nullable": true - } - } - }, "ListCustomerCustomAttributeDefinitionsResponse": { "type": "object", "description": "Represents a [ListCustomerCustomAttributeDefinitions](api-endpoint:CustomerCustomAttributes-ListCustomerCustomAttributeDefinitions) response.\nEither `custom_attribute_definitions`, an empty object, or `errors` is present in the response.\nIf additional results are available, the `cursor` field is also present along with `custom_attribute_definitions`.", @@ -26127,31 +32642,6 @@ ] } }, - "ListCustomerCustomAttributesRequest": { - "type": "object", - "description": "Represents a [ListCustomerCustomAttributes](api-endpoint:CustomerCustomAttributes-ListCustomerCustomAttributes) request.", - "x-release-status": "PUBLIC", - "x-params-example": "?customer_id=Z57QXKM2FGXEQDV42W8RBZY7BR", - "properties": { - "limit": { - "type": "integer", - "description": "The maximum number of results to return in a single paged response. This limit is advisory.\nThe response might contain more or fewer results. The minimum value is 1 and the maximum value is 100.\nThe default value is 20. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "minimum": 1, - "maximum": 100, - "nullable": true - }, - "cursor": { - "type": "string", - "description": "The cursor returned in the paged response from the previous call to this endpoint.\nProvide this cursor to retrieve the next page of results for your original request. For more\ninformation, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "nullable": true - }, - "with_definitions": { - "type": "boolean", - "description": "Indicates whether to return the [custom attribute definition](entity:CustomAttributeDefinition) in the `definition` field of each\ncustom attribute. Set this parameter to `true` to get the name and description of each custom\nattribute, information about the data type, or other definition details. The default value is `false`.", - "nullable": true - } - } - }, "ListCustomerCustomAttributesResponse": { "type": "object", "description": "Represents a [ListCustomerCustomAttributes](api-endpoint:CustomerCustomAttributes-ListCustomerCustomAttributes) response.\nEither `custom_attributes`, an empty object, or `errors` is present in the response. If additional\nresults are available, the `cursor` field is also present along with `custom_attributes`.", @@ -26197,26 +32687,6 @@ ] } }, - "ListCustomerGroupsRequest": { - "type": "object", - "description": "Defines the query parameters that can be included in a request to the\n[ListCustomerGroups](api-endpoint:CustomerGroups-ListCustomerGroups) endpoint.", - "x-release-status": "PUBLIC", - "properties": { - "cursor": { - "type": "string", - "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for your original query.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "nullable": true - }, - "limit": { - "type": "integer", - "description": "The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results.\nIf 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.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "minimum": 1, - "maximum": 50, - "nullable": true - } - }, - "example": {} - }, "ListCustomerGroupsResponse": { "type": "object", "description": "Defines the fields that are included in the response body of\na request to the [ListCustomerGroups](api-endpoint:CustomerGroups-ListCustomerGroups) endpoint.\n\nEither `errors` or `groups` is present in a given response (never both).", @@ -26258,26 +32728,6 @@ ] } }, - "ListCustomerSegmentsRequest": { - "type": "object", - "description": "Defines the valid parameters for requests to the `ListCustomerSegments` endpoint.", - "x-release-status": "PUBLIC", - "properties": { - "cursor": { - "type": "string", - "description": "A pagination cursor returned by previous calls to `ListCustomerSegments`.\nThis cursor is used to retrieve the next set of query results.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "nullable": true - }, - "limit": { - "type": "integer", - "description": "The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results.\nIf 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.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "minimum": 1, - "maximum": 50, - "nullable": true - } - }, - "example": {} - }, "ListCustomerSegmentsResponse": { "type": "object", "description": "Defines the fields that are included in the response body for requests to the `ListCustomerSegments` endpoint.\n\nEither `errors` or `segments` is present in a given response (never both).", @@ -26331,48 +32781,6 @@ ] } }, - "ListCustomersRequest": { - "type": "object", - "description": "Defines the query parameters that can be included in a request to the\n`ListCustomers` endpoint.", - "x-release-status": "PUBLIC", - "properties": { - "cursor": { - "type": "string", - "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for your original query.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "nullable": true - }, - "limit": { - "type": "integer", - "description": "The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results.\nIf 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.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "minimum": 1, - "maximum": 100, - "nullable": true - }, - "sort_field": { - "$ref": "#/components/schemas/CustomerSortField", - "description": "Indicates how customers should be sorted.\n\nThe default value is `DEFAULT`.\nSee [CustomerSortField](#type-customersortfield) for possible values", - "nullable": true - }, - "sort_order": { - "$ref": "#/components/schemas/SortOrder", - "description": "Indicates whether customers should be sorted in ascending (`ASC`) or\ndescending (`DESC`) order.\n\nThe default value is `ASC`.\nSee [SortOrder](#type-sortorder) for possible values", - "nullable": true - }, - "count": { - "type": "boolean", - "description": "Indicates whether to return the total count of customers in the `count` field of the response.\n\nThe default value is `false`.", - "nullable": true - } - }, - "x-sq-sdk-sample-code": { - "csharp": "/sdk_samples/ListCustomers/ListCustomersRequest.csharp", - "java": "/sdk_samples/ListCustomers/ListCustomersRequest.java", - "javascript": "/sdk_samples/ListCustomers/ListCustomersRequest.javascript", - "php": "/sdk_samples/ListCustomers/ListCustomersRequest.php", - "python": "/sdk_samples/ListCustomers/ListCustomersRequest.python", - "ruby": "/sdk_samples/ListCustomers/ListCustomersRequest.ruby" - } - }, "ListCustomersResponse": { "type": "object", "description": "Defines the fields that are included in the response body of\na request to the `ListCustomers` endpoint.\n\nEither `errors` or `customers` is present in a given response (never both).", @@ -26445,36 +32853,6 @@ "ruby": "/sdk_samples/ListCustomers/ListCustomersResponse.ruby" } }, - "ListDeviceCodesRequest": { - "type": "object", - "x-release-status": "PUBLIC", - "properties": { - "cursor": { - "type": "string", - "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this to retrieve the next set of results for your original query.\n\nSee [Paginating results](https://developer.squareup.com/docs/working-with-apis/pagination) for more information.", - "nullable": true - }, - "location_id": { - "type": "string", - "description": "If specified, only returns DeviceCodes of the specified location.\nReturns DeviceCodes of all locations if empty.", - "nullable": true - }, - "product_type": { - "$ref": "#/components/schemas/ProductType", - "description": "If specified, only returns DeviceCodes targeting the specified product type.\nReturns DeviceCodes of all product types if empty.", - "nullable": true - }, - "status": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceCodeStatus" - }, - "description": "If specified, returns DeviceCodes with the specified statuses.\nReturns DeviceCodes of status `PAIRED` and `UNPAIRED` if empty.\nSee [DeviceCodeStatus](#type-devicecodestatus) for possible values", - "nullable": true - } - }, - "example": {} - }, "ListDeviceCodesResponse": { "type": "object", "x-release-status": "PUBLIC", @@ -26526,35 +32904,6 @@ ] } }, - "ListDevicesRequest": { - "type": "object", - "x-release-status": "BETA", - "properties": { - "cursor": { - "type": "string", - "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\nSee [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information.", - "nullable": true - }, - "sort_order": { - "$ref": "#/components/schemas/SortOrder", - "description": "The order in which results are listed.\n- `ASC` - Oldest to newest.\n- `DESC` - Newest to oldest (default).\nSee [SortOrder](#type-sortorder) for possible values", - "nullable": true - }, - "limit": { - "type": "integer", - "description": "The number of results to return in a single page.", - "minimum": 1, - "maximum": 100, - "nullable": true - }, - "location_id": { - "type": "string", - "description": "If present, only returns devices at the target location.", - "nullable": true - } - }, - "example": {} - }, "ListDevicesResponse": { "type": "object", "x-release-status": "BETA", @@ -26698,20 +33047,6 @@ ] } }, - "ListDisputeEvidenceRequest": { - "type": "object", - "description": "Defines the parameters for a `ListDisputeEvidence` request.", - "x-release-status": "PUBLIC", - "x-params-example": "?dispute_id=bVTprrwk0gygTLZ96VX1oB", - "properties": { - "cursor": { - "type": "string", - "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "nullable": true - } - }, - "example": {} - }, "ListDisputeEvidenceResponse": { "type": "object", "description": "Defines the fields in a `ListDisputeEvidence` response.", @@ -26761,34 +33096,6 @@ ] } }, - "ListDisputesRequest": { - "type": "object", - "description": "Defines the request parameters for the `ListDisputes` endpoint.", - "x-release-status": "PUBLIC", - "properties": { - "cursor": { - "type": "string", - "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "nullable": true - }, - "states": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DisputeState" - }, - "description": "The dispute states used to filter the result. If not specified, the endpoint returns all disputes.\nSee [DisputeState](#type-disputestate) for possible values", - "nullable": true - }, - "location_id": { - "type": "string", - "description": "The ID of the location for which to return a list of disputes.\nIf not specified, the endpoint returns disputes associated with all locations.", - "minLength": 1, - "maxLength": 40, - "nullable": true - } - }, - "example": {} - }, "ListDisputesResponse": { "type": "object", "description": "Defines fields in a `ListDisputes` response.", @@ -26859,31 +33166,6 @@ ] } }, - "ListEmployeeWagesRequest": { - "type": "object", - "description": "A request for a set of `EmployeeWage` objects.", - "x-release-status": "DEPRECATED", - "x-params-example": "?employee_id=33fJchumvVdJwxV0H6L9\u0026limit=4\u0026cursor=s4R0Z6ecFTzTC4jz8sUDBQTudX3KE313OT9fCt3VUgsXM4sMgED", - "properties": { - "employee_id": { - "type": "string", - "description": "Filter the returned wages to only those that are associated with the specified employee.", - "nullable": true - }, - "limit": { - "type": "integer", - "description": "The maximum number of `EmployeeWage` results to return per page. The number can range between\n1 and 200. The default is 200.", - "minimum": 1, - "maximum": 200, - "nullable": true - }, - "cursor": { - "type": "string", - "description": "A pointer to the next page of `EmployeeWage` results to fetch.", - "nullable": true - } - } - }, "ListEmployeeWagesResponse": { "type": "object", "description": "The response to a request for a set of `EmployeeWage` objects. The response contains\na set of `EmployeeWage` objects.", @@ -26950,31 +33232,6 @@ ] } }, - "ListEmployeesRequest": { - "type": "object", - "x-release-status": "DEPRECATED", - "properties": { - "location_id": { - "type": "string", - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/EmployeeStatus", - "description": "Specifies the EmployeeStatus to filter the employee by.\nSee [EmployeeStatus](#type-employeestatus) for possible values", - "nullable": true - }, - "limit": { - "type": "integer", - "description": "The number of employees to be returned on each page.", - "nullable": true - }, - "cursor": { - "type": "string", - "description": "The token required to retrieve the specified page of results.", - "nullable": true - } - } - }, "ListEmployeesResponse": { "type": "object", "x-release-status": "DEPRECATED", @@ -26998,18 +33255,6 @@ } } }, - "ListEventTypesRequest": { - "type": "object", - "description": "Lists all event types that can be subscribed to.", - "x-release-status": "BETA", - "properties": { - "api_version": { - "type": "string", - "description": "The API version for which to list event types. Setting this field overrides the default version used by the application.", - "nullable": true - } - } - }, "ListEventTypesResponse": { "type": "object", "description": "Defines the fields that are included in the response body of\na request to the [ListEventTypes](api-endpoint:Events-ListEventTypes) endpoint.\n\nNote: if there are errors processing the request, the event types field will not be\npresent.", @@ -27050,57 +33295,6 @@ ] } }, - "ListGiftCardActivitiesRequest": { - "type": "object", - "description": "Returns a list of gift card activities. You can optionally specify a filter to retrieve a\nsubset of activites.", - "x-release-status": "PUBLIC", - "properties": { - "gift_card_id": { - "type": "string", - "description": "If a gift card ID is provided, the endpoint returns activities related \nto the specified gift card. Otherwise, the endpoint returns all gift card activities for \nthe seller.", - "maxLength": 50, - "nullable": true - }, - "type": { - "type": "string", - "description": "If a [type](entity:GiftCardActivityType) is provided, the endpoint returns gift card activities of the specified type. \nOtherwise, the endpoint returns all types of gift card activities.", - "nullable": true - }, - "location_id": { - "type": "string", - "description": "If a location ID is provided, the endpoint returns gift card activities for the specified location. \nOtherwise, the endpoint returns gift card activities for all locations.", - "nullable": true - }, - "begin_time": { - "type": "string", - "description": "The timestamp for the beginning of the reporting period, in RFC 3339 format.\nThis start time is inclusive. The default value is the current time minus one year.", - "nullable": true - }, - "end_time": { - "type": "string", - "description": "The timestamp for the end of the reporting period, in RFC 3339 format.\nThis end time is inclusive. The default value is the current time.", - "nullable": true - }, - "limit": { - "type": "integer", - "description": "If a limit is provided, the endpoint returns the specified number \nof results (or fewer) per page. The maximum value is 100. The default value is 50.\nFor more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination).", - "minimum": 1, - "maximum": 100, - "nullable": true - }, - "cursor": { - "type": "string", - "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\nIf a cursor is not provided, the endpoint returns the first page of the results.\nFor more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination).", - "nullable": true - }, - "sort_order": { - "type": "string", - "description": "The order in which the endpoint returns the activities, based on `created_at`.\n- `ASC` - Oldest to newest.\n- `DESC` - Newest to oldest (default).", - "nullable": true - } - }, - "example": {} - }, "ListGiftCardActivitiesResponse": { "type": "object", "description": "A response that contains a list of `GiftCardActivity` objects. If the request resulted in errors, \nthe response contains a set of `Error` objects.", @@ -27170,42 +33364,6 @@ ] } }, - "ListGiftCardsRequest": { - "type": "object", - "description": "A request to list gift cards. You can optionally specify a filter to retrieve a subset of \ngift cards.", - "x-release-status": "PUBLIC", - "x-params-example": "?type=DIGITAL\u0026state=ACTIVE\u0026cursor=Jj0rA9-rrDW5k-PsorOq-m4BiGf", - "properties": { - "type": { - "type": "string", - "description": "If a [type](entity:GiftCardType) is provided, the endpoint returns gift cards of the specified type.\nOtherwise, the endpoint returns gift cards of all types.", - "nullable": true - }, - "state": { - "type": "string", - "description": "If a [state](entity:GiftCardStatus) is provided, the endpoint returns the gift cards in the specified state.\nOtherwise, the endpoint returns the gift cards of all states.", - "nullable": true - }, - "limit": { - "type": "integer", - "description": "If a limit is provided, the endpoint returns only the specified number of results per page.\nThe maximum value is 200. The default value is 30.\nFor more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination).", - "minimum": 1, - "maximum": 200, - "nullable": true - }, - "cursor": { - "type": "string", - "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\nIf a cursor is not provided, the endpoint returns the first page of the results. \nFor more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination).", - "nullable": true - }, - "customer_id": { - "type": "string", - "description": "If a customer ID is provided, the endpoint returns only the gift cards linked to the specified customer.", - "maxLength": 191, - "nullable": true - } - } - }, "ListGiftCardsResponse": { "type": "object", "description": "A response that contains a list of `GiftCard` objects. If the request resulted in errors, \nthe response contains a set of `Error` objects.", @@ -27260,33 +33418,6 @@ ] } }, - "ListInvoicesRequest": { - "type": "object", - "description": "Describes a `ListInvoice` request.", - "x-release-status": "PUBLIC", - "x-params-example": "?location_id=ES0RJRZYEC39A\u0026limit=2", - "required": [ - "location_id" - ], - "properties": { - "location_id": { - "type": "string", - "description": "The ID of the location for which to list invoices.", - "minLength": 1, - "maxLength": 255 - }, - "cursor": { - "type": "string", - "description": "A pagination cursor returned by a previous call to this endpoint. \nProvide this cursor to retrieve the next set of results for your original query.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "nullable": true - }, - "limit": { - "type": "integer", - "description": "The maximum number of invoices to return (200 is the maximum `limit`). \nIf not provided, the server uses a default limit of 100 invoices.", - "nullable": true - } - } - }, "ListInvoicesResponse": { "type": "object", "description": "Describes a `ListInvoice` response.", @@ -27464,19 +33595,6 @@ ] } }, - "ListJobsRequest": { - "type": "object", - "description": "Represents a [ListJobs](api-endpoint:Team-ListJobs) request.", - "x-release-status": "BETA", - "properties": { - "cursor": { - "type": "string", - "description": "The pagination cursor returned by the previous call to this endpoint. Provide this\ncursor to retrieve the next page of results for your original request. For more information,\nsee [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "nullable": true - } - }, - "example": {} - }, "ListJobsResponse": { "type": "object", "description": "Represents a [ListJobs](api-endpoint:Team-ListJobs) response. Either `jobs` or `errors`\nis present in the response. If additional results are available, the `cursor` field is also present.", @@ -27522,25 +33640,6 @@ ] } }, - "ListLocationBookingProfilesRequest": { - "type": "object", - "x-release-status": "PUBLIC", - "properties": { - "limit": { - "type": "integer", - "description": "The maximum number of results to return in a paged response.", - "minimum": 1, - "maximum": 100, - "nullable": true - }, - "cursor": { - "type": "string", - "description": "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.", - "maxLength": 65536, - "nullable": true - } - } - }, "ListLocationBookingProfilesResponse": { "type": "object", "x-release-status": "PUBLIC", @@ -27579,31 +33678,6 @@ ] } }, - "ListLocationCustomAttributeDefinitionsRequest": { - "type": "object", - "description": "Represents a [ListLocationCustomAttributeDefinitions](api-endpoint:LocationCustomAttributes-ListLocationCustomAttributeDefinitions) request.", - "x-release-status": "BETA", - "x-params-example": "?limit=2", - "properties": { - "visibility_filter": { - "$ref": "#/components/schemas/VisibilityFilter", - "description": "Filters the `CustomAttributeDefinition` results by their `visibility` values.\nSee [VisibilityFilter](#type-visibilityfilter) for possible values", - "nullable": true - }, - "limit": { - "type": "integer", - "description": "The maximum number of results to return in a single paged response. This limit is advisory.\nThe response might contain more or fewer results. The minimum value is 1 and the maximum value is 100.\nThe default value is 20. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "minimum": 1, - "maximum": 100, - "nullable": true - }, - "cursor": { - "type": "string", - "description": "The cursor returned in the paged response from the previous call to this endpoint.\nProvide this cursor to retrieve the next page of results for your original request.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "nullable": true - } - } - }, "ListLocationCustomAttributeDefinitionsResponse": { "type": "object", "description": "Represents a [ListLocationCustomAttributeDefinitions](api-endpoint:LocationCustomAttributes-ListLocationCustomAttributeDefinitions) response.\nEither `custom_attribute_definitions`, an empty object, or `errors` is present in the response.\nIf additional results are available, the `cursor` field is also present along with `custom_attribute_definitions`.", @@ -27658,36 +33732,6 @@ ] } }, - "ListLocationCustomAttributesRequest": { - "type": "object", - "description": "Represents a [ListLocationCustomAttributes](api-endpoint:LocationCustomAttributes-ListLocationCustomAttributes) request.", - "x-release-status": "BETA", - "x-params-example": "?location_id=L0TBCBTB7P8RQ", - "properties": { - "visibility_filter": { - "$ref": "#/components/schemas/VisibilityFilter", - "description": "Filters the `CustomAttributeDefinition` results by their `visibility` values.\nSee [VisibilityFilter](#type-visibilityfilter) for possible values", - "nullable": true - }, - "limit": { - "type": "integer", - "description": "The maximum number of results to return in a single paged response. This limit is advisory.\nThe response might contain more or fewer results. The minimum value is 1 and the maximum value is 100.\nThe default value is 20. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "minimum": 1, - "maximum": 100, - "nullable": true - }, - "cursor": { - "type": "string", - "description": "The cursor returned in the paged response from the previous call to this endpoint.\nProvide this cursor to retrieve the next page of results for your original request. For more\ninformation, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "nullable": true - }, - "with_definitions": { - "type": "boolean", - "description": "Indicates whether to return the [custom attribute definition](entity:CustomAttributeDefinition) in the `definition` field of each\ncustom attribute. Set this parameter to `true` to get the name and description of each custom\nattribute, information about the data type, or other definition details. The default value is `false`.", - "nullable": true - } - } - }, "ListLocationCustomAttributesResponse": { "type": "object", "description": "Represents a [ListLocationCustomAttributes](api-endpoint:LocationCustomAttributes-ListLocationCustomAttributes) response.\nEither `custom_attributes`, an empty object, or `errors` is present in the response. If additional\nresults are available, the `cursor` field is also present along with `custom_attributes`.", @@ -27733,12 +33777,6 @@ ] } }, - "ListLocationsRequest": { - "type": "object", - "description": "Defines the fields that are included in requests to the\n[ListLocations](api-endpoint:Locations-ListLocations) endpoint.", - "x-release-status": "PUBLIC", - "properties": {} - }, "ListLocationsResponse": { "type": "object", "description": "Defines the fields that are included in the response body of a request\nto the [ListLocations](api-endpoint:Locations-ListLocations) endpoint.\n\nEither `errors` or `locations` is present in a given response (never both).", @@ -27815,13 +33853,6 @@ ] } }, - "ListLoyaltyProgramsRequest": { - "type": "object", - "description": "A request to list `LoyaltyProgram`.", - "x-release-status": "DEPRECATED", - "properties": {}, - "example": {} - }, "ListLoyaltyProgramsResponse": { "type": "object", "description": "A response that contains all loyalty programs.", @@ -27874,11 +33905,6 @@ "reward_tiers": [ { "created_at": "2020-04-20T16:55:11Z", - "definition": { - "discount_type": "FIXED_PERCENTAGE", - "percentage_discount": "10", - "scope": "ORDER" - }, "id": "e1b39225-9da5-43d1-a5db-782cdd8ad94f", "name": "10% off entire sale", "points": 10, @@ -27898,32 +33924,6 @@ ] } }, - "ListLoyaltyPromotionsRequest": { - "type": "object", - "description": "Represents a [ListLoyaltyPromotions](api-endpoint:Loyalty-ListLoyaltyPromotions) request.", - "x-release-status": "PUBLIC", - "x-params-example": "?program_id=d619f755-2d17-41f3-990d-c04ecedd64dd", - "properties": { - "status": { - "$ref": "#/components/schemas/LoyaltyPromotionStatus", - "description": "The status to filter the results by. If a status is provided, only loyalty promotions\nwith the specified status are returned. Otherwise, all loyalty promotions associated with\nthe loyalty program are returned.\nSee [LoyaltyPromotionStatus](#type-loyaltypromotionstatus) for possible values", - "readOnly": true - }, - "cursor": { - "type": "string", - "description": "The cursor returned in the paged response from the previous call to this endpoint.\nProvide this cursor to retrieve the next page of results for your original request.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "nullable": true - }, - "limit": { - "type": "integer", - "description": "The maximum number of results to return in a single paged response.\nThe minimum value is 1 and the maximum value is 30. The default value is 30.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "minimum": 1, - "maximum": 30, - "nullable": true - } - }, - "example": {} - }, "ListLoyaltyPromotionsResponse": { "type": "object", "description": "Represents a [ListLoyaltyPromotions](api-endpoint:Loyalty-ListLoyaltyPromotions) response.\nOne of `loyalty_promotions`, an empty object, or `errors` is present in the response.\nIf additional results are available, the `cursor` field is also present along with `loyalty_promotions`.", @@ -28019,31 +34019,6 @@ ] } }, - "ListMerchantCustomAttributeDefinitionsRequest": { - "type": "object", - "description": "Represents a [ListMerchantCustomAttributeDefinitions](api-endpoint:MerchantCustomAttributes-ListMerchantCustomAttributeDefinitions) request.", - "x-release-status": "BETA", - "x-params-example": "?limit=2", - "properties": { - "visibility_filter": { - "$ref": "#/components/schemas/VisibilityFilter", - "description": "Filters the `CustomAttributeDefinition` results by their `visibility` values.\nSee [VisibilityFilter](#type-visibilityfilter) for possible values", - "nullable": true - }, - "limit": { - "type": "integer", - "description": "The maximum number of results to return in a single paged response. This limit is advisory.\nThe response might contain more or fewer results. The minimum value is 1 and the maximum value is 100.\nThe default value is 20. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "minimum": 1, - "maximum": 100, - "nullable": true - }, - "cursor": { - "type": "string", - "description": "The cursor returned in the paged response from the previous call to this endpoint.\nProvide this cursor to retrieve the next page of results for your original request.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "nullable": true - } - } - }, "ListMerchantCustomAttributeDefinitionsResponse": { "type": "object", "description": "Represents a [ListMerchantCustomAttributeDefinitions](api-endpoint:MerchantCustomAttributes-ListMerchantCustomAttributeDefinitions) response.\nEither `custom_attribute_definitions`, an empty object, or `errors` is present in the response.\nIf additional results are available, the `cursor` field is also present along with `custom_attribute_definitions`.", @@ -28098,36 +34073,6 @@ ] } }, - "ListMerchantCustomAttributesRequest": { - "type": "object", - "description": "Represents a [ListMerchantCustomAttributes](api-endpoint:MerchantCustomAttributes-ListMerchantCustomAttributes) request.", - "x-release-status": "BETA", - "x-params-example": "?merchant_id=DM7VKY8Q63GNP", - "properties": { - "visibility_filter": { - "$ref": "#/components/schemas/VisibilityFilter", - "description": "Filters the `CustomAttributeDefinition` results by their `visibility` values.\nSee [VisibilityFilter](#type-visibilityfilter) for possible values", - "nullable": true - }, - "limit": { - "type": "integer", - "description": "The maximum number of results to return in a single paged response. This limit is advisory.\nThe response might contain more or fewer results. The minimum value is 1 and the maximum value is 100.\nThe default value is 20. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "minimum": 1, - "maximum": 100, - "nullable": true - }, - "cursor": { - "type": "string", - "description": "The cursor returned in the paged response from the previous call to this endpoint.\nProvide this cursor to retrieve the next page of results for your original request. For more\ninformation, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "nullable": true - }, - "with_definitions": { - "type": "boolean", - "description": "Indicates whether to return the [custom attribute definition](entity:CustomAttributeDefinition) in the `definition` field of each\ncustom attribute. Set this parameter to `true` to get the name and description of each custom\nattribute, information about the data type, or other definition details. The default value is `false`.", - "nullable": true - } - } - }, "ListMerchantCustomAttributesResponse": { "type": "object", "description": "Represents a [ListMerchantCustomAttributes](api-endpoint:MerchantCustomAttributes-ListMerchantCustomAttributes) response.\nEither `custom_attributes`, an empty object, or `errors` is present in the response. If additional\nresults are available, the `cursor` field is also present along with `custom_attributes`.", @@ -28173,18 +34118,6 @@ ] } }, - "ListMerchantsRequest": { - "type": "object", - "description": "Request object for the [ListMerchant](api-endpoint:Merchants-ListMerchants) endpoint.", - "x-release-status": "PUBLIC", - "properties": { - "cursor": { - "type": "integer", - "description": "The cursor generated by the previous response.", - "nullable": true - } - } - }, "ListMerchantsResponse": { "type": "object", "description": "The response object returned by the [ListMerchant](api-endpoint:Merchants-ListMerchants) endpoint.", @@ -28224,32 +34157,6 @@ ] } }, - "ListOrderCustomAttributeDefinitionsRequest": { - "type": "object", - "description": "Represents a list request for order custom attribute definitions.", - "x-release-status": "BETA", - "x-params-example": "?limit=4", - "properties": { - "visibility_filter": { - "$ref": "#/components/schemas/VisibilityFilter", - "description": "Requests that all of the custom attributes be returned, or only those that are read-only or read-write.\nSee [VisibilityFilter](#type-visibilityfilter) for possible values", - "nullable": true - }, - "cursor": { - "type": "string", - "description": "The cursor returned in the paged response from the previous call to this endpoint. \nProvide this cursor to retrieve the next page of results for your original request. \nFor more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination).", - "minLength": 1, - "nullable": true - }, - "limit": { - "type": "integer", - "description": "The maximum number of results to return in a single paged response. This limit is advisory. \nThe response might contain more or fewer results. The minimum value is 1 and the maximum value is 100. \nThe default value is 20.\nFor more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination).", - "minimum": 1, - "maximum": 100, - "nullable": true - } - } - }, "ListOrderCustomAttributeDefinitionsResponse": { "type": "object", "description": "Represents a response from listing order custom attribute definitions.", @@ -28319,37 +34226,6 @@ ] } }, - "ListOrderCustomAttributesRequest": { - "type": "object", - "description": "Represents a list request for order custom attributes.", - "x-release-status": "BETA", - "x-params-example": "?order_id=7BbXGEIWNldxAzrtGf9GPVZTwZ4F\u0026with_definitions=true\u0026visibility_filter=ALL\u0026limit=4", - "properties": { - "visibility_filter": { - "$ref": "#/components/schemas/VisibilityFilter", - "description": "Requests that all of the custom attributes be returned, or only those that are read-only or read-write.\nSee [VisibilityFilter](#type-visibilityfilter) for possible values", - "nullable": true - }, - "cursor": { - "type": "string", - "description": "The cursor returned in the paged response from the previous call to this endpoint. \nProvide this cursor to retrieve the next page of results for your original request. \nFor more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination).", - "minLength": 1, - "nullable": true - }, - "limit": { - "type": "integer", - "description": "The maximum number of results to return in a single paged response. This limit is advisory. \nThe response might contain more or fewer results. The minimum value is 1 and the maximum value is 100. \nThe default value is 20.\nFor more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination).", - "minimum": 1, - "maximum": 100, - "nullable": true - }, - "with_definitions": { - "type": "boolean", - "description": "Indicates whether to return the [custom attribute definition](entity:CustomAttributeDefinition) in the `definition` field of each\ncustom attribute. Set this parameter to `true` to get the name and description of each custom attribute, \ninformation about the data type, or other definition details. The default value is `false`.", - "nullable": true - } - } - }, "ListOrderCustomAttributesResponse": { "type": "object", "description": "Represents a response from listing order custom attributes.", @@ -28388,22 +34264,6 @@ ] } }, - "ListPaymentLinksRequest": { - "type": "object", - "x-release-status": "PUBLIC", - "properties": { - "cursor": { - "type": "string", - "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\nIf a cursor is not provided, the endpoint returns the first page of the results.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "nullable": true - }, - "limit": { - "type": "integer", - "description": "A limit on the number of results to return per page. The limit is advisory and\nthe implementation might return more or less results. If the supplied limit is negative, zero, or\ngreater than the maximum limit of 1000, it is ignored.\n\nDefault value: `100`", - "nullable": true - } - } - }, "ListPaymentLinksResponse": { "type": "object", "x-release-status": "PUBLIC", @@ -28453,69 +34313,6 @@ ] } }, - "ListPaymentRefundsRequest": { - "type": "object", - "description": "Describes a request to list refunds using\n[ListPaymentRefunds](api-endpoint:Refunds-ListPaymentRefunds).\n\nThe maximum results per page is 100.", - "x-release-status": "PUBLIC", - "properties": { - "begin_time": { - "type": "string", - "description": "Indicates the start of the time range to retrieve each `PaymentRefund` for, in RFC 3339 \nformat. The range is determined using the `created_at` field for each `PaymentRefund`. \n\nDefault: The current time minus one year.", - "nullable": true - }, - "end_time": { - "type": "string", - "description": "Indicates the end of the time range to retrieve each `PaymentRefund` for, in RFC 3339 \nformat. The range is determined using the `created_at` field for each `PaymentRefund`.\n\nDefault: The current time.", - "nullable": true - }, - "sort_order": { - "type": "string", - "description": "The order in which results are listed by `PaymentRefund.created_at`:\n- `ASC` - Oldest to newest.\n- `DESC` - Newest to oldest (default).", - "nullable": true - }, - "cursor": { - "type": "string", - "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "nullable": true - }, - "location_id": { - "type": "string", - "description": "Limit results to the location supplied. By default, results are returned\nfor all locations associated with the seller.", - "nullable": true - }, - "status": { - "type": "string", - "description": "If provided, only refunds with the given status are returned.\nFor a list of refund status values, see [PaymentRefund](entity:PaymentRefund).\n\nDefault: If omitted, refunds are returned regardless of their status.", - "nullable": true - }, - "source_type": { - "type": "string", - "description": "If provided, only returns refunds whose payments have the indicated source type.\nCurrent values include `CARD`, `BANK_ACCOUNT`, `WALLET`, `CASH`, and `EXTERNAL`.\nFor information about these payment source types, see\n[Take Payments](https://developer.squareup.com/docs/payments-api/take-payments).\n\nDefault: If omitted, refunds are returned regardless of the source type.", - "nullable": true - }, - "limit": { - "type": "integer", - "description": "The maximum number of results to be returned in a single page.\n\nIt is possible to receive fewer results than the specified limit on a given page.\n\nIf the supplied value is greater than 100, no more than 100 results are returned.\n\nDefault: 100", - "nullable": true - }, - "updated_at_begin_time": { - "type": "string", - "description": "Indicates the start of the time range to retrieve each `PaymentRefund` for, in RFC 3339\nformat. The range is determined using the `updated_at` field for each `PaymentRefund`.\n\nDefault: If omitted, the time range starts at `begin_time`.", - "nullable": true - }, - "updated_at_end_time": { - "type": "string", - "description": "Indicates the end of the time range to retrieve each `PaymentRefund` for, in RFC 3339\nformat. The range is determined using the `updated_at` field for each `PaymentRefund`.\n\nDefault: The current time.", - "nullable": true - }, - "sort_field": { - "$ref": "#/components/schemas/ListPaymentRefundsRequestSortField", - "description": "The field used to sort results by. The default is `CREATED_AT`.\nSee [SortField](#type-sortfield) for possible values", - "nullable": true - } - }, - "example": {} - }, "ListPaymentRefundsRequestSortField": { "type": "string", "enum": [ @@ -28588,90 +34385,6 @@ ] } }, - "ListPaymentsRequest": { - "type": "object", - "description": "Describes a request to list payments using \n[ListPayments](api-endpoint:Payments-ListPayments). \n\nThe maximum results per page is 100.", - "x-release-status": "PUBLIC", - "properties": { - "begin_time": { - "type": "string", - "description": "Indicates the start of the time range to retrieve payments for, in RFC 3339 format. \nThe range is determined using the `created_at` field for each Payment.\nInclusive. Default: The current time minus one year.", - "nullable": true - }, - "end_time": { - "type": "string", - "description": "Indicates the end of the time range to retrieve payments for, in RFC 3339 format. The \nrange is determined using the `created_at` field for each Payment.\n\nDefault: The current time.", - "nullable": true - }, - "sort_order": { - "type": "string", - "description": "The order in which results are listed by `ListPaymentsRequest.sort_field`:\n- `ASC` - Oldest to newest.\n- `DESC` - Newest to oldest (default).", - "nullable": true - }, - "cursor": { - "type": "string", - "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "nullable": true - }, - "location_id": { - "type": "string", - "description": "Limit results to the location supplied. By default, results are returned\nfor the default (main) location associated with the seller.", - "nullable": true - }, - "total": { - "type": "integer", - "description": "The exact amount in the `total_money` for a payment.", - "format": "int64", - "nullable": true - }, - "last_4": { - "type": "string", - "description": "The last four digits of a payment card.", - "nullable": true - }, - "card_brand": { - "type": "string", - "description": "The brand of the payment card (for example, VISA).", - "nullable": true - }, - "limit": { - "type": "integer", - "description": "The maximum number of results to be returned in a single page.\nIt is possible to receive fewer results than the specified limit on a given page.\n\nThe default value of 100 is also the maximum allowed value. If the provided value is \ngreater than 100, it is ignored and the default value is used instead.\n\nDefault: `100`", - "nullable": true - }, - "is_offline_payment": { - "type": "boolean", - "description": "Whether the payment was taken offline or not.", - "nullable": true - }, - "offline_begin_time": { - "type": "string", - "description": "Indicates the start of the time range for which to retrieve offline payments, in RFC 3339\nformat for timestamps. The range is determined using the\n`offline_payment_details.client_created_at` field for each Payment. If set, payments without a\nvalue set in `offline_payment_details.client_created_at` will not be returned.\n\nDefault: The current time.", - "nullable": true - }, - "offline_end_time": { - "type": "string", - "description": "Indicates the end of the time range for which to retrieve offline payments, in RFC 3339\nformat for timestamps. The range is determined using the\n`offline_payment_details.client_created_at` field for each Payment. If set, payments without a\nvalue set in `offline_payment_details.client_created_at` will not be returned.\n\nDefault: The current time.", - "nullable": true - }, - "updated_at_begin_time": { - "type": "string", - "description": "Indicates the start of the time range to retrieve payments for, in RFC 3339 format. The\nrange is determined using the `updated_at` field for each Payment.", - "nullable": true - }, - "updated_at_end_time": { - "type": "string", - "description": "Indicates the end of the time range to retrieve payments for, in RFC 3339 format. The\nrange is determined using the `updated_at` field for each Payment.", - "nullable": true - }, - "sort_field": { - "$ref": "#/components/schemas/ListPaymentsRequestSortField", - "description": "The field used to sort results by. The default is `CREATED_AT`.\nSee [SortField](#type-sortfield) for possible values", - "nullable": true - } - }, - "example": {} - }, "ListPaymentsRequestSortField": { "type": "string", "enum": [ @@ -28790,28 +34503,6 @@ ] } }, - "ListPayoutEntriesRequest": { - "type": "object", - "x-release-status": "PUBLIC", - "properties": { - "sort_order": { - "$ref": "#/components/schemas/SortOrder", - "description": "The order in which payout entries are listed.\nSee [SortOrder](#type-sortorder) for possible values", - "nullable": true - }, - "cursor": { - "type": "string", - "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).\nIf request parameters change between requests, subsequent results may contain duplicates or missing records.", - "nullable": true - }, - "limit": { - "type": "integer", - "description": "The maximum number of results to be returned in a single page.\nIt is possible to receive fewer results than the specified limit on a given page.\nThe default value of 100 is also the maximum allowed value. If the provided value is\ngreater than 100, it is ignored and the default value is used instead.\nDefault: `100`", - "nullable": true - } - }, - "example": {} - }, "ListPayoutEntriesResponse": { "type": "object", "description": "The response to retrieve payout records entries.", @@ -28885,50 +34576,6 @@ ] } }, - "ListPayoutsRequest": { - "type": "object", - "description": "A request to retrieve payout records.", - "x-release-status": "PUBLIC", - "properties": { - "location_id": { - "type": "string", - "description": "The ID of the location for which to list the payouts.\nBy default, payouts are returned for the default (main) location associated with the seller.", - "maxLength": 255, - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/PayoutStatus", - "description": "If provided, only payouts with the given status are returned.", - "nullable": true - }, - "begin_time": { - "type": "string", - "description": "The timestamp for the beginning of the payout creation time, in RFC 3339 format.\nInclusive. Default: The current time minus one year.", - "nullable": true - }, - "end_time": { - "type": "string", - "description": "The timestamp for the end of the payout creation time, in RFC 3339 format.\nDefault: The current time.", - "nullable": true - }, - "sort_order": { - "$ref": "#/components/schemas/SortOrder", - "description": "The order in which payouts are listed.\nSee [SortOrder](#type-sortorder) for possible values", - "nullable": true - }, - "cursor": { - "type": "string", - "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this cursor to retrieve the next set of results for the original query.\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).\nIf request parameters change between requests, subsequent results may contain duplicates or missing records.", - "nullable": true - }, - "limit": { - "type": "integer", - "description": "The maximum number of results to be returned in a single page.\nIt is possible to receive fewer results than the specified limit on a given page.\nThe default value of 100 is also the maximum allowed value. If the provided value is\ngreater than 100, it is ignored and the default value is used instead.\nDefault: `100`", - "nullable": true - } - }, - "example": {} - }, "ListPayoutsResponse": { "type": "object", "description": "The response to retrieve payout records entries.", @@ -29007,108 +34654,6 @@ ] } }, - "ListRefundsRequest": { - "type": "object", - "description": "Defines the query parameters that can be included in\na request to the [ListRefunds](api-endpoint:Transactions-ListRefunds) endpoint.\n\nDeprecated - recommend using [SearchOrders](api-endpoint:Orders-SearchOrders)", - "x-release-status": "DEPRECATED", - "x-params-example": "?begin_time=2016-01-15T00:00:00Z\u0026end_time=2016-01-31T00:00:00Z", - "properties": { - "begin_time": { - "type": "string", - "description": "The beginning of the requested reporting period, in RFC 3339 format.\n\nSee [Date ranges](https://developer.squareup.com/docs/build-basics/working-with-dates) for details on date inclusivity/exclusivity.\n\nDefault value: The current time minus one year.", - "nullable": true - }, - "end_time": { - "type": "string", - "description": "The end of the requested reporting period, in RFC 3339 format.\n\nSee [Date ranges](https://developer.squareup.com/docs/build-basics/working-with-dates) for details on date inclusivity/exclusivity.\n\nDefault value: The current time.", - "nullable": true - }, - "sort_order": { - "$ref": "#/components/schemas/SortOrder", - "description": "The order in which results are listed in the response (`ASC` for\noldest first, `DESC` for newest first).\n\nDefault value: `DESC`\nSee [SortOrder](#type-sortorder) for possible values", - "nullable": true - }, - "cursor": { - "type": "string", - "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this to retrieve the next set of results for your original query.\n\nSee [Paginating results](https://developer.squareup.com/docs/working-with-apis/pagination) for more information.", - "nullable": true - } - }, - "x-sq-sdk-sample-code": { - "csharp": "/sdk_samples/ListRefunds/ListRefundsRequest.csharp", - "java": "/sdk_samples/ListRefunds/ListRefundsRequest.java", - "javascript": "/sdk_samples/ListRefunds/ListRefundsRequest.javascript", - "php": "/sdk_samples/ListRefunds/ListRefundsRequest.php", - "python": "/sdk_samples/ListRefunds/ListRefundsRequest.python", - "ruby": "/sdk_samples/ListRefunds/ListRefundsRequest.ruby" - } - }, - "ListRefundsResponse": { - "type": "object", - "description": "Defines the fields that are included in the response body of\na request to the [ListRefunds](api-endpoint:Transactions-ListRefunds) endpoint.\n\nOne of `errors` or `refunds` is present in a given response (never both).", - "x-release-status": "DEPRECATED", - "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Error" - }, - "description": "Any errors that occurred during the request." - }, - "refunds": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Refund" - }, - "description": "An array of refunds that match your query." - }, - "cursor": { - "type": "string", - "description": "A pagination cursor for retrieving the next set of results,\nif any remain. Provide this value as the `cursor` parameter in a subsequent\nrequest to this endpoint.\n\nSee [Paginating results](https://developer.squareup.com/docs/working-with-apis/pagination) for more information." - } - }, - "example": { - "refunds": [ - { - "additional_recipients": [ - { - "amount_money": { - "amount": 10, - "currency": "USD" - }, - "description": "Application fees", - "location_id": "057P5VYJ4A5X1" - } - ], - "amount_money": { - "amount": 100, - "currency": "USD" - }, - "created_at": "2016-01-20T00:28:18Z", - "id": "b27436d1-7f8e-5610-45c6-417ef71434b4-SW", - "location_id": "18YC4JDH91E1H", - "reason": "some reason", - "status": "APPROVED", - "tender_id": "MtZRYYdDrYNQbOvV7nbuBvMF", - "transaction_id": "KnL67ZIwXCPtzOrqj0HrkxMF" - } - ] - }, - "x-sq-sdk-sample-code": { - "csharp": "/sdk_samples/ListRefunds/ListRefundsResponse.csharp", - "java": "/sdk_samples/ListRefunds/ListRefundsResponse.java", - "javascript": "/sdk_samples/ListRefunds/ListRefundsResponse.javascript", - "php": "/sdk_samples/ListRefunds/ListRefundsResponse.php", - "python": "/sdk_samples/ListRefunds/ListRefundsResponse.python", - "ruby": "/sdk_samples/ListRefunds/ListRefundsResponse.ruby" - } - }, - "ListSitesRequest": { - "type": "object", - "description": "Represents a `ListSites` request.", - "x-release-status": "PUBLIC", - "properties": {} - }, "ListSitesResponse": { "type": "object", "description": "Represents a `ListSites` response. The response can include either `sites` or `errors`.", @@ -29150,24 +34695,6 @@ ] } }, - "ListSubscriptionEventsRequest": { - "type": "object", - "description": "Defines input parameters in a request to the \n[ListSubscriptionEvents](api-endpoint:Subscriptions-ListSubscriptionEvents)\nendpoint.", - "x-release-status": "PUBLIC", - "properties": { - "cursor": { - "type": "string", - "description": "When the total number of resulting subscription events exceeds the limit of a paged response, \nspecify the cursor returned from a preceding response here to fetch the next set of results.\nIf the cursor is unset, the response contains the last page of the results.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "nullable": true - }, - "limit": { - "type": "integer", - "description": "The upper limit on the number of subscription events to return\nin a paged response.", - "minimum": 1, - "nullable": true - } - } - }, "ListSubscriptionEventsResponse": { "type": "object", "description": "Defines output parameters in a response from the\n[ListSubscriptionEvents](api-endpoint:Subscriptions-ListSubscriptionEvents).", @@ -29243,36 +34770,6 @@ ] } }, - "ListTeamMemberBookingProfilesRequest": { - "type": "object", - "x-release-status": "PUBLIC", - "properties": { - "bookable_only": { - "type": "boolean", - "description": "Indicates whether to include only bookable team members in the returned result (`true`) or not (`false`).", - "nullable": true - }, - "limit": { - "type": "integer", - "description": "The maximum number of results to return in a paged response.", - "minimum": 1, - "maximum": 100, - "nullable": true - }, - "cursor": { - "type": "string", - "description": "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.", - "maxLength": 65536, - "nullable": true - }, - "location_id": { - "type": "string", - "description": "Indicates whether to include only team members enabled at the given location in the returned result.", - "maxLength": 32, - "nullable": true - } - } - }, "ListTeamMemberBookingProfilesResponse": { "type": "object", "x-release-status": "PUBLIC", @@ -29313,31 +34810,6 @@ ] } }, - "ListTeamMemberWagesRequest": { - "type": "object", - "description": "A request for a set of `TeamMemberWage` objects.", - "x-release-status": "PUBLIC", - "x-params-example": "?team_member_id=33fJchumvVdJwxV0H6L9\u0026limit=4\u0026cursor=s4R0Z6ecFTzTC4jz8sUDBQTudX3KE313OT9fCt3VUgsXM4sMgED", - "properties": { - "team_member_id": { - "type": "string", - "description": "Filter the returned wages to only those that are associated with the\nspecified team member.", - "nullable": true - }, - "limit": { - "type": "integer", - "description": "The maximum number of `TeamMemberWage` results to return per page. The number can range between\n1 and 200. The default is 200.", - "minimum": 1, - "maximum": 200, - "nullable": true - }, - "cursor": { - "type": "string", - "description": "A pointer to the next page of `EmployeeWage` results to fetch.", - "nullable": true - } - } - }, "ListTeamMemberWagesResponse": { "type": "object", "description": "The response to a request for a set of `TeamMemberWage` objects. The response contains\na set of `TeamMemberWage` objects.", @@ -29412,42 +34884,6 @@ ] } }, - "ListTransactionsRequest": { - "type": "object", - "description": "Defines the query parameters that can be included in\na request to the [ListTransactions](api-endpoint:Transactions-ListTransactions) endpoint.\n\nDeprecated - recommend using [SearchOrders](api-endpoint:Orders-SearchOrders)", - "x-release-status": "DEPRECATED", - "x-params-example": "?begin_time=2016-01-15T00:00:00Z\u0026end_time=2016-01-31T00:00:00Z", - "properties": { - "begin_time": { - "type": "string", - "description": "The beginning of the requested reporting period, in RFC 3339 format.\n\nSee [Date ranges](https://developer.squareup.com/docs/build-basics/working-with-dates) for details on date inclusivity/exclusivity.\n\nDefault value: The current time minus one year.", - "nullable": true - }, - "end_time": { - "type": "string", - "description": "The end of the requested reporting period, in RFC 3339 format.\n\nSee [Date ranges](https://developer.squareup.com/docs/build-basics/working-with-dates) for details on date inclusivity/exclusivity.\n\nDefault value: The current time.", - "nullable": true - }, - "sort_order": { - "$ref": "#/components/schemas/SortOrder", - "description": "The order in which results are listed in the response (`ASC` for\noldest first, `DESC` for newest first).\n\nDefault value: `DESC`\nSee [SortOrder](#type-sortorder) for possible values", - "nullable": true - }, - "cursor": { - "type": "string", - "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this to retrieve the next set of results for your original query.\n\nSee [Paginating results](https://developer.squareup.com/docs/working-with-apis/pagination) for more information.", - "nullable": true - } - }, - "x-sq-sdk-sample-code": { - "csharp": "/sdk_samples/ListTransactions/ListTransactionsRequest.csharp", - "java": "/sdk_samples/ListTransactions/ListTransactionsRequest.java", - "javascript": "/sdk_samples/ListTransactions/ListTransactionsRequest.javascript", - "php": "/sdk_samples/ListTransactions/ListTransactionsRequest.php", - "python": "/sdk_samples/ListTransactions/ListTransactionsRequest.python", - "ruby": "/sdk_samples/ListTransactions/ListTransactionsRequest.ruby" - } - }, "ListTransactionsResponse": { "type": "object", "description": "Defines the fields that are included in the response body of\na request to the [ListTransactions](api-endpoint:Transactions-ListTransactions) endpoint.\n\nOne of `errors` or `transactions` is present in a given response (never both).", @@ -29551,22 +34987,10 @@ "x-sq-sdk-sample-code": { "csharp": "/sdk_samples/ListTransactions/ListTransactionsResponse.csharp", "java": "/sdk_samples/ListTransactions/ListTransactionsResponse.java", - "javascript": "/sdk_samples/ListTransactions/ListTransactionsResponse.javascript", - "php": "/sdk_samples/ListTransactions/ListTransactionsResponse.php", - "python": "/sdk_samples/ListTransactions/ListTransactionsResponse.python", - "ruby": "/sdk_samples/ListTransactions/ListTransactionsResponse.ruby" - } - }, - "ListWebhookEventTypesRequest": { - "type": "object", - "description": "Lists all webhook event types that can be subscribed to.", - "x-release-status": "PUBLIC", - "properties": { - "api_version": { - "type": "string", - "description": "The API version for which to list event types. Setting this field overrides the default version used by the application.", - "nullable": true - } + "javascript": "/sdk_samples/ListTransactions/ListTransactionsResponse.javascript", + "php": "/sdk_samples/ListTransactions/ListTransactionsResponse.php", + "python": "/sdk_samples/ListTransactions/ListTransactionsResponse.python", + "ruby": "/sdk_samples/ListTransactions/ListTransactionsResponse.ruby" } }, "ListWebhookEventTypesResponse": { @@ -29609,36 +35033,6 @@ ] } }, - "ListWebhookSubscriptionsRequest": { - "type": "object", - "description": "Lists all [Subscription](entity:WebhookSubscription)s owned by your application.", - "x-release-status": "PUBLIC", - "properties": { - "cursor": { - "type": "string", - "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this to retrieve the next set of results for your original query.\n\nFor more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).", - "maxLength": 256, - "nullable": true - }, - "include_disabled": { - "type": "boolean", - "description": "Includes disabled [Subscription](entity:WebhookSubscription)s.\nBy default, all enabled [Subscription](entity:WebhookSubscription)s are returned.", - "nullable": true - }, - "sort_order": { - "$ref": "#/components/schemas/SortOrder", - "description": "Sorts the returned list by when the [Subscription](entity:WebhookSubscription) was created with the specified order.\nThis field defaults to ASC.\nSee [SortOrder](#type-sortorder) for possible values", - "nullable": true - }, - "limit": { - "type": "integer", - "description": "The maximum number of results to be returned in a single page.\nIt is possible to receive fewer results than the specified limit on a given page.\nThe default value of 100 is also the maximum allowed value.\n\nDefault: 100", - "minimum": 1, - "maximum": 100, - "nullable": true - } - } - }, "ListWebhookSubscriptionsResponse": { "type": "object", "description": "Defines the fields that are included in the response body of\na request to the [ListWebhookSubscriptions](api-endpoint:WebhookSubscriptions-ListWebhookSubscriptions) endpoint.\n\nNote: if there are errors processing the request, the subscriptions field will not be\npresent.", @@ -29681,24 +35075,6 @@ ] } }, - "ListWorkweekConfigsRequest": { - "type": "object", - "description": "A request for a set of `WorkweekConfig` objects.", - "x-release-status": "PUBLIC", - "x-params-example": "?limit=1\u0026cursor=s4R0Z6ecFTzTC4jz8sUDBQTudX3KE313OT9fCt3VUgsXM4sMgED", - "properties": { - "limit": { - "type": "integer", - "description": "The maximum number of `WorkweekConfigs` results to return per page.", - "nullable": true - }, - "cursor": { - "type": "string", - "description": "A pointer to the next page of `WorkweekConfig` results to fetch.", - "nullable": true - } - } - }, "ListWorkweekConfigsResponse": { "type": "object", "description": "The response to a request for a set of `WorkweekConfig` objects. The response contains\nthe requested `WorkweekConfig` objects and might contain a set of `Error` objects if\nthe request resulted in errors.", @@ -29787,170 +35163,973 @@ }, "merchant_id": { "type": "string", - "description": "The ID of the merchant that owns the location.", - "maxLength": 32, - "readOnly": true + "description": "The ID of the merchant that owns the location.", + "maxLength": 32, + "readOnly": true + }, + "country": { + "$ref": "#/components/schemas/Country", + "description": "The country of the location, in the two-letter format of ISO 3166. For example, `US` or `JP`.\n\nSee [Country](entity:Country) for possible values.\nSee [Country](#type-country) for possible values", + "readOnly": true + }, + "language_code": { + "type": "string", + "description": "The language associated with the location, in\n[BCP 47 format](https://tools.ietf.org/html/bcp47#appendix-A).\nFor more information, see [Language Preferences](https://developer.squareup.com/docs/build-basics/general-considerations/language-preferences).", + "minLength": 2, + "maxLength": 5, + "nullable": true + }, + "currency": { + "$ref": "#/components/schemas/Currency", + "description": "The currency used for all transactions at this location,\nin ISO 4217 format. For example, the currency code for US dollars is `USD`.\nSee [Currency](entity:Currency) for possible values.\nSee [Currency](#type-currency) for possible values", + "readOnly": true + }, + "phone_number": { + "type": "string", + "description": "The phone number of the location. For example, `+1 855-700-6000`.", + "maxLength": 17, + "nullable": true + }, + "business_name": { + "type": "string", + "description": "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.", + "maxLength": 255, + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/LocationType", + "description": "The type of the location.\nSee [LocationType](#type-locationtype) for possible values", + "nullable": true + }, + "website_url": { + "type": "string", + "description": "The website URL of the location. For example, `https://squareup.com`.", + "maxLength": 255, + "nullable": true + }, + "business_hours": { + "$ref": "#/components/schemas/BusinessHours", + "description": "The hours of operation for the location.", + "nullable": true + }, + "business_email": { + "type": "string", + "description": "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.", + "maxLength": 255, + "nullable": true + }, + "description": { + "type": "string", + "description": "The description of the location. For example, `Main Street location`.", + "maxLength": 1024, + "nullable": true + }, + "twitter_username": { + "type": "string", + "description": "The Twitter username of the location without the '@' symbol. For example, `Square`.", + "minLength": 1, + "maxLength": 15, + "nullable": true + }, + "instagram_username": { + "type": "string", + "description": "The Instagram username of the location without the '@' symbol. For example, `square`.", + "minLength": 1, + "maxLength": 30, + "nullable": true + }, + "facebook_url": { + "type": "string", + "description": "The Facebook profile URL of the location. The URL should begin with 'facebook.com/'. For example, `https://www.facebook.com/square`.", + "maxLength": 255, + "nullable": true + }, + "coordinates": { + "$ref": "#/components/schemas/Coordinates", + "description": "The physical coordinates (latitude and longitude) of the location.", + "nullable": true + }, + "logo_url": { + "type": "string", + "description": "The URL of the logo image for the location. When configured in the Seller\nDashboard (Receipts section), the logo appears on transactions (such as receipts and invoices) that Square generates on behalf of the seller.\nThis image should have a roughly square (1:1) aspect ratio and should be at least 200x200 pixels.", + "maxLength": 255, + "readOnly": true + }, + "pos_background_url": { + "type": "string", + "description": "The URL of the Point of Sale background image for the location.", + "maxLength": 255, + "readOnly": true + }, + "mcc": { + "type": "string", + "description": "A four-digit number that describes the kind of goods or services sold at the location.\nThe [merchant category code (MCC)](https://developer.squareup.com/docs/locations-api#initialize-a-merchant-category-code) of the location as standardized by ISO 18245.\nFor example, `5045`, for a location that sells computer goods and software.", + "minLength": 4, + "maxLength": 4, + "x-release-status": "BETA", + "nullable": true + }, + "full_format_logo_url": { + "type": "string", + "description": "The URL of a full-format logo image for the location. When configured in the Seller\nDashboard (Receipts section), the logo appears on transactions (such as receipts and invoices) that Square generates on behalf of the seller.\nThis image can be wider than it is tall and should be at least 1280x648 pixels.", + "readOnly": true + }, + "tax_ids": { + "$ref": "#/components/schemas/TaxIds", + "description": "The tax IDs for this location.", + "readOnly": true, + "x-release-status": "BETA" + } + } + }, + "LocationBookingProfile": { + "type": "object", + "description": "The booking profile of a seller's location, including the location's ID and whether the location is enabled for online booking.", + "x-release-status": "PUBLIC", + "properties": { + "location_id": { + "type": "string", + "description": "The ID of the [location](entity:Location).", + "nullable": true + }, + "booking_site_url": { + "type": "string", + "description": "Url for the online booking site for this location.", + "nullable": true + }, + "online_booking_enabled": { + "type": "boolean", + "description": "Indicates whether the location is enabled for online booking.", + "nullable": true + } + } + }, + "LocationCapability": { + "type": "string", + "enum": [ + "CREDIT_CARD_PROCESSING", + "AUTOMATIC_TRANSFERS", + "UNLINKED_REFUNDS" + ], + "x-enum-elements": [ + { + "name": "CREDIT_CARD_PROCESSING", + "description": "The capability to process credit card transactions with Square." + }, + { + "name": "AUTOMATIC_TRANSFERS", + "description": "The capability to receive automatic transfers from Square." + }, + { + "name": "UNLINKED_REFUNDS", + "description": "The capability to process unlinked refunds with Square." + } + ], + "description": "The capabilities a location might have.", + "x-release-status": "PUBLIC" + }, + "LocationCreatedEvent": { + "type": "object", + "description": "Published when a [Location](entity:Location) is created.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "location_id": { + "type": "string", + "description": "The ID of the [Location](entity:Location) associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"location.created\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/LocationCreatedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-02-06T21:27:34.308Z", + "data": { + "id": "S8GWD5DBJ3HF3", + "type": "Location" + }, + "event_id": "de45d351-8ad2-400a-97af-e9f89da3d19d", + "location_id": "S8GWD5DBJ3HF3", + "merchant_id": "6SSW7HV8K2ST5", + "type": "location.created" + }, + "x-webhook": { + "event": "location.created", + "scopes": [ + "MERCHANT_PROFILE_READ" + ] + }, + "x-api": "#/components/x-apis/Locations", + "x-since": "2020-10-28" + }, + "LocationCreatedEventData": { + "type": "object", + "x-release-status": "BETA", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected object’s type, `\"location\"`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the updated [Location](entity:Location)." + } + } + }, + "LocationCustomAttributeDefinitionOwnedCreatedEvent": { + "type": "object", + "description": "Published when a location [custom attribute definition](entity:CustomAttributeDefinition)\nis created by the subscribing application.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"location.custom_attribute_definition.owned.created\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true + } + }, + "example": { + "created_at": "2022-11-26T21:40:49.943Z", + "data": { + "id": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:region-located", + "object": { + "created_at": "2022-11-26T21:40:49Z", + "description": "What region the location is in.", + "key": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:region-located", + "name": "Region Location", + "schema": { + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + }, + "updated_at": "2022-11-26T21:40:49Z", + "version": 1, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute_definition" + }, + "event_id": "347ab320-c0ba-48f5-959a-4e147b9aefcf", + "merchant_id": "DM7VKY8Q63GNP", + "type": "location.custom_attribute_definition.owned.created" + }, + "x-webhook": { + "event": "location.custom_attribute_definition.owned.created", + "scopes": [ + "MERCHANT_PROFILE_READ" + ] + }, + "x-api": "#/components/x-apis/LocationCustomAttributes", + "x-since": "2023-01-19" + }, + "LocationCustomAttributeDefinitionOwnedDeletedEvent": { + "type": "object", + "description": "Published when a location [custom attribute definition](entity:CustomAttributeDefinition) \ncreated by the subscribing application is deleted. A custom attribute definition can only be deleted by \nthe application that created it.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"location.custom_attribute_definition.owned.deleted\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true + } + }, + "example": { + "created_at": "2022-11-27T01:22:29Z", + "data": { + "deleted": true, + "id": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:region-located", + "object": { + "created_at": "2022-11-26T21:40:49Z", + "description": "What region the location is in.", + "key": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:region-located", + "name": "Region Location", + "schema": { + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + }, + "updated_at": "2022-11-27T11:31:29Z", + "version": 3, + "visibility": "VISIBILITY_READ_ONLY" + }, + "type": "custom_attribute_definition" + }, + "event_id": "49363646-7ae7-49b5-aaa0-296610883c61", + "merchant_id": "DM7VKY8Q63GNP", + "type": "location.custom_attribute_definition.owned.deleted" + }, + "x-webhook": { + "event": "location.custom_attribute_definition.owned.deleted", + "scopes": [ + "MERCHANT_PROFILE_READ" + ] + }, + "x-api": "#/components/x-apis/LocationCustomAttributes", + "x-since": "2023-01-19" + }, + "LocationCustomAttributeDefinitionOwnedUpdatedEvent": { + "type": "object", + "description": "Published when a location [custom attribute definition](entity:CustomAttributeDefinition) \ncreated by the subscribing application is updated. A custom attribute definition can only be updated \nby the application that created it.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"location.custom_attribute_definition.owned.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true + } + }, + "example": { + "created_at": "2022-11-26T01:22:29Z", + "data": { + "id": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:region-located", + "object": { + "created_at": "2022-11-26T21:57:39Z", + "description": "What region the location is in.", + "key": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:region-located", + "name": "Operating Region", + "schema": { + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + }, + "updated_at": "2022-11-26T01:22:29Z", + "version": 2, + "visibility": "VISIBILITY_READ_ONLY" + }, + "type": "custom_attribute_definition" + }, + "event_id": "d914e6ef-9e37-4bca-a663-ecc55f5d98d3", + "merchant_id": "DM7VKY8Q63GNP", + "type": "location.custom_attribute_definition.owned.updated" + }, + "x-webhook": { + "event": "location.custom_attribute_definition.owned.updated", + "scopes": [ + "MERCHANT_PROFILE_READ" + ] + }, + "x-api": "#/components/x-apis/LocationCustomAttributes", + "x-since": "2023-01-19" + }, + "LocationCustomAttributeDefinitionVisibleCreatedEvent": { + "type": "object", + "description": "Published when a location [custom attribute definition](entity:CustomAttributeDefinition)\nthat is visible to the subscribing application is created. A notification is sent when your application \ncreates a custom attribute definition or another application creates a custom attribute definition whose\n`visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"location.custom_attribute_definition.visible.created\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true + } + }, + "example": { + "created_at": "2022-04-21T21:40:49.943Z", + "data": { + "id": "sq0idp-BushoY39o1X-GPxRRUWc0A:square-ft", + "object": { + "created_at": "2022-04-21T21:40:49Z", + "description": "Square footage of the facility.", + "key": "sq0idp-BushoY39o1X-GPxRRUWc0A:square-ft", + "name": "Square Footage", + "schema": { + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number" + }, + "updated_at": "2022-04-21T21:40:49Z", + "version": 1, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute_definition" + }, + "event_id": "f679dc4f-3619-4764-a4de-94a54735cd32", + "merchant_id": "DM7VKY8Q63GNP", + "type": "location.custom_attribute_definition.visible.created" + }, + "x-webhook": { + "event": "location.custom_attribute_definition.visible.created", + "scopes": [ + "MERCHANT_PROFILE_READ" + ] + }, + "x-api": "#/components/x-apis/LocationCustomAttributes", + "x-since": "2023-01-19" + }, + "LocationCustomAttributeDefinitionVisibleDeletedEvent": { + "type": "object", + "description": "Published when a location [custom attribute definition](entity:CustomAttributeDefinition) \nthat is visible to the subscribing application is deleted. A custom attribute definition can only \nbe deleted by the application that created it. A notification is sent when your application deletes \na custom attribute definition or when another application deletes a custom attribute definition whose \n`visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"location.custom_attribute_definition.visible.deleted\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true + } + }, + "example": { + "created_at": "2022-04-26T01:22:29Z", + "data": { + "deleted": true, + "id": "sq0idp-BushoY39o1X-GPxRRUWc0A:square-ft", + "object": { + "created_at": "2022-04-21T21:40:49Z", + "description": "Square footage of the facility.", + "key": "sq0idp-BushoY39o1X-GPxRRUWc0A:square-ft", + "name": "Facility Square Footage", + "schema": { + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number" + }, + "updated_at": "2022-04-27T11:31:29Z", + "version": 3, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute_definition" + }, + "event_id": "81c10a07-c329-4943-af20-7d70a300c7e6", + "merchant_id": "DM7VKY8Q63GNP", + "type": "location.custom_attribute_definition.visible.deleted" + }, + "x-webhook": { + "event": "location.custom_attribute_definition.visible.deleted", + "scopes": [ + "MERCHANT_PROFILE_READ" + ] + }, + "x-api": "#/components/x-apis/LocationCustomAttributes", + "x-since": "2023-01-19" + }, + "LocationCustomAttributeDefinitionVisibleUpdatedEvent": { + "type": "object", + "description": "Published when a location [custom attribute definition](entity:CustomAttributeDefinition) \nthat is visible to the subscribing application is updated. A custom attribute definition can only be updated\nby the application that created it. A notification is sent when your application updates a custom attribute \ndefinition or when another application updates a custom attribute definition whose `visibility` is \n`VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"location.custom_attribute_definition.visible.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true + } + }, + "example": { + "created_at": "2022-04-26T01:22:29Z", + "data": { + "id": "sq0idp-BushoY39o1X-GPxRRUWc0A:square-ft", + "object": { + "created_at": "2022-04-21T21:57:39Z", + "description": "Square footage of the facility.", + "key": "sq0idp-BushoY39o1X-GPxRRUWc0A:square-ft", + "name": "Facility Square Footage", + "schema": { + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number" + }, + "updated_at": "2022-04-26T01:22:29Z", + "version": 2, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute_definition" + }, + "event_id": "ae376c21-d360-4694-96c7-1b27830f07d7", + "merchant_id": "DM7VKY8Q63GNP", + "type": "location.custom_attribute_definition.visible.updated" + }, + "x-webhook": { + "event": "location.custom_attribute_definition.visible.updated", + "scopes": [ + "MERCHANT_PROFILE_READ" + ] + }, + "x-api": "#/components/x-apis/LocationCustomAttributes", + "x-since": "2023-01-19" + }, + "LocationCustomAttributeOwnedDeletedEvent": { + "type": "object", + "description": "Published when a location [custom attribute](entity:CustomAttribute) \nowned by the subscribing application is deleted. Custom attributes are owned by the\napplication that created the corresponding [custom attribute definition](entity:CustomAttributeDefinition).\nCustom attributes whose `visibility` is `VISIBILITY_READ_WRITE_VALUES` can be deleted by any application.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"location.custom_attribute.owned.deleted\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true + } + }, + "example": { + "created_at": "2022-11-26T21:40:54Z", + "data": { + "deleted": true, + "id": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-shampoo:LOCATION:0V3BVT5RHZ835", + "object": { + "created_at": "2022-11-26T21:40:54Z", + "key": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:region-located", + "updated_at": "2022-11-27T12:40:54Z", + "value": "PNW", + "version": 2, + "visibility": "VISIBILITY_READ_ONLY" + }, + "type": "custom_attribute" + }, + "event_id": "473795bf-6ce4-4595-88ae-a5e7cc690c02", + "merchant_id": "DM7VKY8Q63GNP", + "type": "location.custom_attribute.owned.deleted" + }, + "x-webhook": { + "event": "location.custom_attribute.owned.deleted", + "scopes": [ + "MERCHANT_PROFILE_READ" + ] + }, + "x-api": "#/components/x-apis/LocationCustomAttributes", + "x-since": "2023-01-19" + }, + "LocationCustomAttributeOwnedUpdatedEvent": { + "type": "object", + "description": "Published when a location [custom attribute](entity:CustomAttribute) owned by the\nsubscribing application is created or updated. Custom attributes are owned by the application that created\nthe corresponding [custom attribute definition](entity:CustomAttributeDefinition). Custom attributes whose\n`visibility` is `VISIBILITY_READ_WRITE_VALUES` can be created or updated by any application.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true }, - "country": { - "$ref": "#/components/schemas/Country", - "description": "The country of the location, in the two-letter format of ISO 3166. For example, `US` or `JP`.\n\nSee [Country](entity:Country) for possible values.\nSee [Country](#type-country) for possible values", - "readOnly": true + "type": { + "type": "string", + "description": "The type of this event. The value is `\"location.custom_attribute.owned.updated\"`.", + "nullable": true }, - "language_code": { + "event_id": { "type": "string", - "description": "The language associated with the location, in\n[BCP 47 format](https://tools.ietf.org/html/bcp47#appendix-A).\nFor more information, see [Language Preferences](https://developer.squareup.com/docs/build-basics/general-considerations/language-preferences).", - "minLength": 2, - "maxLength": 5, + "description": "A unique ID for the event notification.", "nullable": true }, - "currency": { - "$ref": "#/components/schemas/Currency", - "description": "The currency used for all transactions at this location,\nin ISO 4217 format. For example, the currency code for US dollars is `USD`.\nSee [Currency](entity:Currency) for possible values.\nSee [Currency](#type-currency) for possible values", + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", "readOnly": true }, - "phone_number": { - "type": "string", - "description": "The phone number of the location. For example, `+1 855-700-6000`.", - "maxLength": 17, + "data": { + "$ref": "#/components/schemas/CustomAttributeEventData", + "description": "The data associated with the event that triggered the event notification.", "nullable": true + } + }, + "example": { + "created_at": "2022-11-26T21:40:54Z", + "data": { + "id": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:favorite-shampoo:LOCATION:0V3BVT5RHZ835", + "object": { + "created_at": "2022-11-26T21:40:54Z", + "key": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:region-located", + "updated_at": "2022-11-26T21:40:54Z", + "value": "PNW", + "version": 1, + "visibility": "VISIBILITY_READ_ONLY" + }, + "type": "custom_attribute" }, - "business_name": { + "event_id": "e26ca6f2-97f8-426a-b4bf-873044617e94", + "merchant_id": "DM7VKY8Q63GNP", + "type": "location.custom_attribute.owned.updated" + }, + "x-webhook": { + "event": "location.custom_attribute.owned.updated", + "scopes": [ + "MERCHANT_PROFILE_READ" + ] + }, + "x-api": "#/components/x-apis/LocationCustomAttributes", + "x-since": "2023-01-19" + }, + "LocationCustomAttributeVisibleDeletedEvent": { + "type": "object", + "description": "Published when a location [custom attribute](entity:CustomAttribute) that is visible to the\nsubscribing application is deleted. A notification is sent when:\n- Your application deletes a custom attribute owned by your application, regardless of the `visibility` setting.\n- Any application deletes a custom attribute whose `visibility` is `VISIBILITY_READ_ONLY`\nor `VISIBILITY_READ_WRITE_VALUES`.\n\nCustom attributes set to `VISIBILITY_READ_WRITE_VALUES` can be deleted by any application, but those set to\n`VISIBILITY_READ_ONLY` or `VISIBILITY_HIDDEN` can only be deleted by the owner. Custom attributes are owned\nby the application that created the corresponding [custom attribute definition](entity:CustomAttributeDefinition).", + "x-release-status": "BETA", + "properties": { + "merchant_id": { "type": "string", - "description": "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.", - "maxLength": 255, + "description": "The ID of the seller associated with the event that triggered the event notification.", "nullable": true }, "type": { - "$ref": "#/components/schemas/LocationType", - "description": "The type of the location.\nSee [LocationType](#type-locationtype) for possible values", - "nullable": true - }, - "website_url": { "type": "string", - "description": "The website URL of the location. For example, `https://squareup.com`.", - "maxLength": 255, + "description": "The type of this event. The value is `\"location.custom_attribute.visible.deleted\"`.", "nullable": true }, - "business_hours": { - "$ref": "#/components/schemas/BusinessHours", - "description": "The hours of operation for the location.", + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", "nullable": true }, - "business_email": { + "created_at": { "type": "string", - "description": "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.", - "maxLength": 255, + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeEventData", + "description": "The data associated with the event that triggered the event notification.", "nullable": true + } + }, + "example": { + "created_at": "2022-11-26T01:22:29Z", + "data": { + "deleted": true, + "id": "sq0idp-BushoY39o1X-GPxRRUWc0A:square-ft:LOCATION:0V3BVT5RHZ835", + "object": { + "created_at": "2022-11-21T21:58:59Z", + "key": "sq0idp-BushoY39o1X-GPxRRUWc0A:square-ft", + "updated_at": "2022-11-27T11:31:29Z", + "value": "2718", + "version": 3, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute" }, - "description": { + "event_id": "18ef5adc-2efc-4ad9-9b1a-b274a607da3e", + "merchant_id": "DM7VKY8Q63GNP", + "type": "location.custom_attribute.visible.deleted" + }, + "x-webhook": { + "event": "location.custom_attribute.visible.deleted", + "scopes": [ + "MERCHANT_PROFILE_READ" + ] + }, + "x-api": "#/components/x-apis/LocationCustomAttributes", + "x-since": "2023-01-19" + }, + "LocationCustomAttributeVisibleUpdatedEvent": { + "type": "object", + "description": "Published when a location [custom attribute](entity:CustomAttribute) that is visible\nto the subscribing application is created or updated. A notification is sent when:\n- Your application creates or updates a custom attribute owned by your application, regardless of the `visibility` setting.\n- Any application creates or updates a custom attribute whose `visibility` is `VISIBILITY_READ_ONLY`\nor `VISIBILITY_READ_WRITE_VALUES`.\n\nCustom attributes set to `VISIBILITY_READ_WRITE_VALUES` can be created or updated by any application, but those set to\n`VISIBILITY_READ_ONLY` or `VISIBILITY_HIDDEN` can only be created or updated by the owner. Custom attributes are owned\nby the application that created the corresponding [custom attribute definition](entity:CustomAttributeDefinition).", + "x-release-status": "BETA", + "properties": { + "merchant_id": { "type": "string", - "description": "The description of the location. For example, `Main Street location`.", - "maxLength": 1024, + "description": "The ID of the seller associated with the event that triggered the event notification.", "nullable": true }, - "twitter_username": { + "type": { "type": "string", - "description": "The Twitter username of the location without the '@' symbol. For example, `Square`.", - "minLength": 1, - "maxLength": 15, + "description": "The type of this event. The value is `\"location.custom_attribute.visible.updated\"`.", "nullable": true }, - "instagram_username": { + "event_id": { "type": "string", - "description": "The Instagram username of the location without the '@' symbol. For example, `square`.", - "minLength": 1, - "maxLength": 30, + "description": "A unique ID for the event notification.", "nullable": true }, - "facebook_url": { + "created_at": { "type": "string", - "description": "The Facebook profile URL of the location. The URL should begin with 'facebook.com/'. For example, `https://www.facebook.com/square`.", - "maxLength": 255, - "nullable": true + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true }, - "coordinates": { - "$ref": "#/components/schemas/Coordinates", - "description": "The physical coordinates (latitude and longitude) of the location.", + "data": { + "$ref": "#/components/schemas/CustomAttributeEventData", + "description": "The data associated with the event that triggered the event notification.", "nullable": true + } + }, + "example": { + "created_at": "2022-11-26T01:22:29Z", + "data": { + "id": "sq0idp-BushoY39o1X-GPxRRUWc0A:square-ft:LOCATION:0V3BVT5RHZ835", + "object": { + "created_at": "2022-11-21T21:40:54Z", + "key": "sq0idp-BushoY39o1X-GPxRRUWc0A:square-ft", + "updated_at": "2022-11-26T01:22:29Z", + "value": "2718", + "version": 2, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute" }, - "logo_url": { + "event_id": "1cc2925c-f6e2-4fb6-a597-07c198de59e1", + "merchant_id": "DM7VKY8Q63GNP", + "type": "location.custom_attribute.visible.updated" + }, + "x-webhook": { + "event": "location.custom_attribute.visible.updated", + "scopes": [ + "MERCHANT_PROFILE_READ" + ] + }, + "x-api": "#/components/x-apis/LocationCustomAttributes", + "x-since": "2023-01-19" + }, + "LocationSettingsUpdatedEvent": { + "type": "object", + "description": "Published when online checkout location settings are updated", + "x-release-status": "BETA", + "properties": { + "merchant_id": { "type": "string", - "description": "The URL of the logo image for the location. When configured in the Seller\nDashboard (Receipts section), the logo appears on transactions (such as receipts and invoices) that Square generates on behalf of the seller.\nThis image should have a roughly square (1:1) aspect ratio and should be at least 200x200 pixels.", - "maxLength": 255, - "readOnly": true + "description": "The ID of the target merchant associated with the event.", + "nullable": true }, - "pos_background_url": { + "type": { "type": "string", - "description": "The URL of the Point of Sale background image for the location.", - "maxLength": 255, - "readOnly": true + "description": "The type of event this represents, `\"online_checkout.location_settings.updated\"`.", + "nullable": true }, - "mcc": { + "event_id": { "type": "string", - "description": "A four-digit number that describes the kind of goods or services sold at the location.\nThe [merchant category code (MCC)](https://developer.squareup.com/docs/locations-api#initialize-a-merchant-category-code) of the location as standardized by ISO 18245.\nFor example, `5045`, for a location that sells computer goods and software.", - "minLength": 4, - "maxLength": 4, - "x-release-status": "BETA", + "description": "A unique ID for the event.", "nullable": true }, - "full_format_logo_url": { + "created_at": { "type": "string", - "description": "The URL of a full-format logo image for the location. When configured in the Seller\nDashboard (Receipts section), the logo appears on transactions (such as receipts and invoices) that Square generates on behalf of the seller.\nThis image can be wider than it is tall and should be at least 1280x648 pixels.", + "description": "RFC 3339 timestamp of when the event was created.", "readOnly": true }, - "tax_ids": { - "$ref": "#/components/schemas/TaxIds", - "description": "The tax IDs for this location.", - "readOnly": true, - "x-release-status": "BETA" + "data": { + "$ref": "#/components/schemas/LocationSettingsUpdatedEventData", + "description": "Data associated with the event.", + "nullable": true } - } + }, + "example": { + "created_at": "2023-11-09T18:05:02.078121868Z", + "data": { + "id": "LJSYDQDQMDFNQ", + "object": { + "location_settings": { + "branding": { + "button_color": "#006aff", + "button_shape": "SQUARED", + "header_type": "FULL_WIDTH_LOGO" + }, + "coupons": { + "enabled": true + }, + "customer_notes_enabled": true, + "location_id": "LJSYDQDQMDFNQ", + "tipping": { + "default_percent": 15, + "default_smart_tip": { + "amount": 100, + "currency": "USD" + }, + "percentages": [ + 15, + 20, + 25 + ], + "smart_tipping_enabled": true, + "smart_tips": [ + { + "amount": 100, + "currency": "USD" + }, + { + "amount": 200, + "currency": "USD" + }, + { + "amount": 300, + "currency": "USD" + } + ] + }, + "updated_at": "2023-11-09 18:05:02 +0000 UTC" + } + }, + "type": "location_settings" + }, + "event_id": "eda83745-f27e-3812-a368-b61665e466f5", + "merchant_id": "MLX0WMXAER48M", + "type": "online_checkout.location_settings.updated" + }, + "x-webhook": { + "event": "online_checkout.location_settings.updated", + "scopes": [ + "MERCHANT_PROFILE_WRITE", + "MERCHANT_PROFILE_READ" + ] + }, + "x-api": "#/components/x-apis/Checkout", + "x-since": "2023-12-13" }, - "LocationBookingProfile": { + "LocationSettingsUpdatedEventData": { "type": "object", - "description": "The booking profile of a seller's location, including the location's ID and whether the location is enabled for online booking.", - "x-release-status": "PUBLIC", + "x-release-status": "BETA", "properties": { - "location_id": { + "type": { "type": "string", - "description": "The ID of the [location](entity:Location).", + "description": "Name of the updated object’s type, `\"online_checkout.location_settings\"`.", "nullable": true }, - "booking_site_url": { + "id": { "type": "string", - "description": "Url for the online booking site for this location.", - "nullable": true + "description": "ID of the updated location settings." }, - "online_booking_enabled": { - "type": "boolean", - "description": "Indicates whether the location is enabled for online booking.", + "object": { + "$ref": "#/components/schemas/LocationSettingsUpdatedEventObject", + "description": "An object containing the updated location settings.", "nullable": true } } }, - "LocationCapability": { - "type": "string", - "enum": [ - "CREDIT_CARD_PROCESSING", - "AUTOMATIC_TRANSFERS", - "UNLINKED_REFUNDS" - ], - "x-enum-elements": [ - { - "name": "CREDIT_CARD_PROCESSING", - "description": "The capability to process credit card transactions with Square." - }, - { - "name": "AUTOMATIC_TRANSFERS", - "description": "The capability to receive automatic transfers from Square." - }, - { - "name": "UNLINKED_REFUNDS", - "description": "The capability to process unlinked refunds with Square." + "LocationSettingsUpdatedEventObject": { + "type": "object", + "x-release-status": "BETA", + "properties": { + "location_settings": { + "$ref": "#/components/schemas/CheckoutLocationSettings", + "description": "The updated location settings.", + "nullable": true } - ], - "description": "The capabilities a location might have.", - "x-release-status": "PUBLIC" + } }, "LocationStatus": { "type": "string", @@ -29990,6 +36169,77 @@ "description": "A location's type.", "x-release-status": "PUBLIC" }, + "LocationUpdatedEvent": { + "type": "object", + "description": "Published when a [Location](entity:Location) is updated.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "location_id": { + "type": "string", + "description": "The ID of the [Location](entity:Location) associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"location.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/LocationUpdatedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-02-06T21:27:34.308Z", + "data": { + "id": "S8GWD5DBJ3HF3", + "type": "Location" + }, + "event_id": "de45d351-8ad2-400a-97af-e9f89da3d19d", + "location_id": "S8GWD5DBJ3HF3", + "merchant_id": "6SSW7HV8K2ST5", + "type": "location.updated" + }, + "x-webhook": { + "event": "location.updated", + "scopes": [ + "MERCHANT_PROFILE_READ" + ] + }, + "x-api": "#/components/x-apis/Locations", + "x-since": "2020-10-28" + }, + "LocationUpdatedEventData": { + "type": "object", + "x-release-status": "BETA", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected object’s type, `\"location\"`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the updated [Location](entity:Location)." + } + } + }, "LoyaltyAccount": { "type": "object", "description": "Describes a loyalty account in a [loyalty program](entity:LoyaltyProgram). For more information, see\n[Create and Retrieve Loyalty Accounts](https://developer.squareup.com/docs/loyalty-api/loyalty-accounts).", @@ -30055,6 +36305,204 @@ } } }, + "LoyaltyAccountCreatedEvent": { + "type": "object", + "description": "Published when a [loyalty account](entity:LoyaltyAccount) is created.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the Square seller associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event. For this event, the value is `loyalty.account.created`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "The unique ID for the event, which is used for\n[idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices).", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/LoyaltyAccountCreatedEventData", + "description": "The data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-05-13T01:41:35.157Z", + "data": { + "id": "ba2f8ab6-e131-46d9-9882-17714404eb49", + "object": { + "loyalty_account": { + "balance": 0, + "created_at": "2020-05-13T01:41:34Z", + "customer_id": "QPTXM8PQNX3Q726ZYHPMNP46XC", + "enrolled_at": "2020-05-13T01:41:34Z", + "id": "ba2f8ab6-e131-46d9-9882-17714404eb49", + "lifetime_points": 0, + "mapping": { + "created_at": "2020-05-13T01:41:34Z", + "id": "664c22ba-9460-45a5-8917-381ae72dcfdc", + "phone_number": "+14155551234" + }, + "program_id": "5216e8b2-d43e-41e2-9ed8-eccf3e892aef", + "updated_at": "2020-05-13T01:41:34Z" + } + }, + "type": "loyalty_account" + }, + "event_id": "875f2038-6015-492e-9f29-d040b3809e49", + "merchant_id": "C337NFWQT2A6W", + "type": "loyalty.account.created" + }, + "x-webhook": { + "event": "loyalty.account.created", + "scopes": [ + "LOYALTY_READ" + ] + }, + "x-api": "#/components/x-apis/Loyalty", + "x-since": "2020-05-28" + }, + "LoyaltyAccountCreatedEventData": { + "type": "object", + "description": "The data associated with a `loyalty.account.created` event.", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "The type of object affected by the event. For this event, the value is `loyalty_account`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "The ID of the affected loyalty account." + }, + "object": { + "$ref": "#/components/schemas/LoyaltyAccountCreatedEventObject", + "description": "An object that contains the new loyalty account.", + "nullable": true + } + } + }, + "LoyaltyAccountCreatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "loyalty_account": { + "$ref": "#/components/schemas/LoyaltyAccount", + "description": "The loyalty account that was created.", + "nullable": true + } + } + }, + "LoyaltyAccountDeletedEvent": { + "type": "object", + "description": "Published when a [loyalty account](entity:LoyaltyAccount) is deleted.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the Square seller associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event. For this event, the value is `loyalty.account.deleted`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "The unique ID for the event, which is used for\n[idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices).", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/LoyaltyAccountDeletedEventData", + "description": "The data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-05-13T01:50:45.656Z", + "data": { + "id": "ba2f8ab6-e131-46d9-9882-17714404eb49", + "object": { + "loyalty_account": { + "balance": 10, + "created_at": "2020-05-13T01:41:34Z", + "customer_id": "QPTXM8PQNX3Q726ZYHPMNP46XC", + "enrolled_at": "2020-05-13T01:41:34Z", + "id": "ba2f8ab6-e131-46d9-9882-17714404eb49", + "lifetime_points": 10, + "mapping": { + "created_at": "2020-05-13T01:41:34Z", + "id": "664c22ba-9460-45a5-8917-381ae72dcfdc", + "phone_number": "+14155551234" + }, + "program_id": "5216e8b2-d43e-41e2-9ed8-eccf3e892aef", + "updated_at": "2020-05-13T01:41:34Z" + } + }, + "type": "loyalty_account" + }, + "event_id": "7c365846-a64b-40ba-a406-8a0354a63d79", + "merchant_id": "C337NFWQT2A6W", + "type": "loyalty.account.deleted" + }, + "x-webhook": { + "event": "loyalty.account.deleted", + "scopes": [ + "LOYALTY_READ" + ] + }, + "x-api": "#/components/x-apis/Loyalty", + "x-since": "2020-05-28" + }, + "LoyaltyAccountDeletedEventData": { + "type": "object", + "description": "The data associated with a `loyalty.account.deleted` event.", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "The type of object affected by the event. For this event, the value is `loyalty_account`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "The ID of the affected loyalty account." + }, + "object": { + "$ref": "#/components/schemas/LoyaltyAccountDeletedEventObject", + "description": "An object that contains the loyalty account that was deleted.", + "nullable": true + } + } + }, + "LoyaltyAccountDeletedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "loyalty_account": { + "$ref": "#/components/schemas/LoyaltyAccount", + "description": "The loyalty account that was deleted.", + "nullable": true + } + } + }, "LoyaltyAccountExpiringPointDeadline": { "type": "object", "description": "Represents a set of points for a loyalty account that are scheduled to expire on a specific date.", @@ -30112,6 +36560,105 @@ "description": "The type of mapping.", "x-release-status": "PUBLIC" }, + "LoyaltyAccountUpdatedEvent": { + "type": "object", + "description": "Published when a [loyalty account](entity:LoyaltyAccount) is updated.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the Square seller associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event. For this event, the value is `loyalty.account.updated`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "The unique ID for the event, which is used for\n[idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices).", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/LoyaltyAccountUpdatedEventData", + "description": "The data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-05-13T01:46:58.794Z", + "data": { + "id": "ba2f8ab6-e131-46d9-9882-17714404eb49", + "object": { + "loyalty_account": { + "balance": 10, + "created_at": "2020-05-13T01:41:34Z", + "customer_id": "QPTXM8PQNX3Q726ZYHPMNP46XC", + "enrolled_at": "2020-05-13T01:41:34Z", + "id": "ba2f8ab6-e131-46d9-9882-17714404eb49", + "lifetime_points": 10, + "mapping": { + "created_at": "2020-05-13T01:41:34Z", + "id": "664c22ba-9460-45a5-8917-381ae72dcfdc", + "phone_number": "+14155551234" + }, + "program_id": "5216e8b2-d43e-41e2-9ed8-eccf3e892aef", + "updated_at": "2020-05-13T01:41:34Z" + } + }, + "type": "loyalty_account" + }, + "event_id": "3ca83966-230e-4a61-8484-22ea749ea765", + "merchant_id": "C337NFWQT2A6W", + "type": "loyalty.account.updated" + }, + "x-webhook": { + "event": "loyalty.account.updated", + "scopes": [ + "LOYALTY_READ" + ] + }, + "x-api": "#/components/x-apis/Loyalty", + "x-since": "2020-05-28" + }, + "LoyaltyAccountUpdatedEventData": { + "type": "object", + "description": "The data associated with a `loyalty.account.updated` event.", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "The type of object affected by the event. For this event, the value is `loyalty_account`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "The ID of the affected loyalty account." + }, + "object": { + "$ref": "#/components/schemas/LoyaltyAccountUpdatedEventObject", + "description": "An object that contains the loyalty account that was updated.", + "nullable": true + } + } + }, + "LoyaltyAccountUpdatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "loyalty_account": { + "$ref": "#/components/schemas/LoyaltyAccount", + "description": "The loyalty account that was updated.", + "nullable": true + } + } + }, "LoyaltyEvent": { "type": "object", "description": "Provides information about a loyalty event. \nFor more information, see [Search for Balance-Changing Loyalty Events](https://developer.squareup.com/docs/loyalty-api/loyalty-events).", @@ -30314,6 +36861,102 @@ } } }, + "LoyaltyEventCreatedEvent": { + "type": "object", + "description": "Published when a [loyalty event](entity:LoyaltyEvent) is created.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the Square seller associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event. For this event, the value is `loyalty.event.created`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "The unique ID for the event, which is used for\n[idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices).", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/LoyaltyEventCreatedEventData", + "description": "The data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-05-13T01:46:58.783Z", + "data": { + "id": "iirpaae81f66e-a7ea-4fcf-a04f-f0d29fdc60e6", + "object": { + "loyalty_event": { + "adjust_points": { + "loyalty_program_id": "5216e8b2-d43e-41e2-9ed8-eccf3e892aef", + "points": 10 + }, + "created_at": "2020-05-13T01:46:58Z", + "id": "d0bd89a5-3d04-389e-a54b-4e509658fe41", + "location_id": "2Z3BMKQB939X0", + "loyalty_account_id": "ba2f8ab6-e131-46d9-9882-17714404eb49", + "source": "SQUARE", + "type": "ADJUST_POINTS" + } + }, + "type": "loyalty_event" + }, + "event_id": "f151e2c6-9340-4cca-9d37-1bcd1c2d6a0d", + "merchant_id": "C337NFWQT2A6W", + "type": "loyalty.event.created" + }, + "x-webhook": { + "event": "loyalty.event.created", + "scopes": [ + "LOYALTY_READ" + ] + }, + "x-api": "#/components/x-apis/Loyalty", + "x-since": "2020-05-28" + }, + "LoyaltyEventCreatedEventData": { + "type": "object", + "description": "The data associated with a `loyalty.event.created` event.", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "The type of object affected by the event. For this event, the value is `loyalty_event`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the affected loyalty event." + }, + "object": { + "$ref": "#/components/schemas/LoyaltyEventCreatedEventObject", + "description": "An object that contains the new loyalty event.", + "nullable": true + } + } + }, + "LoyaltyEventCreatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "loyalty_event": { + "$ref": "#/components/schemas/LoyaltyEvent", + "description": "The loyalty event that was created.", + "nullable": true + } + } + }, "LoyaltyEventDateTimeFilter": { "type": "object", "description": "Filter events by date time range.", @@ -30839,107 +37482,153 @@ } } }, - "LoyaltyProgramExpirationPolicy": { + "LoyaltyProgramCreatedEvent": { "type": "object", - "description": "Describes when the loyalty program expires.", + "description": "Published when a [loyalty program](entity:LoyaltyProgram) is created.", "x-release-status": "PUBLIC", - "required": [ - "expiration_duration" - ], "properties": { - "expiration_duration": { + "merchant_id": { "type": "string", - "description": "The number of months before points expire, in `P[n]M` RFC 3339 duration format. For example, a value of `P12M` represents a duration of 12 months. \nPoints are valid through the last day of the month in which they are scheduled to expire. For example, with a `P12M` duration, points earned on July 6, 2020 expire on August 1, 2021.", - "minLength": 1 - } - } - }, - "LoyaltyProgramRewardDefinition": { - "type": "object", - "description": "Provides details about the reward tier discount. DEPRECATED at version 2020-12-16. Discount details\nare now defined using a catalog pricing rule and other catalog objects. For more information, see\n[Getting discount details for a reward tier](https://developer.squareup.com/docs/loyalty-api/loyalty-rewards#get-discount-details).", - "x-release-status": "DEPRECATED", - "required": [ - "scope", - "discount_type" - ], - "properties": { - "scope": { - "$ref": "#/components/schemas/LoyaltyProgramRewardDefinitionScope", - "description": "Indicates the scope of the reward tier. DEPRECATED at version 2020-12-16. You can find this information in the\n`product_set_data` field of the `PRODUCT_SET` catalog object referenced by the pricing rule. For `ORDER` scopes,\n`all_products` is true. For `ITEM_VARIATION` or `CATEGORY` scopes, `product_ids_any` is a list of\ncatalog object IDs of the given type.\nSee [LoyaltyProgramRewardDefinitionScope](#type-loyaltyprogramrewarddefinitionscope) for possible values", - "readOnly": true + "description": "The ID of the Square seller associated with the event.", + "nullable": true }, - "discount_type": { - "$ref": "#/components/schemas/LoyaltyProgramRewardDefinitionType", - "description": "The type of discount the reward tier offers. DEPRECATED at version 2020-12-16. You can find this information\nin the `discount_data.discount_type` field of the `DISCOUNT` catalog object referenced by the pricing rule.\nSee [LoyaltyProgramRewardDefinitionType](#type-loyaltyprogramrewarddefinitiontype) for possible values", - "readOnly": true + "type": { + "type": "string", + "description": "The type of event. For this event, the value is `loyalty.program.created`.", + "nullable": true }, - "percentage_discount": { + "event_id": { "type": "string", - "description": "The fixed percentage of the discount. Present if `discount_type` is `FIXED_PERCENTAGE`.\nFor example, a 7.25% off discount will be represented as \"7.25\". DEPRECATED at version 2020-12-16. You can find this\ninformation in the `discount_data.percentage` field of the `DISCOUNT` catalog object referenced by the pricing rule.", + "description": "The unique ID for the event, which is used for\n[idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices).", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", "readOnly": true }, - "catalog_object_ids": { - "type": "array", - "items": { - "type": "string" + "data": { + "$ref": "#/components/schemas/LoyaltyProgramCreatedEventData", + "description": "The data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-05-13T01:38:42.785Z", + "data": { + "id": "5216e8b2-d43e-41e2-9ed8-eccf3e892aef", + "object": { + "loyalty_program": { + "accrual_rules": [ + { + "accrual_type": "SPEND", + "points": 1, + "spend_data": { + "amount_money": { + "amount": 100, + "currency": "USD" + }, + "tax_mode": "BEFORE_TAX" + } + } + ], + "created_at": "2019-08-19T18:22:46Z", + "id": "5216e8b2-d43e-41e2-9ed8-eccf3e892aef", + "location_ids": [ + "2Z3BMKQB939X0" + ], + "reward_tiers": [ + { + "created_at": "2019-08-19T18:22:45Z", + "id": "927cab58-09cd-410f-aa68-a44015d8bbbb", + "name": "5% off entire sale", + "points": 5, + "pricing_rule_reference": { + "catalog_version": "1603960067138", + "object_id": "ZKFKBH5IINTZLY3VA2OWIFX3" + } + }, + { + "created_at": "2020-05-13T01:38:40Z", + "id": "aa5373ef-191d-4cb5-b122-8e8de41ab32f", + "name": "20% off entire sale", + "points": 15, + "pricing_rule_reference": { + "catalog_version": "1605486402527", + "object_id": "74C4JSHESNLTB2A7ITO5HO6F" + } + } + ], + "status": "ACTIVE", + "terminology": { + "one": "Point", + "other": "Points" + }, + "updated_at": "2020-05-13T01:38:40Z" + } }, - "description": "The list of catalog objects to which this reward can be applied. They are either all item-variation ids or category ids, depending on the `type` field.\nDEPRECATED at version 2020-12-16. You can find this information in the `product_set_data.product_ids_any` field\nof the `PRODUCT_SET` catalog object referenced by the pricing rule.", - "readOnly": true + "type": "loyalty_program" }, - "fixed_discount_money": { - "$ref": "#/components/schemas/Money", - "description": "The amount of the discount. Present if `discount_type` is `FIXED_AMOUNT`. For example, $5 off.\nDEPRECATED at version 2020-12-16. You can find this information in the `discount_data.amount_money` field of the \n`DISCOUNT` catalog object referenced by the pricing rule.", - "readOnly": true + "event_id": "b10404b2-08c4-4c66-9299-c11feceb43dd", + "merchant_id": "C337NFWQT2A6W", + "type": "loyalty.program.created" + }, + "x-webhook": { + "event": "loyalty.program.created", + "scopes": [ + "LOYALTY_READ" + ] + }, + "x-api": "#/components/x-apis/Loyalty", + "x-since": "2021-04-21" + }, + "LoyaltyProgramCreatedEventData": { + "type": "object", + "description": "The data associated with a `loyalty.program.created` event.", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "The type of object affected by the event. For this event, the value is `loyalty_program`.", + "nullable": true }, - "max_discount_money": { - "$ref": "#/components/schemas/Money", - "description": "When `discount_type` is `FIXED_PERCENTAGE`, the maximum discount amount that can be applied.\nDEPRECATED at version 2020-12-16. You can find this information in the `discount_data.maximum_amount_money` field\nof the `DISCOUNT` catalog object referenced by the the pricing rule.", - "readOnly": true + "id": { + "type": "string", + "description": "The ID of the created loyalty program." + }, + "object": { + "$ref": "#/components/schemas/LoyaltyProgramCreatedEventObject", + "description": "An object that contains the loyalty program that was created.", + "nullable": true } } }, - "LoyaltyProgramRewardDefinitionScope": { - "type": "string", - "enum": [ - "ORDER", - "ITEM_VARIATION", - "CATEGORY" - ], - "x-enum-elements": [ - { - "name": "ORDER", - "description": "The discount applies to the entire order." - }, - { - "name": "ITEM_VARIATION", - "description": "The discount applies only to specific item variations." - }, - { - "name": "CATEGORY", - "description": "The discount applies only to items in the given categories." + "LoyaltyProgramCreatedEventObject": { + "type": "object", + "description": "An object that contains the loyalty program associated with a `loyalty.program.created` event.", + "x-release-status": "PUBLIC", + "properties": { + "loyalty_program": { + "$ref": "#/components/schemas/LoyaltyProgram", + "description": "The loyalty program that was created.", + "nullable": true } - ], - "description": "Indicates the scope of the reward tier. DEPRECATED at version 2020-12-16. Discount details\nare now defined using a catalog pricing rule and other catalog objects. For more information, see\n[Getting discount details for a reward tier](https://developer.squareup.com/docs/loyalty-api/loyalty-rewards#get-discount-details).", - "x-release-status": "DEPRECATED" + } }, - "LoyaltyProgramRewardDefinitionType": { - "type": "string", - "enum": [ - "FIXED_AMOUNT", - "FIXED_PERCENTAGE" + "LoyaltyProgramExpirationPolicy": { + "type": "object", + "description": "Describes when the loyalty program expires.", + "x-release-status": "PUBLIC", + "required": [ + "expiration_duration" ], - "x-enum-elements": [ - { - "name": "FIXED_AMOUNT", - "description": "The fixed amount discounted." - }, - { - "name": "FIXED_PERCENTAGE", - "description": "The fixed percentage discounted." + "properties": { + "expiration_duration": { + "type": "string", + "description": "The number of months before points expire, in `P[n]M` RFC 3339 duration format. For example, a value of `P12M` represents a duration of 12 months. \nPoints are valid through the last day of the month in which they are scheduled to expire. For example, with a `P12M` duration, points earned on July 6, 2020 expire on August 1, 2021.", + "minLength": 1 } - ], - "description": "The type of discount the reward tier offers. DEPRECATED at version 2020-12-16. Discount details\nare now defined using a catalog pricing rule and other catalog objects. For more information, see\n[Getting discount details for a reward tier](https://developer.squareup.com/docs/loyalty-api/loyalty-rewards#get-discount-details).", - "x-release-status": "DEPRECATED" + } }, "LoyaltyProgramRewardTier": { "type": "object", @@ -30966,12 +37655,6 @@ "description": "The name of the reward tier.", "readOnly": true }, - "definition": { - "$ref": "#/components/schemas/LoyaltyProgramRewardDefinition", - "description": "Provides details about the reward tier definition.\nDEPRECATED at version 2020-12-16. Replaced by the `pricing_rule_reference` field.", - "readOnly": true, - "x-release-status": "DEPRECATED" - }, "created_at": { "type": "string", "description": "The timestamp when the reward tier was created, in RFC 3339 format.", @@ -31023,6 +37706,139 @@ } } }, + "LoyaltyProgramUpdatedEvent": { + "type": "object", + "description": "Published when a [loyalty program](entity:LoyaltyProgram) is updated.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the Square seller associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event. For this event, the value is `loyalty.program.updated`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "The unique ID for the event, which is used for\n[idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices).", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/LoyaltyProgramUpdatedEventData", + "description": "The data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-05-13T01:38:42.785Z", + "data": { + "id": "5216e8b2-d43e-41e2-9ed8-eccf3e892aef", + "object": { + "loyalty_program": { + "accrual_rules": [ + { + "accrual_type": "SPEND", + "points": 1, + "spend_data": { + "amount_money": { + "amount": 100, + "currency": "USD" + }, + "tax_mode": "BEFORE_TAX" + } + } + ], + "created_at": "2019-08-19T18:22:46Z", + "id": "5216e8b2-d43e-41e2-9ed8-eccf3e892aef", + "location_ids": [ + "2Z3BMKQB939X0" + ], + "reward_tiers": [ + { + "created_at": "2019-08-19T18:22:45Z", + "id": "927cab58-09cd-410f-aa68-a44015d8bbbb", + "name": "5% off entire sale", + "points": 5, + "pricing_rule_reference": { + "catalog_version": "1603960067138", + "object_id": "ZKFKBH5IINTZLY3VA2OWIFX3" + } + }, + { + "created_at": "2020-05-13T01:38:40Z", + "id": "aa5373ef-191d-4cb5-b122-8e8de41ab32f", + "name": "20% off entire sale", + "points": 15, + "pricing_rule_reference": { + "catalog_version": "1605486402527", + "object_id": "74C4JSHESNLTB2A7ITO5HO6F" + } + } + ], + "status": "ACTIVE", + "terminology": { + "one": "Point", + "other": "Points" + }, + "updated_at": "2020-05-13T01:38:40Z" + } + }, + "type": "loyalty_program" + }, + "event_id": "b10404b2-08c4-4c66-9299-c11feceb43dd", + "merchant_id": "C337NFWQT2A6W", + "type": "loyalty.program.updated" + }, + "x-webhook": { + "event": "loyalty.program.updated", + "scopes": [ + "LOYALTY_READ" + ] + }, + "x-api": "#/components/x-apis/Loyalty", + "x-since": "2020-05-28" + }, + "LoyaltyProgramUpdatedEventData": { + "type": "object", + "description": "The data associated with a `loyalty.program.updated` event.", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "The type of object affected by the event. For this event, the value is `loyalty_program`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "The ID of the affected loyalty program." + }, + "object": { + "$ref": "#/components/schemas/LoyaltyProgramUpdatedEventObject", + "description": "An object that contains the loyalty program that was updated.", + "nullable": true + } + } + }, + "LoyaltyProgramUpdatedEventObject": { + "type": "object", + "description": "An object that contains the loyalty program associated with a `loyalty.program.updated` event.", + "x-release-status": "PUBLIC", + "properties": { + "loyalty_program": { + "$ref": "#/components/schemas/LoyaltyProgram", + "description": "The loyalty program that was updated.", + "nullable": true + } + } + }, "LoyaltyPromotion": { "type": "object", "description": "Represents a promotion for a [loyalty program](entity:LoyaltyProgram). Loyalty promotions enable buyers\nto earn extra points on top of those earned from the base program.\n\nA loyalty program can have a maximum of 10 loyalty promotions with an `ACTIVE` or `SCHEDULED` status.", @@ -31134,6 +37950,124 @@ } } }, + "LoyaltyPromotionCreatedEvent": { + "type": "object", + "description": "Published when a [loyalty promotion](entity:LoyaltyPromotion) is created.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the Square seller associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event. For this event, the value is `loyalty.promotion.created`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "The unique ID for the event, which is used for\n[idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices).", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/LoyaltyPromotionCreatedEventData", + "description": "The data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2022-06-03T01:41:34Z", + "data": { + "id": "ba2f8ab6-e131-46d9-9882-17714404eb49", + "object": { + "loyalty_promotion": { + "available_time": { + "start_date": "2022-06-06", + "time_periods": [ + "BEGIN:VEVENT\nDTSTART:20220612T090000\nDURATION:PT8H\nRRULE:FREQ=WEEKLY;BYDAY=SU\nEND:VEVENT", + "BEGIN:VEVENT\nDTSTART:20220606T090000\nDURATION:PT8H\nRRULE:FREQ=WEEKLY;BYDAY=MO\nEND:VEVENT", + "BEGIN:VEVENT\nDTSTART:20220607T090000\nDURATION:PT8H\nRRULE:FREQ=WEEKLY;BYDAY=TU\nEND:VEVENT", + "BEGIN:VEVENT\nDTSTART:20220608T090000\nDURATION:PT8H\nRRULE:FREQ=WEEKLY;BYDAY=WE\nEND:VEVENT", + "BEGIN:VEVENT\nDTSTART:20220609T090000\nDURATION:PT8H\nRRULE:FREQ=WEEKLY;BYDAY=TH\nEND:VEVENT", + "BEGIN:VEVENT\nDTSTART:20220610T090000\nDURATION:PT8H\nRRULE:FREQ=WEEKLY;BYDAY=FR\nEND:VEVENT", + "BEGIN:VEVENT\nDTSTART:20220611T090000\nDURATION:PT8H\nRRULE:FREQ=WEEKLY;BYDAY=SA\nEND:VEVENT" + ] + }, + "created_at": "2022-06-03T01:41:34Z", + "id": "loypromo_ba2f8ab6-e131-46d9-9882-17714404eb49", + "incentive": { + "points_addition_data": { + "points_addition": 5 + }, + "type": "POINTS_ADDITION" + }, + "loyalty_program_id": "5216e8b2-d43e-41e2-9ed8-eccf3e892aef", + "minimum_spend_amount_money": { + "amount": 2000, + "currency": "USD" + }, + "name": "Happy Hour", + "qualifying_category_ids": [ + "XTQPYLR3IIU9C44VRCB3XD12" + ], + "status": "SCHEDULED", + "updated_at": "2022-06-03T01:41:34Z" + } + }, + "type": "loyalty_promotion" + }, + "event_id": "875f2038-6015-492e-9f29-d040b3809e49", + "merchant_id": "C337NFWQT2A6W", + "type": "loyalty.promotion.created" + }, + "x-webhook": { + "event": "loyalty.promotion.created", + "scopes": [ + "LOYALTY_READ" + ] + }, + "x-api": "#/components/x-apis/Loyalty", + "x-since": "2022-08-17" + }, + "LoyaltyPromotionCreatedEventData": { + "type": "object", + "description": "The data associated with a `loyalty.promotion.created` event.", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "The type of object affected by the event. For this event, the value is `loyalty_promotion`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "The ID of the affected loyalty promotion." + }, + "object": { + "$ref": "#/components/schemas/LoyaltyPromotionCreatedEventObject", + "description": "An object that contains the loyalty promotion that was created.", + "nullable": true + } + } + }, + "LoyaltyPromotionCreatedEventObject": { + "type": "object", + "description": "An object that contains the loyalty promotion associated with a `loyalty.promotion.created` event.", + "x-release-status": "PUBLIC", + "properties": { + "loyalty_promotion": { + "$ref": "#/components/schemas/LoyaltyPromotion", + "description": "The loyalty promotion that was created.", + "nullable": true + } + } + }, "LoyaltyPromotionIncentive": { "type": "object", "description": "Represents how points for a [loyalty promotion](entity:LoyaltyPromotion) are calculated,\neither by multiplying the points earned from the base program or by adding a specified number\nof points to the points earned from the base program.", @@ -31278,9 +38212,129 @@ "name": "DAY", "description": "The limit applies per day, according to the `available_time` schedule specified for the promotion.\nFor example, if the `times` field of the trigger limit is set to 1, a buyer can trigger the promotion\na maximum of once per day." } - ], - "description": "Indicates the time period that the [trigger limit](entity:LoyaltyPromotionTriggerLimit) applies to,\nwhich is used to determine the number of times a buyer can earn points for a [loyalty promotion](entity:LoyaltyPromotion).", - "x-release-status": "PUBLIC" + ], + "description": "Indicates the time period that the [trigger limit](entity:LoyaltyPromotionTriggerLimit) applies to,\nwhich is used to determine the number of times a buyer can earn points for a [loyalty promotion](entity:LoyaltyPromotion).", + "x-release-status": "PUBLIC" + }, + "LoyaltyPromotionUpdatedEvent": { + "type": "object", + "description": "Published when a [loyalty promotion](entity:LoyaltyPromotion) is updated. This event is\ninvoked only when a loyalty promotion is canceled.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the Square seller associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event. For this event, the value is `loyalty.promotion.updated`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "The unique ID for the event, which is used for\n[idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices).", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/LoyaltyPromotionUpdatedEventData", + "description": "The data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2022-07-14T01:23:45Z", + "data": { + "id": "ba2f8ab6-e131-46d9-9882-17714404eb49", + "object": { + "loyalty_promotion": { + "available_time": { + "start_date": "2022-06-06", + "time_periods": [ + "BEGIN:VEVENT\nDTSTART:20220612T090000\nDURATION:PT8H\nRRULE:FREQ=WEEKLY;BYDAY=SU\nEND:VEVENT", + "BEGIN:VEVENT\nDTSTART:20220606T090000\nDURATION:PT8H\nRRULE:FREQ=WEEKLY;BYDAY=MO\nEND:VEVENT", + "BEGIN:VEVENT\nDTSTART:20220607T090000\nDURATION:PT8H\nRRULE:FREQ=WEEKLY;BYDAY=TU\nEND:VEVENT", + "BEGIN:VEVENT\nDTSTART:20220608T090000\nDURATION:PT8H\nRRULE:FREQ=WEEKLY;BYDAY=WE\nEND:VEVENT", + "BEGIN:VEVENT\nDTSTART:20220609T090000\nDURATION:PT8H\nRRULE:FREQ=WEEKLY;BYDAY=TH\nEND:VEVENT", + "BEGIN:VEVENT\nDTSTART:20220610T090000\nDURATION:PT8H\nRRULE:FREQ=WEEKLY;BYDAY=FR\nEND:VEVENT", + "BEGIN:VEVENT\nDTSTART:20220611T090000\nDURATION:PT8H\nRRULE:FREQ=WEEKLY;BYDAY=SA\nEND:VEVENT" + ] + }, + "canceled_at": "2022-07-14T01:23:45Z", + "created_at": "2022-06-03T01:41:34Z", + "id": "loypromo_ba2f8ab6-e131-46d9-9882-17714404eb49", + "incentive": { + "points_addition_data": { + "points_addition": 5 + }, + "type": "POINTS_ADDITION" + }, + "loyalty_program_id": "5216e8b2-d43e-41e2-9ed8-eccf3e892aef", + "minimum_spend_amount_money": { + "amount": 2000, + "currency": "USD" + }, + "name": "Happy Hour", + "qualifying_item_variation_ids": [ + "CJ3RYL56ITAKMD4VRCM7XERS", + "AT3RYLR3TUA9C34VRCB7X5RR" + ], + "status": "CANCELED", + "updated_at": "2022-07-14T01:23:45Z" + } + }, + "type": "loyalty_promotion" + }, + "event_id": "875f2038-6015-492e-9f29-d040b3809e49", + "merchant_id": "C337NFWQT2A6W", + "type": "loyalty.promotion.updated" + }, + "x-webhook": { + "event": "loyalty.promotion.updated", + "scopes": [ + "LOYALTY_READ" + ] + }, + "x-api": "#/components/x-apis/Loyalty", + "x-since": "2022-08-17" + }, + "LoyaltyPromotionUpdatedEventData": { + "type": "object", + "description": "The data associated with a `loyalty.promotion.updated` event.", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "The type of object affected by the event. For this event, the value is `loyalty_promotion`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "The ID of the affected loyalty promotion." + }, + "object": { + "$ref": "#/components/schemas/LoyaltyPromotionUpdatedEventObject", + "description": "An object that contains the loyalty promotion that was updated.", + "nullable": true + } + } + }, + "LoyaltyPromotionUpdatedEventObject": { + "type": "object", + "description": "An object that contains the loyalty promotion associated with a `loyalty.promotion.updated` event.", + "x-release-status": "PUBLIC", + "properties": { + "loyalty_promotion": { + "$ref": "#/components/schemas/LoyaltyPromotion", + "description": "The loyalty promotion that was updated.", + "nullable": true + } + } }, "LoyaltyReward": { "type": "object", @@ -31767,6 +38821,735 @@ } } }, + "MerchantCustomAttributeDefinitionOwnedCreatedEvent": { + "type": "object", + "description": "Published when a merchant [custom attribute definition](entity:CustomAttributeDefinition)\nis created by the subscribing application. Subscribe to this event to be notified\nwhen your application creates a merchant custom attribute definition.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"merchant.custom_attribute_definition.owned.created\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true + } + }, + "example": { + "created_at": "2022-01-26T21:40:49.943Z", + "data": { + "id": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:has_seen_tutorial", + "object": { + "created_at": "2023-126T21:40:49Z", + "description": "Whether the merchant has seen the tutorial screen for using the app.", + "key": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:has_seen_tutorial", + "name": "Seen tutorial Screen", + "schema": { + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Boolean" + }, + "updated_at": "2022-01-26T21:40:49Z", + "version": 1, + "visibility": "VISIBILITY_HIDDEN" + }, + "type": "custom_attribute_definition" + }, + "event_id": "347ab320-c0ba-48f5-959a-4e147b9aefcf", + "merchant_id": "DM7VKY8Q63GNP", + "type": "merchant.custom_attribute_definition.owned.created" + }, + "x-webhook": { + "event": "merchant.custom_attribute_definition.owned.created", + "scopes": [ + "MERCHANT_PROFILE_READ" + ] + }, + "x-api": "#/components/x-apis/MerchantCustomAttributes", + "x-since": "2023-05-17" + }, + "MerchantCustomAttributeDefinitionOwnedDeletedEvent": { + "type": "object", + "description": "Published when a merchant [custom attribute definition](entity:CustomAttributeDefinition)\nis deleted by the subscribing application. Subscribe to this event to be notified\nwhen your application deletes a merchant custom attribute definition.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"merchant.custom_attribute_definition.owned.deleted\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true + } + }, + "example": { + "created_at": "2022-01-27T01:22:29Z", + "data": { + "deleted": true, + "id": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:has_seen_tutorial", + "object": { + "created_at": "2022-126T21:40:49Z", + "description": "Has seen the merchant seen the tutorial screen for using the app?", + "key": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:has_seen_tutorial", + "name": "Seen tutorial screen", + "schema": { + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Boolean" + }, + "updated_at": "2022-01-27T11:31:29Z", + "version": 3, + "visibility": "VISIBILITY_HIDDEN" + }, + "type": "custom_attribute_definition" + }, + "event_id": "49363646-7ae7-49b5-aaa0-296610883c61", + "merchant_id": "DM7VKY8Q63GNP", + "type": "merchant.custom_attribute_definition.owned.deleted" + }, + "x-webhook": { + "event": "merchant.custom_attribute_definition.owned.deleted", + "scopes": [ + "MERCHANT_PROFILE_READ" + ] + }, + "x-api": "#/components/x-apis/MerchantCustomAttributes", + "x-since": "2023-05-17" + }, + "MerchantCustomAttributeDefinitionOwnedUpdatedEvent": { + "type": "object", + "description": "Published when a merchant [custom attribute definition](entity:CustomAttributeDefinition)\nis updated by the subscribing application. Subscribe to this event to be notified\nwhen your application updates a merchant custom attribute definition.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"merchant.custom_attribute_definition.owned.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true + } + }, + "example": { + "created_at": "2022-01-26T01:22:29Z", + "data": { + "id": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:has_seen_tutorial", + "object": { + "created_at": "2022-1-26T21:57:39Z", + "description": "Has seen the merchant seen the tutorial screen for using the app?", + "key": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:has_seen_tutorial", + "name": "Seen tutorial screen", + "schema": { + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Boolean" + }, + "updated_at": "2022-01-26T01:22:29Z", + "version": 2, + "visibility": "VISIBILITY_HIDDEN" + }, + "type": "custom_attribute_definition" + }, + "event_id": "d914e6ef-9e37-4bca-a663-ecc55f5d98d3", + "merchant_id": "DM7VKY8Q63GNP", + "type": "merchant.custom_attribute_definition.owned.updated" + }, + "x-webhook": { + "event": "merchant.custom_attribute_definition.owned.updated", + "scopes": [ + "MERCHANT_PROFILE_READ" + ] + }, + "x-api": "#/components/x-apis/MerchantCustomAttributes", + "x-since": "2023-05-17" + }, + "MerchantCustomAttributeDefinitionVisibleCreatedEvent": { + "type": "object", + "description": "Published when a merchant [custom attribute definition](entity:CustomAttributeDefinition)\nthat is visible to the subscribing application is created. A notification is sent when your application\ncreates a custom attribute definition or another application creates a custom attribute definition whose\n`visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"merchant.custom_attribute_definition.visible.created\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true + } + }, + "example": { + "created_at": "2022-02-21T21:40:49.943Z", + "data": { + "id": "sq0idp-BushoY39o1X-GPxRRUWc0A:express_shipping_enabled", + "object": { + "created_at": "2022-02-21T21:40:49Z", + "description": "Can this seller provide 2 day shipping?", + "key": "sq0idp-BushoY39o1X-GPxRRUWc0A:express_shipping_enabled", + "name": "Ships Quickly", + "schema": { + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Boolean" + }, + "updated_at": "2022-02-21T21:40:49Z", + "version": 1, + "visibility": "VISIBILITY_READ_ONLY" + }, + "type": "custom_attribute_definition" + }, + "event_id": "f679dc4f-3619-4764-a4de-94a54735cd32", + "merchant_id": "DM7VKY8Q63GNP", + "type": "merchant.custom_attribute_definition.visible.created" + }, + "x-webhook": { + "event": "merchant.custom_attribute_definition.visible.created", + "scopes": [ + "MERCHANT_PROFILE_READ" + ] + }, + "x-api": "#/components/x-apis/MerchantCustomAttributes", + "x-since": "2023-05-17" + }, + "MerchantCustomAttributeDefinitionVisibleDeletedEvent": { + "type": "object", + "description": "Published when a merchant [custom attribute definition](entity:CustomAttributeDefinition)\nthat is visible to the subscribing application is deleted. A notification is sent when your application\ndeletes a custom attribute definition or another application deletes a custom attribute definition whose\n`visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"merchant.custom_attribute_definition.visible.deleted\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true + } + }, + "example": { + "created_at": "2022-02-26T01:22:29Z", + "data": { + "deleted": true, + "id": "sq0idp-BushoY39o1X-GPxRRUWc0A:express_shipping_enabled", + "object": { + "created_at": "2022-02-21T21:40:49Z", + "description": "Can this seller provide 2 day shipping?", + "key": "sq0idp-BushoY39o1X-GPxRRUWc0A:express_shipping_enabled", + "name": "Provides 2 day shipping", + "schema": { + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Boolean" + }, + "updated_at": "2022-02-27T11:31:29Z", + "version": 3, + "visibility": "VISIBILITY_READ_ONLY" + }, + "type": "custom_attribute_definition" + }, + "event_id": "81c10a07-c329-4943-af20-7d70a300c7e6", + "merchant_id": "DM7VKY8Q63GNP", + "type": "merchant.custom_attribute_definition.visible.deleted" + }, + "x-webhook": { + "event": "merchant.custom_attribute_definition.visible.deleted", + "scopes": [ + "MERCHANT_PROFILE_READ" + ] + }, + "x-api": "#/components/x-apis/MerchantCustomAttributes", + "x-since": "2023-05-17" + }, + "MerchantCustomAttributeDefinitionVisibleUpdatedEvent": { + "type": "object", + "description": "Published when a merchant [custom attribute definition](entity:CustomAttributeDefinition)\nthat is visible to the subscribing application is updated. A notification is sent when your application\nupdates a custom attribute definition or another application updates a custom attribute definition whose\n`visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"merchant.custom_attribute_definition.visible.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true + } + }, + "example": { + "created_at": "2022-02-26T01:22:29Z", + "data": { + "id": "sq0idp-BushoY39o1X-GPxRRUWc0A:express_shipping_enabled", + "object": { + "created_at": "2022-02-21T21:57:39Z", + "description": "Can this seller provide 2 day shipping?", + "key": "sq0idp-BushoY39o1X-GPxRRUWc0A:express_shipping_enabled", + "name": "Provides 2 day shipping", + "schema": { + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Boolean" + }, + "updated_at": "2022-02-26T01:22:29Z", + "version": 2, + "visibility": "VISIBILITY_READ_ONLY" + }, + "type": "custom_attribute_definition" + }, + "event_id": "ae376c21-d360-4694-96c7-1b27830f07d7", + "merchant_id": "DM7VKY8Q63GNP", + "type": "merchant.custom_attribute_definition.visible.updated" + }, + "x-webhook": { + "event": "merchant.custom_attribute_definition.visible.updated", + "scopes": [ + "MERCHANT_PROFILE_READ" + ] + }, + "x-api": "#/components/x-apis/MerchantCustomAttributes", + "x-since": "2023-05-17" + }, + "MerchantCustomAttributeOwnedDeletedEvent": { + "type": "object", + "description": "Published when a merchant [custom attribute](entity:CustomAttribute)\nassociated with a [custom attribute definition](entity:CustomAttributeDefinition) that is\nowned by the subscribing application is deleted. Subscribe to this event to be notified\nwhen your application deletes a merchant custom attribute.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"merchant.custom_attribute.owned.deleted\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true + } + }, + "example": { + "created_at": "2022-01-26T21:40:54Z", + "data": { + "deleted": true, + "id": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:has_seen_tutorial:MERCHANT:DM7VKY8Q63GNP", + "object": { + "created_at": "2022-1-26T21:40:54Z", + "key": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:has_seen_tutorial", + "updated_at": "2022-01-27T12:40:54Z", + "value": true, + "version": 2, + "visibility": "VISIBILITY_HIDDEN" + }, + "type": "custom_attribute" + }, + "event_id": "473795bf-6ce4-4595-88ae-a5e7cc690c02", + "merchant_id": "DM7VKY8Q63GNP", + "type": "merchant.custom_attribute.owned.deleted" + }, + "x-webhook": { + "event": "merchant.custom_attribute.owned.deleted", + "scopes": [ + "MERCHANT_PROFILE_READ" + ] + }, + "x-api": "#/components/x-apis/MerchantCustomAttributes", + "x-since": "2023-05-17" + }, + "MerchantCustomAttributeOwnedUpdatedEvent": { + "type": "object", + "description": "Published when a merchant [custom attribute](entity:CustomAttribute)\nassociated with a [custom attribute definition](entity:CustomAttributeDefinition) that is\nowned by the subscribing application is updated. Subscribe to this event to be notified\nwhen your application updates a merchant custom attribute.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"merchant.custom_attribute.owned.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true + } + }, + "example": { + "created_at": "2022-01-26T21:40:54Z", + "data": { + "id": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:has_seen_tutorial:MERCHANT:DM7VKY8Q63GNP", + "object": { + "created_at": "2022-1-26T21:40:54Z", + "key": "sq0idp-LJ1Kr4Iim0hGDvAwrv8HIB:has_seen_tutorial", + "updated_at": "2022-01-26T21:40:54Z", + "value": true, + "version": 1, + "visibility": "VISIBILITY_HIDDEN" + }, + "type": "custom_attribute" + }, + "event_id": "e26ca6f2-97f8-426a-b4bf-873024617e94", + "merchant_id": "DM7VKY8Q63GNP", + "type": "merchant.custom_attribute.owned.updated" + }, + "x-webhook": { + "event": "merchant.custom_attribute.owned.updated", + "scopes": [ + "MERCHANT_PROFILE_READ" + ] + }, + "x-api": "#/components/x-apis/MerchantCustomAttributes", + "x-since": "2023-05-17" + }, + "MerchantCustomAttributeVisibleDeletedEvent": { + "type": "object", + "description": "Published when a merchant [custom attribute](entity:CustomAttribute) with\nthe `visibility` field set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES` is deleted.\nAn application that subscribes to this event is notified when a merchant custom attribute is deleted\nby any application for which the subscribing application has read access to the merchant custom attribute.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"merchant.custom_attribute.visible.deleted\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true + } + }, + "example": { + "created_at": "2022-01-26T01:22:29Z", + "data": { + "deleted": true, + "id": "sq0idp-BushoY39o1X-GPxRRUWc0A:express_shipping_enabled:MERCHANT:DM7VKY8Q63GNP", + "object": { + "created_at": "2022-1-21T21:58:59Z", + "key": "sq0idp-BushoY39o1X-GPxRRUWc0A:express_shipping_enabled", + "updated_at": "2022-01-27T11:31:29Z", + "value": false, + "version": 3, + "visibility": "VISIBILITY_READ_ONLY" + }, + "type": "custom_attribute" + }, + "event_id": "18ef5adc-2efc-4ad9-9b1a-b274a607da3e", + "merchant_id": "DM7VKY8Q63GNP", + "type": "merchant.custom_attribute.visible.deleted" + }, + "x-webhook": { + "event": "merchant.custom_attribute.visible.deleted", + "scopes": [ + "MERCHANT_PROFILE_READ" + ] + }, + "x-api": "#/components/x-apis/MerchantCustomAttributes", + "x-since": "2023-05-17" + }, + "MerchantCustomAttributeVisibleUpdatedEvent": { + "type": "object", + "description": "Published when a merchant [custom attribute](entity:CustomAttribute) with\nthe `visibility` field set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES` is updated.\nAn application that subscribes to this event is notified when a merchant custom attribute is updated\nby any application for which the subscribing application has read access to the merchant custom attribute.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the seller associated with the event that triggered the event notification.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"merchant.custom_attribute.visible.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event notification.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp that indicates when the event notification was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeEventData", + "description": "The data associated with the event that triggered the event notification.", + "nullable": true + } + }, + "example": { + "created_at": "2022-01-26T01:22:29Z", + "data": { + "id": "sq0idp-BushoY39o1X-GPxRRUWc0A:express_shipping_enabled:MERCHANT:DM7VKY8Q63GNP", + "object": { + "created_at": "2022-1-21T21:40:54Z", + "key": "sq0idp-BushoY39o1X-GPxRRUWc0A:express_shipping_enabled", + "updated_at": "2022-01-26T01:22:29Z", + "value": false, + "version": 2, + "visibility": "VISIBILITY_READ_ONLY" + }, + "type": "custom_attribute" + }, + "event_id": "1cc2925c-f6e2-4fb6-a597-07c198de59e1", + "merchant_id": "DM7VKY8Q63GNP", + "type": "merchant.custom_attribute.visible.updated" + }, + "x-webhook": { + "event": "merchant.custom_attribute.visible.updated", + "scopes": [ + "MERCHANT_PROFILE_READ" + ] + }, + "x-api": "#/components/x-apis/MerchantCustomAttributes", + "x-since": "2023-05-17" + }, + "MerchantSettingsUpdatedEvent": { + "type": "object", + "description": "Published when online checkout merchant settings are updated", + "x-release-status": "BETA", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"online_checkout.merchant_settings.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "RFC 3339 timestamp of when the event was created.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/MerchantSettingsUpdatedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2023-11-09T18:04:58.856036784Z", + "data": { + "id": "MLX0WMXAER48M", + "object": { + "merchant_settings": { + "payment_methods": { + "afterpay_clearpay": { + "enabled": true, + "item_eligibility_range": { + "max": { + "amount": 200000, + "currency": "USD" + }, + "min": { + "amount": 200, + "currency": "USD" + } + }, + "order_eligibility_range": { + "max": { + "amount": 200000, + "currency": "USD" + }, + "min": { + "amount": 100, + "currency": "USD" + } + } + }, + "apple_pay": { + "enabled": false + }, + "cash_app": { + "enabled": true + }, + "google_pay": { + "enabled": true + } + }, + "updated_at": "2023-11-09 18:04:58 +0000 UTC" + } + }, + "type": "merchant_settings" + }, + "event_id": "8bfc6b46-b274-376f-b5e7-0575827f6f29", + "merchant_id": "MLX0WMXAER48M", + "type": "online_checkout.merchant_settings.updated" + }, + "x-webhook": { + "event": "online_checkout.merchant_settings.updated", + "scopes": [ + "MERCHANT_PROFILE_WRITE", + "MERCHANT_PROFILE_READ" + ] + }, + "x-api": "#/components/x-apis/Checkout", + "x-since": "2023-12-13" + }, + "MerchantSettingsUpdatedEventData": { + "type": "object", + "x-release-status": "BETA", + "properties": { + "type": { + "type": "string", + "description": "Name of the updated object’s type, `\"online_checkout.merchant_settings\"`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the updated merchant settings." + }, + "object": { + "$ref": "#/components/schemas/MerchantSettingsUpdatedEventObject", + "description": "An object containing the updated merchant settings.", + "nullable": true + } + } + }, + "MerchantSettingsUpdatedEventObject": { + "type": "object", + "x-release-status": "BETA", + "properties": { + "merchant_settings": { + "$ref": "#/components/schemas/CheckoutMerchantSettings", + "description": "The updated merchant settings.", + "nullable": true + } + } + }, "MerchantStatus": { "type": "string", "enum": [ @@ -31782,49 +39565,174 @@ "name": "INACTIVE", "description": "A functionally limited merchant account. The merchant can only have limited interaction\nvia Square APIs. The merchant cannot log in or access the seller dashboard." } - ], - "x-release-status": "PUBLIC" + ], + "x-release-status": "PUBLIC" + }, + "ModifierLocationOverrides": { + "type": "object", + "description": "Location-specific overrides for specified properties of a `CatalogModifier` object.", + "x-release-status": "PUBLIC", + "properties": { + "location_id": { + "type": "string", + "description": "The ID of the `Location` object representing the location. This can include a deactivated location.", + "nullable": true + }, + "price_money": { + "$ref": "#/components/schemas/Money", + "description": "The overridden price at the specified location. If this is unspecified, the modifier price is not overridden.\nThe modifier becomes free of charge at the specified location, when this `price_money` field is set to 0.", + "nullable": true + }, + "sold_out": { + "type": "boolean", + "description": "Indicates whether the modifier is sold out at the specified location or not. As an example, for cheese (modifier) burger (item), when the modifier is sold out, it is the cheese, but not the burger, that is sold out.\nThe seller can manually set this sold out status. Attempts by an application to set this attribute are ignored.", + "readOnly": true + } + } + }, + "Money": { + "type": "object", + "description": "Represents an amount of money. `Money` fields can be signed or unsigned.\nFields that do not explicitly define whether they are signed or unsigned are\nconsidered unsigned and can only hold positive amounts. For signed fields, the\nsign of the value indicates the purpose of the money transfer. See\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)\nfor more information.", + "x-release-status": "PUBLIC", + "properties": { + "amount": { + "type": "integer", + "description": "The amount of money, in the smallest denomination of the currency\nindicated by `currency`. For example, when `currency` is `USD`, `amount` is\nin cents. Monetary amounts can be positive or negative. See the specific\nfield description to determine the meaning of the sign in a particular case.", + "format": "int64", + "nullable": true + }, + "currency": { + "$ref": "#/components/schemas/Currency", + "description": "The type of currency, in __ISO 4217 format__. For example, the currency\ncode for US dollars is `USD`.\n\nSee [Currency](entity:Currency) for possible values.\nSee [Currency](#type-currency) for possible values", + "nullable": true + } + } + }, + "OauthAuthorizationRevokedEvent": { + "type": "object", + "description": "Published when a merchant/application revokes all access tokens and refresh tokens granted to an application.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"oauth.authorization.revoked\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/OauthAuthorizationRevokedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-08-14T15:51:04.246373287Z", + "data": { + "id": "415641cf-eba2-4dfa-88cc-c4be1301fdc6", + "object": { + "revocation": { + "revoked_at": "2020-08-14T15:51:00.246373287Z", + "revoker_type": "MERCHANT" + } + }, + "type": "revocation" + }, + "event_id": "e1d6ae37-5aa9-45a5-b525-b12caf819fdb", + "merchant_id": "J9Z30SF99NPFJ", + "type": "oauth.authorization.revoked" + }, + "x-webhook": { + "event": "oauth.authorization.revoked", + "scopes": null + }, + "x-api": "#/components/x-apis/OAuth", + "x-since": "2020-08-26" }, - "ModifierLocationOverrides": { + "OauthAuthorizationRevokedEventData": { "type": "object", - "description": "Location-specific overrides for specified properties of a `CatalogModifier` object.", "x-release-status": "PUBLIC", "properties": { - "location_id": { + "type": { "type": "string", - "description": "The ID of the `Location` object representing the location. This can include a deactivated location.", + "description": "Name of the affected object’s type, `\"revocation\"`.", "nullable": true }, - "price_money": { - "$ref": "#/components/schemas/Money", - "description": "The overridden price at the specified location. If this is unspecified, the modifier price is not overridden.\nThe modifier becomes free of charge at the specified location, when this `price_money` field is set to 0.", - "nullable": true + "id": { + "type": "string", + "description": "Not applicable, revocation is not an object" }, - "sold_out": { - "type": "boolean", - "description": "Indicates whether the modifier is sold out at the specified location or not. As an example, for cheese (modifier) burger (item), when the modifier is sold out, it is the cheese, but not the burger, that is sold out.\nThe seller can manually set this sold out status. Attempts by an application to set this attribute are ignored.", - "readOnly": true + "object": { + "$ref": "#/components/schemas/OauthAuthorizationRevokedEventObject", + "description": "An object containing information about revocation event.", + "nullable": true } } }, - "Money": { + "OauthAuthorizationRevokedEventObject": { "type": "object", - "description": "Represents an amount of money. `Money` fields can be signed or unsigned.\nFields that do not explicitly define whether they are signed or unsigned are\nconsidered unsigned and can only hold positive amounts. For signed fields, the\nsign of the value indicates the purpose of the money transfer. See\n[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)\nfor more information.", "x-release-status": "PUBLIC", "properties": { - "amount": { - "type": "integer", - "description": "The amount of money, in the smallest denomination of the currency\nindicated by `currency`. For example, when `currency` is `USD`, `amount` is\nin cents. Monetary amounts can be positive or negative. See the specific\nfield description to determine the meaning of the sign in a particular case.", - "format": "int64", + "revocation": { + "$ref": "#/components/schemas/OauthAuthorizationRevokedEventRevocationObject", + "description": "The revocation event.", + "nullable": true + } + } + }, + "OauthAuthorizationRevokedEventRevocationObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "revoked_at": { + "type": "string", + "description": "Timestamp of when the revocation event occurred, in RFC 3339 format.", "nullable": true }, - "currency": { - "$ref": "#/components/schemas/Currency", - "description": "The type of currency, in __ISO 4217 format__. For example, the currency\ncode for US dollars is `USD`.\n\nSee [Currency](entity:Currency) for possible values.\nSee [Currency](#type-currency) for possible values", + "revoker_type": { + "$ref": "#/components/schemas/OauthAuthorizationRevokedEventRevokerType", + "description": "Type of client that performed the revocation, either APPLICATION, MERCHANT, or SQUARE.\nSee [OauthAuthorizationRevokedEventRevokerType](#type-oauthauthorizationrevokedeventrevokertype) for possible values", "nullable": true } } }, + "OauthAuthorizationRevokedEventRevokerType": { + "type": "string", + "enum": [ + "APPLICATION", + "MERCHANT", + "SQUARE" + ], + "x-enum-elements": [ + { + "name": "APPLICATION", + "description": "The application that requested access to a merchant's data." + }, + { + "name": "MERCHANT", + "description": "The admin for the merchant." + }, + { + "name": "SQUARE", + "description": "An internal Square employee." + } + ], + "description": "Defines the possible types for the revoking client.", + "x-release-status": "PUBLIC" + }, "ObtainTokenRequest": { "type": "object", "description": "Represents an [ObtainToken](api-endpoint:OAuth-ObtainToken) request.", @@ -32246,6 +40154,85 @@ } } }, + "OrderCreatedEvent": { + "type": "object", + "description": "Published when an [Order](entity:Order) is created. This event is\ntriggered only by the [CreateOrder](api-endpoint:Orders-CreateOrder) endpoint call.\n\nCreating an order in the Point of Sale app will **not** publish this event.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"order.created\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/OrderCreatedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-04-16T23:14:26.129Z", + "data": { + "id": "eA3vssLHKJrv9H0IdJCM3gNqfdcZY", + "object": { + "order_created": { + "created_at": "2020-04-16T23:14:26.129Z", + "location_id": "FPYCBCHYMXFK1", + "order_id": "eA3vssLHKJrv9H0IdJCM3gNqfdcZY", + "state": "OPEN", + "version": 1 + } + }, + "type": "order_created" + }, + "event_id": "116038d3-2948-439f-8679-fc86dbf80f69", + "merchant_id": "5S9MXCS9Y99KK", + "type": "order.created" + }, + "x-webhook": { + "event": "order.created", + "scopes": [ + "ORDERS_READ" + ] + }, + "x-api": "#/components/x-apis/Orders", + "x-since": "2020-04-22" + }, + "OrderCreatedEventData": { + "type": "object", + "x-release-status": "BETA", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected object’s type, `\"order_created\"`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the affected order." + }, + "object": { + "$ref": "#/components/schemas/OrderCreatedObject", + "description": "An object containing information about the created Order.", + "nullable": true + } + } + }, "OrderCreatedObject": { "type": "object", "x-release-status": "BETA", @@ -32257,219 +40244,633 @@ } } }, - "OrderEntry": { + "OrderCustomAttributeDefinitionOwnedCreatedEvent": { "type": "object", - "description": "A lightweight description of an [order](entity:Order) that is returned when\n`returned_entries` is `true` on a [SearchOrdersRequest](api-endpoint:Orders-SearchOrders).", - "x-release-status": "PUBLIC", + "description": "Published when an order [custom attribute definition](entity:CustomAttributeDefinition) that is owned by the subscribing app is created.", + "x-release-status": "BETA", "properties": { - "order_id": { + "merchant_id": { "type": "string", - "description": "The ID of the order.", + "description": "The ID of the target seller associated with the event.", "nullable": true }, - "version": { - "type": "integer", - "description": "The version number, which is incremented each time an update is committed to the order.\nOrders that were not created through the API do not include a version number and\ntherefore cannot be updated.\n\n[Read more about working with versions.](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders)", - "readOnly": true, - "x-release-status": "BETA" + "type": { + "type": "string", + "description": "The type of this event. The value is `\"order.custom_attribute_definition.owned.created\"`.", + "nullable": true }, - "location_id": { + "event_id": { "type": "string", - "description": "The location ID the order belongs to.", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event.", "nullable": true } - } + }, + "example": { + "created_at": "2022-11-09T20:59:17.185Z", + "data": { + "id": "sq0ids-tr5sCkWm3b9X9MkpAvJ42A:table-number", + "object": { + "created_at": "2022-11-09T20:59:17.185Z", + "description": "Table number at a location", + "key": "sq0ids-tr5sCkWm3b9X9MkpAvJ42A:table-number", + "name": "Table Number", + "schema": { + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + }, + "updated_at": "2022-11-09T20:59:17.185Z", + "version": 1, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute_definition" + }, + "event_id": "11d7bdf0-773a-3e9e-9d59-d91fe31110db", + "merchant_id": "MLABZFS5JTW5B", + "type": "order.custom_attribute_definition.owned.created" + }, + "x-webhook": { + "event": "order.custom_attribute_definition.owned.created", + "scopes": [ + "ORDERS_READ" + ] + }, + "x-api": "#/components/x-apis/OrderCustomAttributes", + "x-since": "2022-11-16" }, - "OrderFulfillment": { + "OrderCustomAttributeDefinitionOwnedDeletedEvent": { "type": "object", - "description": "Contains details about how to fulfill this order.\nOrders can only be created with at most one fulfillment using the API.\nHowever, orders returned by the Orders API might contain multiple fulfillments because sellers can create multiple fulfillments using Square products such as Square Online.", - "x-release-status": "PUBLIC", + "description": "Published when an order [custom attribute definition](entity:CustomAttributeDefinition) that is owned by the subscribing app is deleted.", + "x-release-status": "BETA", "properties": { - "uid": { + "merchant_id": { "type": "string", - "description": "A unique ID that identifies the fulfillment only within this order.", - "maxLength": 60, - "x-release-status": "BETA", + "description": "The ID of the target seller associated with the event.", "nullable": true }, "type": { - "$ref": "#/components/schemas/OrderFulfillmentType", - "description": "The type of the fulfillment.\nSee [OrderFulfillmentType](#type-orderfulfillmenttype) for possible values", + "type": "string", + "description": "The type of this event. The value is `\"order.custom_attribute_definition.owned.deleted\"`.", "nullable": true }, - "state": { - "$ref": "#/components/schemas/OrderFulfillmentState", - "description": "The state of the fulfillment.\nSee [OrderFulfillmentState](#type-orderfulfillmentstate) for possible values", + "event_id": { + "type": "string", + "description": "A unique ID for the event.", "nullable": true }, - "line_item_application": { - "$ref": "#/components/schemas/OrderFulfillmentFulfillmentLineItemApplication", - "description": "Describes what order line items this fulfillment applies to.\nIt can be `ALL` or `ENTRY_LIST` with a supplied list of fulfillment entries.\nSee [OrderFulfillmentFulfillmentLineItemApplication](#type-orderfulfillmentfulfillmentlineitemapplication) for possible values", - "readOnly": true, - "x-release-status": "BETA" + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true }, - "entries": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OrderFulfillmentFulfillmentEntry" + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2022-11-09T21:04:52Z", + "data": { + "deleted": true, + "id": "sq0ids-tr5sCkWm3b9X9MkpAvJ42A:table-number", + "object": { + "created_at": "2022-11-09T20:56:14.351Z", + "description": "Table number at a location", + "key": "sq0ids-tr5sCkWm3b9X9MkpAvJ42A:table-number", + "name": "Table Number", + "schema": { + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + }, + "updated_at": "2022-11-09T20:56:14.351Z", + "version": 1, + "visibility": "VISIBILITY_READ_WRITE_VALUES" }, - "description": "A list of entries pertaining to the fulfillment of an order. Each entry must reference\na valid `uid` for an order line item in the `line_item_uid` field, as well as a `quantity` to\nfulfill.\nMultiple entries can reference the same line item `uid`, as long as the total quantity among\nall fulfillment entries referencing a single line item does not exceed the quantity of the\norder's line item itself.\nAn order cannot be marked as `COMPLETED` before all fulfillments are `COMPLETED`,\n`CANCELED`, or `FAILED`. Fulfillments can be created and completed independently\nbefore order completion.", - "readOnly": true, - "x-release-status": "BETA" + "type": "custom_attribute_definition" }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Application-defined data attached to this fulfillment. Metadata fields are intended\nto store descriptive references or associations with an entity in another system or store brief\ninformation about the object. Square does not process this field; it only stores and returns it\nin relevant API calls. Do not use metadata to store any sensitive information (such as personally\nidentifiable information or card details).\nKeys written by applications must be 60 characters or less and must be in the character set\n`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed\nwith a namespace, separated from the key with a ':' character.\nValues have a maximum length of 255 characters.\nAn application can have up to 10 entries per metadata field.\nEntries written by applications are private and can only be read or modified by the same\napplication.\nFor more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata).", - "x-release-status": "BETA", + "event_id": "4cadb90e-8dac-38c0-8f50-521f477cf4a7", + "merchant_id": "MLABZFS5JTW5B", + "type": "order.custom_attribute_definition.owned.deleted" + }, + "x-webhook": { + "event": "order.custom_attribute_definition.owned.deleted", + "scopes": [ + "ORDERS_READ" + ] + }, + "x-api": "#/components/x-apis/OrderCustomAttributes", + "x-since": "2022-11-16" + }, + "OrderCustomAttributeDefinitionOwnedUpdatedEvent": { + "type": "object", + "description": "Published when an order [custom attribute definition](entity:CustomAttributeDefinition) that is owned by the subscribing app is updated.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target seller associated with the event.", "nullable": true }, - "pickup_details": { - "$ref": "#/components/schemas/OrderFulfillmentPickupDetails", - "description": "Contains details for a pickup fulfillment. These details are required when the fulfillment\ntype is `PICKUP`.", + "type": { + "type": "string", + "description": "The type of this event. The value is `\"order.custom_attribute_definition.owned.updated\"`.", "nullable": true }, - "shipment_details": { - "$ref": "#/components/schemas/OrderFulfillmentShipmentDetails", - "description": "Contains details for a shipment fulfillment. These details are required when the fulfillment type\nis `SHIPMENT`.\nA shipment fulfillment's relationship to fulfillment `state`:\n`PROPOSED`: A shipment is requested.\n`RESERVED`: Fulfillment in progress. Shipment processing.\n`PREPARED`: Shipment packaged. Shipping label created.\n`COMPLETED`: Package has been shipped.\n`CANCELED`: Shipment has been canceled.\n`FAILED`: Shipment has failed.", - "x-release-status": "BETA", + "event_id": { + "type": "string", + "description": "A unique ID for the event.", "nullable": true }, - "delivery_details": { - "$ref": "#/components/schemas/OrderFulfillmentDeliveryDetails", - "description": "Describes delivery details of an order fulfillment.", - "x-release-status": "BETA", + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event.", "nullable": true } - } + }, + "example": { + "created_at": "2022-11-09T21:25:45.592Z", + "data": { + "id": "sq0ids-tr5sCkWm3b9X9MkpAvJ42A:table-number", + "object": { + "created_at": "2022-11-09T21:25:28.693Z", + "description": "Table number at a location", + "key": "sq0ids-tr5sCkWm3b9X9MkpAvJ42A:table-number", + "name": "Table Number", + "schema": { + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + }, + "updated_at": "2022-11-09T21:25:45.592Z", + "version": 2, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute_definition" + }, + "event_id": "39b6f636-7fcb-38f0-acbf-7e221e829496", + "merchant_id": "MLABZFS5JTW5B", + "type": "order.custom_attribute_definition.owned.updated" + }, + "x-webhook": { + "event": "order.custom_attribute_definition.owned.updated", + "scopes": [ + "ORDERS_READ" + ] + }, + "x-api": "#/components/x-apis/OrderCustomAttributes", + "x-since": "2022-11-16" }, - "OrderFulfillmentDeliveryDetails": { + "OrderCustomAttributeDefinitionVisibleCreatedEvent": { "type": "object", - "description": "Describes delivery details of an order fulfillment.", + "description": "Published when an order [custom attribute definition](entity:CustomAttributeDefinition) that is visible to the subscribing app is created.", "x-release-status": "BETA", "properties": { - "recipient": { - "$ref": "#/components/schemas/OrderFulfillmentRecipient", - "description": "The contact information for the person to receive the fulfillment.", + "merchant_id": { + "type": "string", + "description": "The ID of the target seller associated with the event.", "nullable": true }, - "schedule_type": { - "$ref": "#/components/schemas/OrderFulfillmentDeliveryDetailsScheduleType", - "description": "Indicates the fulfillment delivery schedule type. If `SCHEDULED`, then\n`deliver_at` is required. If `ASAP`, then `prep_time_duration` is required. The default is `SCHEDULED`.\nSee [OrderFulfillmentDeliveryDetailsScheduleType](#type-orderfulfillmentdeliverydetailsscheduletype) for possible values", + "type": { + "type": "string", + "description": "The type of this event. The value is `\"order.custom_attribute_definition.visible.created\"`.", "nullable": true }, - "placed_at": { + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { "type": "string", - "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment was placed.\nThe timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\").\nMust be in RFC 3339 timestamp format, e.g., \"2016-09-04T23:59:33.123Z\".", + "description": "The timestamp of when the event was created, in RFC 3339 format.", "readOnly": true }, - "deliver_at": { + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2022-11-09T20:59:17.185Z", + "data": { + "id": "sq0ids-tr5sCkWm3b9X9MkpAvJ42A:table-number", + "object": { + "created_at": "2022-11-09T20:59:17.185Z", + "description": "Table number at a location", + "key": "sq0ids-tr5sCkWm3b9X9MkpAvJ42A:table-number", + "name": "Table Number", + "schema": { + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + }, + "updated_at": "2022-11-09T20:59:17.185Z", + "version": 1, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute_definition" + }, + "event_id": "32515c08-b0c3-3835-9606-f43f613e4635", + "merchant_id": "MLABZFS5JTW5B", + "type": "order.custom_attribute_definition.visible.created" + }, + "x-webhook": { + "event": "order.custom_attribute_definition.visible.created", + "scopes": [ + "ORDERS_READ" + ] + }, + "x-api": "#/components/x-apis/OrderCustomAttributes", + "x-since": "2022-11-16" + }, + "OrderCustomAttributeDefinitionVisibleDeletedEvent": { + "type": "object", + "description": "Published when an order [custom attribute definition](entity:CustomAttributeDefinition) that is visible to the subscribing app is deleted.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { "type": "string", - "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nthat represents the start of the delivery period.\nWhen the fulfillment `schedule_type` is `ASAP`, the field is automatically\nset to the current time plus the `prep_time_duration`.\nOtherwise, the application can set this field while the fulfillment `state` is\n`PROPOSED`, `RESERVED`, or `PREPARED` (any time before the\nterminal state such as `COMPLETED`, `CANCELED`, and `FAILED`).\n\nThe timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", + "description": "The ID of the target seller associated with the event.", "nullable": true }, - "prep_time_duration": { + "type": { "type": "string", - "description": "The duration of time it takes to prepare and deliver this fulfillment.\nThe duration must be in RFC 3339 format (for example, \"P1W3D\").", + "description": "The type of this event. The value is `\"order.custom_attribute_definition.visible.deleted\"`.", "nullable": true }, - "delivery_window_duration": { + "event_id": { "type": "string", - "description": "The time period after `deliver_at` in which to deliver the order.\nApplications can set this field when the fulfillment `state` is\n`PROPOSED`, `RESERVED`, or `PREPARED` (any time before the terminal state\nsuch as `COMPLETED`, `CANCELED`, and `FAILED`).\nThe duration must be in RFC 3339 format (for example, \"P1W3D\").", + "description": "A unique ID for the event.", "nullable": true }, - "note": { + "created_at": { "type": "string", - "description": "Provides additional instructions about the delivery fulfillment.\nIt is displayed in the Square Point of Sale application and set by the API.", - "maxLength": 550, + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event.", "nullable": true + } + }, + "example": { + "created_at": "2022-11-09T21:04:52Z", + "data": { + "deleted": true, + "id": "sq0ids-tr5sCkWm3b9X9MkpAvJ42A:table-number", + "object": { + "created_at": "2022-11-09T20:56:14.351Z", + "description": "Table number at a location", + "key": "sq0ids-tr5sCkWm3b9X9MkpAvJ42A:table-number", + "name": "Table Number", + "schema": { + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + }, + "updated_at": "2022-11-09T20:56:14.351Z", + "version": 1, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute_definition" }, - "completed_at": { + "event_id": "536e094e-d704-3962-9caa-a981240f13f1", + "merchant_id": "MLABZFS5JTW5B", + "type": "order.custom_attribute_definition.visible.deleted" + }, + "x-webhook": { + "event": "order.custom_attribute_definition.visible.deleted", + "scopes": [ + "ORDERS_READ" + ] + }, + "x-api": "#/components/x-apis/OrderCustomAttributes", + "x-since": "2022-11-16" + }, + "OrderCustomAttributeDefinitionVisibleUpdatedEvent": { + "type": "object", + "description": "Published when an order [custom attribute definition](entity:CustomAttributeDefinition) that is visible to the subscribing app is updated.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { "type": "string", - "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicates when the seller completed the fulfillment.\nThis field is automatically set when fulfillment `state` changes to `COMPLETED`.\nThe timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\").", + "description": "The ID of the target seller associated with the event.", "nullable": true }, - "in_progress_at": { + "type": { "type": "string", - "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicates when the seller started processing the fulfillment.\nThis field is automatically set when the fulfillment `state` changes to `RESERVED`.\nThe timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\").", - "readOnly": true + "description": "The type of this event. The value is `\"order.custom_attribute_definition.visible.updated\"`.", + "nullable": true }, - "rejected_at": { + "event_id": { "type": "string", - "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment was rejected. This field is\nautomatically set when the fulfillment `state` changes to `FAILED`.\nThe timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\").", - "readOnly": true + "description": "A unique ID for the event.", + "nullable": true }, - "ready_at": { + "created_at": { "type": "string", - "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the seller marked the fulfillment as ready for\ncourier pickup. This field is automatically set when the fulfillment `state` changes\nto PREPARED.\nThe timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\").", + "description": "The timestamp of when the event was created, in RFC 3339 format.", "readOnly": true }, - "delivered_at": { + "data": { + "$ref": "#/components/schemas/CustomAttributeDefinitionEventData", + "description": "The data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2022-11-09T21:25:45.592Z", + "data": { + "id": "sq0ids-tr5sCkWm3b9X9MkpAvJ42A:table-number", + "object": { + "created_at": "2022-11-09T21:25:28.693Z", + "description": "Table number at a location", + "key": "sq0ids-tr5sCkWm3b9X9MkpAvJ42A:table-number", + "name": "Table Number", + "schema": { + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String" + }, + "updated_at": "2022-11-09T21:25:45.592Z", + "version": 2, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute_definition" + }, + "event_id": "b0262c17-dea7-3a7e-aeb2-52bfb962959b", + "merchant_id": "MLABZFS5JTW5B", + "type": "order.custom_attribute_definition.visible.updated" + }, + "x-webhook": { + "event": "order.custom_attribute_definition.visible.updated", + "scopes": [ + "ORDERS_READ" + ] + }, + "x-api": "#/components/x-apis/OrderCustomAttributes", + "x-since": "2022-11-16" + }, + "OrderCustomAttributeOwnedDeletedEvent": { + "type": "object", + "description": "Published when an order [custom attribute](entity:CustomAttribute) associated with a [custom attribute definition](entity:CustomAttributeDefinition) that is owned by the subscribing app is deleted.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { "type": "string", - "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment was delivered to the recipient.\nThe timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\").", + "description": "The ID of the target seller associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"order.custom_attribute.owned.deleted\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", "readOnly": true }, - "canceled_at": { + "data": { + "$ref": "#/components/schemas/CustomAttributeEventData", + "description": "The data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2022-11-09T21:36:17Z", + "data": { + "deleted": true, + "id": "sq0ids-tr5sCkWm3b9X9MkpAvJ42A:table-number:ORDER:VilxhxZHuWEqDC6GQNgiLNshRMYZY", + "object": { + "created_at": "2022-11-09T21:30:17.093Z", + "key": "sq0ids-tr5sCkWm3b9X9MkpAvJ42A:table-number", + "updated_at": "2022-11-09T21:34:20.906Z", + "value": "TEST", + "version": 2, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute" + }, + "event_id": "0026e02d-de6f-32b3-ba9f-d353d46544eb", + "merchant_id": "MLABZFS5JTW5B", + "type": "order.custom_attribute.owned.deleted" + }, + "x-webhook": { + "event": "order.custom_attribute.owned.deleted", + "scopes": [ + "ORDERS_READ" + ] + }, + "x-api": "#/components/x-apis/OrderCustomAttributes", + "x-since": "2022-11-16" + }, + "OrderCustomAttributeOwnedUpdatedEvent": { + "type": "object", + "description": "Published when an order [custom attribute](entity:CustomAttribute) associated with a [custom attribute definition](entity:CustomAttributeDefinition) that is owned by the subscribing app is updated.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { "type": "string", - "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment was canceled. This field is automatically\nset when the fulfillment `state` changes to `CANCELED`.\n\nThe timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\").", + "description": "The ID of the target seller associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"order.custom_attribute.owned.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", "readOnly": true }, - "cancel_reason": { + "data": { + "$ref": "#/components/schemas/CustomAttributeEventData", + "description": "The data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2022-11-09T21:30:17.093Z", + "data": { + "id": "sq0ids-tr5sCkWm3b9X9MkpAvJ42A:table-number:ORDER:VilxhxZHuWEqDC6GQNgiLNshRMYZY", + "object": { + "created_at": "2022-11-09T21:30:17.093Z", + "key": "sq0ids-tr5sCkWm3b9X9MkpAvJ42A:table-number", + "updated_at": "2022-11-09T21:30:17.093Z", + "value": "Table-WK", + "version": 1, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute" + }, + "event_id": "92322a74-fd56-304e-aba7-4c4a7b82c003", + "merchant_id": "MLABZFS5JTW5B", + "type": "order.custom_attribute.owned.updated" + }, + "x-webhook": { + "event": "order.custom_attribute.owned.updated", + "scopes": [ + "ORDERS_READ" + ] + }, + "x-api": "#/components/x-apis/OrderCustomAttributes", + "x-since": "2022-11-16" + }, + "OrderCustomAttributeVisibleDeletedEvent": { + "type": "object", + "description": "Published when an order [custom attribute](entity:CustomAttribute) that is visible to the subscribing app is deleted.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { "type": "string", - "description": "The delivery cancellation reason. Max length: 100 characters.", - "maxLength": 100, + "description": "The ID of the target seller associated with the event.", "nullable": true }, - "courier_pickup_at": { + "type": { "type": "string", - "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when an order can be picked up by the courier for delivery.\nThe timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\").", + "description": "The type of this event. The value is `\"order.custom_attribute.visible.deleted\"`.", "nullable": true }, - "courier_pickup_window_duration": { + "event_id": { "type": "string", - "description": "The time period after `courier_pickup_at` in which the courier should pick up the order.\nThe duration must be in RFC 3339 format (for example, \"P1W3D\").", + "description": "A unique ID for the event.", "nullable": true }, - "is_no_contact_delivery": { - "type": "boolean", - "description": "Whether the delivery is preferred to be no contact.", + "created_at": { + "type": "string", + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeEventData", + "description": "The data associated with the event.", "nullable": true + } + }, + "example": { + "created_at": "2022-11-09T21:36:17Z", + "data": { + "deleted": true, + "id": "sq0ids-tr5sCkWm3b9X9MkpAvJ42A:table-number:ORDER:VilxhxZHuWEqDC6GQNgiLNshRMYZY", + "object": { + "created_at": "2022-11-09T21:30:17.093Z", + "key": "sq0ids-tr5sCkWm3b9X9MkpAvJ42A:table-number", + "updated_at": "2022-11-09T21:34:20.906Z", + "value": "Table-WK", + "version": 2, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute" }, - "dropoff_notes": { + "event_id": "0a847808-3985-361d-b31f-b6060ccfea43", + "merchant_id": "MLABZFS5JTW5B", + "type": "order.custom_attribute.visible.deleted" + }, + "x-webhook": { + "event": "order.custom_attribute.visible.deleted", + "scopes": [ + "ORDERS_READ" + ] + }, + "x-api": "#/components/x-apis/OrderCustomAttributes", + "x-since": "2022-11-16" + }, + "OrderCustomAttributeVisibleUpdatedEvent": { + "type": "object", + "description": "Published when an order [custom attribute](entity:CustomAttribute) that is visible to the subscribing app is updated.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { "type": "string", - "description": "A note to provide additional instructions about how to deliver the order.", - "maxLength": 550, + "description": "The ID of the target seller associated with the event.", "nullable": true }, - "courier_provider_name": { + "type": { "type": "string", - "description": "The name of the courier provider.", - "maxLength": 255, + "description": "The type of this event. The value is `\"order.custom_attribute.visible.updated\"`.", "nullable": true }, - "courier_support_phone_number": { + "event_id": { "type": "string", - "description": "The support phone number of the courier.", - "maxLength": 17, + "description": "A unique ID for the event.", "nullable": true }, - "square_delivery_id": { + "created_at": { "type": "string", - "description": "The identifier for the delivery created by Square.", - "maxLength": 50, + "description": "The timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/CustomAttributeEventData", + "description": "The data associated with the event.", "nullable": true + } + }, + "example": { + "created_at": "2022-11-09T21:30:17.093Z", + "data": { + "id": "sq0ids-tr5sCkWm3b9X9MkpAvJ42A:table-number:ORDER:VilxhxZHuWEqDC6GQNgiLNshRMYZY", + "object": { + "created_at": "2022-11-09T21:30:17.093Z", + "key": "sq0ids-tr5sCkWm3b9X9MkpAvJ42A:table-number", + "updated_at": "2022-11-09T21:30:17.093Z", + "value": "Table-WK", + "version": 1, + "visibility": "VISIBILITY_READ_WRITE_VALUES" + }, + "type": "custom_attribute" }, - "external_delivery_id": { + "event_id": "ff7b8470-95fc-3f29-8939-2a6cc23aca95", + "merchant_id": "MLABZFS5JTW5B", + "type": "order.custom_attribute.visible.updated" + }, + "x-webhook": { + "event": "order.custom_attribute.visible.updated", + "scopes": [ + "ORDERS_READ" + ] + }, + "x-api": "#/components/x-apis/OrderCustomAttributes", + "x-since": "2022-11-16" + }, + "OrderEntry": { + "type": "object", + "description": "A lightweight description of an [order](entity:Order) that is returned when\n`returned_entries` is `true` on a [SearchOrdersRequest](api-endpoint:Orders-SearchOrders).", + "x-release-status": "PUBLIC", + "properties": { + "order_id": { "type": "string", - "description": "The identifier for the delivery created by the third-party courier service.", - "maxLength": 50, + "description": "The ID of the order.", "nullable": true }, - "managed_delivery": { - "type": "boolean", - "description": "The flag to indicate the delivery is managed by a third party (ie DoorDash), which means\nwe may not receive all recipient information for PII purposes.", + "version": { + "type": "integer", + "description": "The version number, which is incremented each time an update is committed to the order.\nOrders that were not created through the API do not include a version number and\ntherefore cannot be updated.\n\n[Read more about working with versions.](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders)", + "readOnly": true, + "x-release-status": "BETA" + }, + "location_id": { + "type": "string", + "description": "The location ID the order belongs to.", "nullable": true } } @@ -32493,42 +40894,6 @@ "description": "The schedule type of the delivery fulfillment.", "x-release-status": "BETA" }, - "OrderFulfillmentFulfillmentEntry": { - "type": "object", - "description": "Links an order line item to a fulfillment. Each entry must reference\na valid `uid` for an order line item in the `line_item_uid` field, as well as a `quantity` to\nfulfill.", - "x-release-status": "BETA", - "required": [ - "line_item_uid", - "quantity" - ], - "properties": { - "uid": { - "type": "string", - "description": "A unique ID that identifies the fulfillment entry only within this order.", - "maxLength": 60, - "nullable": true - }, - "line_item_uid": { - "type": "string", - "description": "The `uid` from the order line item.", - "minLength": 1 - }, - "quantity": { - "type": "string", - "description": "The quantity of the line item being fulfilled, formatted as a decimal number.\nFor example, `\"3\"`.\nFulfillments for line items with a `quantity_unit` can have non-integer quantities.\nFor example, `\"1.70000\"`.", - "minLength": 1, - "maxLength": 12 - }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Application-defined data attached to this fulfillment entry. Metadata fields are intended\nto store descriptive references or associations with an entity in another system or store brief\ninformation about the object. Square does not process this field; it only stores and returns it\nin relevant API calls. Do not use metadata to store any sensitive information (such as personally\nidentifiable information or card details).\nKeys written by applications must be 60 characters or less and must be in the character set\n`[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed\nwith a namespace, separated from the key with a ':' character.\nValues have a maximum length of 255 characters.\nAn application can have up to 10 entries per metadata field.\nEntries written by applications are private and can only be read or modified by the same\napplication.\nFor more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata).", - "nullable": true - } - } - }, "OrderFulfillmentFulfillmentLineItemApplication": { "type": "string", "enum": [ @@ -32548,125 +40913,6 @@ "description": "The `line_item_application` describes what order line items this fulfillment applies\nto. It can be `ALL` or `ENTRY_LIST` with a supplied list of fulfillment entries.", "x-release-status": "BETA" }, - "OrderFulfillmentPickupDetails": { - "type": "object", - "description": "Contains details necessary to fulfill a pickup order.", - "x-release-status": "PUBLIC", - "properties": { - "recipient": { - "$ref": "#/components/schemas/OrderFulfillmentRecipient", - "description": "Information about the person to pick up this fulfillment from a physical\nlocation.", - "nullable": true - }, - "expires_at": { - "type": "string", - "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when this fulfillment expires if it is not marked in progress. The timestamp must be\nin RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\"). The expiration time can only be set\nup to 7 days in the future. If `expires_at` is not set, any new payments attached to the order\nare automatically completed.", - "nullable": true - }, - "auto_complete_duration": { - "type": "string", - "description": "The duration of time after which an in progress pickup fulfillment is automatically moved\nto the `COMPLETED` state. The duration must be in RFC 3339 format (for example, \"P1W3D\").\n\nIf not set, this pickup fulfillment remains in progress until it is canceled or completed.", - "nullable": true - }, - "schedule_type": { - "$ref": "#/components/schemas/OrderFulfillmentPickupDetailsScheduleType", - "description": "The schedule type of the pickup fulfillment. Defaults to `SCHEDULED`.\nSee [OrderFulfillmentPickupDetailsScheduleType](#type-orderfulfillmentpickupdetailsscheduletype) for possible values", - "nullable": true - }, - "pickup_at": { - "type": "string", - "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nthat represents the start of the pickup window. Must be in RFC 3339 timestamp format, e.g.,\n\"2016-09-04T23:59:33.123Z\".\nFor fulfillments with the schedule type `ASAP`, this is automatically set\nto the current time plus the expected duration to prepare the fulfillment.", - "nullable": true - }, - "pickup_window_duration": { - "type": "string", - "description": "The window of time in which the order should be picked up after the `pickup_at` timestamp.\nMust be in RFC 3339 duration format, e.g., \"P1W3D\". Can be used as an\ninformational guideline for merchants.", - "nullable": true - }, - "prep_time_duration": { - "type": "string", - "description": "The duration of time it takes to prepare this fulfillment.\nThe duration must be in RFC 3339 format (for example, \"P1W3D\").", - "nullable": true - }, - "note": { - "type": "string", - "description": "A note to provide additional instructions about the pickup\nfulfillment displayed in the Square Point of Sale application and set by the API.", - "maxLength": 500, - "nullable": true - }, - "placed_at": { - "type": "string", - "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment was placed. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", - "readOnly": true - }, - "accepted_at": { - "type": "string", - "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment was marked in progress. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", - "readOnly": true - }, - "rejected_at": { - "type": "string", - "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment was rejected. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", - "readOnly": true - }, - "ready_at": { - "type": "string", - "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment is marked as ready for pickup. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", - "readOnly": true - }, - "expired_at": { - "type": "string", - "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment expired. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", - "readOnly": true - }, - "picked_up_at": { - "type": "string", - "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment was picked up by the recipient. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", - "readOnly": true - }, - "canceled_at": { - "type": "string", - "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the fulfillment was canceled. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", - "readOnly": true - }, - "cancel_reason": { - "type": "string", - "description": "A description of why the pickup was canceled. The maximum length: 100 characters.", - "maxLength": 100, - "nullable": true - }, - "is_curbside_pickup": { - "type": "boolean", - "description": "If set to `true`, indicates that this pickup order is for curbside pickup, not in-store pickup.", - "x-release-status": "BETA", - "nullable": true - }, - "curbside_pickup_details": { - "$ref": "#/components/schemas/OrderFulfillmentPickupDetailsCurbsidePickupDetails", - "description": "Specific details for curbside pickup. These details can only be populated if `is_curbside_pickup` is set to `true`.", - "x-release-status": "BETA", - "nullable": true - } - } - }, - "OrderFulfillmentPickupDetailsCurbsidePickupDetails": { - "type": "object", - "description": "Specific details for curbside pickup.", - "x-release-status": "BETA", - "properties": { - "curbside_details": { - "type": "string", - "description": "Specific details for curbside pickup, such as parking number and vehicle model.", - "maxLength": 250, - "nullable": true - }, - "buyer_arrived_at": { - "type": "string", - "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the buyer arrived and is waiting for pickup. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", - "nullable": true - } - } - }, "OrderFulfillmentPickupDetailsScheduleType": { "type": "string", "enum": [ @@ -32686,132 +40932,6 @@ "description": "The schedule type of the pickup fulfillment.", "x-release-status": "PUBLIC" }, - "OrderFulfillmentRecipient": { - "type": "object", - "description": "Information about the fulfillment recipient.", - "x-release-status": "PUBLIC", - "properties": { - "customer_id": { - "type": "string", - "description": "The ID of the customer associated with the fulfillment.\nIf `customer_id` is provided, the fulfillment recipient's `display_name`,\n`email_address`, and `phone_number` are automatically populated from the\ntargeted customer profile. If these fields are set in the request, the request\nvalues override the information from the customer profile. If the\ntargeted customer profile does not contain the necessary information and\nthese fields are left unset, the request results in an error.", - "maxLength": 191, - "nullable": true - }, - "display_name": { - "type": "string", - "description": "The display name of the fulfillment recipient. This field is required.\nIf provided, the display name overrides the corresponding customer profile value\nindicated by `customer_id`.", - "maxLength": 255, - "nullable": true - }, - "email_address": { - "type": "string", - "description": "The email address of the fulfillment recipient.\nIf provided, the email address overrides the corresponding customer profile value\nindicated by `customer_id`.", - "maxLength": 255, - "nullable": true - }, - "phone_number": { - "type": "string", - "description": "The phone number of the fulfillment recipient. This field is required.\nIf provided, the phone number overrides the corresponding customer profile value\nindicated by `customer_id`.", - "maxLength": 17, - "nullable": true - }, - "address": { - "$ref": "#/components/schemas/Address", - "description": "The address of the fulfillment recipient. This field is required.\nIf provided, the address overrides the corresponding customer profile value\nindicated by `customer_id`.", - "x-release-status": "BETA", - "nullable": true - } - } - }, - "OrderFulfillmentShipmentDetails": { - "type": "object", - "description": "Contains the details necessary to fulfill a shipment order.", - "x-release-status": "BETA", - "properties": { - "recipient": { - "$ref": "#/components/schemas/OrderFulfillmentRecipient", - "description": "Information about the person to receive this shipment fulfillment.", - "nullable": true - }, - "carrier": { - "type": "string", - "description": "The shipping carrier being used to ship this fulfillment (such as UPS, FedEx, or USPS).", - "maxLength": 50, - "nullable": true - }, - "shipping_note": { - "type": "string", - "description": "A note with additional information for the shipping carrier.", - "maxLength": 500, - "nullable": true - }, - "shipping_type": { - "type": "string", - "description": "A description of the type of shipping product purchased from the carrier\n(such as First Class, Priority, or Express).", - "maxLength": 50, - "nullable": true - }, - "tracking_number": { - "type": "string", - "description": "The reference number provided by the carrier to track the shipment's progress.", - "maxLength": 100, - "nullable": true - }, - "tracking_url": { - "type": "string", - "description": "A link to the tracking webpage on the carrier's website.", - "maxLength": 2000, - "nullable": true - }, - "placed_at": { - "type": "string", - "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the shipment was requested. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", - "readOnly": true - }, - "in_progress_at": { - "type": "string", - "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when this fulfillment was moved to the `RESERVED` state, which indicates that preparation\nof this shipment has begun. The timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\").", - "readOnly": true - }, - "packaged_at": { - "type": "string", - "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when this fulfillment was moved to the `PREPARED` state, which indicates that the\nfulfillment is packaged. The timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\").", - "readOnly": true - }, - "expected_shipped_at": { - "type": "string", - "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the shipment is expected to be delivered to the shipping carrier.\nThe timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\").", - "nullable": true - }, - "shipped_at": { - "type": "string", - "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when this fulfillment was moved to the `COMPLETED` state, which indicates that\nthe fulfillment has been given to the shipping carrier. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", - "readOnly": true - }, - "canceled_at": { - "type": "string", - "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating the shipment was canceled.\nThe timestamp must be in RFC 3339 format (for example, \"2016-09-04T23:59:33.123Z\").", - "nullable": true - }, - "cancel_reason": { - "type": "string", - "description": "A description of why the shipment was canceled.", - "maxLength": 100, - "nullable": true - }, - "failed_at": { - "type": "string", - "description": "The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)\nindicating when the shipment failed to be completed. The timestamp must be in RFC 3339 format\n(for example, \"2016-09-04T23:59:33.123Z\").", - "readOnly": true - }, - "failure_reason": { - "type": "string", - "description": "A description of why the shipment failed to be completed.", - "maxLength": 100, - "nullable": true - } - } - }, "OrderFulfillmentState": { "type": "string", "enum": [ @@ -32918,6 +41038,93 @@ } } }, + "OrderFulfillmentUpdatedEvent": { + "type": "object", + "description": "Published when an [OrderFulfillment](entity:OrderFulfillment)\nis created or updated. This event is triggered only by the\n[UpdateOrder](api-endpoint:Orders-UpdateOrder) endpoint call.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"order.fulfillment.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/OrderFulfillmentUpdatedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-04-16T23:16:30.789Z", + "data": { + "id": "eA3vssLHKJrv9H0IdJCM3gNqfdcZY", + "object": { + "order_fulfillment_updated": { + "created_at": "2020-04-16T23:14:26.129Z", + "fulfillment_update": [ + { + "fulfillment_uid": "VWJ1N9leLqjSDLvF2hvYjD", + "new_state": "RESERVED", + "old_state": "PROPOSED" + } + ], + "location_id": "FPYCBCHYMXFK1", + "order_id": "eA3vssLHKJrv9H0IdJCM3gNqfdcZY", + "state": "OPEN", + "updated_at": "2020-04-16T23:16:30.789Z", + "version": 6 + } + }, + "type": "order_fulfillment_updated" + }, + "event_id": "b3adf364-4937-436e-a833-49c72b4baee8", + "merchant_id": "5S9MXCS9Y99KK", + "type": "order.fulfillment.updated" + }, + "x-webhook": { + "event": "order.fulfillment.updated", + "scopes": [ + "ORDERS_READ" + ] + }, + "x-api": "#/components/x-apis/Orders", + "x-since": "2020-04-22" + }, + "OrderFulfillmentUpdatedEventData": { + "type": "object", + "x-release-status": "BETA", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected object’s type, `\"order_fulfillment_updated\"`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the affected order." + }, + "object": { + "$ref": "#/components/schemas/OrderFulfillmentUpdatedObject", + "description": "An object containing information about the updated Order.", + "nullable": true + } + } + }, "OrderFulfillmentUpdatedObject": { "type": "object", "x-release-status": "BETA", @@ -34480,25 +42687,93 @@ } } }, - "OrderUpdatedObject": { + "OrderUpdatedEvent": { "type": "object", + "description": "Published when an [Order](entity:Order) is updated. This\nevent is triggered by the [UpdateOrder](api-endpoint:Orders-UpdateOrder)\nendpoint call, Order Manager, or the Square Dashboard.", "x-release-status": "BETA", "properties": { - "order_updated": { - "$ref": "#/components/schemas/OrderUpdated", - "description": "Information about the updated order.", + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"order.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/OrderUpdatedEventData", + "description": "Data associated with the event.", "nullable": true } - } + }, + "example": { + "created_at": "2020-04-16T23:14:26.359Z", + "data": { + "id": "eA3vssLHKJrv9H0IdJCM3gNqfdcZY", + "object": { + "order_updated": { + "created_at": "2020-04-16T23:14:26.129Z", + "location_id": "FPYCBCHYMXFK1", + "order_id": "eA3vssLHKJrv9H0IdJCM3gNqfdcZY", + "state": "OPEN", + "updated_at": "2020-04-16T23:14:26.359Z", + "version": 2 + } + }, + "type": "order_updated" + }, + "event_id": "4b8e5c91-9f17-4cf1-900a-4a0629f81add", + "merchant_id": "5S9MXCS9Y99KK", + "type": "order.updated" + }, + "x-webhook": { + "event": "order.updated", + "scopes": [ + "ORDERS_READ" + ] + }, + "x-api": "#/components/x-apis/Orders", + "x-since": "2020-04-22" }, - "PaginationCursor": { + "OrderUpdatedEventData": { "type": "object", - "description": "Used *internally* to encapsulate pagination details. The resulting proto will be base62 encoded\nin order to produce a cursor that can be used externally.", "x-release-status": "BETA", "properties": { - "order_value": { + "type": { "type": "string", - "description": "The ID of the last resource in the current page. The page can be in an ascending or\ndescending order", + "description": "Name of the affected object’s type, `\"order_updated\"`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the affected order." + }, + "object": { + "$ref": "#/components/schemas/OrderUpdatedObject", + "description": "An object containing information about the updated Order.", + "nullable": true + } + } + }, + "OrderUpdatedObject": { + "type": "object", + "x-release-status": "BETA", + "properties": { + "order_updated": { + "$ref": "#/components/schemas/OrderUpdated", + "description": "Information about the updated order.", "nullable": true } } @@ -35387,6 +43662,146 @@ } } }, + "PaymentCreatedEvent": { + "type": "object", + "description": "Published when a [Payment](entity:Payment) is created.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"payment.created\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/PaymentCreatedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-02-06T21:27:30.792Z", + "data": { + "id": "KkAkhdMsgzn59SM8A89WgKwekxLZY", + "object": { + "payment": { + "amount_money": { + "amount": 100, + "currency": "USD" + }, + "approved_money": { + "amount": 100, + "currency": "USD" + }, + "capabilities": [ + "EDIT_TIP_AMOUNT", + "EDIT_TIP_AMOUNT_UP", + "EDIT_TIP_AMOUNT_DOWN" + ], + "card_details": { + "avs_status": "AVS_ACCEPTED", + "card": { + "bin": "540988", + "card_brand": "MASTERCARD", + "card_type": "CREDIT", + "exp_month": 11, + "exp_year": 2022, + "fingerprint": "sq-1-Tvruf3vPQxlvI6n0IcKYfBukrcv6IqWr8UyBdViWXU2yzGn5VMJvrsHMKpINMhPmVg", + "last_4": "9029", + "prepaid_type": "NOT_PREPAID" + }, + "card_payment_timeline": { + "authorized_at": "2020-11-22T21:16:51.198Z" + }, + "cvv_status": "CVV_ACCEPTED", + "entry_method": "KEYED", + "statement_description": "SQ *DEFAULT TEST ACCOUNT", + "status": "AUTHORIZED" + }, + "created_at": "2020-11-22T21:16:51.086Z", + "delay_action": "CANCEL", + "delay_duration": "PT168H", + "delayed_until": "2020-11-29T21:16:51.086Z", + "id": "hYy9pRFVxpDsO1FB05SunFWUe9JZY", + "location_id": "S8GWD5R9QB376", + "order_id": "03O3USaPaAaFnI6kkwB1JxGgBsUZY", + "receipt_number": "hYy9", + "risk_evaluation": { + "created_at": "2020-11-22T21:16:51.198Z", + "risk_level": "NORMAL" + }, + "source_type": "CARD", + "status": "APPROVED", + "total_money": { + "amount": 100, + "currency": "USD" + }, + "updated_at": "2020-11-22T21:16:51.198Z", + "version_token": "FfQhQJf9r3VSQIgyWBk1oqhIwiznLwVwJbVVA0bdyEv6o" + } + }, + "type": "payment" + }, + "event_id": "13b867cf-db3d-4b1c-90b6-2f32a9d78124", + "merchant_id": "6SSW7HV8K2ST5", + "type": "payment.created" + }, + "x-webhook": { + "event": "payment.created", + "scopes": [ + "PAYMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/Payments", + "x-since": "2020-02-26" + }, + "PaymentCreatedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected object’s type, `\"payment\"`.", + "maxLength": 50, + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the affected payment.", + "maxLength": 192 + }, + "object": { + "$ref": "#/components/schemas/PaymentCreatedEventObject", + "description": "An object containing the created payment.", + "nullable": true + } + } + }, + "PaymentCreatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "payment": { + "$ref": "#/components/schemas/Payment", + "description": "The created payment.", + "nullable": true + } + } + }, "PaymentLink": { "type": "object", "x-release-status": "PUBLIC", @@ -35625,6 +44040,143 @@ } } }, + "PaymentUpdatedEvent": { + "type": "object", + "description": "Published when a [Payment](entity:Payment) is updated.\nTypically the `payment.status`, or `card_details.status` fields are updated\nas a payment is canceled, authorized, or completed.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"payment.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/PaymentUpdatedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-02-06T21:27:34.308Z", + "data": { + "id": "hYy9pRFVxpDsO1FB05SunFWUe9JZY", + "object": { + "payment": { + "amount_money": { + "amount": 100, + "currency": "USD" + }, + "approved_money": { + "amount": 100, + "currency": "USD" + }, + "card_details": { + "avs_status": "AVS_ACCEPTED", + "card": { + "bin": "540988", + "card_brand": "MASTERCARD", + "card_type": "CREDIT", + "exp_month": 11, + "exp_year": 2022, + "fingerprint": "sq-1-Tvruf3vPQxlvI6n0IcKYfBukrcv6IqWr8UyBdViWXU2yzGn5VMJvrsHMKpINMhPmVg", + "last_4": "9029", + "prepaid_type": "NOT_PREPAID" + }, + "card_payment_timeline": { + "authorized_at": "2020-11-22T21:16:51.198Z", + "captured_at": "2020-11-22T21:19:00.832Z" + }, + "cvv_status": "CVV_ACCEPTED", + "entry_method": "KEYED", + "statement_description": "SQ *DEFAULT TEST ACCOUNT", + "status": "CAPTURED" + }, + "created_at": "2020-11-22T21:16:51.086Z", + "delay_action": "CANCEL", + "delay_duration": "PT168H", + "delayed_until": "2020-11-29T21:16:51.086Z", + "id": "hYy9pRFVxpDsO1FB05SunFWUe9JZY", + "location_id": "S8GWD5R9QB376", + "order_id": "03O3USaPaAaFnI6kkwB1JxGgBsUZY", + "receipt_number": "hYy9", + "receipt_url": "https://squareup.com/receipt/preview/hYy9pRFVxpDsO1FB05SunFWUe9JZY", + "risk_evaluation": { + "created_at": "2020-11-22T21:16:51.198Z", + "risk_level": "NORMAL" + }, + "source_type": "CARD", + "status": "COMPLETED", + "total_money": { + "amount": 100, + "currency": "USD" + }, + "updated_at": "2020-11-22T21:19:00.831Z", + "version_token": "bhC3b8qKJvNDdxqKzXaeDsAjS1oMFuAKxGgT32HbE6S6o" + } + }, + "type": "payment" + }, + "event_id": "6a8f5f28-54a1-4eb0-a98a-3111513fd4fc", + "merchant_id": "6SSW7HV8K2ST5", + "type": "payment.updated" + }, + "x-webhook": { + "event": "payment.updated", + "scopes": [ + "PAYMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/Payments", + "x-since": "2020-02-26" + }, + "PaymentUpdatedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected object’s type, `\"payment\"`.", + "maxLength": 50, + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the affected payment.", + "maxLength": 192 + }, + "object": { + "$ref": "#/components/schemas/PaymentUpdatedEventObject", + "description": "An object containing the updated payment.", + "nullable": true + } + } + }, + "PaymentUpdatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "payment": { + "$ref": "#/components/schemas/Payment", + "description": "The updated payment.", + "nullable": true + } + } + }, "Payout": { "type": "object", "description": "An accounting of the amount owed the seller and record of the actual transfer to their\nexternal bank account or to the Square balance.", @@ -35867,6 +44419,114 @@ } } }, + "PayoutFailedEvent": { + "type": "object", + "description": "Published when a [Payout](entity:Payout) has failed.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "location_id": { + "type": "string", + "description": "The ID of the target location associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event that this represents, `payout.failed`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The timestamp of when the event was verified, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/PayoutFailedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "1970-01-01T00:20:28.481Z", + "data": { + "id": "po_070431e4-e351-11eb-a8bb-02420a140009", + "object": { + "payout": { + "amount_money": { + "amount": 457, + "currency_code": "EUR" + }, + "arrival_date": "2021-07-13", + "created_at": "2021-07-12T20:37:51Z", + "destination": { + "id": "bact:c164d7ec7302", + "type": "BANK_ACCOUNT" + }, + "id": "po_070431e4-e351-11eb-a8bb-02420a140009", + "location_id": "LRJNZCB190DTQ", + "status": "FAILED", + "type": "BATCH", + "updated_at": "1970-01-01T00:20:28.481Z", + "version": 2 + } + }, + "type": "payout" + }, + "event_id": "7116e4a4-7622-42b0-b16c-c164d7ec7302", + "location_id": "LRJNZCB190DTQ", + "merchant_id": "MLEWJTMNJN37Z", + "type": "payout.failed" + }, + "x-webhook": { + "event": "payout.failed", + "scopes": [ + "PAYOUTS_READ", + "SETTLEMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/Payouts", + "x-since": "2022-04-20" + }, + "PayoutFailedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "The name of the affected object's type, `payout`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "The ID of the failed payout." + }, + "object": { + "$ref": "#/components/schemas/PayoutFailedEventObject", + "description": "An object containing the failed payout.", + "nullable": true + } + } + }, + "PayoutFailedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "payout": { + "$ref": "#/components/schemas/Payout", + "description": "The payout that failed.", + "nullable": true + } + } + }, "PayoutFee": { "type": "object", "description": "Represents a payout fee that can incur as part of a payout.", @@ -35908,6 +44568,222 @@ "description": "Represents the type of payout fee that can incur as part of a payout.", "x-release-status": "PUBLIC" }, + "PayoutPaidEvent": { + "type": "object", + "description": "Published when a [Payout](entity:Payout) is complete.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "location_id": { + "type": "string", + "description": "The ID of the target location associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"payout.paid\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was verified, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/PayoutPaidEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "1970-01-01T00:20:28.481Z", + "data": { + "id": "po_070431e4-e351-11eb-a8bb-02420a140009", + "object": { + "payout": { + "amount_money": { + "amount": 457, + "currency_code": "EUR" + }, + "arrival_date": "2021-07-13", + "created_at": "2021-07-12T20:37:51Z", + "destination": { + "id": "bact:c164d7ec7302", + "type": "BANK_ACCOUNT" + }, + "id": "po_070431e4-e351-11eb-a8bb-02420a140009", + "location_id": "LRJNZCB190DTQ", + "status": "PAID", + "type": "BATCH", + "updated_at": "1970-01-01T00:20:28.481Z", + "version": 2 + } + }, + "type": "payout" + }, + "event_id": "7116e4a4-7622-42b0-b16c-c164d7ec7302", + "location_id": "LRJNZCB190DTQ", + "merchant_id": "MLEWJTMNJN37Z", + "type": "payout.paid" + }, + "x-webhook": { + "event": "payout.paid", + "scopes": [ + "PAYOUTS_READ", + "SETTLEMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/Payouts", + "x-since": "2022-04-20" + }, + "PayoutPaidEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected object’s type, `\"payout\"`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the completed payout." + }, + "object": { + "$ref": "#/components/schemas/PayoutPaidEventObject", + "description": "An object containing the completed payout.", + "nullable": true + } + } + }, + "PayoutPaidEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "payout": { + "$ref": "#/components/schemas/Payout", + "description": "The payout that has completed.", + "nullable": true + } + } + }, + "PayoutSentEvent": { + "type": "object", + "description": "Published when a [Payout](entity:Payout) is sent.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "location_id": { + "type": "string", + "description": "The ID of the target location associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"payout.sent\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was verified, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/PayoutSentEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "1970-01-01T00:20:28.481Z", + "data": { + "id": "po_070431e4-e351-11eb-a8bb-02420a140009", + "object": { + "payout": { + "amount_money": { + "amount": 457, + "currency_code": "EUR" + }, + "arrival_date": "2021-07-13", + "created_at": "2021-07-12T20:37:51Z", + "destination": { + "id": "bact:c164d7ec7302", + "type": "BANK_ACCOUNT" + }, + "id": "po_070431e4-e351-11eb-a8bb-02420a140009", + "location_id": "LRJNZCB190DTQ", + "status": "SENT", + "type": "BATCH", + "updated_at": "1970-01-01T00:20:28.481Z", + "version": 1 + } + }, + "type": "payout" + }, + "event_id": "7116e4a4-7622-42b0-b16c-c164d7ec7302", + "location_id": "LRJNZCB190DTQ", + "merchant_id": "MLEWJTMNJN37Z", + "type": "payout.sent" + }, + "x-webhook": { + "event": "payout.sent", + "scopes": [ + "PAYOUTS_READ", + "SETTLEMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/Payouts", + "x-since": "2022-04-20" + }, + "PayoutSentEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected object’s type, `\"payout\"`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the sent payout." + }, + "object": { + "$ref": "#/components/schemas/PayoutSentEventObject", + "description": "An object containing the sent payout.", + "nullable": true + } + } + }, + "PayoutSentEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "payout": { + "$ref": "#/components/schemas/Payout", + "description": "The payout that was sent.", + "nullable": true + } + } + }, "PayoutStatus": { "type": "string", "enum": [ @@ -36336,23 +45212,6 @@ } } }, - "QuantityRatio": { - "type": "object", - "description": "A whole number or unreduced fractional ratio.", - "x-release-status": "BETA", - "properties": { - "quantity": { - "type": "integer", - "description": "The whole or fractional quantity as the numerator.", - "nullable": true - }, - "quantity_denominator": { - "type": "integer", - "description": "The whole or fractional quantity as the denominator.\nWith fractional quantity this field is the denominator and quantity is the numerator.\nThe default value is `1`. For example, when `quantity=3` and `quantity_denominator` is unspecified,\nthe quantity ratio is `3` or `3/1`.", - "nullable": true - } - } - }, "QuickPay": { "type": "object", "description": "Describes an ad hoc item and price to generate a quick pay checkout link.\nFor more information,\nsee [Quick Pay Checkout](https://developer.squareup.com/docs/checkout-api/quick-pay-checkout).", @@ -36486,7 +45345,6 @@ "required": [ "id", "location_id", - "tender_id", "reason", "amount_money", "status" @@ -36511,7 +45369,8 @@ "tender_id": { "type": "string", "description": "The ID of the refunded tender.", - "maxLength": 192 + "maxLength": 192, + "nullable": true }, "created_at": { "type": "string", @@ -36548,6 +45407,105 @@ } } }, + "RefundCreatedEvent": { + "type": "object", + "description": "Published when a [Refund](entity:PaymentRefund) is created.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"refund.created\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/RefundCreatedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-02-06T21:27:41.852Z", + "data": { + "id": "KkAkhdMsgzn59SM8A89WgKwekxLZY_ptNBVqHYxt5gAdfcobBe4u1AZsXhoz06KTtuq9Ls24P", + "object": { + "refund": { + "amount_money": { + "amount": 1000, + "currency": "USD" + }, + "created_at": "2020-02-06T21:27:41.836Z", + "id": "KkAkhdMsgzn59SM8A89WgKwekxLZY_ptNBVqHYxt5gAdfcobBe4u1AZsXhoz06KTtuq9Ls24P", + "location_id": "NAQ1FHV6ZJ8YV", + "order_id": "haOyDuHiqtAXMk0d8pDKXpL7Jg4F", + "payment_id": "KkAkhdMsgzn59SM8A89WgKwekxLZY", + "status": "PENDING", + "updated_at": "2020-02-06T21:27:41.846Z", + "version": 7 + } + }, + "type": "refund" + }, + "event_id": "bc316346-6691-4243-88ed-6d651a0d0c47", + "merchant_id": "6SSW7HV8K2ST5", + "type": "refund.created" + }, + "x-webhook": { + "event": "refund.created", + "scopes": [ + "PAYMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/Refunds", + "x-since": "2020-02-26" + }, + "RefundCreatedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected object’s type, `\"refund\"`.", + "maxLength": 50, + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the affected refund.", + "maxLength": 255 + }, + "object": { + "$ref": "#/components/schemas/RefundCreatedEventObject", + "description": "An object containing the created refund.", + "nullable": true + } + } + }, + "RefundCreatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "refund": { + "$ref": "#/components/schemas/PaymentRefund", + "description": "The created refund.", + "nullable": true + } + } + }, "RefundPaymentRequest": { "type": "object", "description": "Describes a request to refund a payment using [RefundPayment](api-endpoint:Refunds-RefundPayment).", @@ -36708,6 +45666,115 @@ "description": "Indicates a refund's current status.", "x-release-status": "PUBLIC" }, + "RefundUpdatedEvent": { + "type": "object", + "description": "Published when a [Refund](entity:PaymentRefund) is updated.\nTypically the `refund.status` changes when a refund is completed.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"refund.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/RefundUpdatedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-02-06T22:14:16.421Z", + "data": { + "id": "KkAkhdMsgzn59SM8A89WgKwekxLZY_ptNBVqHYxt5gAdfcobBe4u1AZsXhoz06KTtuq9Ls24P", + "object": { + "refund": { + "amount_money": { + "amount": 1000, + "currency": "USD" + }, + "created_at": "2020-02-06T21:27:41.836Z", + "id": "KkAkhdMsgzn59SM8A89WgKwekxLZY_ptNBVqHYxt5gAdfcobBe4u1AZsXhoz06KTtuq9Ls24P", + "location_id": "NAQ1FHV6ZJ8YV", + "order_id": "haOyDuHiqtAXMk0d8pDKXpL7Jg4F", + "payment_id": "KkAkhdMsgzn59SM8A89WgKwekxLZY", + "processing_fee": [ + { + "amount_money": { + "amount": -59, + "currency": "USD" + }, + "effective_at": "2020-02-06T23:27:31.000Z", + "type": "INITIAL" + } + ], + "status": "COMPLETED", + "updated_at": "2020-02-06T22:14:16.381Z", + "version": 10 + } + }, + "type": "refund" + }, + "event_id": "bc316346-6691-4243-88ed-6d651a0d0c47", + "merchant_id": "6SSW7HV8K2ST5", + "type": "refund.updated" + }, + "x-webhook": { + "event": "refund.updated", + "scopes": [ + "PAYMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/Refunds", + "x-since": "2020-02-26" + }, + "RefundUpdatedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected object’s type, `\"refund\"`.", + "maxLength": 50, + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the affected refund.", + "maxLength": 255 + }, + "object": { + "$ref": "#/components/schemas/RefundUpdatedEventObject", + "description": "An object containing the updated refund.", + "nullable": true + } + } + }, + "RefundUpdatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "refund": { + "$ref": "#/components/schemas/PaymentRefund", + "description": "The updated refund.", + "nullable": true + } + } + }, "RegisterDomainRequest": { "type": "object", "description": "Defines the parameters that can be included in the body of\na request to the [RegisterDomain](api-endpoint:ApplePay-RegisterDomain) endpoint.", @@ -36783,13 +45850,6 @@ "description": "The status of the domain registration.", "x-release-status": "PUBLIC" }, - "RemoveGroupFromCustomerRequest": { - "type": "object", - "description": "Defines the fields that are included in the request body of\na request to the [RemoveGroupFromCustomer](api-endpoint:Customers-RemoveGroupFromCustomer) endpoint.", - "x-release-status": "PUBLIC", - "properties": {}, - "example": {} - }, "RemoveGroupFromCustomerResponse": { "type": "object", "description": "Defines the fields that are included in the response body of\na request to the [RemoveGroupFromCustomer](api-endpoint:Customers-RemoveGroupFromCustomer)\nendpoint.", @@ -36882,17 +45942,6 @@ } } }, - "RetrieveBookingCustomAttributeDefinitionRequest": { - "type": "object", - "description": "Represents a [RetrieveBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-RetrieveBookingCustomAttributeDefinition) request.", - "x-release-status": "PUBLIC", - "properties": { - "version": { - "type": "integer", - "description": "The current version of the custom attribute definition, which is used for strongly consistent\nreads to guarantee that you receive the most up-to-date data. When included in the request,\nSquare returns the specified version or a higher version if one exists. If the specified version\nis higher than the current version, Square returns a `BAD_REQUEST` error." - } - } - }, "RetrieveBookingCustomAttributeDefinitionResponse": { "type": "object", "description": "Represents a [RetrieveBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-RetrieveBookingCustomAttributeDefinition) response.\nEither `custom_attribute_definition` or `errors` is present in the response.", @@ -36926,22 +45975,6 @@ "errors": [] } }, - "RetrieveBookingCustomAttributeRequest": { - "type": "object", - "description": "Represents a [RetrieveBookingCustomAttribute](api-endpoint:BookingCustomAttributes-RetrieveBookingCustomAttribute) request.", - "x-release-status": "PUBLIC", - "properties": { - "with_definition": { - "type": "boolean", - "description": "Indicates whether to return the [custom attribute definition](entity:CustomAttributeDefinition) in the `definition` field of\nthe custom attribute. Set this parameter to `true` to get the name and description of the custom\nattribute, information about the data type, or other definition details. The default value is `false`.", - "nullable": true - }, - "version": { - "type": "integer", - "description": "The current version of the custom attribute, which is used for strongly consistent reads to\nguarantee that you receive the most up-to-date data. When included in the request, Square\nreturns the specified version or a higher version if one exists. If the specified version is\nhigher than the current version, Square returns a `BAD_REQUEST` error." - } - } - }, "RetrieveBookingCustomAttributeResponse": { "type": "object", "description": "Represents a [RetrieveBookingCustomAttribute](api-endpoint:BookingCustomAttributes-RetrieveBookingCustomAttribute) response.\nEither `custom_attribute_definition` or `errors` is present in the response.", @@ -36971,11 +46004,6 @@ "errors": [] } }, - "RetrieveBookingRequest": { - "type": "object", - "x-release-status": "PUBLIC", - "properties": {} - }, "RetrieveBookingResponse": { "type": "object", "x-release-status": "PUBLIC", @@ -37016,11 +46044,6 @@ "errors": [] } }, - "RetrieveBusinessBookingProfileRequest": { - "type": "object", - "x-release-status": "PUBLIC", - "properties": {} - }, "RetrieveBusinessBookingProfileResponse": { "type": "object", "x-release-status": "PUBLIC", @@ -37064,13 +46087,6 @@ "errors": [] } }, - "RetrieveCardRequest": { - "type": "object", - "description": "Retrieves details for a specific Card. Accessible via\nHTTP requests at GET https://connect.squareup.com/v2/cards/{card_id}", - "x-release-status": "PUBLIC", - "properties": {}, - "example": {} - }, "RetrieveCardResponse": { "type": "object", "description": "Defines the fields that are included in the response body of\na request to the [RetrieveCard](api-endpoint:Cards-RetrieveCard) endpoint.\n\nNote: if there are errors processing the request, the card field will not be\npresent.", @@ -37117,21 +46133,6 @@ } } }, - "RetrieveCashDrawerShiftRequest": { - "type": "object", - "x-release-status": "PUBLIC", - "required": [ - "location_id" - ], - "properties": { - "location_id": { - "type": "string", - "description": "The ID of the location to retrieve cash drawer shifts from.", - "minLength": 1 - } - }, - "example": {} - }, "RetrieveCashDrawerShiftResponse": { "type": "object", "x-release-status": "PUBLIC", @@ -37193,38 +46194,6 @@ } } }, - "RetrieveCatalogObjectRequest": { - "type": "object", - "x-release-status": "PUBLIC", - "x-params-example": "?include_related_objects=true", - "properties": { - "include_related_objects": { - "type": "boolean", - "description": "If `true`, the response will include additional objects that are related to the\nrequested objects. Related objects are defined as any objects referenced by ID by the results in the `objects` field\nof the response. These objects are put in the `related_objects` field. Setting this to `true` is\nhelpful when the objects are needed for immediate display to a user.\nThis process only goes one level deep. Objects referenced by the related objects will not be included. For example,\n\nif the `objects` field of the response contains a CatalogItem, its associated\nCatalogCategory objects, CatalogTax objects, CatalogImage objects and\nCatalogModifierLists will be returned in the `related_objects` field of the\nresponse. If the `objects` field of the response contains a CatalogItemVariation,\nits parent CatalogItem will be returned in the `related_objects` field of\nthe response.\n\nDefault value: `false`", - "nullable": true - }, - "catalog_version": { - "type": "integer", - "description": "Requests objects as of a specific version of the catalog. This allows you to retrieve historical\nversions of objects. The value to retrieve a specific version of an object can be found\nin the version field of [CatalogObject](entity:CatalogObject)s. If not included, results will\nbe from the current version of the catalog.", - "format": "int64", - "x-release-status": "BETA", - "nullable": true - }, - "include_category_path_to_root": { - "type": "boolean", - "description": "Specifies whether or not to include the `path_to_root` list for each returned category instance. The `path_to_root` list consists\nof `CategoryPathToRootNode` objects and specifies the path that starts with the immediate parent category of the returned category\nand ends with its root category. If the returned category is a top-level category, the `path_to_root` list is empty and is not returned\nin the response payload.", - "nullable": true - } - }, - "x-sq-sdk-sample-code": { - "csharp": "/sdk_samples/Catalog/RetrieveCatalogObject/RetrieveCatalogObjectRequest.csharp", - "java": "/sdk_samples/Catalog/RetrieveCatalogObject/RetrieveCatalogObjectRequest.java", - "javascript": "/sdk_samples/Catalog/RetrieveCatalogObject/RetrieveCatalogObjectRequest.javascript", - "php": "/sdk_samples/Catalog/RetrieveCatalogObject/RetrieveCatalogObjectRequest.php", - "python": "/sdk_samples/Catalog/RetrieveCatalogObject/RetrieveCatalogObjectRequest.python", - "ruby": "/sdk_samples/Catalog/RetrieveCatalogObject/RetrieveCatalogObjectRequest.ruby" - } - }, "RetrieveCatalogObjectResponse": { "type": "object", "x-release-status": "PUBLIC", @@ -37328,18 +46297,6 @@ "ruby": "/sdk_samples/Catalog/RetrieveCatalogObject/RetrieveCatalogObjectResponse.ruby" } }, - "RetrieveCustomerCustomAttributeDefinitionRequest": { - "type": "object", - "description": "Represents a [RetrieveCustomerCustomAttributeDefinition](api-endpoint:CustomerCustomAttributes-RetrieveCustomerCustomAttributeDefinition) request.", - "x-release-status": "PUBLIC", - "x-params-example": "?key=favoritemovie", - "properties": { - "version": { - "type": "integer", - "description": "The current version of the custom attribute definition, which is used for strongly consistent\nreads to guarantee that you receive the most up-to-date data. When included in the request,\nSquare returns the specified version or a higher version if one exists. If the specified version\nis higher than the current version, Square returns a `BAD_REQUEST` error." - } - } - }, "RetrieveCustomerCustomAttributeDefinitionResponse": { "type": "object", "description": "Represents a [RetrieveCustomerCustomAttributeDefinition](api-endpoint:CustomerCustomAttributes-RetrieveCustomerCustomAttributeDefinition) response.\nEither `custom_attribute_definition` or `errors` is present in the response.", @@ -37372,23 +46329,6 @@ } } }, - "RetrieveCustomerCustomAttributeRequest": { - "type": "object", - "description": "Represents a [RetrieveCustomerCustomAttribute](api-endpoint:CustomerCustomAttributes-RetrieveCustomerCustomAttribute) request.", - "x-release-status": "PUBLIC", - "x-params-example": "?customer_id=Z57QXKM2FGXEQDV42W8RBZY7BR\u0026key=favoritemovie", - "properties": { - "with_definition": { - "type": "boolean", - "description": "Indicates whether to return the [custom attribute definition](entity:CustomAttributeDefinition) in the `definition` field of\nthe custom attribute. Set this parameter to `true` to get the name and description of the custom\nattribute, information about the data type, or other definition details. The default value is `false`.", - "nullable": true - }, - "version": { - "type": "integer", - "description": "The current version of the custom attribute, which is used for strongly consistent reads to\nguarantee that you receive the most up-to-date data. When included in the request, Square\nreturns the specified version or a higher version if one exists. If the specified version is\nhigher than the current version, Square returns a `BAD_REQUEST` error." - } - } - }, "RetrieveCustomerCustomAttributeResponse": { "type": "object", "description": "Represents a [RetrieveCustomerCustomAttribute](api-endpoint:CustomerCustomAttributes-RetrieveCustomerCustomAttribute) response.\nEither `custom_attribute_definition` or `errors` is present in the response.", @@ -37417,13 +46357,6 @@ } } }, - "RetrieveCustomerGroupRequest": { - "type": "object", - "description": "Defines the fields that can be included in a request to the\n[RetrieveCustomerGroup](api-endpoint:CustomerGroups-RetrieveCustomerGroup) endpoint.", - "x-release-status": "PUBLIC", - "properties": {}, - "example": {} - }, "RetrieveCustomerGroupResponse": { "type": "object", "description": "Defines the fields that are included in the response body of\na request to the [RetrieveCustomerGroup](api-endpoint:CustomerGroups-RetrieveCustomerGroup) endpoint.\n\nEither `errors` or `group` is present in a given response (never both).", @@ -37450,20 +46383,6 @@ } } }, - "RetrieveCustomerRequest": { - "type": "object", - "description": "Defines the fields that are included in requests to the `RetrieveCustomer`\nendpoint.", - "x-release-status": "PUBLIC", - "properties": {}, - "x-sq-sdk-sample-code": { - "csharp": "/sdk_samples/RetrieveCustomer/RetrieveCustomerRequest.csharp", - "java": "/sdk_samples/RetrieveCustomer/RetrieveCustomerRequest.java", - "javascript": "/sdk_samples/RetrieveCustomer/RetrieveCustomerRequest.javascript", - "php": "/sdk_samples/RetrieveCustomer/RetrieveCustomerRequest.php", - "python": "/sdk_samples/RetrieveCustomer/RetrieveCustomerRequest.python", - "ruby": "/sdk_samples/RetrieveCustomer/RetrieveCustomerRequest.ruby" - } - }, "RetrieveCustomerResponse": { "type": "object", "description": "Defines the fields that are included in the response body of\na request to the `RetrieveCustomer` endpoint.\n\nEither `errors` or `customer` is present in a given response (never both).", @@ -37522,13 +46441,6 @@ "ruby": "/sdk_samples/RetrieveCustomer/RetrieveCustomerResponse.ruby" } }, - "RetrieveCustomerSegmentRequest": { - "type": "object", - "description": "Defines the valid parameters for requests to the `RetrieveCustomerSegmentRequest` endpoint.", - "x-release-status": "PUBLIC", - "properties": {}, - "example": {} - }, "RetrieveCustomerSegmentResponse": { "type": "object", "description": "Defines the fields that are included in the response body for requests to the `RetrieveCustomerSegment` endpoint.\n\nEither `errors` or `segment` is present in a given response (never both).", @@ -37555,13 +46467,6 @@ } } }, - "RetrieveDisputeEvidenceRequest": { - "type": "object", - "description": "Defines the parameters for a `RetrieveDisputeEvidence` request.", - "x-release-status": "PUBLIC", - "properties": {}, - "example": {} - }, "RetrieveDisputeEvidenceResponse": { "type": "object", "description": "Defines the fields in a `RetrieveDisputeEvidence` response.", @@ -37592,13 +46497,6 @@ } } }, - "RetrieveDisputeRequest": { - "type": "object", - "description": "Defines the request parameters for the `RetrieveDispute` endpoint.", - "x-release-status": "PUBLIC", - "properties": {}, - "example": {} - }, "RetrieveDisputeResponse": { "type": "object", "description": "Defines fields in a `RetrieveDispute` response.", @@ -37639,11 +46537,6 @@ } } }, - "RetrieveEmployeeRequest": { - "type": "object", - "x-release-status": "DEPRECATED", - "properties": {} - }, "RetrieveEmployeeResponse": { "type": "object", "x-release-status": "DEPRECATED", @@ -37761,13 +46654,6 @@ } } }, - "RetrieveGiftCardRequest": { - "type": "object", - "description": "A request to retrieve digital gift cards.", - "x-release-status": "PUBLIC", - "x-params-example": "?id=gftc:00113070ba5745f0b2377c1b9570cb03", - "properties": {} - }, "RetrieveGiftCardResponse": { "type": "object", "description": "A response that contains a `GiftCard`. The response might contain a set of `Error` objects\nif the request resulted in errors.", @@ -37800,19 +46686,6 @@ } } }, - "RetrieveInventoryAdjustmentRequest": { - "type": "object", - "x-release-status": "PUBLIC", - "properties": {}, - "x-sq-sdk-sample-code": { - "csharp": "/sdk_samples/Inventory/RetrieveInventoryAdjustment/RetrieveInventoryAdjustmentRequest.csharp", - "java": "/sdk_samples/Inventory/RetrieveInventoryAdjustment/RetrieveInventoryAdjustmentRequest.java", - "javascript": "/sdk_samples/Inventory/RetrieveInventoryAdjustment/RetrieveInventoryAdjustmentRequest.javascript", - "php": "/sdk_samples/Inventory/RetrieveInventoryAdjustment/RetrieveInventoryAdjustmentRequest.php", - "python": "/sdk_samples/Inventory/RetrieveInventoryAdjustment/RetrieveInventoryAdjustmentRequest.python", - "ruby": "/sdk_samples/Inventory/RetrieveInventoryAdjustment/RetrieveInventoryAdjustmentRequest.ruby" - } - }, "RetrieveInventoryAdjustmentResponse": { "type": "object", "x-release-status": "PUBLIC", @@ -37855,31 +46728,6 @@ "errors": [] } }, - "RetrieveInventoryChangesRequest": { - "type": "object", - "x-release-status": "PUBLIC", - "x-params-example": "?location_ids=\u0026cursor=", - "properties": { - "location_ids": { - "type": "string", - "description": "The [Location](entity:Location) IDs to look up as a comma-separated\nlist. An empty list queries all locations.", - "nullable": true - }, - "cursor": { - "type": "string", - "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this to retrieve the next set of results for the original query.\n\nSee the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information.", - "nullable": true - } - }, - "x-sq-sdk-sample-code": { - "csharp": "/sdk_samples/Inventory/RetrieveInventoryChanges/RetrieveInventoryChangesRequest.csharp", - "java": "/sdk_samples/Inventory/RetrieveInventoryChanges/RetrieveInventoryChangesRequest.java", - "javascript": "/sdk_samples/Inventory/RetrieveInventoryChanges/RetrieveInventoryChangesRequest.javascript", - "php": "/sdk_samples/Inventory/RetrieveInventoryChanges/RetrieveInventoryChangesRequest.php", - "python": "/sdk_samples/Inventory/RetrieveInventoryChanges/RetrieveInventoryChangesRequest.python", - "ruby": "/sdk_samples/Inventory/RetrieveInventoryChanges/RetrieveInventoryChangesRequest.ruby" - } - }, "RetrieveInventoryChangesResponse": { "type": "object", "x-release-status": "PUBLIC", @@ -37935,31 +46783,6 @@ "errors": [] } }, - "RetrieveInventoryCountRequest": { - "type": "object", - "x-release-status": "PUBLIC", - "x-params-example": "?location_ids=C6W5YS5QM06F5\u0026cursor=", - "properties": { - "location_ids": { - "type": "string", - "description": "The [Location](entity:Location) IDs to look up as a comma-separated\nlist. An empty list queries all locations.", - "nullable": true - }, - "cursor": { - "type": "string", - "description": "A pagination cursor returned by a previous call to this endpoint.\nProvide this to retrieve the next set of results for the original query.\n\nSee the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information.", - "nullable": true - } - }, - "x-sq-sdk-sample-code": { - "csharp": "/sdk_samples/Inventory/RetrieveInventoryCount/RetrieveInventoryCountRequest.csharp", - "java": "/sdk_samples/Inventory/RetrieveInventoryCount/RetrieveInventoryCountRequest.java", - "javascript": "/sdk_samples/Inventory/RetrieveInventoryCount/RetrieveInventoryCountRequest.javascript", - "php": "/sdk_samples/Inventory/RetrieveInventoryCount/RetrieveInventoryCountRequest.php", - "python": "/sdk_samples/Inventory/RetrieveInventoryCount/RetrieveInventoryCountRequest.python", - "ruby": "/sdk_samples/Inventory/RetrieveInventoryCount/RetrieveInventoryCountRequest.ruby" - } - }, "RetrieveInventoryCountResponse": { "type": "object", "x-release-status": "PUBLIC", @@ -37997,19 +46820,6 @@ "errors": [] } }, - "RetrieveInventoryPhysicalCountRequest": { - "type": "object", - "x-release-status": "PUBLIC", - "properties": {}, - "x-sq-sdk-sample-code": { - "csharp": "/sdk_samples/Inventory/RetrieveInventoryPhysicalCount/RetrieveInventoryPhysicalCountRequest.csharp", - "java": "/sdk_samples/Inventory/RetrieveInventoryPhysicalCount/RetrieveInventoryPhysicalCountRequest.java", - "javascript": "/sdk_samples/Inventory/RetrieveInventoryPhysicalCount/RetrieveInventoryPhysicalCountRequest.javascript", - "php": "/sdk_samples/Inventory/RetrieveInventoryPhysicalCount/RetrieveInventoryPhysicalCountRequest.php", - "python": "/sdk_samples/Inventory/RetrieveInventoryPhysicalCount/RetrieveInventoryPhysicalCountRequest.python", - "ruby": "/sdk_samples/Inventory/RetrieveInventoryPhysicalCount/RetrieveInventoryPhysicalCountRequest.ruby" - } - }, "RetrieveInventoryPhysicalCountResponse": { "type": "object", "x-release-status": "PUBLIC", @@ -38047,19 +46857,6 @@ "errors": [] } }, - "RetrieveInventoryTransferRequest": { - "type": "object", - "x-release-status": "BETA", - "properties": {}, - "x-sq-sdk-sample-code": { - "csharp": "/sdk_samples/Inventory/RetrieveInventoryTransfer/RetrieveInventoryTransferRequest.csharp", - "java": "/sdk_samples/Inventory/RetrieveInventoryTransfer/RetrieveInventoryTransferRequest.java", - "javascript": "/sdk_samples/Inventory/RetrieveInventoryTransfer/RetrieveInventoryTransferRequest.javascript", - "php": "/sdk_samples/Inventory/RetrieveInventoryTransfer/RetrieveInventoryTransferRequest.php", - "python": "/sdk_samples/Inventory/RetrieveInventoryTransfer/RetrieveInventoryTransferRequest.python", - "ruby": "/sdk_samples/Inventory/RetrieveInventoryTransfer/RetrieveInventoryTransferRequest.ruby" - } - }, "RetrieveInventoryTransferResponse": { "type": "object", "x-release-status": "BETA", @@ -38098,13 +46895,6 @@ } } }, - "RetrieveJobRequest": { - "type": "object", - "description": "Represents a [RetrieveJob](api-endpoint:Team-RetrieveJob) request.", - "x-release-status": "BETA", - "properties": {}, - "example": {} - }, "RetrieveJobResponse": { "type": "object", "description": "Represents a [RetrieveJob](api-endpoint:Team-RetrieveJob) response. Either `job` or `errors`\nis present in the response.", @@ -38133,11 +46923,6 @@ } } }, - "RetrieveLocationBookingProfileRequest": { - "type": "object", - "x-release-status": "PUBLIC", - "properties": {} - }, "RetrieveLocationBookingProfileResponse": { "type": "object", "x-release-status": "PUBLIC", @@ -38163,18 +46948,6 @@ } } }, - "RetrieveLocationCustomAttributeDefinitionRequest": { - "type": "object", - "description": "Represents a [RetrieveLocationCustomAttributeDefinition](api-endpoint:LocationCustomAttributes-RetrieveLocationCustomAttributeDefinition) request.", - "x-release-status": "BETA", - "x-params-example": "?key=bestseller", - "properties": { - "version": { - "type": "integer", - "description": "The current version of the custom attribute definition, which is used for strongly consistent\nreads to guarantee that you receive the most up-to-date data. When included in the request,\nSquare returns the specified version or a higher version if one exists. If the specified version\nis higher than the current version, Square returns a `BAD_REQUEST` error." - } - } - }, "RetrieveLocationCustomAttributeDefinitionResponse": { "type": "object", "description": "Represents a [RetrieveLocationCustomAttributeDefinition](api-endpoint:LocationCustomAttributes-RetrieveLocationCustomAttributeDefinition) response.\nEither `custom_attribute_definition` or `errors` is present in the response.", @@ -38207,23 +46980,6 @@ } } }, - "RetrieveLocationCustomAttributeRequest": { - "type": "object", - "description": "Represents a [RetrieveLocationCustomAttribute](api-endpoint:LocationCustomAttributes-RetrieveLocationCustomAttribute) request.", - "x-release-status": "BETA", - "x-params-example": "?location_id=L0TBCBTB7P8RQ\u0026key=bestseller", - "properties": { - "with_definition": { - "type": "boolean", - "description": "Indicates whether to return the [custom attribute definition](entity:CustomAttributeDefinition) in the `definition` field of\nthe custom attribute. Set this parameter to `true` to get the name and description of the custom\nattribute, information about the data type, or other definition details. The default value is `false`.", - "nullable": true - }, - "version": { - "type": "integer", - "description": "The current version of the custom attribute, which is used for strongly consistent reads to\nguarantee that you receive the most up-to-date data. When included in the request, Square\nreturns the specified version or a higher version if one exists. If the specified version is\nhigher than the current version, Square returns a `BAD_REQUEST` error." - } - } - }, "RetrieveLocationCustomAttributeResponse": { "type": "object", "description": "Represents a [RetrieveLocationCustomAttribute](api-endpoint:LocationCustomAttributes-RetrieveLocationCustomAttribute) response.\nEither `custom_attribute_definition` or `errors` is present in the response.", @@ -38252,12 +47008,6 @@ } } }, - "RetrieveLocationRequest": { - "type": "object", - "description": "Defines the fields that are included in the request body for the\n[RetrieveLocation](api-endpoint:Locations-RetrieveLocation) endpoint.", - "x-release-status": "PUBLIC", - "properties": {} - }, "RetrieveLocationResponse": { "type": "object", "description": "Defines the fields that the [RetrieveLocation](api-endpoint:Locations-RetrieveLocation)\nendpoint returns in a response.", @@ -38301,11 +47051,6 @@ } } }, - "RetrieveLocationSettingsRequest": { - "type": "object", - "x-release-status": "BETA", - "properties": {} - }, "RetrieveLocationSettingsResponse": { "type": "object", "x-release-status": "BETA", @@ -38369,13 +47114,6 @@ } } }, - "RetrieveLoyaltyAccountRequest": { - "type": "object", - "description": "A request to retrieve a loyalty account.", - "x-release-status": "PUBLIC", - "x-params-example": "?account_id=79b807d2-d786-46a9-933b-918028d7a8c5", - "properties": {} - }, "RetrieveLoyaltyAccountResponse": { "type": "object", "description": "A response that includes the loyalty account.", @@ -38410,13 +47148,6 @@ } } }, - "RetrieveLoyaltyProgramRequest": { - "type": "object", - "description": "A request to retrieve the [loyalty program](entity:LoyaltyProgram) that belongs to a seller. A seller can have only one loyalty program.", - "x-release-status": "PUBLIC", - "x-params-example": "?program_id=main", - "properties": {} - }, "RetrieveLoyaltyProgramResponse": { "type": "object", "description": "A response that contains the loyalty program.", @@ -38465,11 +47196,6 @@ "reward_tiers": [ { "created_at": "2020-04-20T16:55:11Z", - "definition": { - "discount_type": "FIXED_PERCENTAGE", - "percentage_discount": "10", - "scope": "ORDER" - }, "id": "e1b39225-9da5-43d1-a5db-782cdd8ad94f", "name": "10% off entire sale", "points": 10, @@ -38488,14 +47214,6 @@ } } }, - "RetrieveLoyaltyPromotionRequest": { - "type": "object", - "description": "Represents a [RetrieveLoyaltyPromotionPromotions](api-endpoint:Loyalty-RetrieveLoyaltyPromotion) request.", - "x-release-status": "PUBLIC", - "x-params-example": "?program_id=d619f755-2d17-41f3-990d-c04ecedd64dd\u0026promotion_id=loypromo_f0f9b849-725e-378d-b810-511237e07b67", - "properties": {}, - "example": {} - }, "RetrieveLoyaltyPromotionResponse": { "type": "object", "description": "Represents a [RetrieveLoyaltyPromotionPromotions](api-endpoint:Loyalty-RetrieveLoyaltyPromotion) response.", @@ -38549,13 +47267,6 @@ } } }, - "RetrieveLoyaltyRewardRequest": { - "type": "object", - "description": "A request to retrieve a loyalty reward.", - "x-release-status": "PUBLIC", - "x-params-example": "?reward_id=9f18ac21-233a-31c3-be77-b45840f5a810", - "properties": {} - }, "RetrieveLoyaltyRewardResponse": { "type": "object", "description": "A response that includes the loyalty reward.", @@ -38586,18 +47297,6 @@ } } }, - "RetrieveMerchantCustomAttributeDefinitionRequest": { - "type": "object", - "description": "Represents a [RetrieveMerchantCustomAttributeDefinition](api-endpoint:MerchantCustomAttributes-RetrieveMerchantCustomAttributeDefinition) request.", - "x-release-status": "BETA", - "x-params-example": "?key=alternative_seller_name", - "properties": { - "version": { - "type": "integer", - "description": "The current version of the custom attribute definition, which is used for strongly consistent\nreads to guarantee that you receive the most up-to-date data. When included in the request,\nSquare returns the specified version or a higher version if one exists. If the specified version\nis higher than the current version, Square returns a `BAD_REQUEST` error." - } - } - }, "RetrieveMerchantCustomAttributeDefinitionResponse": { "type": "object", "description": "Represents a [RetrieveMerchantCustomAttributeDefinition](api-endpoint:MerchantCustomAttributes-RetrieveMerchantCustomAttributeDefinition) response.\nEither `custom_attribute_definition` or `errors` is present in the response.", @@ -38630,23 +47329,6 @@ } } }, - "RetrieveMerchantCustomAttributeRequest": { - "type": "object", - "description": "Represents a [RetrieveMerchantCustomAttribute](api-endpoint:MerchantCustomAttributes-RetrieveMerchantCustomAttribute) request.", - "x-release-status": "BETA", - "x-params-example": "?merchant_id=DM7VKY8Q63GNP\u0026key=alternative_seller_name", - "properties": { - "with_definition": { - "type": "boolean", - "description": "Indicates whether to return the [custom attribute definition](entity:CustomAttributeDefinition) in the `definition` field of\nthe custom attribute. Set this parameter to `true` to get the name and description of the custom\nattribute, information about the data type, or other definition details. The default value is `false`.", - "nullable": true - }, - "version": { - "type": "integer", - "description": "The current version of the custom attribute, which is used for strongly consistent reads to\nguarantee that you receive the most up-to-date data. When included in the request, Square\nreturns the specified version or a higher version if one exists. If the specified version is\nhigher than the current version, Square returns a `BAD_REQUEST` error." - } - } - }, "RetrieveMerchantCustomAttributeResponse": { "type": "object", "description": "Represents a [RetrieveMerchantCustomAttribute](api-endpoint:MerchantCustomAttributes-RetrieveMerchantCustomAttribute) response.\nEither `custom_attribute_definition` or `errors` is present in the response.", @@ -38675,12 +47357,6 @@ } } }, - "RetrieveMerchantRequest": { - "type": "object", - "description": "Request object for the [RetrieveMerchant](api-endpoint:Merchants-RetrieveMerchant) endpoint.", - "x-release-status": "PUBLIC", - "properties": {} - }, "RetrieveMerchantResponse": { "type": "object", "description": "The response object returned by the [RetrieveMerchant](api-endpoint:Merchants-RetrieveMerchant) endpoint.", @@ -38711,11 +47387,6 @@ } } }, - "RetrieveMerchantSettingsRequest": { - "type": "object", - "x-release-status": "BETA", - "properties": {} - }, "RetrieveMerchantSettingsResponse": { "type": "object", "x-release-status": "BETA", @@ -38773,17 +47444,6 @@ } } }, - "RetrieveOrderCustomAttributeDefinitionRequest": { - "type": "object", - "description": "Represents a get request for an order custom attribute definition.", - "x-release-status": "BETA", - "properties": { - "version": { - "type": "integer", - "description": "To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)\ncontrol, include this optional field and specify the current version of the custom attribute." - } - } - }, "RetrieveOrderCustomAttributeDefinitionResponse": { "type": "object", "description": "Represents a response from getting an order custom attribute definition.", @@ -38816,23 +47476,6 @@ } } }, - "RetrieveOrderCustomAttributeRequest": { - "type": "object", - "description": "Represents a get request for an order custom attribute.", - "x-release-status": "BETA", - "x-params-example": "?order_id=7BbXGEIWNldxAzrtGf9GPVZTwZ4F\u0026key=cover-count", - "properties": { - "version": { - "type": "integer", - "description": "To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)\ncontrol, include this optional field and specify the current version of the custom attribute." - }, - "with_definition": { - "type": "boolean", - "description": "Indicates whether to return the [custom attribute definition](entity:CustomAttributeDefinition) in the `definition` field of each \ncustom attribute. Set this parameter to `true` to get the name and description of each custom attribute, \ninformation about the data type, or other definition details. The default value is `false`.", - "nullable": true - } - } - }, "RetrieveOrderCustomAttributeResponse": { "type": "object", "description": "Represents a response from getting an order custom attribute.", @@ -38861,12 +47504,6 @@ } } }, - "RetrieveOrderRequest": { - "type": "object", - "x-release-status": "PUBLIC", - "properties": {}, - "example": {} - }, "RetrieveOrderResponse": { "type": "object", "x-release-status": "PUBLIC", @@ -39037,11 +47674,6 @@ } } }, - "RetrievePaymentLinkRequest": { - "type": "object", - "x-release-status": "PUBLIC", - "properties": {} - }, "RetrievePaymentLinkResponse": { "type": "object", "x-release-status": "PUBLIC", @@ -39069,12 +47701,6 @@ } } }, - "RetrieveScheduledShiftRequest": { - "type": "object", - "description": "Represents a [RetrieveScheduledShift](api-endpoint:Labor-RetrieveScheduledShift) request.", - "x-release-status": "BETA", - "properties": {} - }, "RetrieveScheduledShiftResponse": { "type": "object", "description": "Represents a [RetrieveScheduledShift](api-endpoint:Labor-RetrieveScheduledShift) response.\nEither `scheduled_shift` or `errors` is present in the response.", @@ -39111,12 +47737,6 @@ } } }, - "RetrieveSnippetRequest": { - "type": "object", - "description": "Represents a `RetrieveSnippet` request.", - "x-release-status": "PUBLIC", - "properties": {} - }, "RetrieveSnippetResponse": { "type": "object", "description": "Represents a `RetrieveSnippet` response. The response can include either `snippet` or `errors`.", @@ -39144,19 +47764,6 @@ } } }, - "RetrieveSubscriptionRequest": { - "type": "object", - "description": "Defines input parameters in a request to the \n[RetrieveSubscription](api-endpoint:Subscriptions-RetrieveSubscription) endpoint.", - "x-release-status": "PUBLIC", - "properties": { - "include": { - "type": "string", - "description": "A query parameter to specify related information to be included in the response. \n\nThe supported query parameter values are: \n\n- `actions`: to include scheduled actions on the targeted subscription.", - "x-release-status": "BETA", - "nullable": true - } - } - }, "RetrieveSubscriptionResponse": { "type": "object", "description": "Defines output parameters in a response from the\n[RetrieveSubscription](api-endpoint:Subscriptions-RetrieveSubscription) endpoint.", @@ -39201,11 +47808,6 @@ } } }, - "RetrieveTeamMemberBookingProfileRequest": { - "type": "object", - "x-release-status": "PUBLIC", - "properties": {} - }, "RetrieveTeamMemberBookingProfileResponse": { "type": "object", "x-release-status": "PUBLIC", @@ -39231,13 +47833,6 @@ } } }, - "RetrieveTeamMemberRequest": { - "type": "object", - "description": "Represents a retrieve request for a `TeamMember` object.", - "x-release-status": "PUBLIC", - "properties": {}, - "example": {} - }, "RetrieveTeamMemberResponse": { "type": "object", "description": "Represents a response from a retrieve request containing a `TeamMember` object or error messages.", @@ -39309,12 +47904,6 @@ } } }, - "RetrieveTimecardRequest": { - "type": "object", - "description": "A request to get a `Timecard` by ID.", - "x-release-status": "PUBLIC", - "properties": {} - }, "RetrieveTimecardResponse": { "type": "object", "description": "A response to a request to get a `Timecard`. The response contains\nthe requested `Timecard` object and might contain a set of `Error` objects if\nthe request resulted in errors.", @@ -39371,12 +47960,6 @@ } } }, - "RetrieveTokenStatusRequest": { - "type": "object", - "description": "Request object for [RetrieveTokenStatus] endpoint.", - "x-release-status": "PUBLIC", - "properties": {} - }, "RetrieveTokenStatusResponse": { "type": "object", "description": "Defines the fields that are included in the response body of\na request to the `RetrieveTokenStatus` endpoint.", @@ -39422,19 +48005,6 @@ ] } }, - "RetrieveTransactionRequest": { - "type": "object", - "x-release-status": "DEPRECATED", - "properties": {}, - "x-sq-sdk-sample-code": { - "csharp": "/sdk_samples/RetrieveTransaction/RetrieveTransactionRequest.csharp", - "java": "/sdk_samples/RetrieveTransaction/RetrieveTransactionRequest.java", - "javascript": "/sdk_samples/RetrieveTransaction/RetrieveTransactionRequest.javascript", - "php": "/sdk_samples/RetrieveTransaction/RetrieveTransactionRequest.php", - "python": "/sdk_samples/RetrieveTransaction/RetrieveTransactionRequest.python", - "ruby": "/sdk_samples/RetrieveTransaction/RetrieveTransactionRequest.ruby" - } - }, "RetrieveTransactionResponse": { "type": "object", "description": "Defines the fields that are included in the response body of\na request to the [RetrieveTransaction](api-endpoint:Transactions-RetrieveTransaction) endpoint.\n\nOne of `errors` or `transaction` is present in a given response (never both).", @@ -39506,12 +48076,6 @@ "ruby": "/sdk_samples/RetrieveTransaction/RetrieveTransactionResponse.ruby" } }, - "RetrieveVendorRequest": { - "type": "object", - "description": "Represents an input to a call to [RetrieveVendor](api-endpoint:Vendors-RetrieveVendor).", - "x-release-status": "BETA", - "properties": {} - }, "RetrieveVendorResponse": { "type": "object", "description": "Represents an output from a call to [RetrieveVendor](api-endpoint:Vendors-RetrieveVendor).", @@ -39558,13 +48122,6 @@ } } }, - "RetrieveWageSettingRequest": { - "type": "object", - "description": "Represents a retrieve request for the wage setting of a team member.", - "x-release-status": "PUBLIC", - "properties": {}, - "example": {} - }, "RetrieveWageSettingResponse": { "type": "object", "description": "Represents a response from a retrieve request containing the specified `WageSetting` object or error messages.", @@ -39607,12 +48164,6 @@ } } }, - "RetrieveWebhookSubscriptionRequest": { - "type": "object", - "description": "Retrieves a [Subscription](entity:WebhookSubscription) using its id.", - "x-release-status": "PUBLIC", - "properties": {} - }, "RetrieveWebhookSubscriptionResponse": { "type": "object", "description": "Defines the fields that are included in the response body of\na request to the [RetrieveWebhookSubscription](api-endpoint:WebhookSubscriptions-RetrieveWebhookSubscription) endpoint.\n\nNote: if there are errors processing the request, the [Subscription](entity:WebhookSubscription) will not be\npresent.", @@ -43833,23 +52384,6 @@ } } }, - "SnippetResponse": { - "type": "object", - "x-release-status": "PUBLIC", - "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Error" - }, - "description": "Any errors that occurred during the request." - }, - "snippet": { - "$ref": "#/components/schemas/Snippet", - "description": "The snippet." - } - } - }, "SortOrder": { "type": "string", "enum": [ @@ -43954,13 +52488,6 @@ } } }, - "SubmitEvidenceRequest": { - "type": "object", - "description": "Defines the parameters for a `SubmitEvidence` request.", - "x-release-status": "PUBLIC", - "properties": {}, - "example": {} - }, "SubmitEvidenceResponse": { "type": "object", "description": "Defines the fields in a `SubmitEvidence` response.", @@ -44263,6 +52790,103 @@ "description": "Determines the billing cadence of a [Subscription](entity:Subscription)", "x-release-status": "PUBLIC" }, + "SubscriptionCreatedEvent": { + "type": "object", + "description": "Published when a [Subscription](entity:Subscription) is created.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"subscription.created\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/SubscriptionCreatedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-07-15T05:14:11.002Z", + "data": { + "id": "592b9720-d2ef-4ee4-b3fd-9d98e4f829d2", + "object": { + "subscription": { + "created_date": "2020-07-15", + "customer_id": "QX2XG9GMQS2BVBJKPG8CJ8JKCR", + "id": "592b9720-d2ef-4ee4-b3fd-9d98e4f829d2", + "location_id": "EZHGJ7SNVAJ19", + "plan_variation_id": "CRUUZUK5W6PIIM6H54242NV6", + "start_date": "2020-07-15", + "status": "ACTIVE", + "tax_percentage": "5", + "timezone": "America/New_York", + "version": 1594790050754 + } + }, + "type": "subscription" + }, + "event_id": "65bc2e81-bcdc-4add-abfd-7a012b8f3d2a", + "merchant_id": "VSE65BA53PXCC", + "type": "subscription.created" + }, + "x-webhook": { + "event": "subscription.created", + "scopes": [ + "SUBSCRIPTIONS_READ" + ] + }, + "x-api": "#/components/x-apis/Subscriptions", + "x-since": "2020-08-12" + }, + "SubscriptionCreatedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected object’s type, `\"subscription\"`.", + "maxLength": 50, + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the affected subscription.", + "maxLength": 255 + }, + "object": { + "$ref": "#/components/schemas/SubscriptionCreatedEventObject", + "description": "An object containing the created subscription.", + "nullable": true + } + } + }, + "SubscriptionCreatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "subscription": { + "$ref": "#/components/schemas/Subscription", + "description": "The created subscription.", + "nullable": true + } + } + }, "SubscriptionEvent": { "type": "object", "description": "Describes changes to a subscription and the subscription status.", @@ -44575,6 +53199,103 @@ } } }, + "SubscriptionUpdatedEvent": { + "type": "object", + "description": "Published when a [Subscription](entity:Subscription) is updated.\nTypically the `subscription.status` is updated as subscriptions become active\nor cancelled.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"subscription.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/SubscriptionUpdatedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-07-15T05:14:11.213Z", + "data": { + "id": "592b9720-d2ef-4ee4-b3fd-9d98e4f829d2", + "object": { + "subscription": { + "created_date": "2020-07-15", + "customer_id": "QX2XG9GMQS2BVBJKPG8CJ8JKCR", + "id": "592b9720-d2ef-4ee4-b3fd-9d98e4f829d2", + "location_id": "EZHGJ7SNVAJ19", + "plan_variation_id": "CRUUZUK5W6PIIM6H54242NV6", + "start_date": "2020-07-15", + "status": "ACTIVE", + "tax_percentage": "5", + "timezone": "America/New_York", + "version": 1594790050754 + } + }, + "type": "subscription" + }, + "event_id": "c0b40cc0-7cb2-4aa1-81ce-0893b9b0b9b8", + "merchant_id": "VSE65BA53PXCC", + "type": "subscription.updated" + }, + "x-webhook": { + "event": "subscription.updated", + "scopes": [ + "SUBSCRIPTIONS_READ" + ] + }, + "x-api": "#/components/x-apis/Subscriptions", + "x-since": "2020-08-12" + }, + "SubscriptionUpdatedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected object’s type, `\"subscription\"`.", + "maxLength": 50, + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the affected subscription.", + "maxLength": 255 + }, + "object": { + "$ref": "#/components/schemas/SubscriptionUpdatedEventObject", + "description": "An object containing the updated subscription.", + "nullable": true + } + } + }, + "SubscriptionUpdatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "subscription": { + "$ref": "#/components/schemas/Subscription", + "description": "The updated subscription.", + "nullable": true + } + } + }, "SwapPlanRequest": { "type": "object", "description": "Defines input parameters in a call to the\n[SwapPlan](api-endpoint:Subscriptions-SwapPlan) endpoint.", @@ -44883,6 +53604,104 @@ } } }, + "TeamMemberCreatedEvent": { + "type": "object", + "description": "Published when a Team Member is created.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"team_member.created\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/TeamMemberCreatedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2021-03-11T01:16:04.253Z", + "data": { + "id": "TMfCNDbg_wwJvUJY", + "object": { + "team_member": { + "assigned_locations": { + "assignment_type": "EXPLICIT_LOCATIONS" + }, + "created_at": "2021-03-11T01:16:03.697Z", + "email_address": "amelia.earhart@example.com", + "family_name": "Earhart", + "given_name": "Amelia", + "id": "TMfCNDbg_wwJvUJY", + "is_owner": false, + "phone_number": "+12125554240", + "reference_id": "example-reference-id", + "status": "ACTIVE", + "updated_at": "2021-03-11T01:16:03.697Z" + } + }, + "type": "team_member" + }, + "event_id": "91484f7e-63bc-4253-a86d-18e7ea0b0cfb", + "merchant_id": "0JV5BGNW4EG9R", + "type": "team_member.created" + }, + "x-webhook": { + "event": "team_member.created", + "scopes": [ + "EMPLOYEES_READ" + ] + }, + "x-api": "#/components/x-apis/Team", + "x-since": "2021-04-21" + }, + "TeamMemberCreatedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected object’s type, `\"team_member\"`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the created team member." + }, + "object": { + "$ref": "#/components/schemas/TeamMemberCreatedEventObject", + "description": "An object containing the created team member.", + "nullable": true + } + } + }, + "TeamMemberCreatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "team_member": { + "$ref": "#/components/schemas/TeamMember", + "description": "The created team member.", + "nullable": true + } + } + }, "TeamMemberInvitationStatus": { "type": "string", "enum": [ @@ -44926,6 +53745,104 @@ "description": "Enumerates the possible statuses the team member can have within a business.", "x-release-status": "PUBLIC" }, + "TeamMemberUpdatedEvent": { + "type": "object", + "description": "Published when a Team Member is updated.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"team_member.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/TeamMemberUpdatedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2021-03-11T01:16:04.254Z", + "data": { + "id": "TMfCNDbg_wwJvUJY", + "object": { + "team_member": { + "assigned_locations": { + "assignment_type": "EXPLICIT_LOCATIONS" + }, + "created_at": "2021-03-11T01:16:03.697Z", + "email_address": "amelia.earhart@example.com", + "family_name": "Earhart", + "given_name": "Amelia", + "id": "TMfCNDbg_wwJvUJY", + "is_owner": false, + "phone_number": "+12125554240", + "reference_id": "example-reference-id", + "status": "ACTIVE", + "updated_at": "2021-03-11T01:16:03.697Z" + } + }, + "type": "team_member" + }, + "event_id": "86c18838-51a7-4bdd-a6ff-3ffd2c1c5eb9", + "merchant_id": "0JV5BGNW4EG9R", + "type": "team_member.updated" + }, + "x-webhook": { + "event": "team_member.updated", + "scopes": [ + "EMPLOYEES_READ" + ] + }, + "x-api": "#/components/x-apis/Team", + "x-since": "2021-04-21" + }, + "TeamMemberUpdatedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected object’s type, `\"team_member\"`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the affected team member." + }, + "object": { + "$ref": "#/components/schemas/TeamMemberUpdatedEventObject", + "description": "An object containing the updated team member.", + "nullable": true + } + } + }, + "TeamMemberUpdatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "team_member": { + "$ref": "#/components/schemas/TeamMember", + "description": "The updated team member.", + "nullable": true + } + } + }, "TeamMemberWage": { "type": "object", "description": "Job and wage information for a [team member](entity:TeamMember).\nThis convenience object provides details needed to specify the `wage`\nfield for a [timecard](entity:Timecard).", @@ -44962,6 +53879,106 @@ } } }, + "TeamMemberWageSettingUpdatedEvent": { + "type": "object", + "description": "Published when a Wage Setting is updated.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"team_member.wage_setting.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Timestamp of when the event was created, in RFC 3339 format.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/TeamMemberWageSettingUpdatedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2021-03-11T01:17:03Z", + "data": { + "id": "TMfCNDbg_wwJvUJY", + "object": { + "wage_setting": { + "created_at": "2021-03-11T01:17:02+00:00", + "is_overtime_exempt": true, + "job_assignments": [ + { + "hourly_rate": { + "amount": 800, + "currency": "USD" + }, + "job_title": "Barista", + "pay_type": "HOURLY" + } + ], + "team_member_id": "TMfCNDbg_wwJvUJY", + "updated_at": "2021-03-11T01:17:03+00:00", + "version": 1 + } + }, + "type": "wage_setting" + }, + "event_id": "22ce9c01-d5bc-50ca-85f5-f97140537837", + "merchant_id": "0JV5BGNW4EG9R", + "type": "team_member.wage_setting.updated" + }, + "x-webhook": { + "event": "team_member.wage_setting.updated", + "scopes": [ + "EMPLOYEES_READ" + ] + }, + "x-api": "#/components/x-apis/Team", + "x-since": "2021-04-21" + }, + "TeamMemberWageSettingUpdatedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "Name of the affected object’s type, `\"wage_setting\"`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the updated team member wage setting." + }, + "object": { + "$ref": "#/components/schemas/TeamMemberWageSettingUpdatedEventObject", + "description": "An object containing the updated team member wage setting.", + "nullable": true + } + } + }, + "TeamMemberWageSettingUpdatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "wage_setting": { + "$ref": "#/components/schemas/WageSetting", + "description": "The updated team member wage setting.", + "nullable": true + } + } + }, "Tender": { "type": "object", "description": "Represents a tender (i.e., a method of payment) used in a Square transaction.", @@ -45526,6 +54543,103 @@ "description": "Describes the type of this unit and indicates which field contains the unit information. This is an ‘open’ enum.", "x-release-status": "BETA" }, + "TerminalActionCreatedEvent": { + "type": "object", + "description": "Published when a TerminalAction is created.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"terminal.action.created\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "RFC 3339 timestamp of when the event was created.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/TerminalActionCreatedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2021-03-10T14:43:55.262Z", + "data": { + "id": "dhgENdnFOPXqO", + "object": { + "action": { + "app_id": "APP_ID", + "created_at": "2021-03-10T14:43:55.262Z", + "deadline_duration": "PT5M", + "device_id": "DEVICE_ID", + "id": "termapia:jveJIAkkAjILHkdCE", + "save_card_options": { + "customer_id": "CUSTOMER_ID", + "reference_id": "user-id-1" + }, + "status": "PENDING", + "type": "SAVE_CARD", + "updated_at": "2020-04-10T14:43:55.262Z" + } + }, + "type": "action" + }, + "event_id": "7229a692-def5-4a7e-b4f3-80638aa2f24d", + "merchant_id": "MERCHANT_ID", + "type": "terminal.action.created" + }, + "x-webhook": { + "event": "terminal.action.created", + "scopes": [ + "PAYMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/Terminal", + "x-since": "2022-05-12" + }, + "TerminalActionCreatedEventData": { + "type": "object", + "x-release-status": "BETA", + "properties": { + "type": { + "type": "string", + "description": "Name of the created object’s type, `\"action\"`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the created terminal action." + }, + "object": { + "$ref": "#/components/schemas/TerminalActionCreatedEventObject", + "description": "An object containing the created terminal action.", + "nullable": true + } + } + }, + "TerminalActionCreatedEventObject": { + "type": "object", + "x-release-status": "BETA", + "properties": { + "action": { + "$ref": "#/components/schemas/TerminalAction", + "description": "The created terminal action.", + "nullable": true + } + } + }, "TerminalActionQuery": { "type": "object", "x-release-status": "BETA", @@ -45589,6 +54703,104 @@ } } }, + "TerminalActionUpdatedEvent": { + "type": "object", + "description": "Published when a TerminalAction is updated.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"terminal.action.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "RFC 3339 timestamp of when the event was created.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/TerminalActionUpdatedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2021-03-10T14:44:06.039Z", + "data": { + "id": "dhgENdnFOPXqO", + "object": { + "action": { + "app_id": "APP_ID", + "created_at": "2021-03-10T14:43:55.262Z", + "deadline_duration": "PT5M", + "device_id": "DEVICE_ID", + "id": "termapia:RZDei5nMuO0rMmCE", + "save_card_options": { + "card_id": "ccof:CARD_ID", + "customer_id": "CUSTOMER_ID", + "reference_id": "user-id-1" + }, + "status": "COMPLETED", + "type": "SAVE_CARD", + "updated_at": "2021-03-10T14:44:55.262Z" + } + }, + "type": "action" + }, + "event_id": "1c3ef831-670d-4f4c-b59c-f0bb2d2fc872", + "merchant_id": "MERCHANT_ID", + "type": "terminal.action.updated" + }, + "x-webhook": { + "event": "terminal.action.updated", + "scopes": [ + "PAYMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/Terminal", + "x-since": "2022-05-12" + }, + "TerminalActionUpdatedEventData": { + "type": "object", + "x-release-status": "BETA", + "properties": { + "type": { + "type": "string", + "description": "Name of the updated object’s type, `\"action\"`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the updated terminal action." + }, + "object": { + "$ref": "#/components/schemas/TerminalActionUpdatedEventObject", + "description": "An object containing the updated terminal action.", + "nullable": true + } + } + }, + "TerminalActionUpdatedEventObject": { + "type": "object", + "x-release-status": "BETA", + "properties": { + "action": { + "$ref": "#/components/schemas/TerminalAction", + "description": "The updated terminal action.", + "nullable": true + } + } + }, "TerminalCheckout": { "type": "object", "description": "Represents a checkout processed by the Square Terminal.", @@ -45713,6 +54925,112 @@ } } }, + "TerminalCheckoutCreatedEvent": { + "type": "object", + "description": "Published when a [TerminalCheckout](entity:TerminalCheckout) is created.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"terminal.checkout.created\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "RFC 3339 timestamp of when the event was created.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/TerminalCheckoutCreatedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-04-10T14:43:55.262Z", + "data": { + "id": "dhgENdnFOPXqO", + "object": { + "checkout": { + "amount_money": { + "amount": 111, + "currency": "USD" + }, + "app_id": "sq0idp-734Md5EcFjFmwpaR0Snm6g", + "created_at": "2020-04-10T14:43:55.262Z", + "deadline_duration": "PT5M", + "device_options": { + "device_id": "907CS13101300122", + "skip_receipt_screen": false, + "tip_settings": { + "allow_tipping": false + } + }, + "id": "dhgENdnFOPXqO", + "note": "A simple note", + "reference_id": "id72709", + "status": "PENDING", + "updated_at": "2020-04-10T14:43:55.262Z" + } + }, + "type": "checkout" + }, + "event_id": "7229a692-def5-4a7e-b4f3-80638aa2f24d", + "merchant_id": "7NZR58EPNGNPC", + "type": "terminal.checkout.created" + }, + "x-webhook": { + "event": "terminal.checkout.created", + "scopes": [ + "PAYMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/Terminal", + "x-since": "2020-04-22" + }, + "TerminalCheckoutCreatedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "Name of the created object’s type, `\"checkout\"`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the created terminal checkout.", + "minLength": 10, + "maxLength": 255 + }, + "object": { + "$ref": "#/components/schemas/TerminalCheckoutCreatedEventObject", + "description": "An object containing the created terminal checkout", + "nullable": true + } + } + }, + "TerminalCheckoutCreatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "checkout": { + "$ref": "#/components/schemas/TerminalCheckout", + "description": "The created terminal checkout", + "nullable": true + } + } + }, "TerminalCheckoutQuery": { "type": "object", "x-release-status": "PUBLIC", @@ -45760,6 +55078,115 @@ } } }, + "TerminalCheckoutUpdatedEvent": { + "type": "object", + "description": "Published when a [TerminalCheckout](entity:TerminalCheckout) is updated.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"terminal.checkout.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "RFC 3339 timestamp of when the event was created.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/TerminalCheckoutUpdatedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-04-10T14:44:06.039Z", + "data": { + "id": "dhgENdnFOPXqO", + "object": { + "checkout": { + "amount_money": { + "amount": 111, + "currency": "USD" + }, + "app_id": "sq0idp-734Md5EcFjFmwpaR0Snm6g", + "created_at": "2020-04-10T14:43:55.262Z", + "deadline_duration": "PT5M", + "device_options": { + "device_id": "907CS13101300122", + "skip_receipt_screen": false, + "tip_settings": { + "allow_tipping": false + } + }, + "id": "dhgENdnFOPXqO", + "note": "A simple note", + "payment_ids": [ + "dgzrZTeIeVuOGwYgekoTHsPouaB" + ], + "reference_id": "id72709", + "status": "COMPLETED", + "updated_at": "2020-04-10T14:44:06.039Z" + } + }, + "type": "checkout" + }, + "event_id": "1c3ef831-670d-4f4c-b59c-f0bb2d2fc872", + "merchant_id": "7NZR58EPNGNPC", + "type": "terminal.checkout.updated" + }, + "x-webhook": { + "event": "terminal.checkout.updated", + "scopes": [ + "PAYMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/Terminal", + "x-since": "2020-04-22" + }, + "TerminalCheckoutUpdatedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "Name of the updated object’s type, `\"checkout\"`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the updated terminal checkout.", + "minLength": 10, + "maxLength": 255 + }, + "object": { + "$ref": "#/components/schemas/TerminalCheckoutUpdatedEventObject", + "description": "An object containing the updated terminal checkout", + "nullable": true + } + } + }, + "TerminalCheckoutUpdatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "checkout": { + "$ref": "#/components/schemas/TerminalCheckout", + "description": "The updated terminal checkout", + "nullable": true + } + } + }, "TerminalRefund": { "type": "object", "description": "Represents a payment refund processed by the Square Terminal. Only supports Interac (Canadian debit network) payment refunds.", @@ -45844,6 +55271,131 @@ } } }, + "TerminalRefundCreatedEvent": { + "type": "object", + "description": "Published when a Terminal API refund is created.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"terminal.refund.created\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "RFC 3339 timestamp of when the event was created.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/TerminalRefundCreatedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-09-22T14:29:19.459Z", + "data": { + "id": "S67MS3HD-5O5OvgkcNUhl7JBuINflcjKqUzXZY", + "object": { + "refund": { + "amount_money": { + "amount": 100, + "currency": "CAD" + }, + "app_id": "sq0idp-734Md5EcFjFmwpaR0Snm6g", + "card": { + "bin": "411111", + "card_brand": "INTERAC", + "card_type": "CREDIT", + "exp_month": 12, + "exp_year": 2020, + "fingerprint": "sq-1-B1fP9MNNmZgVVaPKRND6oDKYbz25S2cTvg9Mzwg3RMTK1zT1PiGRT-AE3nTA8vSmmw", + "last_4": "1111" + }, + "card_details": { + "avs_status": "AVS_NOT_CHECKED", + "card": { + "bin": "411111", + "card_brand": "INTERAC", + "card_type": "CREDIT", + "exp_month": 12, + "exp_year": 2020, + "fingerprint": "sq-1-B1fP9MNNmZgVVaPKRND6oDKYbz25S2cTvg9Mzwg3RMTK1zT1PiGRT-AE3nTA8vSmmw", + "last_4": "1111" + }, + "cvv_status": "CVV_NOT_CHECKED", + "entry_method": "EMV", + "statement_description": "SQ *DEFAULT TEST ACCOUNT", + "status": "CAPTURED" + }, + "created_at": "2020-09-22T14:29:19.459Z", + "deadline_duration": "PT5M", + "device_id": "907CS13101300122", + "id": "S67MS3HD-5O5OvgkcNUhl7JBuINflcjKqUzXZY", + "location_id": "A6SYFRSV4WAFW", + "order_id": "9VeViC6PeooYw4GVAgiuEMseV", + "payment_id": "5O5OvgkcNUhl7JBuINflcjKqUzXZY", + "reason": "Refund reason", + "status": "PENDING", + "updated_at": "2020-09-22T14:29:19.459Z" + } + }, + "type": "refund" + }, + "event_id": "9232cde1-6e72-4356-8b08-bd2af7bb87a2", + "merchant_id": "7NZR58EPNGNPC", + "type": "terminal.refund.created" + }, + "x-webhook": { + "event": "terminal.refund.created", + "scopes": [ + "PAYMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/Terminal", + "x-since": "2020-10-28" + }, + "TerminalRefundCreatedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "Name of the created object’s type, `\"refund\"`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the created terminal refund." + }, + "object": { + "$ref": "#/components/schemas/TerminalRefundCreatedEventObject", + "description": "An object containing the created terminal refund.", + "nullable": true + } + } + }, + "TerminalRefundCreatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "refund": { + "$ref": "#/components/schemas/TerminalRefund", + "description": "The created terminal refund.", + "nullable": true + } + } + }, "TerminalRefundQuery": { "type": "object", "x-release-status": "PUBLIC", @@ -45891,6 +55443,131 @@ } } }, + "TerminalRefundUpdatedEvent": { + "type": "object", + "description": "Published when a Terminal API refund is updated.", + "x-release-status": "PUBLIC", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of the target merchant associated with the event.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of event this represents, `\"terminal.refund.updated\"`.", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for the event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "RFC 3339 timestamp of when the event was created.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/TerminalRefundUpdatedEventData", + "description": "Data associated with the event.", + "nullable": true + } + }, + "example": { + "created_at": "2020-09-22T14:34:40.334Z", + "data": { + "id": "S67MS3HD-rbh7ygmmPfnEsP6OcuOEFL9FuaB", + "object": { + "refund": { + "amount_money": { + "amount": 100, + "currency": "CAD" + }, + "app_id": "sq0idp-734Md5EcFjFmwpaR0Snm6g", + "card": { + "bin": "411111", + "card_brand": "INTERAC", + "card_type": "CREDIT", + "exp_month": 12, + "exp_year": 2020, + "fingerprint": "sq-1-B1fP9MNNmZgVVaPKRND6oDKYbz25S2cTvg9Mzwg3RMTK1zT1PiGRT-AE3nTA8vSmmw", + "last_4": "1111" + }, + "card_details": { + "avs_status": "AVS_NOT_CHECKED", + "card": { + "bin": "411111", + "card_brand": "INTERAC", + "card_type": "CREDIT", + "exp_month": 12, + "exp_year": 2020, + "fingerprint": "sq-1-B1fP9MNNmZgVVaPKRND6oDKYbz25S2cTvg9Mzwg3RMTK1zT1PiGRT-AE3nTA8vSmmw", + "last_4": "1111" + }, + "cvv_status": "CVV_NOT_CHECKED", + "entry_method": "EMV", + "statement_description": "SQ *DEFAULT TEST ACCOUNT", + "status": "CAPTURED" + }, + "created_at": "2020-09-22T14:29:19.459Z", + "deadline_duration": "PT5M", + "device_id": "907CS13101300122", + "id": "S67MS3HD-5O5OvgkcNUhl7JBuINflcjKqUzXZY", + "location_id": "A6SYFRSV4WAFW", + "order_id": "9VeViC6PeooYw4GVAgiuEMseV", + "payment_id": "5O5OvgkcNUhl7JBuINflcjKqUzXZY", + "reason": "Refund reason", + "status": "IN PROGRESS", + "updated_at": "2020-09-22T14:34:40.334Z" + } + }, + "type": "refund" + }, + "event_id": "d15cfe13-f02c-4155-b381-ef36dd5be92f", + "merchant_id": "ET1TXH00Q2X3B", + "type": "terminal.refund.updated" + }, + "x-webhook": { + "event": "terminal.refund.updated", + "scopes": [ + "PAYMENTS_READ" + ] + }, + "x-api": "#/components/x-apis/Terminal", + "x-since": "2020-10-28" + }, + "TerminalRefundUpdatedEventData": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "type": { + "type": "string", + "description": "Name of the updated object’s type, `\"refund\"`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the updated terminal refund." + }, + "object": { + "$ref": "#/components/schemas/TerminalRefundUpdatedEventObject", + "description": "An object containing the updated terminal refund.", + "nullable": true + } + } + }, + "TerminalRefundUpdatedEventObject": { + "type": "object", + "x-release-status": "PUBLIC", + "properties": { + "refund": { + "$ref": "#/components/schemas/TerminalRefund", + "description": "The updated terminal refund.", + "nullable": true + } + } + }, "TestWebhookSubscriptionRequest": { "type": "object", "description": "Tests a [Subscription](entity:WebhookSubscription) by sending a test event to its notification URL.", @@ -49280,56 +58957,6 @@ } } }, - "V1Device": { - "type": "object", - "x-release-status": "DEPRECATED", - "properties": { - "id": { - "type": "string", - "description": "The device's Square-issued ID." - }, - "name": { - "type": "string", - "description": "The device's merchant-specified name.", - "nullable": true - } - } - }, - "V1ListOrdersRequest": { - "type": "object", - "x-release-status": "DEPRECATED", - "x-visibility": "SDK_ONLY", - "properties": { - "order": { - "$ref": "#/components/schemas/SortOrder", - "description": "The order in which payments are listed in the response.\nSee [SortOrder](#type-sortorder) for possible values", - "nullable": true - }, - "limit": { - "type": "integer", - "description": "The maximum number of payments to return in a single response. This value cannot exceed 200.", - "nullable": true - }, - "batch_token": { - "type": "string", - "description": "A pagination cursor to retrieve the next set of results for your\noriginal query to the endpoint.", - "nullable": true - } - } - }, - "V1ListOrdersResponse": { - "type": "object", - "x-release-status": "DEPRECATED", - "x-visibility": "SDK_ONLY", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/V1Order" - } - } - } - }, "V1Money": { "type": "object", "x-release-status": "DEPRECATED", @@ -49582,31 +59209,6 @@ "x-release-status": "DEPRECATED", "x-visibility": "SDK_ONLY" }, - "V1PhoneNumber": { - "type": "object", - "description": "Represents a phone number.", - "x-release-status": "DEPRECATED", - "required": [ - "calling_code", - "number" - ], - "properties": { - "calling_code": { - "type": "string", - "description": "The phone number's international calling code. For US phone numbers, this value is +1." - }, - "number": { - "type": "string", - "description": "The phone number." - } - } - }, - "V1RetrieveOrderRequest": { - "type": "object", - "x-release-status": "DEPRECATED", - "x-visibility": "SDK_ONLY", - "properties": {} - }, "V1Tender": { "type": "object", "description": "A tender represents a discrete monetary exchange. Square represents this\nexchange as a money object with a specific currency and amount, where the\namount is given in the smallest denomination of the given currency.\n\nSquare POS can accept more than one form of tender for a single payment (such\nas by splitting a bill between a credit card and a gift card). The `tender`\nfield of the Payment object lists all forms of tender used for the payment.\n\nSplit tender payments behave slightly differently from single tender payments:\n\nThe receipt_url for a split tender corresponds only to the first tender listed\nin the tender field. To get the receipt URLs for the remaining tenders, use\nthe receipt_url fields of the corresponding Tender objects.\n\n*A note on gift cards**: when a customer purchases a Square gift card from a\nmerchant, the merchant receives the full amount of the gift card in the\nassociated payment.\n\nWhen that gift card is used as a tender, the balance of the gift card is\nreduced and the merchant receives no funds. A `Tender` object with a type of\n`SQUARE_GIFT_CARD` indicates a gift card was used for some or all of the\nassociated payment.", @@ -50003,6 +59605,138 @@ } } }, + "VendorCreatedEvent": { + "type": "object", + "description": "Published when a [Vendor](entity:Vendor) is created.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of a seller associated with this event.", + "nullable": true + }, + "location_id": { + "type": "string", + "description": "The ID of a location associated with the event, if the event is associated with the location of the seller.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"vendor.created\".`", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for this event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The RFC 3339-formatted time when the underlying event data object is created.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/VendorCreatedEventData", + "description": "The data associated with this event.", + "nullable": true + } + }, + "example": { + "created_at": "2022-03-16T01:04:37.308555597Z", + "data": { + "id": "5b041563-c3fa-4989-baaf-dec90e81de0b", + "object": { + "operation": "CREATED", + "vendor": { + "address": { + "administrative_district_level_1": "NY", + "country": "US", + "locality": "New York", + "postal_code": "10003" + }, + "contacts": [ + { + "email_address": "joe@joesfreshseafood.com", + "id": "W43ANBJLR5UAV7WT", + "name": "Joe Burrow", + "ordinal": 0, + "phone_number": "1-212-555-4250" + } + ], + "created_at": "2022-03-16T01:04:12.581Z", + "id": "BXIDSDOUIU34VY2V", + "name": "A vendor", + "status": "ACTIVE", + "updated_at": "2022-03-16T01:04:12.581Z", + "version": 1 + } + }, + "type": "vendor" + }, + "event_id": "4edd919d-ed19-492d-bcb0-1a1ef65dda1a", + "merchant_id": "ETCE****QDYP", + "type": "vendor.created" + }, + "x-webhook": { + "event": "vendor.created", + "scopes": [ + "VENDOR_READ" + ] + }, + "x-api": "#/components/x-apis/Vendors", + "x-since": "2022-03-16" + }, + "VendorCreatedEventData": { + "type": "object", + "description": "Defines the `vendor.created` event data structure.", + "x-release-status": "BETA", + "properties": { + "type": { + "type": "string", + "description": "The type of the event data object. The value is `vendor`", + "nullable": true + }, + "id": { + "type": "string", + "description": "The ID of the event data object." + }, + "object": { + "$ref": "#/components/schemas/VendorCreatedEventObject", + "description": "An object containing the created vendor.", + "nullable": true + } + } + }, + "VendorCreatedEventObject": { + "type": "object", + "x-release-status": "BETA", + "properties": { + "operation": { + "$ref": "#/components/schemas/VendorCreatedEventObjectOperation", + "description": "The operation on the vendor that caused the event to be published. The value is `CREATED`.\nSee [Operation](#type-operation) for possible values", + "nullable": true + }, + "vendor": { + "$ref": "#/components/schemas/Vendor", + "description": "The created vendor as the result of the specified operation.", + "nullable": true + } + } + }, + "VendorCreatedEventObjectOperation": { + "type": "string", + "enum": [ + "CREATED" + ], + "x-enum-elements": [ + { + "name": "CREATED", + "description": "" + } + ], + "description": "The operation that can be performed against a vendor to cause the event to be published.", + "x-release-status": "BETA" + }, "VendorStatus": { "type": "string", "enum": [ @@ -50022,6 +59756,139 @@ "description": "The status of the [Vendor](entity:Vendor),\nwhether a [Vendor](entity:Vendor) is active or inactive.", "x-release-status": "BETA" }, + "VendorUpdatedEvent": { + "type": "object", + "description": "Published when a [Vendor](entity:Vendor) is updated.", + "x-release-status": "BETA", + "properties": { + "merchant_id": { + "type": "string", + "description": "The ID of a seller associated with this event.", + "nullable": true + }, + "location_id": { + "type": "string", + "description": "The ID of a seller location associated with this event, if the event is associated with the location.", + "nullable": true + }, + "type": { + "type": "string", + "description": "The type of this event. The value is `\"vendor.updated\".`", + "nullable": true + }, + "event_id": { + "type": "string", + "description": "A unique ID for this webhoook event.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "The RFC 3339-formatted time when the underlying event data object is created.", + "readOnly": true + }, + "data": { + "$ref": "#/components/schemas/VendorUpdatedEventData", + "description": "The data associated with this event.", + "nullable": true + } + }, + "example": { + "created_at": "2022-03-16T01:15:35.780283073Z", + "data": { + "id": "1e8d9885-21dc-41b9-8a8f-6ccf64da5462", + "object": { + "operation": "UPDATED", + "vendor": { + "address": { + "administrative_district_level_1": "NY", + "country": "US", + "locality": "New York", + "postal_code": "10003" + }, + "contacts": [ + { + "email_address": "joe@joesfreshseafood.com", + "id": "W43ANBJLR5UAV7WT", + "name": "Joe Burrow", + "ordinal": 0, + "phone_number": "1-212-555-4250" + } + ], + "created_at": "2022-03-16T01:04:12.581Z", + "id": "BXIDSDOUIU34VY2V", + "name": "Macro Brewing", + "note": "Preferred beer supplier", + "status": "ACTIVE", + "updated_at": "2022-03-16T01:15:35.774Z", + "version": 2 + } + }, + "type": "vendor" + }, + "event_id": "1ae8cc43-bf73-48f6-a767-90bdfa197421", + "merchant_id": "ETCE****QDYP", + "type": "vendor.updated" + }, + "x-webhook": { + "event": "vendor.updated", + "scopes": [ + "VENDOR_READ" + ] + }, + "x-api": "#/components/x-apis/Vendors", + "x-since": "2022-03-16" + }, + "VendorUpdatedEventData": { + "type": "object", + "description": "Defines the `vendor.updated` event data structure.", + "x-release-status": "BETA", + "properties": { + "type": { + "type": "string", + "description": "The type of the event data object. The value is `vendor`.", + "nullable": true + }, + "id": { + "type": "string", + "description": "The ID of the event data object." + }, + "object": { + "$ref": "#/components/schemas/VendorUpdatedEventObject", + "description": "An object containing updated vendor.", + "nullable": true + } + } + }, + "VendorUpdatedEventObject": { + "type": "object", + "x-release-status": "BETA", + "properties": { + "operation": { + "$ref": "#/components/schemas/VendorUpdatedEventObjectOperation", + "description": "The operation on the vendor that caused the event to be published. The value is `UPDATED`.\nSee [Operation](#type-operation) for possible values", + "nullable": true + }, + "vendor": { + "$ref": "#/components/schemas/Vendor", + "description": "The updated vendor as the result of the specified operation.", + "nullable": true + } + } + }, + "VendorUpdatedEventObjectOperation": { + "type": "string", + "enum": [ + "UPDATED" + ], + "x-enum-elements": [ + { + "name": "UPDATED", + "description": "" + } + ], + "description": "The operation that can be performed against a vendor to cause the event to be published.", + "x-release-status": "BETA" + }, "VisibilityFilter": { "type": "string", "enum": [ @@ -50046,19 +59913,6 @@ "description": "Enumeration of visibility-filter values used to set the ability to view custom attributes or custom attribute definitions.", "x-release-status": "PUBLIC" }, - "VoidTransactionRequest": { - "type": "object", - "x-release-status": "DEPRECATED", - "properties": {}, - "x-sq-sdk-sample-code": { - "csharp": "/sdk_samples/VoidTransaction/VoidTransactionRequest.csharp", - "java": "/sdk_samples/VoidTransaction/VoidTransactionRequest.java", - "javascript": "/sdk_samples/VoidTransaction/VoidTransactionRequest.javascript", - "php": "/sdk_samples/VoidTransaction/VoidTransactionRequest.php", - "python": "/sdk_samples/VoidTransaction/VoidTransactionRequest.python", - "ruby": "/sdk_samples/VoidTransaction/VoidTransactionRequest.ruby" - } - }, "VoidTransactionResponse": { "type": "object", "description": "Defines the fields that are included in the response body of\na request to the [VoidTransaction](api-endpoint:Transactions-VoidTransaction) endpoint.", @@ -66940,7 +76794,7 @@ "name": "version", "optional": true, "env": "VERSION", - "type": "literal\u003c\"2025-05-21\"\u003e" + "type": "literal\u003c\"2025-06-18\"\u003e" } ] } \ No newline at end of file diff --git a/package.json b/package.json index 2703b59f3..c30200488 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "square", - "version": "42.3.0", + "version": "43.0.0", "private": false, "repository": "https://github.com/square/square-nodejs-sdk", "license": "MIT", diff --git a/reference.md b/reference.md index d03ead60a..384fa46d1 100644 --- a/reference.md +++ b/reference.md @@ -12393,11093 +12393,3 @@ await client.vendors.create({ - - -
client.vendors.search({ ...params }) -> Square.SearchVendorsResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Searches for vendors using a filter against supported [Vendor](entity:Vendor) properties and a supported sorter. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.vendors.search(); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.SearchVendorsRequest` - -
-
- -
-
- -**requestOptions:** `Vendors.RequestOptions` - -
-
-
-
- -
-
-
- -
client.vendors.get({ ...params }) -> Square.GetVendorResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves the vendor of a specified [Vendor](entity:Vendor) ID. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.vendors.get({ - vendorId: "vendor_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.GetVendorsRequest` - -
-
- -
-
- -**requestOptions:** `Vendors.RequestOptions` - -
-
-
-
- -
-
-
- -
client.vendors.update({ ...params }) -> Square.UpdateVendorResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Updates an existing [Vendor](entity:Vendor) object as a supplier to a seller. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.vendors.update({ - vendorId: "vendor_id", - body: { - idempotencyKey: "8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe", - vendor: { - id: "INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4", - name: "Jack's Chicken Shack", - version: 1, - status: "ACTIVE", - }, - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.UpdateVendorsRequest` - -
-
- -
-
- -**requestOptions:** `Vendors.RequestOptions` - -
-
-
-
- -
-
-
- -## Bookings CustomAttributeDefinitions - -
client.bookings.customAttributeDefinitions.list({ ...params }) -> core.Page -
-
- -#### 📝 Description - -
-
- -
-
- -Get all bookings custom attribute definitions. - -To call this endpoint with buyer-level permissions, set `APPOINTMENTS_READ` for the OAuth scope. -To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` for the OAuth scope. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -const response = await client.bookings.customAttributeDefinitions.list(); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -const page = await client.bookings.customAttributeDefinitions.list(); -while (page.hasNextPage()) { - page = page.getNextPage(); -} -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.bookings.ListCustomAttributeDefinitionsRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributeDefinitions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.bookings.customAttributeDefinitions.create({ ...params }) -> Square.CreateBookingCustomAttributeDefinitionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Creates a bookings custom attribute definition. - -To call this endpoint with buyer-level permissions, set `APPOINTMENTS_WRITE` for the OAuth scope. -To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope. - -For calls to this endpoint with seller-level permissions to succeed, the seller must have subscribed to _Appointments Plus_ -or _Appointments Premium_. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.bookings.customAttributeDefinitions.create({ - customAttributeDefinition: {}, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.bookings.CreateBookingCustomAttributeDefinitionRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributeDefinitions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.bookings.customAttributeDefinitions.get({ ...params }) -> Square.RetrieveBookingCustomAttributeDefinitionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves a bookings custom attribute definition. - -To call this endpoint with buyer-level permissions, set `APPOINTMENTS_READ` for the OAuth scope. -To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` for the OAuth scope. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.bookings.customAttributeDefinitions.get({ - key: "key", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.bookings.GetCustomAttributeDefinitionsRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributeDefinitions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.bookings.customAttributeDefinitions.update({ ...params }) -> Square.UpdateBookingCustomAttributeDefinitionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Updates a bookings custom attribute definition. - -To call this endpoint with buyer-level permissions, set `APPOINTMENTS_WRITE` for the OAuth scope. -To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope. - -For calls to this endpoint with seller-level permissions to succeed, the seller must have subscribed to _Appointments Plus_ -or _Appointments Premium_. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.bookings.customAttributeDefinitions.update({ - key: "key", - customAttributeDefinition: {}, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.bookings.UpdateBookingCustomAttributeDefinitionRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributeDefinitions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.bookings.customAttributeDefinitions.delete({ ...params }) -> Square.DeleteBookingCustomAttributeDefinitionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Deletes a bookings custom attribute definition. - -To call this endpoint with buyer-level permissions, set `APPOINTMENTS_WRITE` for the OAuth scope. -To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope. - -For calls to this endpoint with seller-level permissions to succeed, the seller must have subscribed to _Appointments Plus_ -or _Appointments Premium_. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.bookings.customAttributeDefinitions.delete({ - key: "key", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.bookings.DeleteCustomAttributeDefinitionsRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributeDefinitions.RequestOptions` - -
-
-
-
- -
-
-
- -## Bookings CustomAttributes - -
client.bookings.customAttributes.batchDelete({ ...params }) -> Square.BulkDeleteBookingCustomAttributesResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Bulk deletes bookings custom attributes. - -To call this endpoint with buyer-level permissions, set `APPOINTMENTS_WRITE` for the OAuth scope. -To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope. - -For calls to this endpoint with seller-level permissions to succeed, the seller must have subscribed to _Appointments Plus_ -or _Appointments Premium_. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.bookings.customAttributes.batchDelete({ - values: { - key: { - bookingId: "booking_id", - key: "key", - }, - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.bookings.BulkDeleteBookingCustomAttributesRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.bookings.customAttributes.batchUpsert({ ...params }) -> Square.BulkUpsertBookingCustomAttributesResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Bulk upserts bookings custom attributes. - -To call this endpoint with buyer-level permissions, set `APPOINTMENTS_WRITE` for the OAuth scope. -To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope. - -For calls to this endpoint with seller-level permissions to succeed, the seller must have subscribed to _Appointments Plus_ -or _Appointments Premium_. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.bookings.customAttributes.batchUpsert({ - values: { - key: { - bookingId: "booking_id", - customAttribute: {}, - }, - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.bookings.BulkUpsertBookingCustomAttributesRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.bookings.customAttributes.list({ ...params }) -> core.Page -
-
- -#### 📝 Description - -
-
- -
-
- -Lists a booking's custom attributes. - -To call this endpoint with buyer-level permissions, set `APPOINTMENTS_READ` for the OAuth scope. -To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` for the OAuth scope. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -const response = await client.bookings.customAttributes.list({ - bookingId: "booking_id", -}); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -const page = await client.bookings.customAttributes.list({ - bookingId: "booking_id", -}); -while (page.hasNextPage()) { - page = page.getNextPage(); -} -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.bookings.ListCustomAttributesRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.bookings.customAttributes.get({ ...params }) -> Square.RetrieveBookingCustomAttributeResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves a bookings custom attribute. - -To call this endpoint with buyer-level permissions, set `APPOINTMENTS_READ` for the OAuth scope. -To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` for the OAuth scope. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.bookings.customAttributes.get({ - bookingId: "booking_id", - key: "key", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.bookings.GetCustomAttributesRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.bookings.customAttributes.upsert({ ...params }) -> Square.UpsertBookingCustomAttributeResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Upserts a bookings custom attribute. - -To call this endpoint with buyer-level permissions, set `APPOINTMENTS_WRITE` for the OAuth scope. -To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope. - -For calls to this endpoint with seller-level permissions to succeed, the seller must have subscribed to _Appointments Plus_ -or _Appointments Premium_. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.bookings.customAttributes.upsert({ - bookingId: "booking_id", - key: "key", - customAttribute: {}, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.bookings.UpsertBookingCustomAttributeRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.bookings.customAttributes.delete({ ...params }) -> Square.DeleteBookingCustomAttributeResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Deletes a bookings custom attribute. - -To call this endpoint with buyer-level permissions, set `APPOINTMENTS_WRITE` for the OAuth scope. -To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope. - -For calls to this endpoint with seller-level permissions to succeed, the seller must have subscribed to _Appointments Plus_ -or _Appointments Premium_. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.bookings.customAttributes.delete({ - bookingId: "booking_id", - key: "key", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.bookings.DeleteCustomAttributesRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributes.RequestOptions` - -
-
-
-
- -
-
-
- -## Bookings LocationProfiles - -
client.bookings.locationProfiles.list({ ...params }) -> core.Page -
-
- -#### 📝 Description - -
-
- -
-
- -Lists location booking profiles of a seller. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -const response = await client.bookings.locationProfiles.list(); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -const page = await client.bookings.locationProfiles.list(); -while (page.hasNextPage()) { - page = page.getNextPage(); -} -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.bookings.ListLocationProfilesRequest` - -
-
- -
-
- -**requestOptions:** `LocationProfiles.RequestOptions` - -
-
-
-
- -
-
-
- -## Bookings TeamMemberProfiles - -
client.bookings.teamMemberProfiles.list({ ...params }) -> core.Page -
-
- -#### 📝 Description - -
-
- -
-
- -Lists booking profiles for team members. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -const response = await client.bookings.teamMemberProfiles.list(); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -const page = await client.bookings.teamMemberProfiles.list(); -while (page.hasNextPage()) { - page = page.getNextPage(); -} -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.bookings.ListTeamMemberProfilesRequest` - -
-
- -
-
- -**requestOptions:** `TeamMemberProfiles.RequestOptions` - -
-
-
-
- -
-
-
- -
client.bookings.teamMemberProfiles.get({ ...params }) -> Square.GetTeamMemberBookingProfileResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves a team member's booking profile. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.bookings.teamMemberProfiles.get({ - teamMemberId: "team_member_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.bookings.GetTeamMemberProfilesRequest` - -
-
- -
-
- -**requestOptions:** `TeamMemberProfiles.RequestOptions` - -
-
-
-
- -
-
-
- -## CashDrawers Shifts - -
client.cashDrawers.shifts.list({ ...params }) -> core.Page -
-
- -#### 📝 Description - -
-
- -
-
- -Provides the details for all of the cash drawer shifts for a location -in a date range. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -const response = await client.cashDrawers.shifts.list({ - locationId: "location_id", -}); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -const page = await client.cashDrawers.shifts.list({ - locationId: "location_id", -}); -while (page.hasNextPage()) { - page = page.getNextPage(); -} -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.cashDrawers.ListShiftsRequest` - -
-
- -
-
- -**requestOptions:** `Shifts.RequestOptions` - -
-
-
-
- -
-
-
- -
client.cashDrawers.shifts.get({ ...params }) -> Square.GetCashDrawerShiftResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Provides the summary details for a single cash drawer shift. See -[ListCashDrawerShiftEvents](api-endpoint:CashDrawers-ListCashDrawerShiftEvents) for a list of cash drawer shift events. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.cashDrawers.shifts.get({ - shiftId: "shift_id", - locationId: "location_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.cashDrawers.GetShiftsRequest` - -
-
- -
-
- -**requestOptions:** `Shifts.RequestOptions` - -
-
-
-
- -
-
-
- -
client.cashDrawers.shifts.listEvents({ ...params }) -> core.Page -
-
- -#### 📝 Description - -
-
- -
-
- -Provides a paginated list of events for a single cash drawer shift. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -const response = await client.cashDrawers.shifts.listEvents({ - shiftId: "shift_id", - locationId: "location_id", -}); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -const page = await client.cashDrawers.shifts.listEvents({ - shiftId: "shift_id", - locationId: "location_id", -}); -while (page.hasNextPage()) { - page = page.getNextPage(); -} -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.cashDrawers.ListEventsShiftsRequest` - -
-
- -
-
- -**requestOptions:** `Shifts.RequestOptions` - -
-
-
-
- -
-
-
- -## Catalog Images - -
client.catalog.images.create({ ...params }) -> Square.CreateCatalogImageResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Uploads an image file to be represented by a [CatalogImage](entity:CatalogImage) object that can be linked to an existing -[CatalogObject](entity:CatalogObject) instance. The resulting `CatalogImage` is unattached to any `CatalogObject` if the `object_id` -is not specified. - -This `CreateCatalogImage` endpoint accepts HTTP multipart/form-data requests with a JSON part and an image file part in -JPEG, PJPEG, PNG, or GIF format. The maximum file size is 15MB. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.catalog.images.create({}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.catalog.CreateImagesRequest` - -
-
- -
-
- -**requestOptions:** `Images.RequestOptions` - -
-
-
-
- -
-
-
- -
client.catalog.images.update({ ...params }) -> Square.UpdateCatalogImageResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Uploads a new image file to replace the existing one in the specified [CatalogImage](entity:CatalogImage) object. - -This `UpdateCatalogImage` endpoint accepts HTTP multipart/form-data requests with a JSON part and an image file part in -JPEG, PJPEG, PNG, or GIF format. The maximum file size is 15MB. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.catalog.images.update({ - imageId: "image_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.catalog.UpdateImagesRequest` - -
-
- -
-
- -**requestOptions:** `Images.RequestOptions` - -
-
-
-
- -
-
-
- -## Catalog Object - -
client.catalog.object.upsert({ ...params }) -> Square.UpsertCatalogObjectResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Creates a new or updates the specified [CatalogObject](entity:CatalogObject). - -To ensure consistency, only one update request is processed at a time per seller account. -While one (batch or non-batch) update request is being processed, other (batched and non-batched) -update requests are rejected with the `429` error code. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.catalog.object.upsert({ - idempotencyKey: "af3d1afc-7212-4300-b463-0bfc5314a5ae", - object: { - type: "ITEM", - id: "id", - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.catalog.UpsertCatalogObjectRequest` - -
-
- -
-
- -**requestOptions:** `Object_.RequestOptions` - -
-
-
-
- -
-
-
- -
client.catalog.object.get({ ...params }) -> Square.GetCatalogObjectResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Returns a single [CatalogItem](entity:CatalogItem) as a -[CatalogObject](entity:CatalogObject) based on the provided ID. The returned -object includes all of the relevant [CatalogItem](entity:CatalogItem) -information including: [CatalogItemVariation](entity:CatalogItemVariation) -children, references to its -[CatalogModifierList](entity:CatalogModifierList) objects, and the ids of -any [CatalogTax](entity:CatalogTax) objects that apply to it. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.catalog.object.get({ - objectId: "object_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.catalog.GetObjectRequest` - -
-
- -
-
- -**requestOptions:** `Object_.RequestOptions` - -
-
-
-
- -
-
-
- -
client.catalog.object.delete({ ...params }) -> Square.DeleteCatalogObjectResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Deletes a single [CatalogObject](entity:CatalogObject) based on the -provided ID and returns the set of successfully deleted IDs in the response. -Deletion is a cascading event such that all children of the targeted object -are also deleted. For example, deleting a [CatalogItem](entity:CatalogItem) -will also delete all of its -[CatalogItemVariation](entity:CatalogItemVariation) children. - -To ensure consistency, only one delete request is processed at a time per seller account. -While one (batch or non-batch) delete request is being processed, other (batched and non-batched) -delete requests are rejected with the `429` error code. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.catalog.object.delete({ - objectId: "object_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.catalog.DeleteObjectRequest` - -
-
- -
-
- -**requestOptions:** `Object_.RequestOptions` - -
-
-
-
- -
-
-
- -## Checkout PaymentLinks - -
client.checkout.paymentLinks.list({ ...params }) -> core.Page -
-
- -#### 📝 Description - -
-
- -
-
- -Lists all payment links. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -const response = await client.checkout.paymentLinks.list(); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -const page = await client.checkout.paymentLinks.list(); -while (page.hasNextPage()) { - page = page.getNextPage(); -} -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.checkout.ListPaymentLinksRequest` - -
-
- -
-
- -**requestOptions:** `PaymentLinks.RequestOptions` - -
-
-
-
- -
-
-
- -
client.checkout.paymentLinks.create({ ...params }) -> Square.CreatePaymentLinkResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Creates a Square-hosted checkout page. Applications can share the resulting payment link with their buyer to pay for goods and services. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.checkout.paymentLinks.create({ - idempotencyKey: "cd9e25dc-d9f2-4430-aedb-61605070e95f", - quickPay: { - name: "Auto Detailing", - priceMoney: { - amount: 10000, - currency: "USD", - }, - locationId: "A9Y43N9ABXZBP", - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.checkout.CreatePaymentLinkRequest` - -
-
- -
-
- -**requestOptions:** `PaymentLinks.RequestOptions` - -
-
-
-
- -
-
-
- -
client.checkout.paymentLinks.get({ ...params }) -> Square.GetPaymentLinkResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves a payment link. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.checkout.paymentLinks.get({ - id: "id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.checkout.GetPaymentLinksRequest` - -
-
- -
-
- -**requestOptions:** `PaymentLinks.RequestOptions` - -
-
-
-
- -
-
-
- -
client.checkout.paymentLinks.update({ ...params }) -> Square.UpdatePaymentLinkResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Updates a payment link. You can update the `payment_link` fields such as -`description`, `checkout_options`, and `pre_populated_data`. -You cannot update other fields such as the `order_id`, `version`, `URL`, or `timestamp` field. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.checkout.paymentLinks.update({ - id: "id", - paymentLink: { - version: 1, - checkoutOptions: { - askForShippingAddress: true, - }, - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.checkout.UpdatePaymentLinkRequest` - -
-
- -
-
- -**requestOptions:** `PaymentLinks.RequestOptions` - -
-
-
-
- -
-
-
- -
client.checkout.paymentLinks.delete({ ...params }) -> Square.DeletePaymentLinkResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Deletes a payment link. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.checkout.paymentLinks.delete({ - id: "id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.checkout.DeletePaymentLinksRequest` - -
-
- -
-
- -**requestOptions:** `PaymentLinks.RequestOptions` - -
-
-
-
- -
-
-
- -## Customers CustomAttributeDefinitions - -
client.customers.customAttributeDefinitions.list({ ...params }) -> core.Page -
-
- -#### 📝 Description - -
-
- -
-
- -Lists the customer-related [custom attribute definitions](entity:CustomAttributeDefinition) that belong to a Square seller account. - -When all response pages are retrieved, the results include all custom attribute definitions -that are visible to the requesting application, including those that are created by other -applications and set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. Note that -seller-defined custom attributes (also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -const response = await client.customers.customAttributeDefinitions.list(); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -const page = await client.customers.customAttributeDefinitions.list(); -while (page.hasNextPage()) { - page = page.getNextPage(); -} -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.customers.ListCustomAttributeDefinitionsRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributeDefinitions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.customers.customAttributeDefinitions.create({ ...params }) -> Square.CreateCustomerCustomAttributeDefinitionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Creates a customer-related [custom attribute definition](entity:CustomAttributeDefinition) for a Square seller account. -Use this endpoint to define a custom attribute that can be associated with customer profiles. - -A custom attribute definition specifies the `key`, `visibility`, `schema`, and other properties -for a custom attribute. After the definition is created, you can call -[UpsertCustomerCustomAttribute](api-endpoint:CustomerCustomAttributes-UpsertCustomerCustomAttribute) or -[BulkUpsertCustomerCustomAttributes](api-endpoint:CustomerCustomAttributes-BulkUpsertCustomerCustomAttributes) -to set the custom attribute for customer profiles in the seller's Customer Directory. - -Sellers can view all custom attributes in exported customer data, including those set to -`VISIBILITY_HIDDEN`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.customers.customAttributeDefinitions.create({ - customAttributeDefinition: { - key: "favoritemovie", - schema: { - ref: "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String", - }, - name: "Favorite Movie", - description: "The favorite movie of the customer.", - visibility: "VISIBILITY_HIDDEN", - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.customers.CreateCustomerCustomAttributeDefinitionRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributeDefinitions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.customers.customAttributeDefinitions.get({ ...params }) -> Square.GetCustomerCustomAttributeDefinitionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves a customer-related [custom attribute definition](entity:CustomAttributeDefinition) from a Square seller account. - -To retrieve a custom attribute definition created by another application, the `visibility` -setting must be `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom attributes -(also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.customers.customAttributeDefinitions.get({ - key: "key", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.customers.GetCustomAttributeDefinitionsRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributeDefinitions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.customers.customAttributeDefinitions.update({ ...params }) -> Square.UpdateCustomerCustomAttributeDefinitionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Updates a customer-related [custom attribute definition](entity:CustomAttributeDefinition) for a Square seller account. - -Use this endpoint to update the following fields: `name`, `description`, `visibility`, or the -`schema` for a `Selection` data type. - -Only the definition owner can update a custom attribute definition. Note that sellers can view -all custom attributes in exported customer data, including those set to `VISIBILITY_HIDDEN`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.customers.customAttributeDefinitions.update({ - key: "key", - customAttributeDefinition: { - description: "Update the description as desired.", - visibility: "VISIBILITY_READ_ONLY", - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.customers.UpdateCustomerCustomAttributeDefinitionRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributeDefinitions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.customers.customAttributeDefinitions.delete({ ...params }) -> Square.DeleteCustomerCustomAttributeDefinitionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Deletes a customer-related [custom attribute definition](entity:CustomAttributeDefinition) from a Square seller account. - -Deleting a custom attribute definition also deletes the corresponding custom attribute from -all customer profiles in the seller's Customer Directory. - -Only the definition owner can delete a custom attribute definition. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.customers.customAttributeDefinitions.delete({ - key: "key", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.customers.DeleteCustomAttributeDefinitionsRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributeDefinitions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.customers.customAttributeDefinitions.batchUpsert({ ...params }) -> Square.BatchUpsertCustomerCustomAttributesResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Creates or updates [custom attributes](entity:CustomAttribute) for customer profiles as a bulk operation. - -Use this endpoint to set the value of one or more custom attributes for one or more customer profiles. -A custom attribute is based on a custom attribute definition in a Square seller account, which is -created using the [CreateCustomerCustomAttributeDefinition](api-endpoint:CustomerCustomAttributes-CreateCustomerCustomAttributeDefinition) endpoint. - -This `BulkUpsertCustomerCustomAttributes` endpoint accepts a map of 1 to 25 individual upsert -requests and returns a map of individual upsert responses. Each upsert request has a unique ID -and provides a customer ID and custom attribute. Each upsert response is returned with the ID -of the corresponding request. - -To create or update a custom attribute owned by another application, the `visibility` setting -must be `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom attributes -(also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.customers.customAttributeDefinitions.batchUpsert({ - values: { - id1: { - customerId: "N3NCVYY3WS27HF0HKANA3R9FP8", - customAttribute: { - key: "favoritemovie", - value: "Dune", - }, - }, - id2: { - customerId: "SY8EMWRNDN3TQDP2H4KS1QWMMM", - customAttribute: { - key: "ownsmovie", - value: false, - }, - }, - id3: { - customerId: "SY8EMWRNDN3TQDP2H4KS1QWMMM", - customAttribute: { - key: "favoritemovie", - value: "Star Wars", - }, - }, - id4: { - customerId: "N3NCVYY3WS27HF0HKANA3R9FP8", - customAttribute: { - key: "square:a0f1505a-2aa1-490d-91a8-8d31ff181808", - value: "10.5", - }, - }, - id5: { - customerId: "70548QG1HN43B05G0KCZ4MMC1G", - customAttribute: { - key: "sq0ids-0evKIskIGaY45fCyNL66aw:backupemail", - value: "fake-email@squareup.com", - }, - }, - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.customers.BatchUpsertCustomerCustomAttributesRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributeDefinitions.RequestOptions` - -
-
-
-
- -
-
-
- -## Customers Groups - -
client.customers.groups.list({ ...params }) -> core.Page -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves the list of customer groups of a business. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -const response = await client.customers.groups.list(); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -const page = await client.customers.groups.list(); -while (page.hasNextPage()) { - page = page.getNextPage(); -} -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.customers.ListGroupsRequest` - -
-
- -
-
- -**requestOptions:** `Groups.RequestOptions` - -
-
-
-
- -
-
-
- -
client.customers.groups.create({ ...params }) -> Square.CreateCustomerGroupResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Creates a new customer group for a business. - -The request must include the `name` value of the group. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.customers.groups.create({ - group: { - name: "Loyal Customers", - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.customers.CreateCustomerGroupRequest` - -
-
- -
-
- -**requestOptions:** `Groups.RequestOptions` - -
-
-
-
- -
-
-
- -
client.customers.groups.get({ ...params }) -> Square.GetCustomerGroupResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves a specific customer group as identified by the `group_id` value. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.customers.groups.get({ - groupId: "group_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.customers.GetGroupsRequest` - -
-
- -
-
- -**requestOptions:** `Groups.RequestOptions` - -
-
-
-
- -
-
-
- -
client.customers.groups.update({ ...params }) -> Square.UpdateCustomerGroupResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Updates a customer group as identified by the `group_id` value. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.customers.groups.update({ - groupId: "group_id", - group: { - name: "Loyal Customers", - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.customers.UpdateCustomerGroupRequest` - -
-
- -
-
- -**requestOptions:** `Groups.RequestOptions` - -
-
-
-
- -
-
-
- -
client.customers.groups.delete({ ...params }) -> Square.DeleteCustomerGroupResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Deletes a customer group as identified by the `group_id` value. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.customers.groups.delete({ - groupId: "group_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.customers.DeleteGroupsRequest` - -
-
- -
-
- -**requestOptions:** `Groups.RequestOptions` - -
-
-
-
- -
-
-
- -
client.customers.groups.add({ ...params }) -> Square.AddGroupToCustomerResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Adds a group membership to a customer. - -The customer is identified by the `customer_id` value -and the customer group is identified by the `group_id` value. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.customers.groups.add({ - customerId: "customer_id", - groupId: "group_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.customers.AddGroupsRequest` - -
-
- -
-
- -**requestOptions:** `Groups.RequestOptions` - -
-
-
-
- -
-
-
- -
client.customers.groups.remove({ ...params }) -> Square.RemoveGroupFromCustomerResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Removes a group membership from a customer. - -The customer is identified by the `customer_id` value -and the customer group is identified by the `group_id` value. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.customers.groups.remove({ - customerId: "customer_id", - groupId: "group_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.customers.RemoveGroupsRequest` - -
-
- -
-
- -**requestOptions:** `Groups.RequestOptions` - -
-
-
-
- -
-
-
- -## Customers Segments - -
client.customers.segments.list({ ...params }) -> core.Page -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves the list of customer segments of a business. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -const response = await client.customers.segments.list(); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -const page = await client.customers.segments.list(); -while (page.hasNextPage()) { - page = page.getNextPage(); -} -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.customers.ListSegmentsRequest` - -
-
- -
-
- -**requestOptions:** `Segments.RequestOptions` - -
-
-
-
- -
-
-
- -
client.customers.segments.get({ ...params }) -> Square.GetCustomerSegmentResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves a specific customer segment as identified by the `segment_id` value. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.customers.segments.get({ - segmentId: "segment_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.customers.GetSegmentsRequest` - -
-
- -
-
- -**requestOptions:** `Segments.RequestOptions` - -
-
-
-
- -
-
-
- -## Customers Cards - -
client.customers.cards.create({ ...params }) -> Square.CreateCustomerCardResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Adds a card on file to an existing customer. - -As with charges, calls to `CreateCustomerCard` are idempotent. Multiple -calls with the same card nonce return the same card record that was created -with the provided nonce during the _first_ call. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.customers.cards.create({ - customerId: "customer_id", - cardNonce: "YOUR_CARD_NONCE", - billingAddress: { - addressLine1: "500 Electric Ave", - addressLine2: "Suite 600", - locality: "New York", - administrativeDistrictLevel1: "NY", - postalCode: "10003", - country: "US", - }, - cardholderName: "Amelia Earhart", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.customers.CreateCustomerCardRequest` - -
-
- -
-
- -**requestOptions:** `Cards.RequestOptions` - -
-
-
-
- -
-
-
- -
client.customers.cards.delete({ ...params }) -> Square.DeleteCustomerCardResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Removes a card on file from a customer. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.customers.cards.delete({ - customerId: "customer_id", - cardId: "card_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.customers.DeleteCardsRequest` - -
-
- -
-
- -**requestOptions:** `Cards.RequestOptions` - -
-
-
-
- -
-
-
- -## Customers CustomAttributes - -
client.customers.customAttributes.list({ ...params }) -> core.Page -
-
- -#### 📝 Description - -
-
- -
-
- -Lists the [custom attributes](entity:CustomAttribute) associated with a customer profile. - -You can use the `with_definitions` query parameter to also retrieve custom attribute definitions -in the same call. - -When all response pages are retrieved, the results include all custom attributes that are -visible to the requesting application, including those that are owned by other applications -and set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -const response = await client.customers.customAttributes.list({ - customerId: "customer_id", -}); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -const page = await client.customers.customAttributes.list({ - customerId: "customer_id", -}); -while (page.hasNextPage()) { - page = page.getNextPage(); -} -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.customers.ListCustomAttributesRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.customers.customAttributes.get({ ...params }) -> Square.GetCustomerCustomAttributeResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves a [custom attribute](entity:CustomAttribute) associated with a customer profile. - -You can use the `with_definition` query parameter to also retrieve the custom attribute definition -in the same call. - -To retrieve a custom attribute owned by another application, the `visibility` setting must be -`VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom attributes -(also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.customers.customAttributes.get({ - customerId: "customer_id", - key: "key", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.customers.GetCustomAttributesRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.customers.customAttributes.upsert({ ...params }) -> Square.UpsertCustomerCustomAttributeResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Creates or updates a [custom attribute](entity:CustomAttribute) for a customer profile. - -Use this endpoint to set the value of a custom attribute for a specified customer profile. -A custom attribute is based on a custom attribute definition in a Square seller account, which -is created using the [CreateCustomerCustomAttributeDefinition](api-endpoint:CustomerCustomAttributes-CreateCustomerCustomAttributeDefinition) endpoint. - -To create or update a custom attribute owned by another application, the `visibility` setting -must be `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom attributes -(also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.customers.customAttributes.upsert({ - customerId: "customer_id", - key: "key", - customAttribute: { - value: "Dune", - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.customers.UpsertCustomerCustomAttributeRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.customers.customAttributes.delete({ ...params }) -> Square.DeleteCustomerCustomAttributeResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Deletes a [custom attribute](entity:CustomAttribute) associated with a customer profile. - -To delete a custom attribute owned by another application, the `visibility` setting must be -`VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom attributes -(also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.customers.customAttributes.delete({ - customerId: "customer_id", - key: "key", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.customers.DeleteCustomAttributesRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributes.RequestOptions` - -
-
-
-
- -
-
-
- -## Devices Codes - -
client.devices.codes.list({ ...params }) -> core.Page -
-
- -#### 📝 Description - -
-
- -
-
- -Lists all DeviceCodes associated with the merchant. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -const response = await client.devices.codes.list(); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -const page = await client.devices.codes.list(); -while (page.hasNextPage()) { - page = page.getNextPage(); -} -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.devices.ListCodesRequest` - -
-
- -
-
- -**requestOptions:** `Codes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.devices.codes.create({ ...params }) -> Square.CreateDeviceCodeResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Creates a DeviceCode that can be used to login to a Square Terminal device to enter the connected -terminal mode. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.devices.codes.create({ - idempotencyKey: "01bb00a6-0c86-4770-94ed-f5fca973cd56", - deviceCode: { - name: "Counter 1", - productType: "TERMINAL_API", - locationId: "B5E4484SHHNYH", - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.devices.CreateDeviceCodeRequest` - -
-
- -
-
- -**requestOptions:** `Codes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.devices.codes.get({ ...params }) -> Square.GetDeviceCodeResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves DeviceCode with the associated ID. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.devices.codes.get({ - id: "id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.devices.GetCodesRequest` - -
-
- -
-
- -**requestOptions:** `Codes.RequestOptions` - -
-
-
-
- -
-
-
- -## Disputes Evidence - -
client.disputes.evidence.list({ ...params }) -> core.Page -
-
- -#### 📝 Description - -
-
- -
-
- -Returns a list of evidence associated with a dispute. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -const response = await client.disputes.evidence.list({ - disputeId: "dispute_id", -}); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -const page = await client.disputes.evidence.list({ - disputeId: "dispute_id", -}); -while (page.hasNextPage()) { - page = page.getNextPage(); -} -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.disputes.ListEvidenceRequest` - -
-
- -
-
- -**requestOptions:** `Evidence.RequestOptions` - -
-
-
-
- -
-
-
- -
client.disputes.evidence.get({ ...params }) -> Square.GetDisputeEvidenceResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Returns the metadata for the evidence specified in the request URL path. - -You must maintain a copy of any evidence uploaded if you want to reference it later. Evidence cannot be downloaded after you upload it. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.disputes.evidence.get({ - disputeId: "dispute_id", - evidenceId: "evidence_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.disputes.GetEvidenceRequest` - -
-
- -
-
- -**requestOptions:** `Evidence.RequestOptions` - -
-
-
-
- -
-
-
- -
client.disputes.evidence.delete({ ...params }) -> Square.DeleteDisputeEvidenceResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Removes specified evidence from a dispute. -Square does not send the bank any evidence that is removed. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.disputes.evidence.delete({ - disputeId: "dispute_id", - evidenceId: "evidence_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.disputes.DeleteEvidenceRequest` - -
-
- -
-
- -**requestOptions:** `Evidence.RequestOptions` - -
-
-
-
- -
-
-
- -## GiftCards Activities - -
client.giftCards.activities.list({ ...params }) -> core.Page -
-
- -#### 📝 Description - -
-
- -
-
- -Lists gift card activities. By default, you get gift card activities for all -gift cards in the seller's account. You can optionally specify query parameters to -filter the list. For example, you can get a list of gift card activities for a gift card, -for all gift cards in a specific region, or for activities within a time window. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -const response = await client.giftCards.activities.list(); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -const page = await client.giftCards.activities.list(); -while (page.hasNextPage()) { - page = page.getNextPage(); -} -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.giftCards.ListActivitiesRequest` - -
-
- -
-
- -**requestOptions:** `Activities.RequestOptions` - -
-
-
-
- -
-
-
- -
client.giftCards.activities.create({ ...params }) -> Square.CreateGiftCardActivityResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Creates a gift card activity to manage the balance or state of a [gift card](entity:GiftCard). -For example, create an `ACTIVATE` activity to activate a gift card with an initial balance before first use. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.giftCards.activities.create({ - idempotencyKey: "U16kfr-kA70er-q4Rsym-7U7NnY", - giftCardActivity: { - type: "ACTIVATE", - locationId: "81FN9BNFZTKS4", - giftCardId: "gftc:6d55a72470d940c6ba09c0ab8ad08d20", - activateActivityDetails: { - orderId: "jJNGHm4gLI6XkFbwtiSLqK72KkAZY", - lineItemUid: "eIWl7X0nMuO9Ewbh0ChIx", - }, - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.giftCards.CreateGiftCardActivityRequest` - -
-
- -
-
- -**requestOptions:** `Activities.RequestOptions` - -
-
-
-
- -
-
-
- -## Labor BreakTypes - -
client.labor.breakTypes.list({ ...params }) -> core.Page -
-
- -#### 📝 Description - -
-
- -
-
- -Returns a paginated list of `BreakType` instances for a business. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -const response = await client.labor.breakTypes.list(); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -const page = await client.labor.breakTypes.list(); -while (page.hasNextPage()) { - page = page.getNextPage(); -} -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.labor.ListBreakTypesRequest` - -
-
- -
-
- -**requestOptions:** `BreakTypes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.labor.breakTypes.create({ ...params }) -> Square.CreateBreakTypeResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Creates a new `BreakType`. - -A `BreakType` is a template for creating `Break` objects. -You must provide the following values in your request to this -endpoint: - -- `location_id` -- `break_name` -- `expected_duration` -- `is_paid` - -You can only have three `BreakType` instances per location. If you attempt to add a fourth -`BreakType` for a location, an `INVALID_REQUEST_ERROR` "Exceeded limit of 3 breaks per location." -is returned. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.labor.breakTypes.create({ - idempotencyKey: "PAD3NG5KSN2GL", - breakType: { - locationId: "CGJN03P1D08GF", - breakName: "Lunch Break", - expectedDuration: "PT30M", - isPaid: true, - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.labor.CreateBreakTypeRequest` - -
-
- -
-
- -**requestOptions:** `BreakTypes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.labor.breakTypes.get({ ...params }) -> Square.GetBreakTypeResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Returns a single `BreakType` specified by `id`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.labor.breakTypes.get({ - id: "id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.labor.GetBreakTypesRequest` - -
-
- -
-
- -**requestOptions:** `BreakTypes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.labor.breakTypes.update({ ...params }) -> Square.UpdateBreakTypeResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Updates an existing `BreakType`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.labor.breakTypes.update({ - id: "id", - breakType: { - locationId: "26M7H24AZ9N6R", - breakName: "Lunch", - expectedDuration: "PT50M", - isPaid: true, - version: 1, - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.labor.UpdateBreakTypeRequest` - -
-
- -
-
- -**requestOptions:** `BreakTypes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.labor.breakTypes.delete({ ...params }) -> Square.DeleteBreakTypeResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Deletes an existing `BreakType`. - -A `BreakType` can be deleted even if it is referenced from a `Shift`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.labor.breakTypes.delete({ - id: "id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.labor.DeleteBreakTypesRequest` - -
-
- -
-
- -**requestOptions:** `BreakTypes.RequestOptions` - -
-
-
-
- -
-
-
- -## Labor EmployeeWages - -
client.labor.employeeWages.list({ ...params }) -> core.Page -
-
- -#### 📝 Description - -
-
- -
-
- -Returns a paginated list of `EmployeeWage` instances for a business. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -const response = await client.labor.employeeWages.list(); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -const page = await client.labor.employeeWages.list(); -while (page.hasNextPage()) { - page = page.getNextPage(); -} -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.labor.ListEmployeeWagesRequest` - -
-
- -
-
- -**requestOptions:** `EmployeeWages.RequestOptions` - -
-
-
-
- -
-
-
- -
client.labor.employeeWages.get({ ...params }) -> Square.GetEmployeeWageResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Returns a single `EmployeeWage` specified by `id`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.labor.employeeWages.get({ - id: "id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.labor.GetEmployeeWagesRequest` - -
-
- -
-
- -**requestOptions:** `EmployeeWages.RequestOptions` - -
-
-
-
- -
-
-
- -## Labor Shifts - -
client.labor.shifts.create({ ...params }) -> Square.CreateShiftResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Creates a new `Shift`. - -A `Shift` represents a complete workday for a single team member. -You must provide the following values in your request to this -endpoint: - -- `location_id` -- `team_member_id` -- `start_at` - -An attempt to create a new `Shift` can result in a `BAD_REQUEST` error when: - -- The `status` of the new `Shift` is `OPEN` and the team member has another - shift with an `OPEN` status. -- The `start_at` date is in the future. -- The `start_at` or `end_at` date overlaps another shift for the same team member. -- The `Break` instances are set in the request and a break `start_at` -is before the `Shift.start_at`, a break `end_at` is after -the `Shift.end_at`, or both. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.labor.shifts.create({ - idempotencyKey: "HIDSNG5KS478L", - shift: { - locationId: "PAA1RJZZKXBFG", - startAt: "2019-01-25T03:11:00-05:00", - endAt: "2019-01-25T13:11:00-05:00", - wage: { - title: "Barista", - hourlyRate: { - amount: 1100, - currency: "USD", - }, - tipEligible: true, - }, - breaks: [ - { - startAt: "2019-01-25T06:11:00-05:00", - endAt: "2019-01-25T06:16:00-05:00", - breakTypeId: "REGS1EQR1TPZ5", - name: "Tea Break", - expectedDuration: "PT5M", - isPaid: true, - }, - ], - teamMemberId: "ormj0jJJZ5OZIzxrZYJI", - declaredCashTipMoney: { - amount: 500, - currency: "USD", - }, - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.labor.CreateShiftRequest` - -
-
- -
-
- -**requestOptions:** `Shifts.RequestOptions` - -
-
-
-
- -
-
-
- -
client.labor.shifts.search({ ...params }) -> Square.SearchShiftsResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Returns a paginated list of `Shift` records for a business. -The list to be returned can be filtered by: - -- Location IDs -- Team member IDs -- Shift status (`OPEN` or `CLOSED`) -- Shift start -- Shift end -- Workday details - -The list can be sorted by: - -- `START_AT` -- `END_AT` -- `CREATED_AT` -- `UPDATED_AT` -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.labor.shifts.search({ - query: { - filter: { - workday: { - dateRange: { - startDate: "2019-01-20", - endDate: "2019-02-03", - }, - matchShiftsBy: "START_AT", - defaultTimezone: "America/Los_Angeles", - }, - }, - }, - limit: 100, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.labor.SearchShiftsRequest` - -
-
- -
-
- -**requestOptions:** `Shifts.RequestOptions` - -
-
-
-
- -
-
-
- -
client.labor.shifts.get({ ...params }) -> Square.GetShiftResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Returns a single `Shift` specified by `id`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.labor.shifts.get({ - id: "id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.labor.GetShiftsRequest` - -
-
- -
-
- -**requestOptions:** `Shifts.RequestOptions` - -
-
-
-
- -
-
-
- -
client.labor.shifts.update({ ...params }) -> Square.UpdateShiftResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Updates an existing `Shift`. - -When adding a `Break` to a `Shift`, any earlier `Break` instances in the `Shift` have -the `end_at` property set to a valid RFC-3339 datetime string. - -When closing a `Shift`, all `Break` instances in the `Shift` must be complete with `end_at` -set on each `Break`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.labor.shifts.update({ - id: "id", - shift: { - locationId: "PAA1RJZZKXBFG", - startAt: "2019-01-25T03:11:00-05:00", - endAt: "2019-01-25T13:11:00-05:00", - wage: { - title: "Bartender", - hourlyRate: { - amount: 1500, - currency: "USD", - }, - tipEligible: true, - }, - breaks: [ - { - id: "X7GAQYVVRRG6P", - startAt: "2019-01-25T06:11:00-05:00", - endAt: "2019-01-25T06:16:00-05:00", - breakTypeId: "REGS1EQR1TPZ5", - name: "Tea Break", - expectedDuration: "PT5M", - isPaid: true, - }, - ], - version: 1, - teamMemberId: "ormj0jJJZ5OZIzxrZYJI", - declaredCashTipMoney: { - amount: 500, - currency: "USD", - }, - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.labor.UpdateShiftRequest` - -
-
- -
-
- -**requestOptions:** `Shifts.RequestOptions` - -
-
-
-
- -
-
-
- -
client.labor.shifts.delete({ ...params }) -> Square.DeleteShiftResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Deletes a `Shift`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.labor.shifts.delete({ - id: "id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.labor.DeleteShiftsRequest` - -
-
- -
-
- -**requestOptions:** `Shifts.RequestOptions` - -
-
-
-
- -
-
-
- -## Labor TeamMemberWages - -
client.labor.teamMemberWages.list({ ...params }) -> core.Page -
-
- -#### 📝 Description - -
-
- -
-
- -Returns a paginated list of `TeamMemberWage` instances for a business. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -const response = await client.labor.teamMemberWages.list(); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -const page = await client.labor.teamMemberWages.list(); -while (page.hasNextPage()) { - page = page.getNextPage(); -} -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.labor.ListTeamMemberWagesRequest` - -
-
- -
-
- -**requestOptions:** `TeamMemberWages.RequestOptions` - -
-
-
-
- -
-
-
- -
client.labor.teamMemberWages.get({ ...params }) -> Square.GetTeamMemberWageResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Returns a single `TeamMemberWage` specified by `id`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.labor.teamMemberWages.get({ - id: "id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.labor.GetTeamMemberWagesRequest` - -
-
- -
-
- -**requestOptions:** `TeamMemberWages.RequestOptions` - -
-
-
-
- -
-
-
- -## Labor WorkweekConfigs - -
client.labor.workweekConfigs.list({ ...params }) -> core.Page -
-
- -#### 📝 Description - -
-
- -
-
- -Returns a list of `WorkweekConfig` instances for a business. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -const response = await client.labor.workweekConfigs.list(); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -const page = await client.labor.workweekConfigs.list(); -while (page.hasNextPage()) { - page = page.getNextPage(); -} -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.labor.ListWorkweekConfigsRequest` - -
-
- -
-
- -**requestOptions:** `WorkweekConfigs.RequestOptions` - -
-
-
-
- -
-
-
- -
client.labor.workweekConfigs.get({ ...params }) -> Square.UpdateWorkweekConfigResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Updates a `WorkweekConfig`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.labor.workweekConfigs.get({ - id: "id", - workweekConfig: { - startOfWeek: "MON", - startOfDayLocalTime: "10:00", - version: 10, - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.labor.UpdateWorkweekConfigRequest` - -
-
- -
-
- -**requestOptions:** `WorkweekConfigs.RequestOptions` - -
-
-
-
- -
-
-
- -## Locations CustomAttributeDefinitions - -
client.locations.customAttributeDefinitions.list({ ...params }) -> core.Page -
-
- -#### 📝 Description - -
-
- -
-
- -Lists the location-related [custom attribute definitions](entity:CustomAttributeDefinition) that belong to a Square seller account. -When all response pages are retrieved, the results include all custom attribute definitions -that are visible to the requesting application, including those that are created by other -applications and set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -const response = await client.locations.customAttributeDefinitions.list(); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -const page = await client.locations.customAttributeDefinitions.list(); -while (page.hasNextPage()) { - page = page.getNextPage(); -} -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.locations.ListCustomAttributeDefinitionsRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributeDefinitions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.locations.customAttributeDefinitions.create({ ...params }) -> Square.CreateLocationCustomAttributeDefinitionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Creates a location-related [custom attribute definition](entity:CustomAttributeDefinition) for a Square seller account. -Use this endpoint to define a custom attribute that can be associated with locations. -A custom attribute definition specifies the `key`, `visibility`, `schema`, and other properties -for a custom attribute. After the definition is created, you can call -[UpsertLocationCustomAttribute](api-endpoint:LocationCustomAttributes-UpsertLocationCustomAttribute) or -[BulkUpsertLocationCustomAttributes](api-endpoint:LocationCustomAttributes-BulkUpsertLocationCustomAttributes) -to set the custom attribute for locations. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.locations.customAttributeDefinitions.create({ - customAttributeDefinition: { - key: "bestseller", - schema: { - ref: "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String", - }, - name: "Bestseller", - description: "Bestselling item at location", - visibility: "VISIBILITY_READ_WRITE_VALUES", - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.locations.CreateLocationCustomAttributeDefinitionRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributeDefinitions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.locations.customAttributeDefinitions.get({ ...params }) -> Square.RetrieveLocationCustomAttributeDefinitionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves a location-related [custom attribute definition](entity:CustomAttributeDefinition) from a Square seller account. -To retrieve a custom attribute definition created by another application, the `visibility` -setting must be `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.locations.customAttributeDefinitions.get({ - key: "key", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.locations.GetCustomAttributeDefinitionsRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributeDefinitions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.locations.customAttributeDefinitions.update({ ...params }) -> Square.UpdateLocationCustomAttributeDefinitionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Updates a location-related [custom attribute definition](entity:CustomAttributeDefinition) for a Square seller account. -Use this endpoint to update the following fields: `name`, `description`, `visibility`, or the -`schema` for a `Selection` data type. -Only the definition owner can update a custom attribute definition. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.locations.customAttributeDefinitions.update({ - key: "key", - customAttributeDefinition: { - description: "Update the description as desired.", - visibility: "VISIBILITY_READ_ONLY", - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.locations.UpdateLocationCustomAttributeDefinitionRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributeDefinitions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.locations.customAttributeDefinitions.delete({ ...params }) -> Square.DeleteLocationCustomAttributeDefinitionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Deletes a location-related [custom attribute definition](entity:CustomAttributeDefinition) from a Square seller account. -Deleting a custom attribute definition also deletes the corresponding custom attribute from -all locations. -Only the definition owner can delete a custom attribute definition. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.locations.customAttributeDefinitions.delete({ - key: "key", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.locations.DeleteCustomAttributeDefinitionsRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributeDefinitions.RequestOptions` - -
-
-
-
- -
-
-
- -## Locations CustomAttributes - -
client.locations.customAttributes.batchDelete({ ...params }) -> Square.BulkDeleteLocationCustomAttributesResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Deletes [custom attributes](entity:CustomAttribute) for locations as a bulk operation. -To delete a custom attribute owned by another application, the `visibility` setting must be -`VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.locations.customAttributes.batchDelete({ - values: { - id1: { - key: "bestseller", - }, - id2: { - key: "bestseller", - }, - id3: { - key: "phone-number", - }, - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.locations.BulkDeleteLocationCustomAttributesRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.locations.customAttributes.batchUpsert({ ...params }) -> Square.BulkUpsertLocationCustomAttributesResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Creates or updates [custom attributes](entity:CustomAttribute) for locations as a bulk operation. -Use this endpoint to set the value of one or more custom attributes for one or more locations. -A custom attribute is based on a custom attribute definition in a Square seller account, which is -created using the [CreateLocationCustomAttributeDefinition](api-endpoint:LocationCustomAttributes-CreateLocationCustomAttributeDefinition) endpoint. -This `BulkUpsertLocationCustomAttributes` endpoint accepts a map of 1 to 25 individual upsert -requests and returns a map of individual upsert responses. Each upsert request has a unique ID -and provides a location ID and custom attribute. Each upsert response is returned with the ID -of the corresponding request. -To create or update a custom attribute owned by another application, the `visibility` setting -must be `VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.locations.customAttributes.batchUpsert({ - values: { - id1: { - locationId: "L0TBCBTB7P8RQ", - customAttribute: { - key: "bestseller", - value: "hot cocoa", - }, - }, - id2: { - locationId: "L9XMD04V3STJX", - customAttribute: { - key: "bestseller", - value: "berry smoothie", - }, - }, - id3: { - locationId: "L0TBCBTB7P8RQ", - customAttribute: { - key: "phone-number", - value: "+12223334444", - }, - }, - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.locations.BulkUpsertLocationCustomAttributesRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.locations.customAttributes.list({ ...params }) -> core.Page -
-
- -#### 📝 Description - -
-
- -
-
- -Lists the [custom attributes](entity:CustomAttribute) associated with a location. -You can use the `with_definitions` query parameter to also retrieve custom attribute definitions -in the same call. -When all response pages are retrieved, the results include all custom attributes that are -visible to the requesting application, including those that are owned by other applications -and set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -const response = await client.locations.customAttributes.list({ - locationId: "location_id", -}); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -const page = await client.locations.customAttributes.list({ - locationId: "location_id", -}); -while (page.hasNextPage()) { - page = page.getNextPage(); -} -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.locations.ListCustomAttributesRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.locations.customAttributes.get({ ...params }) -> Square.RetrieveLocationCustomAttributeResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves a [custom attribute](entity:CustomAttribute) associated with a location. -You can use the `with_definition` query parameter to also retrieve the custom attribute definition -in the same call. -To retrieve a custom attribute owned by another application, the `visibility` setting must be -`VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.locations.customAttributes.get({ - locationId: "location_id", - key: "key", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.locations.GetCustomAttributesRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.locations.customAttributes.upsert({ ...params }) -> Square.UpsertLocationCustomAttributeResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Creates or updates a [custom attribute](entity:CustomAttribute) for a location. -Use this endpoint to set the value of a custom attribute for a specified location. -A custom attribute is based on a custom attribute definition in a Square seller account, which -is created using the [CreateLocationCustomAttributeDefinition](api-endpoint:LocationCustomAttributes-CreateLocationCustomAttributeDefinition) endpoint. -To create or update a custom attribute owned by another application, the `visibility` setting -must be `VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.locations.customAttributes.upsert({ - locationId: "location_id", - key: "key", - customAttribute: { - value: "hot cocoa", - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.locations.UpsertLocationCustomAttributeRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.locations.customAttributes.delete({ ...params }) -> Square.DeleteLocationCustomAttributeResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Deletes a [custom attribute](entity:CustomAttribute) associated with a location. -To delete a custom attribute owned by another application, the `visibility` setting must be -`VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.locations.customAttributes.delete({ - locationId: "location_id", - key: "key", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.locations.DeleteCustomAttributesRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributes.RequestOptions` - -
-
-
-
- -
-
-
- -## Locations Transactions - -
client.locations.transactions.list({ ...params }) -> Square.ListTransactionsResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Lists transactions for a particular location. - -Transactions include payment information from sales and exchanges and refund -information from returns and exchanges. - -Max results per [page](https://developer.squareup.com/docs/working-with-apis/pagination): 50 - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.locations.transactions.list({ - locationId: "location_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.locations.ListTransactionsRequest` - -
-
- -
-
- -**requestOptions:** `Transactions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.locations.transactions.get({ ...params }) -> Square.GetTransactionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves details for a single transaction. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.locations.transactions.get({ - locationId: "location_id", - transactionId: "transaction_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.locations.GetTransactionsRequest` - -
-
- -
-
- -**requestOptions:** `Transactions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.locations.transactions.capture({ ...params }) -> Square.CaptureTransactionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Captures a transaction that was created with the [Charge](api-endpoint:Transactions-Charge) -endpoint with a `delay_capture` value of `true`. - -See [Delayed capture transactions](https://developer.squareup.com/docs/payments/transactions/overview#delayed-capture) -for more information. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.locations.transactions.capture({ - locationId: "location_id", - transactionId: "transaction_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.locations.CaptureTransactionsRequest` - -
-
- -
-
- -**requestOptions:** `Transactions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.locations.transactions.void({ ...params }) -> Square.VoidTransactionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Cancels a transaction that was created with the [Charge](api-endpoint:Transactions-Charge) -endpoint with a `delay_capture` value of `true`. - -See [Delayed capture transactions](https://developer.squareup.com/docs/payments/transactions/overview#delayed-capture) -for more information. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.locations.transactions.void({ - locationId: "location_id", - transactionId: "transaction_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.locations.VoidTransactionsRequest` - -
-
- -
-
- -**requestOptions:** `Transactions.RequestOptions` - -
-
-
-
- -
-
-
- -## Loyalty Accounts - -
client.loyalty.accounts.create({ ...params }) -> Square.CreateLoyaltyAccountResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Creates a loyalty account. To create a loyalty account, you must provide the `program_id` and a `mapping` with the `phone_number` of the buyer. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.loyalty.accounts.create({ - loyaltyAccount: { - programId: "d619f755-2d17-41f3-990d-c04ecedd64dd", - mapping: { - phoneNumber: "+14155551234", - }, - }, - idempotencyKey: "ec78c477-b1c3-4899-a209-a4e71337c996", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.loyalty.CreateLoyaltyAccountRequest` - -
-
- -
-
- -**requestOptions:** `Accounts.RequestOptions` - -
-
-
-
- -
-
-
- -
client.loyalty.accounts.search({ ...params }) -> Square.SearchLoyaltyAccountsResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Searches for loyalty accounts in a loyalty program. - -You can search for a loyalty account using the phone number or customer ID associated with the account. To return all loyalty accounts, specify an empty `query` object or omit it entirely. - -Search results are sorted by `created_at` in ascending order. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.loyalty.accounts.search({ - query: { - mappings: [ - { - phoneNumber: "+14155551234", - }, - ], - }, - limit: 10, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.loyalty.SearchLoyaltyAccountsRequest` - -
-
- -
-
- -**requestOptions:** `Accounts.RequestOptions` - -
-
-
-
- -
-
-
- -
client.loyalty.accounts.get({ ...params }) -> Square.GetLoyaltyAccountResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves a loyalty account. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.loyalty.accounts.get({ - accountId: "account_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.loyalty.GetAccountsRequest` - -
-
- -
-
- -**requestOptions:** `Accounts.RequestOptions` - -
-
-
-
- -
-
-
- -
client.loyalty.accounts.accumulatePoints({ ...params }) -> Square.AccumulateLoyaltyPointsResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Adds points earned from a purchase to a [loyalty account](entity:LoyaltyAccount). - -- If you are using the Orders API to manage orders, provide the `order_id`. Square reads the order - to compute the points earned from both the base loyalty program and an associated - [loyalty promotion](entity:LoyaltyPromotion). For purchases that qualify for multiple accrual - rules, Square computes points based on the accrual rule that grants the most points. - For purchases that qualify for multiple promotions, Square computes points based on the most - recently created promotion. A purchase must first qualify for program points to be eligible for promotion points. - -- If you are not using the Orders API to manage orders, provide `points` with the number of points to add. -You must first perform a client-side computation of the points earned from the loyalty program and -loyalty promotion. For spend-based and visit-based programs, you can call [CalculateLoyaltyPoints](api-endpoint:Loyalty-CalculateLoyaltyPoints) -to compute the points earned from the base loyalty program. For information about computing points earned from a loyalty promotion, see -[Calculating promotion points](https://developer.squareup.com/docs/loyalty-api/loyalty-promotions#calculate-promotion-points). -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.loyalty.accounts.accumulatePoints({ - accountId: "account_id", - accumulatePoints: { - orderId: "RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY", - }, - idempotencyKey: "58b90739-c3e8-4b11-85f7-e636d48d72cb", - locationId: "P034NEENMD09F", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.loyalty.AccumulateLoyaltyPointsRequest` - -
-
- -
-
- -**requestOptions:** `Accounts.RequestOptions` - -
-
-
-
- -
-
-
- -
client.loyalty.accounts.adjust({ ...params }) -> Square.AdjustLoyaltyPointsResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Adds points to or subtracts points from a buyer's account. - -Use this endpoint only when you need to manually adjust points. Otherwise, in your application flow, you call -[AccumulateLoyaltyPoints](api-endpoint:Loyalty-AccumulateLoyaltyPoints) -to add points when a buyer pays for the purchase. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.loyalty.accounts.adjust({ - accountId: "account_id", - idempotencyKey: "bc29a517-3dc9-450e-aa76-fae39ee849d1", - adjustPoints: { - points: 10, - reason: "Complimentary points", - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.loyalty.AdjustLoyaltyPointsRequest` - -
-
- -
-
- -**requestOptions:** `Accounts.RequestOptions` - -
-
-
-
- -
-
-
- -## Loyalty Programs - -
client.loyalty.programs.list() -> Square.ListLoyaltyProgramsResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Returns a list of loyalty programs in the seller's account. -Loyalty programs define how buyers can earn points and redeem points for rewards. Square sellers can have only one loyalty program, which is created and managed from the Seller Dashboard. For more information, see [Loyalty Program Overview](https://developer.squareup.com/docs/loyalty/overview). - -Replaced with [RetrieveLoyaltyProgram](api-endpoint:Loyalty-RetrieveLoyaltyProgram) when used with the keyword `main`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.loyalty.programs.list(); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**requestOptions:** `Programs.RequestOptions` - -
-
-
-
- -
-
-
- -
client.loyalty.programs.get({ ...params }) -> Square.GetLoyaltyProgramResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves the loyalty program in a seller's account, specified by the program ID or the keyword `main`. - -Loyalty programs define how buyers can earn points and redeem points for rewards. Square sellers can have only one loyalty program, which is created and managed from the Seller Dashboard. For more information, see [Loyalty Program Overview](https://developer.squareup.com/docs/loyalty/overview). - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.loyalty.programs.get({ - programId: "program_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.loyalty.GetProgramsRequest` - -
-
- -
-
- -**requestOptions:** `Programs.RequestOptions` - -
-
-
-
- -
-
-
- -
client.loyalty.programs.calculate({ ...params }) -> Square.CalculateLoyaltyPointsResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Calculates the number of points a buyer can earn from a purchase. Applications might call this endpoint -to display the points to the buyer. - -- If you are using the Orders API to manage orders, provide the `order_id` and (optional) `loyalty_account_id`. - Square reads the order to compute the points earned from the base loyalty program and an associated - [loyalty promotion](entity:LoyaltyPromotion). - -- If you are not using the Orders API to manage orders, provide `transaction_amount_money` with the -purchase amount. Square uses this amount to calculate the points earned from the base loyalty program, -but not points earned from a loyalty promotion. For spend-based and visit-based programs, the `tax_mode` -setting of the accrual rule indicates how taxes should be treated for loyalty points accrual. -If the purchase qualifies for program points, call -[ListLoyaltyPromotions](api-endpoint:Loyalty-ListLoyaltyPromotions) and perform a client-side computation -to calculate whether the purchase also qualifies for promotion points. For more information, see -[Calculating promotion points](https://developer.squareup.com/docs/loyalty-api/loyalty-promotions#calculate-promotion-points). -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.loyalty.programs.calculate({ - programId: "program_id", - orderId: "RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY", - loyaltyAccountId: "79b807d2-d786-46a9-933b-918028d7a8c5", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.loyalty.CalculateLoyaltyPointsRequest` - -
-
- -
-
- -**requestOptions:** `Programs.RequestOptions` - -
-
-
-
- -
-
-
- -## Loyalty Rewards - -
client.loyalty.rewards.create({ ...params }) -> Square.CreateLoyaltyRewardResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Creates a loyalty reward. In the process, the endpoint does following: - -- Uses the `reward_tier_id` in the request to determine the number of points - to lock for this reward. -- If the request includes `order_id`, it adds the reward and related discount to the order. - -After a reward is created, the points are locked and -not available for the buyer to redeem another reward. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.loyalty.rewards.create({ - reward: { - loyaltyAccountId: "5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd", - rewardTierId: "e1b39225-9da5-43d1-a5db-782cdd8ad94f", - orderId: "RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY", - }, - idempotencyKey: "18c2e5ea-a620-4b1f-ad60-7b167285e451", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.loyalty.CreateLoyaltyRewardRequest` - -
-
- -
-
- -**requestOptions:** `Rewards.RequestOptions` - -
-
-
-
- -
-
-
- -
client.loyalty.rewards.search({ ...params }) -> Square.SearchLoyaltyRewardsResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Searches for loyalty rewards. This endpoint accepts a request with no query filters and returns results for all loyalty accounts. -If you include a `query` object, `loyalty_account_id` is required and `status` is optional. - -If you know a reward ID, use the -[RetrieveLoyaltyReward](api-endpoint:Loyalty-RetrieveLoyaltyReward) endpoint. - -Search results are sorted by `updated_at` in descending order. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.loyalty.rewards.search({ - query: { - loyaltyAccountId: "5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd", - }, - limit: 10, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.loyalty.SearchLoyaltyRewardsRequest` - -
-
- -
-
- -**requestOptions:** `Rewards.RequestOptions` - -
-
-
-
- -
-
-
- -
client.loyalty.rewards.get({ ...params }) -> Square.GetLoyaltyRewardResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves a loyalty reward. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.loyalty.rewards.get({ - rewardId: "reward_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.loyalty.GetRewardsRequest` - -
-
- -
-
- -**requestOptions:** `Rewards.RequestOptions` - -
-
-
-
- -
-
-
- -
client.loyalty.rewards.delete({ ...params }) -> Square.DeleteLoyaltyRewardResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Deletes a loyalty reward by doing the following: - -- Returns the loyalty points back to the loyalty account. -- If an order ID was specified when the reward was created - (see [CreateLoyaltyReward](api-endpoint:Loyalty-CreateLoyaltyReward)), - it updates the order by removing the reward and related - discounts. - -You cannot delete a reward that has reached the terminal state (REDEEMED). - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.loyalty.rewards.delete({ - rewardId: "reward_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.loyalty.DeleteRewardsRequest` - -
-
- -
-
- -**requestOptions:** `Rewards.RequestOptions` - -
-
-
-
- -
-
-
- -
client.loyalty.rewards.redeem({ ...params }) -> Square.RedeemLoyaltyRewardResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Redeems a loyalty reward. - -The endpoint sets the reward to the `REDEEMED` terminal state. - -If you are using your own order processing system (not using the -Orders API), you call this endpoint after the buyer paid for the -purchase. - -After the reward reaches the terminal state, it cannot be deleted. -In other words, points used for the reward cannot be returned -to the account. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.loyalty.rewards.redeem({ - rewardId: "reward_id", - idempotencyKey: "98adc7f7-6963-473b-b29c-f3c9cdd7d994", - locationId: "P034NEENMD09F", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.loyalty.RedeemLoyaltyRewardRequest` - -
-
- -
-
- -**requestOptions:** `Rewards.RequestOptions` - -
-
-
-
- -
-
-
- -## Loyalty Programs Promotions - -
client.loyalty.programs.promotions.list({ ...params }) -> core.Page -
-
- -#### 📝 Description - -
-
- -
-
- -Lists the loyalty promotions associated with a [loyalty program](entity:LoyaltyProgram). -Results are sorted by the `created_at` date in descending order (newest to oldest). - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -const response = await client.loyalty.programs.promotions.list({ - programId: "program_id", -}); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -const page = await client.loyalty.programs.promotions.list({ - programId: "program_id", -}); -while (page.hasNextPage()) { - page = page.getNextPage(); -} -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.loyalty.programs.ListPromotionsRequest` - -
-
- -
-
- -**requestOptions:** `Promotions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.loyalty.programs.promotions.create({ ...params }) -> Square.CreateLoyaltyPromotionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Creates a loyalty promotion for a [loyalty program](entity:LoyaltyProgram). A loyalty promotion -enables buyers to earn points in addition to those earned from the base loyalty program. - -This endpoint sets the loyalty promotion to the `ACTIVE` or `SCHEDULED` status, depending on the -`available_time` setting. A loyalty program can have a maximum of 10 loyalty promotions with an -`ACTIVE` or `SCHEDULED` status. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.loyalty.programs.promotions.create({ - programId: "program_id", - loyaltyPromotion: { - name: "Tuesday Happy Hour Promo", - incentive: { - type: "POINTS_MULTIPLIER", - pointsMultiplierData: { - multiplier: "3.0", - }, - }, - availableTime: { - timePeriods: [ - "BEGIN:VEVENT\nDTSTART:20220816T160000\nDURATION:PT2H\nRRULE:FREQ=WEEKLY;BYDAY=TU\nEND:VEVENT", - ], - }, - triggerLimit: { - times: 1, - interval: "DAY", - }, - minimumSpendAmountMoney: { - amount: 2000, - currency: "USD", - }, - qualifyingCategoryIds: ["XTQPYLR3IIU9C44VRCB3XD12"], - }, - idempotencyKey: "ec78c477-b1c3-4899-a209-a4e71337c996", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.loyalty.programs.CreateLoyaltyPromotionRequest` - -
-
- -
-
- -**requestOptions:** `Promotions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.loyalty.programs.promotions.get({ ...params }) -> Square.GetLoyaltyPromotionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves a loyalty promotion. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.loyalty.programs.promotions.get({ - promotionId: "promotion_id", - programId: "program_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.loyalty.programs.GetPromotionsRequest` - -
-
- -
-
- -**requestOptions:** `Promotions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.loyalty.programs.promotions.cancel({ ...params }) -> Square.CancelLoyaltyPromotionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Cancels a loyalty promotion. Use this endpoint to cancel an `ACTIVE` promotion earlier than the -end date, cancel an `ACTIVE` promotion when an end date is not specified, or cancel a `SCHEDULED` promotion. -Because updating a promotion is not supported, you can also use this endpoint to cancel a promotion before -you create a new one. - -This endpoint sets the loyalty promotion to the `CANCELED` state - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.loyalty.programs.promotions.cancel({ - promotionId: "promotion_id", - programId: "program_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.loyalty.programs.CancelPromotionsRequest` - -
-
- -
-
- -**requestOptions:** `Promotions.RequestOptions` - -
-
-
-
- -
-
-
- -## Merchants CustomAttributeDefinitions - -
client.merchants.customAttributeDefinitions.list({ ...params }) -> core.Page -
-
- -#### 📝 Description - -
-
- -
-
- -Lists the merchant-related [custom attribute definitions](entity:CustomAttributeDefinition) that belong to a Square seller account. -When all response pages are retrieved, the results include all custom attribute definitions -that are visible to the requesting application, including those that are created by other -applications and set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -const response = await client.merchants.customAttributeDefinitions.list(); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -const page = await client.merchants.customAttributeDefinitions.list(); -while (page.hasNextPage()) { - page = page.getNextPage(); -} -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.merchants.ListCustomAttributeDefinitionsRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributeDefinitions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.merchants.customAttributeDefinitions.create({ ...params }) -> Square.CreateMerchantCustomAttributeDefinitionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Creates a merchant-related [custom attribute definition](entity:CustomAttributeDefinition) for a Square seller account. -Use this endpoint to define a custom attribute that can be associated with a merchant connecting to your application. -A custom attribute definition specifies the `key`, `visibility`, `schema`, and other properties -for a custom attribute. After the definition is created, you can call -[UpsertMerchantCustomAttribute](api-endpoint:MerchantCustomAttributes-UpsertMerchantCustomAttribute) or -[BulkUpsertMerchantCustomAttributes](api-endpoint:MerchantCustomAttributes-BulkUpsertMerchantCustomAttributes) -to set the custom attribute for a merchant. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.merchants.customAttributeDefinitions.create({ - customAttributeDefinition: { - key: "alternative_seller_name", - schema: { - ref: "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String", - }, - name: "Alternative Merchant Name", - description: "This is the other name this merchant goes by.", - visibility: "VISIBILITY_READ_ONLY", - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.merchants.CreateMerchantCustomAttributeDefinitionRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributeDefinitions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.merchants.customAttributeDefinitions.get({ ...params }) -> Square.RetrieveMerchantCustomAttributeDefinitionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves a merchant-related [custom attribute definition](entity:CustomAttributeDefinition) from a Square seller account. -To retrieve a custom attribute definition created by another application, the `visibility` -setting must be `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.merchants.customAttributeDefinitions.get({ - key: "key", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.merchants.GetCustomAttributeDefinitionsRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributeDefinitions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.merchants.customAttributeDefinitions.update({ ...params }) -> Square.UpdateMerchantCustomAttributeDefinitionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Updates a merchant-related [custom attribute definition](entity:CustomAttributeDefinition) for a Square seller account. -Use this endpoint to update the following fields: `name`, `description`, `visibility`, or the -`schema` for a `Selection` data type. -Only the definition owner can update a custom attribute definition. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.merchants.customAttributeDefinitions.update({ - key: "key", - customAttributeDefinition: { - description: "Update the description as desired.", - visibility: "VISIBILITY_READ_ONLY", - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.merchants.UpdateMerchantCustomAttributeDefinitionRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributeDefinitions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.merchants.customAttributeDefinitions.delete({ ...params }) -> Square.DeleteMerchantCustomAttributeDefinitionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Deletes a merchant-related [custom attribute definition](entity:CustomAttributeDefinition) from a Square seller account. -Deleting a custom attribute definition also deletes the corresponding custom attribute from -the merchant. -Only the definition owner can delete a custom attribute definition. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.merchants.customAttributeDefinitions.delete({ - key: "key", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.merchants.DeleteCustomAttributeDefinitionsRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributeDefinitions.RequestOptions` - -
-
-
-
- -
-
-
- -## Merchants CustomAttributes - -
client.merchants.customAttributes.batchDelete({ ...params }) -> Square.BulkDeleteMerchantCustomAttributesResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Deletes [custom attributes](entity:CustomAttribute) for a merchant as a bulk operation. -To delete a custom attribute owned by another application, the `visibility` setting must be -`VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.merchants.customAttributes.batchDelete({ - values: { - id1: { - key: "alternative_seller_name", - }, - id2: { - key: "has_seen_tutorial", - }, - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.merchants.BulkDeleteMerchantCustomAttributesRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.merchants.customAttributes.batchUpsert({ ...params }) -> Square.BulkUpsertMerchantCustomAttributesResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Creates or updates [custom attributes](entity:CustomAttribute) for a merchant as a bulk operation. -Use this endpoint to set the value of one or more custom attributes for a merchant. -A custom attribute is based on a custom attribute definition in a Square seller account, which is -created using the [CreateMerchantCustomAttributeDefinition](api-endpoint:MerchantCustomAttributes-CreateMerchantCustomAttributeDefinition) endpoint. -This `BulkUpsertMerchantCustomAttributes` endpoint accepts a map of 1 to 25 individual upsert -requests and returns a map of individual upsert responses. Each upsert request has a unique ID -and provides a merchant ID and custom attribute. Each upsert response is returned with the ID -of the corresponding request. -To create or update a custom attribute owned by another application, the `visibility` setting -must be `VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.merchants.customAttributes.batchUpsert({ - values: { - id1: { - merchantId: "DM7VKY8Q63GNP", - customAttribute: { - key: "alternative_seller_name", - value: "Ultimate Sneaker Store", - }, - }, - id2: { - merchantId: "DM7VKY8Q63GNP", - customAttribute: { - key: "has_seen_tutorial", - value: true, - }, - }, - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.merchants.BulkUpsertMerchantCustomAttributesRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.merchants.customAttributes.list({ ...params }) -> core.Page -
-
- -#### 📝 Description - -
-
- -
-
- -Lists the [custom attributes](entity:CustomAttribute) associated with a merchant. -You can use the `with_definitions` query parameter to also retrieve custom attribute definitions -in the same call. -When all response pages are retrieved, the results include all custom attributes that are -visible to the requesting application, including those that are owned by other applications -and set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -const response = await client.merchants.customAttributes.list({ - merchantId: "merchant_id", -}); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -const page = await client.merchants.customAttributes.list({ - merchantId: "merchant_id", -}); -while (page.hasNextPage()) { - page = page.getNextPage(); -} -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.merchants.ListCustomAttributesRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.merchants.customAttributes.get({ ...params }) -> Square.RetrieveMerchantCustomAttributeResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves a [custom attribute](entity:CustomAttribute) associated with a merchant. -You can use the `with_definition` query parameter to also retrieve the custom attribute definition -in the same call. -To retrieve a custom attribute owned by another application, the `visibility` setting must be -`VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.merchants.customAttributes.get({ - merchantId: "merchant_id", - key: "key", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.merchants.GetCustomAttributesRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.merchants.customAttributes.upsert({ ...params }) -> Square.UpsertMerchantCustomAttributeResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Creates or updates a [custom attribute](entity:CustomAttribute) for a merchant. -Use this endpoint to set the value of a custom attribute for a specified merchant. -A custom attribute is based on a custom attribute definition in a Square seller account, which -is created using the [CreateMerchantCustomAttributeDefinition](api-endpoint:MerchantCustomAttributes-CreateMerchantCustomAttributeDefinition) endpoint. -To create or update a custom attribute owned by another application, the `visibility` setting -must be `VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.merchants.customAttributes.upsert({ - merchantId: "merchant_id", - key: "key", - customAttribute: { - value: "Ultimate Sneaker Store", - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.merchants.UpsertMerchantCustomAttributeRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.merchants.customAttributes.delete({ ...params }) -> Square.DeleteMerchantCustomAttributeResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Deletes a [custom attribute](entity:CustomAttribute) associated with a merchant. -To delete a custom attribute owned by another application, the `visibility` setting must be -`VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.merchants.customAttributes.delete({ - merchantId: "merchant_id", - key: "key", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.merchants.DeleteCustomAttributesRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributes.RequestOptions` - -
-
-
-
- -
-
-
- -## Orders CustomAttributeDefinitions - -
client.orders.customAttributeDefinitions.list({ ...params }) -> core.Page -
-
- -#### 📝 Description - -
-
- -
-
- -Lists the order-related [custom attribute definitions](entity:CustomAttributeDefinition) that belong to a Square seller account. - -When all response pages are retrieved, the results include all custom attribute definitions -that are visible to the requesting application, including those that are created by other -applications and set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. Note that -seller-defined custom attributes (also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -const response = await client.orders.customAttributeDefinitions.list(); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -const page = await client.orders.customAttributeDefinitions.list(); -while (page.hasNextPage()) { - page = page.getNextPage(); -} -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.orders.ListCustomAttributeDefinitionsRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributeDefinitions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.orders.customAttributeDefinitions.create({ ...params }) -> Square.CreateOrderCustomAttributeDefinitionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Creates an order-related custom attribute definition. Use this endpoint to -define a custom attribute that can be associated with orders. - -After creating a custom attribute definition, you can set the custom attribute for orders -in the Square seller account. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.orders.customAttributeDefinitions.create({ - customAttributeDefinition: { - key: "cover-count", - schema: { - ref: "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number", - }, - name: "Cover count", - description: "The number of people seated at a table", - visibility: "VISIBILITY_READ_WRITE_VALUES", - }, - idempotencyKey: "IDEMPOTENCY_KEY", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.orders.CreateOrderCustomAttributeDefinitionRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributeDefinitions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.orders.customAttributeDefinitions.get({ ...params }) -> Square.RetrieveOrderCustomAttributeDefinitionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves an order-related [custom attribute definition](entity:CustomAttributeDefinition) from a Square seller account. - -To retrieve a custom attribute definition created by another application, the `visibility` -setting must be `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom attributes -(also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.orders.customAttributeDefinitions.get({ - key: "key", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.orders.GetCustomAttributeDefinitionsRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributeDefinitions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.orders.customAttributeDefinitions.update({ ...params }) -> Square.UpdateOrderCustomAttributeDefinitionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Updates an order-related custom attribute definition for a Square seller account. - -Only the definition owner can update a custom attribute definition. Note that sellers can view all custom attributes in exported customer data, including those set to `VISIBILITY_HIDDEN`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.orders.customAttributeDefinitions.update({ - key: "key", - customAttributeDefinition: { - key: "cover-count", - visibility: "VISIBILITY_READ_ONLY", - version: 1, - }, - idempotencyKey: "IDEMPOTENCY_KEY", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.orders.UpdateOrderCustomAttributeDefinitionRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributeDefinitions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.orders.customAttributeDefinitions.delete({ ...params }) -> Square.DeleteOrderCustomAttributeDefinitionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Deletes an order-related [custom attribute definition](entity:CustomAttributeDefinition) from a Square seller account. - -Only the definition owner can delete a custom attribute definition. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.orders.customAttributeDefinitions.delete({ - key: "key", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.orders.DeleteCustomAttributeDefinitionsRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributeDefinitions.RequestOptions` - -
-
-
-
- -
-
-
- -## Orders CustomAttributes - -
client.orders.customAttributes.batchDelete({ ...params }) -> Square.BulkDeleteOrderCustomAttributesResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Deletes order [custom attributes](entity:CustomAttribute) as a bulk operation. - -Use this endpoint to delete one or more custom attributes from one or more orders. -A custom attribute is based on a custom attribute definition in a Square seller account. (To create a -custom attribute definition, use the [CreateOrderCustomAttributeDefinition](api-endpoint:OrderCustomAttributes-CreateOrderCustomAttributeDefinition) endpoint.) - -This `BulkDeleteOrderCustomAttributes` endpoint accepts a map of 1 to 25 individual delete -requests and returns a map of individual delete responses. Each delete request has a unique ID -and provides an order ID and custom attribute. Each delete response is returned with the ID -of the corresponding request. - -To delete a custom attribute owned by another application, the `visibility` setting -must be `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom attributes -(also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.orders.customAttributes.batchDelete({ - values: { - "cover-count": { - key: "cover-count", - orderId: "7BbXGEIWNldxAzrtGf9GPVZTwZ4F", - }, - "table-number": { - key: "table-number", - orderId: "7BbXGEIWNldxAzrtGf9GPVZTwZ4F", - }, - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.orders.BulkDeleteOrderCustomAttributesRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.orders.customAttributes.batchUpsert({ ...params }) -> Square.BulkUpsertOrderCustomAttributesResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Creates or updates order [custom attributes](entity:CustomAttribute) as a bulk operation. - -Use this endpoint to delete one or more custom attributes from one or more orders. -A custom attribute is based on a custom attribute definition in a Square seller account. (To create a -custom attribute definition, use the [CreateOrderCustomAttributeDefinition](api-endpoint:OrderCustomAttributes-CreateOrderCustomAttributeDefinition) endpoint.) - -This `BulkUpsertOrderCustomAttributes` endpoint accepts a map of 1 to 25 individual upsert -requests and returns a map of individual upsert responses. Each upsert request has a unique ID -and provides an order ID and custom attribute. Each upsert response is returned with the ID -of the corresponding request. - -To create or update a custom attribute owned by another application, the `visibility` setting -must be `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom attributes -(also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.orders.customAttributes.batchUpsert({ - values: { - "cover-count": { - customAttribute: { - key: "cover-count", - value: "6", - version: 2, - }, - orderId: "7BbXGEIWNldxAzrtGf9GPVZTwZ4F", - }, - "table-number": { - customAttribute: { - key: "table-number", - value: "11", - version: 4, - }, - orderId: "7BbXGEIWNldxAzrtGf9GPVZTwZ4F", - }, - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.orders.BulkUpsertOrderCustomAttributesRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.orders.customAttributes.list({ ...params }) -> core.Page -
-
- -#### 📝 Description - -
-
- -
-
- -Lists the [custom attributes](entity:CustomAttribute) associated with an order. - -You can use the `with_definitions` query parameter to also retrieve custom attribute definitions -in the same call. - -When all response pages are retrieved, the results include all custom attributes that are -visible to the requesting application, including those that are owned by other applications -and set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -const response = await client.orders.customAttributes.list({ - orderId: "order_id", -}); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -const page = await client.orders.customAttributes.list({ - orderId: "order_id", -}); -while (page.hasNextPage()) { - page = page.getNextPage(); -} -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.orders.ListCustomAttributesRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.orders.customAttributes.get({ ...params }) -> Square.RetrieveOrderCustomAttributeResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves a [custom attribute](entity:CustomAttribute) associated with an order. - -You can use the `with_definition` query parameter to also retrieve the custom attribute definition -in the same call. - -To retrieve a custom attribute owned by another application, the `visibility` setting must be -`VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom attributes -also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.orders.customAttributes.get({ - orderId: "order_id", - customAttributeKey: "custom_attribute_key", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.orders.GetCustomAttributesRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.orders.customAttributes.upsert({ ...params }) -> Square.UpsertOrderCustomAttributeResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Creates or updates a [custom attribute](entity:CustomAttribute) for an order. - -Use this endpoint to set the value of a custom attribute for a specific order. -A custom attribute is based on a custom attribute definition in a Square seller account. (To create a -custom attribute definition, use the [CreateOrderCustomAttributeDefinition](api-endpoint:OrderCustomAttributes-CreateOrderCustomAttributeDefinition) endpoint.) - -To create or update a custom attribute owned by another application, the `visibility` setting -must be `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom attributes -(also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.orders.customAttributes.upsert({ - orderId: "order_id", - customAttributeKey: "custom_attribute_key", - customAttribute: { - key: "table-number", - value: "42", - version: 1, - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.orders.UpsertOrderCustomAttributeRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributes.RequestOptions` - -
-
-
-
- -
-
-
- -
client.orders.customAttributes.delete({ ...params }) -> Square.DeleteOrderCustomAttributeResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Deletes a [custom attribute](entity:CustomAttribute) associated with a customer profile. - -To delete a custom attribute owned by another application, the `visibility` setting must be -`VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom attributes -(also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.orders.customAttributes.delete({ - orderId: "order_id", - customAttributeKey: "custom_attribute_key", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.orders.DeleteCustomAttributesRequest` - -
-
- -
-
- -**requestOptions:** `CustomAttributes.RequestOptions` - -
-
-
-
- -
-
-
- -## TeamMembers WageSetting - -
client.teamMembers.wageSetting.get({ ...params }) -> Square.GetWageSettingResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves a `WageSetting` object for a team member specified -by `TeamMember.id`. For more information, see -[Troubleshooting the Team API](https://developer.squareup.com/docs/team/troubleshooting#retrievewagesetting). - -Square recommends using [RetrieveTeamMember](api-endpoint:Team-RetrieveTeamMember) or [SearchTeamMembers](api-endpoint:Team-SearchTeamMembers) -to get this information directly from the `TeamMember.wage_setting` field. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.teamMembers.wageSetting.get({ - teamMemberId: "team_member_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.teamMembers.GetWageSettingRequest` - -
-
- -
-
- -**requestOptions:** `WageSetting.RequestOptions` - -
-
-
-
- -
-
-
- -
client.teamMembers.wageSetting.update({ ...params }) -> Square.UpdateWageSettingResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Creates or updates a `WageSetting` object. The object is created if a -`WageSetting` with the specified `team_member_id` doesn't exist. Otherwise, -it fully replaces the `WageSetting` object for the team member. -The `WageSetting` is returned on a successful update. For more information, see -[Troubleshooting the Team API](https://developer.squareup.com/docs/team/troubleshooting#create-or-update-a-wage-setting). - -Square recommends using [CreateTeamMember](api-endpoint:Team-CreateTeamMember) or [UpdateTeamMember](api-endpoint:Team-UpdateTeamMember) -to manage the `TeamMember.wage_setting` field directly. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.teamMembers.wageSetting.update({ - teamMemberId: "team_member_id", - wageSetting: { - jobAssignments: [ - { - jobTitle: "Manager", - payType: "SALARY", - annualRate: { - amount: 3000000, - currency: "USD", - }, - weeklyHours: 40, - }, - { - jobTitle: "Cashier", - payType: "HOURLY", - hourlyRate: { - amount: 2000, - currency: "USD", - }, - }, - ], - isOvertimeExempt: true, - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.teamMembers.UpdateWageSettingRequest` - -
-
- -
-
- -**requestOptions:** `WageSetting.RequestOptions` - -
-
-
-
- -
-
-
- -## Terminal Actions - -
client.terminal.actions.create({ ...params }) -> Square.CreateTerminalActionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Creates a Terminal action request and sends it to the specified device. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.terminal.actions.create({ - idempotencyKey: "thahn-70e75c10-47f7-4ab6-88cc-aaa4076d065e", - action: { - deviceId: "{{DEVICE_ID}}", - deadlineDuration: "PT5M", - type: "SAVE_CARD", - saveCardOptions: { - customerId: "{{CUSTOMER_ID}}", - referenceId: "user-id-1", - }, - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.terminal.CreateTerminalActionRequest` - -
-
- -
-
- -**requestOptions:** `Actions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.terminal.actions.search({ ...params }) -> Square.SearchTerminalActionsResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves a filtered list of Terminal action requests created by the account making the request. Terminal action requests are available for 30 days. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.terminal.actions.search({ - query: { - filter: { - createdAt: { - startAt: "2022-04-01T00:00:00.000Z", - }, - }, - sort: { - sortOrder: "DESC", - }, - }, - limit: 2, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.terminal.SearchTerminalActionsRequest` - -
-
- -
-
- -**requestOptions:** `Actions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.terminal.actions.get({ ...params }) -> Square.GetTerminalActionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves a Terminal action request by `action_id`. Terminal action requests are available for 30 days. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.terminal.actions.get({ - actionId: "action_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.terminal.GetActionsRequest` - -
-
- -
-
- -**requestOptions:** `Actions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.terminal.actions.cancel({ ...params }) -> Square.CancelTerminalActionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Cancels a Terminal action request if the status of the request permits it. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.terminal.actions.cancel({ - actionId: "action_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.terminal.CancelActionsRequest` - -
-
- -
-
- -**requestOptions:** `Actions.RequestOptions` - -
-
-
-
- -
-
-
- -## Terminal Checkouts - -
client.terminal.checkouts.create({ ...params }) -> Square.CreateTerminalCheckoutResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Creates a Terminal checkout request and sends it to the specified device to take a payment -for the requested amount. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.terminal.checkouts.create({ - idempotencyKey: "28a0c3bc-7839-11ea-bc55-0242ac130003", - checkout: { - amountMoney: { - amount: 2610, - currency: "USD", - }, - referenceId: "id11572", - note: "A brief note", - deviceOptions: { - deviceId: "dbb5d83a-7838-11ea-bc55-0242ac130003", - }, - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.terminal.CreateTerminalCheckoutRequest` - -
-
- -
-
- -**requestOptions:** `Checkouts.RequestOptions` - -
-
-
-
- -
-
-
- -
client.terminal.checkouts.search({ ...params }) -> Square.SearchTerminalCheckoutsResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Returns a filtered list of Terminal checkout requests created by the application making the request. Only Terminal checkout requests created for the merchant scoped to the OAuth token are returned. Terminal checkout requests are available for 30 days. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.terminal.checkouts.search({ - query: { - filter: { - status: "COMPLETED", - }, - }, - limit: 2, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.terminal.SearchTerminalCheckoutsRequest` - -
-
- -
-
- -**requestOptions:** `Checkouts.RequestOptions` - -
-
-
-
- -
-
-
- -
client.terminal.checkouts.get({ ...params }) -> Square.GetTerminalCheckoutResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves a Terminal checkout request by `checkout_id`. Terminal checkout requests are available for 30 days. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.terminal.checkouts.get({ - checkoutId: "checkout_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.terminal.GetCheckoutsRequest` - -
-
- -
-
- -**requestOptions:** `Checkouts.RequestOptions` - -
-
-
-
- -
-
-
- -
client.terminal.checkouts.cancel({ ...params }) -> Square.CancelTerminalCheckoutResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Cancels a Terminal checkout request if the status of the request permits it. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.terminal.checkouts.cancel({ - checkoutId: "checkout_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.terminal.CancelCheckoutsRequest` - -
-
- -
-
- -**requestOptions:** `Checkouts.RequestOptions` - -
-
-
-
- -
-
-
- -## Terminal Refunds - -
client.terminal.refunds.create({ ...params }) -> Square.CreateTerminalRefundResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Creates a request to refund an Interac payment completed on a Square Terminal. Refunds for Interac payments on a Square Terminal are supported only for Interac debit cards in Canada. Other refunds for Terminal payments should use the Refunds API. For more information, see [Refunds API](api:Refunds). - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.terminal.refunds.create({ - idempotencyKey: "402a640b-b26f-401f-b406-46f839590c04", - refund: { - paymentId: "5O5OvgkcNUhl7JBuINflcjKqUzXZY", - amountMoney: { - amount: 111, - currency: "CAD", - }, - reason: "Returning items", - deviceId: "f72dfb8e-4d65-4e56-aade-ec3fb8d33291", - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.terminal.CreateTerminalRefundRequest` - -
-
- -
-
- -**requestOptions:** `Refunds.RequestOptions` - -
-
-
-
- -
-
-
- -
client.terminal.refunds.search({ ...params }) -> Square.SearchTerminalRefundsResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves a filtered list of Interac Terminal refund requests created by the seller making the request. Terminal refund requests are available for 30 days. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.terminal.refunds.search({ - query: { - filter: { - status: "COMPLETED", - }, - }, - limit: 1, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.terminal.SearchTerminalRefundsRequest` - -
-
- -
-
- -**requestOptions:** `Refunds.RequestOptions` - -
-
-
-
- -
-
-
- -
client.terminal.refunds.get({ ...params }) -> Square.GetTerminalRefundResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves an Interac Terminal refund object by ID. Terminal refund objects are available for 30 days. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.terminal.refunds.get({ - terminalRefundId: "terminal_refund_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.terminal.GetRefundsRequest` - -
-
- -
-
- -**requestOptions:** `Refunds.RequestOptions` - -
-
-
-
- -
-
-
- -
client.terminal.refunds.cancel({ ...params }) -> Square.CancelTerminalRefundResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Cancels an Interac Terminal refund request by refund request ID if the status of the request permits it. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.terminal.refunds.cancel({ - terminalRefundId: "terminal_refund_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.terminal.CancelRefundsRequest` - -
-
- -
-
- -**requestOptions:** `Refunds.RequestOptions` - -
-
-
-
- -
-
-
- -## Webhooks EventTypes - -
client.webhooks.eventTypes.list({ ...params }) -> Square.ListWebhookEventTypesResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Lists all webhook event types that can be subscribed to. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.webhooks.eventTypes.list(); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.webhooks.ListEventTypesRequest` - -
-
- -
-
- -**requestOptions:** `EventTypes.RequestOptions` - -
-
-
-
- -
-
-
- -## Webhooks Subscriptions - -
client.webhooks.subscriptions.list({ ...params }) -> core.Page -
-
- -#### 📝 Description - -
-
- -
-
- -Lists all webhook subscriptions owned by your application. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -const response = await client.webhooks.subscriptions.list(); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -const page = await client.webhooks.subscriptions.list(); -while (page.hasNextPage()) { - page = page.getNextPage(); -} -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.webhooks.ListSubscriptionsRequest` - -
-
- -
-
- -**requestOptions:** `Subscriptions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.webhooks.subscriptions.create({ ...params }) -> Square.CreateWebhookSubscriptionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Creates a webhook subscription. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.webhooks.subscriptions.create({ - idempotencyKey: "63f84c6c-2200-4c99-846c-2670a1311fbf", - subscription: { - name: "Example Webhook Subscription", - eventTypes: ["payment.created", "payment.updated"], - notificationUrl: "https://example-webhook-url.com", - apiVersion: "2021-12-15", - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.webhooks.CreateWebhookSubscriptionRequest` - -
-
- -
-
- -**requestOptions:** `Subscriptions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.webhooks.subscriptions.get({ ...params }) -> Square.GetWebhookSubscriptionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves a webhook subscription identified by its ID. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.webhooks.subscriptions.get({ - subscriptionId: "subscription_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.webhooks.GetSubscriptionsRequest` - -
-
- -
-
- -**requestOptions:** `Subscriptions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.webhooks.subscriptions.update({ ...params }) -> Square.UpdateWebhookSubscriptionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Updates a webhook subscription. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.webhooks.subscriptions.update({ - subscriptionId: "subscription_id", - subscription: { - name: "Updated Example Webhook Subscription", - enabled: false, - }, -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.webhooks.UpdateWebhookSubscriptionRequest` - -
-
- -
-
- -**requestOptions:** `Subscriptions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.webhooks.subscriptions.delete({ ...params }) -> Square.DeleteWebhookSubscriptionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Deletes a webhook subscription. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.webhooks.subscriptions.delete({ - subscriptionId: "subscription_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.webhooks.DeleteSubscriptionsRequest` - -
-
- -
-
- -**requestOptions:** `Subscriptions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.webhooks.subscriptions.updateSignatureKey({ ...params }) -> Square.UpdateWebhookSubscriptionSignatureKeyResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Updates a webhook subscription by replacing the existing signature key with a new one. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.webhooks.subscriptions.updateSignatureKey({ - subscriptionId: "subscription_id", - idempotencyKey: "ed80ae6b-0654-473b-bbab-a39aee89a60d", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.webhooks.UpdateWebhookSubscriptionSignatureKeyRequest` - -
-
- -
-
- -**requestOptions:** `Subscriptions.RequestOptions` - -
-
-
-
- -
-
-
- -
client.webhooks.subscriptions.test({ ...params }) -> Square.TestWebhookSubscriptionResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Tests a webhook subscription by sending a test event to the notification URL. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.webhooks.subscriptions.test({ - subscriptionId: "subscription_id", - eventType: "payment.created", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Square.webhooks.TestWebhookSubscriptionRequest` - -
-
- -
-
- -**requestOptions:** `Subscriptions.RequestOptions` - -
-
-
-
- -
-
-
diff --git a/src/Client.ts b/src/Client.ts index d0e039a0f..7368ca948 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -46,7 +46,7 @@ export declare namespace SquareClient { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -58,7 +58,7 @@ export declare namespace SquareClient { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } diff --git a/src/api/resources/applePay/client/Client.ts b/src/api/resources/applePay/client/Client.ts index 8c63f3d08..6f0d7dc20 100644 --- a/src/api/resources/applePay/client/Client.ts +++ b/src/api/resources/applePay/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace ApplePay { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace ApplePay { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -75,11 +75,11 @@ export class ApplePay { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/bankAccounts/client/Client.ts b/src/api/resources/bankAccounts/client/Client.ts index 050b527b2..d52e0d87f 100644 --- a/src/api/resources/bankAccounts/client/Client.ts +++ b/src/api/resources/bankAccounts/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace BankAccounts { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace BankAccounts { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -72,11 +72,11 @@ export class BankAccounts { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -153,11 +153,11 @@ export class BankAccounts { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -229,11 +229,11 @@ export class BankAccounts { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/bookings/client/Client.ts b/src/api/resources/bookings/client/Client.ts index 6901a2a26..da5c7bb84 100644 --- a/src/api/resources/bookings/client/Client.ts +++ b/src/api/resources/bookings/client/Client.ts @@ -20,7 +20,7 @@ export declare namespace Bookings { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -32,7 +32,7 @@ export declare namespace Bookings { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -112,11 +112,11 @@ export class Bookings { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -205,11 +205,11 @@ export class Bookings { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -288,11 +288,11 @@ export class Bookings { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -369,11 +369,11 @@ export class Bookings { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -441,11 +441,11 @@ export class Bookings { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -516,11 +516,11 @@ export class Bookings { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -590,11 +590,11 @@ export class Bookings { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -672,11 +672,11 @@ export class Bookings { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -752,11 +752,11 @@ export class Bookings { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -835,11 +835,11 @@ export class Bookings { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/bookings/resources/customAttributeDefinitions/client/Client.ts b/src/api/resources/bookings/resources/customAttributeDefinitions/client/Client.ts index 21134f6bd..818ee5d8a 100644 --- a/src/api/resources/bookings/resources/customAttributeDefinitions/client/Client.ts +++ b/src/api/resources/bookings/resources/customAttributeDefinitions/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace CustomAttributeDefinitions { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace CustomAttributeDefinitions { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -74,11 +74,11 @@ export class CustomAttributeDefinitions { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -165,11 +165,11 @@ export class CustomAttributeDefinitions { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -252,11 +252,11 @@ export class CustomAttributeDefinitions { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -335,11 +335,11 @@ export class CustomAttributeDefinitions { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -420,11 +420,11 @@ export class CustomAttributeDefinitions { method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/bookings/resources/customAttributes/client/Client.ts b/src/api/resources/bookings/resources/customAttributes/client/Client.ts index 6630b7585..6b38252fa 100644 --- a/src/api/resources/bookings/resources/customAttributes/client/Client.ts +++ b/src/api/resources/bookings/resources/customAttributes/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace CustomAttributes { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace CustomAttributes { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -73,11 +73,11 @@ export class CustomAttributes { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -162,11 +162,11 @@ export class CustomAttributes { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -257,11 +257,11 @@ export class CustomAttributes { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -353,11 +353,11 @@ export class CustomAttributes { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -437,11 +437,11 @@ export class CustomAttributes { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -523,11 +523,11 @@ export class CustomAttributes { method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/bookings/resources/locationProfiles/client/Client.ts b/src/api/resources/bookings/resources/locationProfiles/client/Client.ts index fd65d7dd1..446d151ce 100644 --- a/src/api/resources/bookings/resources/locationProfiles/client/Client.ts +++ b/src/api/resources/bookings/resources/locationProfiles/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace LocationProfiles { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace LocationProfiles { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -71,11 +71,11 @@ export class LocationProfiles { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/bookings/resources/teamMemberProfiles/client/Client.ts b/src/api/resources/bookings/resources/teamMemberProfiles/client/Client.ts index abfcd1c44..0d4ad65c6 100644 --- a/src/api/resources/bookings/resources/teamMemberProfiles/client/Client.ts +++ b/src/api/resources/bookings/resources/teamMemberProfiles/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace TeamMemberProfiles { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace TeamMemberProfiles { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -77,11 +77,11 @@ export class TeamMemberProfiles { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -160,11 +160,11 @@ export class TeamMemberProfiles { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/cards/client/Client.ts b/src/api/resources/cards/client/Client.ts index fdda24829..ccf370cb1 100644 --- a/src/api/resources/cards/client/Client.ts +++ b/src/api/resources/cards/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Cards { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace Cards { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -82,11 +82,11 @@ export class Cards { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -176,11 +176,11 @@ export class Cards { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -253,11 +253,11 @@ export class Cards { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -327,11 +327,11 @@ export class Cards { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/cashDrawers/client/Client.ts b/src/api/resources/cashDrawers/client/Client.ts index dd89acc74..e4bb7324a 100644 --- a/src/api/resources/cashDrawers/client/Client.ts +++ b/src/api/resources/cashDrawers/client/Client.ts @@ -13,7 +13,7 @@ export declare namespace CashDrawers { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -25,7 +25,7 @@ export declare namespace CashDrawers { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } diff --git a/src/api/resources/cashDrawers/resources/shifts/client/Client.ts b/src/api/resources/cashDrawers/resources/shifts/client/Client.ts index 7c5311af0..97f7c62f1 100644 --- a/src/api/resources/cashDrawers/resources/shifts/client/Client.ts +++ b/src/api/resources/cashDrawers/resources/shifts/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Shifts { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace Shifts { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -87,11 +87,11 @@ export class Shifts { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -172,11 +172,11 @@ export class Shifts { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -260,11 +260,11 @@ export class Shifts { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/catalog/client/Client.ts b/src/api/resources/catalog/client/Client.ts index 951c8a246..48387df8b 100644 --- a/src/api/resources/catalog/client/Client.ts +++ b/src/api/resources/catalog/client/Client.ts @@ -18,7 +18,7 @@ export declare namespace Catalog { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -30,7 +30,7 @@ export declare namespace Catalog { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -88,11 +88,11 @@ export class Catalog { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -170,11 +170,11 @@ export class Catalog { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -273,11 +273,11 @@ export class Catalog { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -344,11 +344,11 @@ export class Catalog { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -433,11 +433,11 @@ export class Catalog { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -529,11 +529,11 @@ export class Catalog { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -635,11 +635,11 @@ export class Catalog { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -717,11 +717,11 @@ export class Catalog { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -799,11 +799,11 @@ export class Catalog { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/catalog/resources/images/client/Client.ts b/src/api/resources/catalog/resources/images/client/Client.ts index 23000c171..6c64fadaa 100644 --- a/src/api/resources/catalog/resources/images/client/Client.ts +++ b/src/api/resources/catalog/resources/images/client/Client.ts @@ -17,7 +17,7 @@ export declare namespace Images { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -29,7 +29,7 @@ export declare namespace Images { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -84,11 +84,11 @@ export class Images { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ..._maybeEncodedRequest.headers, @@ -179,11 +179,11 @@ export class Images { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ..._maybeEncodedRequest.headers, diff --git a/src/api/resources/catalog/resources/object/client/Client.ts b/src/api/resources/catalog/resources/object/client/Client.ts index e8332fa0c..c6b8ff9d1 100644 --- a/src/api/resources/catalog/resources/object/client/Client.ts +++ b/src/api/resources/catalog/resources/object/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Object_ { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace Object_ { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -70,11 +70,11 @@ export class Object_ { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -166,11 +166,11 @@ export class Object_ { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -251,11 +251,11 @@ export class Object_ { method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/checkout/client/Client.ts b/src/api/resources/checkout/client/Client.ts index ebc515482..26020ed8a 100644 --- a/src/api/resources/checkout/client/Client.ts +++ b/src/api/resources/checkout/client/Client.ts @@ -17,7 +17,7 @@ export declare namespace Checkout { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -29,7 +29,7 @@ export declare namespace Checkout { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -70,11 +70,11 @@ export class Checkout { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -146,11 +146,11 @@ export class Checkout { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -220,11 +220,11 @@ export class Checkout { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -294,11 +294,11 @@ export class Checkout { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/checkout/resources/paymentLinks/client/Client.ts b/src/api/resources/checkout/resources/paymentLinks/client/Client.ts index 753f858e2..1406748d8 100644 --- a/src/api/resources/checkout/resources/paymentLinks/client/Client.ts +++ b/src/api/resources/checkout/resources/paymentLinks/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace PaymentLinks { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace PaymentLinks { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -71,11 +71,11 @@ export class PaymentLinks { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -161,11 +161,11 @@ export class PaymentLinks { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -240,11 +240,11 @@ export class PaymentLinks { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -323,11 +323,11 @@ export class PaymentLinks { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -402,11 +402,11 @@ export class PaymentLinks { method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/customers/client/Client.ts b/src/api/resources/customers/client/Client.ts index 61ed41ba0..f8b8cad3c 100644 --- a/src/api/resources/customers/client/Client.ts +++ b/src/api/resources/customers/client/Client.ts @@ -21,7 +21,7 @@ export declare namespace Customers { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -33,7 +33,7 @@ export declare namespace Customers { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -119,11 +119,11 @@ export class Customers { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -221,11 +221,11 @@ export class Customers { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -340,11 +340,11 @@ export class Customers { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -418,11 +418,11 @@ export class Customers { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -496,11 +496,11 @@ export class Customers { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -585,11 +585,11 @@ export class Customers { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -691,11 +691,11 @@ export class Customers { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -768,11 +768,11 @@ export class Customers { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -847,11 +847,11 @@ export class Customers { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -931,11 +931,11 @@ export class Customers { method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/customers/resources/cards/client/Client.ts b/src/api/resources/customers/resources/cards/client/Client.ts index 99b264032..cdb8b37f2 100644 --- a/src/api/resources/customers/resources/cards/client/Client.ts +++ b/src/api/resources/customers/resources/cards/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Cards { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace Cards { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -77,11 +77,11 @@ export class Cards { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -157,11 +157,11 @@ export class Cards { method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/customers/resources/customAttributeDefinitions/client/Client.ts b/src/api/resources/customers/resources/customAttributeDefinitions/client/Client.ts index 5c44b0693..9d4164d55 100644 --- a/src/api/resources/customers/resources/customAttributeDefinitions/client/Client.ts +++ b/src/api/resources/customers/resources/customAttributeDefinitions/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace CustomAttributeDefinitions { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace CustomAttributeDefinitions { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -76,11 +76,11 @@ export class CustomAttributeDefinitions { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -179,11 +179,11 @@ export class CustomAttributeDefinitions { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -267,11 +267,11 @@ export class CustomAttributeDefinitions { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -353,11 +353,11 @@ export class CustomAttributeDefinitions { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -437,11 +437,11 @@ export class CustomAttributeDefinitions { method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -560,11 +560,11 @@ export class CustomAttributeDefinitions { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/customers/resources/customAttributes/client/Client.ts b/src/api/resources/customers/resources/customAttributes/client/Client.ts index 706aa9858..8c1be4f05 100644 --- a/src/api/resources/customers/resources/customAttributes/client/Client.ts +++ b/src/api/resources/customers/resources/customAttributes/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace CustomAttributes { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace CustomAttributes { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -83,11 +83,11 @@ export class CustomAttributes { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -183,11 +183,11 @@ export class CustomAttributes { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -271,11 +271,11 @@ export class CustomAttributes { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -355,11 +355,11 @@ export class CustomAttributes { method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/customers/resources/groups/client/Client.ts b/src/api/resources/customers/resources/groups/client/Client.ts index 0826ccd24..a6f3d1604 100644 --- a/src/api/resources/customers/resources/groups/client/Client.ts +++ b/src/api/resources/customers/resources/groups/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Groups { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace Groups { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -71,11 +71,11 @@ export class Groups { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -155,11 +155,11 @@ export class Groups { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -232,11 +232,11 @@ export class Groups { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -310,11 +310,11 @@ export class Groups { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -389,11 +389,11 @@ export class Groups { method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -468,11 +468,11 @@ export class Groups { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -547,11 +547,11 @@ export class Groups { method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/customers/resources/segments/client/Client.ts b/src/api/resources/customers/resources/segments/client/Client.ts index 90ca0a64c..a7fa7f985 100644 --- a/src/api/resources/customers/resources/segments/client/Client.ts +++ b/src/api/resources/customers/resources/segments/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Segments { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace Segments { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -71,11 +71,11 @@ export class Segments { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -152,11 +152,11 @@ export class Segments { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/devices/client/Client.ts b/src/api/resources/devices/client/Client.ts index ac24d1873..e13902deb 100644 --- a/src/api/resources/devices/client/Client.ts +++ b/src/api/resources/devices/client/Client.ts @@ -17,7 +17,7 @@ export declare namespace Devices { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -29,7 +29,7 @@ export declare namespace Devices { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -86,11 +86,11 @@ export class Devices { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -167,11 +167,11 @@ export class Devices { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/devices/resources/codes/client/Client.ts b/src/api/resources/devices/resources/codes/client/Client.ts index b5188ebcb..3379e845e 100644 --- a/src/api/resources/devices/resources/codes/client/Client.ts +++ b/src/api/resources/devices/resources/codes/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Codes { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace Codes { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -81,11 +81,11 @@ export class Codes { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -167,11 +167,11 @@ export class Codes { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -244,11 +244,11 @@ export class Codes { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/disputes/client/Client.ts b/src/api/resources/disputes/client/Client.ts index 2b6825d43..c428f6392 100644 --- a/src/api/resources/disputes/client/Client.ts +++ b/src/api/resources/disputes/client/Client.ts @@ -18,7 +18,7 @@ export declare namespace Disputes { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -30,7 +30,7 @@ export declare namespace Disputes { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -83,11 +83,11 @@ export class Disputes { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -164,11 +164,11 @@ export class Disputes { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -241,11 +241,11 @@ export class Disputes { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -334,11 +334,11 @@ export class Disputes { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ..._maybeEncodedRequest.headers, @@ -414,11 +414,11 @@ export class Disputes { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -499,11 +499,11 @@ export class Disputes { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/disputes/resources/evidence/client/Client.ts b/src/api/resources/disputes/resources/evidence/client/Client.ts index df606a47f..893b12899 100644 --- a/src/api/resources/disputes/resources/evidence/client/Client.ts +++ b/src/api/resources/disputes/resources/evidence/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Evidence { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace Evidence { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -70,11 +70,11 @@ export class Evidence { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -156,11 +156,11 @@ export class Evidence { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -233,11 +233,11 @@ export class Evidence { method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/employees/client/Client.ts b/src/api/resources/employees/client/Client.ts index 7c155f136..a3682108c 100644 --- a/src/api/resources/employees/client/Client.ts +++ b/src/api/resources/employees/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Employees { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace Employees { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -78,11 +78,11 @@ export class Employees { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -159,11 +159,11 @@ export class Employees { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/events/client/Client.ts b/src/api/resources/events/client/Client.ts index 9f427a921..f90041d2a 100644 --- a/src/api/resources/events/client/Client.ts +++ b/src/api/resources/events/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Events { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace Events { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -60,11 +60,11 @@ export class Events { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -132,11 +132,11 @@ export class Events { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -198,11 +198,11 @@ export class Events { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -274,11 +274,11 @@ export class Events { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/giftCards/client/Client.ts b/src/api/resources/giftCards/client/Client.ts index fff07b2b4..1e6fbeb16 100644 --- a/src/api/resources/giftCards/client/Client.ts +++ b/src/api/resources/giftCards/client/Client.ts @@ -17,7 +17,7 @@ export declare namespace GiftCards { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -29,7 +29,7 @@ export declare namespace GiftCards { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -86,11 +86,11 @@ export class GiftCards { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -174,11 +174,11 @@ export class GiftCards { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -250,11 +250,11 @@ export class GiftCards { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -326,11 +326,11 @@ export class GiftCards { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -404,11 +404,11 @@ export class GiftCards { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -484,11 +484,11 @@ export class GiftCards { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -563,11 +563,11 @@ export class GiftCards { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/giftCards/resources/activities/client/Client.ts b/src/api/resources/giftCards/resources/activities/client/Client.ts index dc1ae221e..fd47bf9b5 100644 --- a/src/api/resources/giftCards/resources/activities/client/Client.ts +++ b/src/api/resources/giftCards/resources/activities/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Activities { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace Activities { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -92,11 +92,11 @@ export class Activities { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -182,11 +182,11 @@ export class Activities { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/inventory/client/Client.ts b/src/api/resources/inventory/client/Client.ts index f22f5abee..8d93d252d 100644 --- a/src/api/resources/inventory/client/Client.ts +++ b/src/api/resources/inventory/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Inventory { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace Inventory { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -64,11 +64,11 @@ export class Inventory { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -140,11 +140,11 @@ export class Inventory { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -228,11 +228,11 @@ export class Inventory { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -310,11 +310,11 @@ export class Inventory { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -391,11 +391,11 @@ export class Inventory { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -486,11 +486,11 @@ export class Inventory { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -579,11 +579,11 @@ export class Inventory { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -679,11 +679,11 @@ export class Inventory { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -766,11 +766,11 @@ export class Inventory { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -842,11 +842,11 @@ export class Inventory { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -918,11 +918,11 @@ export class Inventory { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1004,11 +1004,11 @@ export class Inventory { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1107,11 +1107,11 @@ export class Inventory { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/invoices/client/Client.ts b/src/api/resources/invoices/client/Client.ts index 8b0c1a892..bf2b15d1d 100644 --- a/src/api/resources/invoices/client/Client.ts +++ b/src/api/resources/invoices/client/Client.ts @@ -17,7 +17,7 @@ export declare namespace Invoices { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -29,7 +29,7 @@ export declare namespace Invoices { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -75,11 +75,11 @@ export class Invoices { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -199,11 +199,11 @@ export class Invoices { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -291,11 +291,11 @@ export class Invoices { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -368,11 +368,11 @@ export class Invoices { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -452,11 +452,11 @@ export class Invoices { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -536,11 +536,11 @@ export class Invoices { method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -634,11 +634,11 @@ export class Invoices { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ..._maybeEncodedRequest.headers, @@ -713,11 +713,11 @@ export class Invoices { method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -792,11 +792,11 @@ export class Invoices { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -886,11 +886,11 @@ export class Invoices { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/labor/client/Client.ts b/src/api/resources/labor/client/Client.ts index 878bf05f5..1e8a3c383 100644 --- a/src/api/resources/labor/client/Client.ts +++ b/src/api/resources/labor/client/Client.ts @@ -21,7 +21,7 @@ export declare namespace Labor { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -33,7 +33,7 @@ export declare namespace Labor { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -111,11 +111,11 @@ export class Labor { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -195,11 +195,11 @@ export class Labor { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -284,11 +284,11 @@ export class Labor { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -363,11 +363,11 @@ export class Labor { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -459,11 +459,11 @@ export class Labor { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -542,11 +542,11 @@ export class Labor { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -663,11 +663,11 @@ export class Labor { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -764,11 +764,11 @@ export class Labor { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -841,11 +841,11 @@ export class Labor { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -949,11 +949,11 @@ export class Labor { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1026,11 +1026,11 @@ export class Labor { method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/labor/resources/breakTypes/client/Client.ts b/src/api/resources/labor/resources/breakTypes/client/Client.ts index 3f345b3a0..d4f45ce07 100644 --- a/src/api/resources/labor/resources/breakTypes/client/Client.ts +++ b/src/api/resources/labor/resources/breakTypes/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace BreakTypes { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace BreakTypes { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -72,11 +72,11 @@ export class BreakTypes { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -171,11 +171,11 @@ export class BreakTypes { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -248,11 +248,11 @@ export class BreakTypes { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -328,11 +328,11 @@ export class BreakTypes { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -407,11 +407,11 @@ export class BreakTypes { method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/labor/resources/employeeWages/client/Client.ts b/src/api/resources/labor/resources/employeeWages/client/Client.ts index 1a118e27e..9c829d83f 100644 --- a/src/api/resources/labor/resources/employeeWages/client/Client.ts +++ b/src/api/resources/labor/resources/employeeWages/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace EmployeeWages { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace EmployeeWages { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -74,11 +74,11 @@ export class EmployeeWages { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -155,11 +155,11 @@ export class EmployeeWages { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/labor/resources/shifts/client/Client.ts b/src/api/resources/labor/resources/shifts/client/Client.ts index 06e80fbba..56a4c9b07 100644 --- a/src/api/resources/labor/resources/shifts/client/Client.ts +++ b/src/api/resources/labor/resources/shifts/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Shifts { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace Shifts { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -105,11 +105,11 @@ export class Shifts { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -206,11 +206,11 @@ export class Shifts { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -283,11 +283,11 @@ export class Shifts { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -390,11 +390,11 @@ export class Shifts { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -467,11 +467,11 @@ export class Shifts { method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/labor/resources/teamMemberWages/client/Client.ts b/src/api/resources/labor/resources/teamMemberWages/client/Client.ts index 62dd584a8..62414ad43 100644 --- a/src/api/resources/labor/resources/teamMemberWages/client/Client.ts +++ b/src/api/resources/labor/resources/teamMemberWages/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace TeamMemberWages { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace TeamMemberWages { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -74,11 +74,11 @@ export class TeamMemberWages { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -157,11 +157,11 @@ export class TeamMemberWages { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/labor/resources/workweekConfigs/client/Client.ts b/src/api/resources/labor/resources/workweekConfigs/client/Client.ts index c1050ddf7..683bde00d 100644 --- a/src/api/resources/labor/resources/workweekConfigs/client/Client.ts +++ b/src/api/resources/labor/resources/workweekConfigs/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace WorkweekConfigs { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace WorkweekConfigs { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -71,11 +71,11 @@ export class WorkweekConfigs { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -159,11 +159,11 @@ export class WorkweekConfigs { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/locations/client/Client.ts b/src/api/resources/locations/client/Client.ts index 2838b0f0d..9705afd91 100644 --- a/src/api/resources/locations/client/Client.ts +++ b/src/api/resources/locations/client/Client.ts @@ -19,7 +19,7 @@ export declare namespace Locations { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -31,7 +31,7 @@ export declare namespace Locations { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -76,11 +76,11 @@ export class Locations { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -163,11 +163,11 @@ export class Locations { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -241,11 +241,11 @@ export class Locations { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -332,11 +332,11 @@ export class Locations { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -489,11 +489,11 @@ export class Locations { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/locations/resources/customAttributeDefinitions/client/Client.ts b/src/api/resources/locations/resources/customAttributeDefinitions/client/Client.ts index 0bb79f9c7..3416a1794 100644 --- a/src/api/resources/locations/resources/customAttributeDefinitions/client/Client.ts +++ b/src/api/resources/locations/resources/customAttributeDefinitions/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace CustomAttributeDefinitions { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace CustomAttributeDefinitions { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -80,11 +80,11 @@ export class CustomAttributeDefinitions { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -179,11 +179,11 @@ export class CustomAttributeDefinitions { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -265,11 +265,11 @@ export class CustomAttributeDefinitions { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -348,11 +348,11 @@ export class CustomAttributeDefinitions { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -430,11 +430,11 @@ export class CustomAttributeDefinitions { method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/locations/resources/customAttributes/client/Client.ts b/src/api/resources/locations/resources/customAttributes/client/Client.ts index 449ab4205..7cec03bad 100644 --- a/src/api/resources/locations/resources/customAttributes/client/Client.ts +++ b/src/api/resources/locations/resources/customAttributes/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace CustomAttributes { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace CustomAttributes { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -74,11 +74,11 @@ export class CustomAttributes { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -183,11 +183,11 @@ export class CustomAttributes { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -286,11 +286,11 @@ export class CustomAttributes { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -383,11 +383,11 @@ export class CustomAttributes { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -468,11 +468,11 @@ export class CustomAttributes { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -550,11 +550,11 @@ export class CustomAttributes { method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/locations/resources/transactions/client/Client.ts b/src/api/resources/locations/resources/transactions/client/Client.ts index 53213e941..401d5e9ea 100644 --- a/src/api/resources/locations/resources/transactions/client/Client.ts +++ b/src/api/resources/locations/resources/transactions/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Transactions { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace Transactions { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -88,11 +88,11 @@ export class Transactions { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -165,11 +165,11 @@ export class Transactions { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -246,11 +246,11 @@ export class Transactions { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -327,11 +327,11 @@ export class Transactions { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/loyalty/client/Client.ts b/src/api/resources/loyalty/client/Client.ts index 3712eb58b..5f4d7dcd7 100644 --- a/src/api/resources/loyalty/client/Client.ts +++ b/src/api/resources/loyalty/client/Client.ts @@ -19,7 +19,7 @@ export declare namespace Loyalty { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -31,7 +31,7 @@ export declare namespace Loyalty { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -95,11 +95,11 @@ export class Loyalty { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/loyalty/resources/accounts/client/Client.ts b/src/api/resources/loyalty/resources/accounts/client/Client.ts index 5a5e5473c..8a6b94666 100644 --- a/src/api/resources/loyalty/resources/accounts/client/Client.ts +++ b/src/api/resources/loyalty/resources/accounts/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Accounts { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace Accounts { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -68,11 +68,11 @@ export class Accounts { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -153,11 +153,11 @@ export class Accounts { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -230,11 +230,11 @@ export class Accounts { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -323,11 +323,11 @@ export class Accounts { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -411,11 +411,11 @@ export class Accounts { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/loyalty/resources/programs/client/Client.ts b/src/api/resources/loyalty/resources/programs/client/Client.ts index 497831381..ee75a2a2c 100644 --- a/src/api/resources/loyalty/resources/programs/client/Client.ts +++ b/src/api/resources/loyalty/resources/programs/client/Client.ts @@ -17,7 +17,7 @@ export declare namespace Programs { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -29,7 +29,7 @@ export declare namespace Programs { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -67,11 +67,11 @@ export class Programs { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -142,11 +142,11 @@ export class Programs { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -233,11 +233,11 @@ export class Programs { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/loyalty/resources/programs/resources/promotions/client/Client.ts b/src/api/resources/loyalty/resources/programs/resources/promotions/client/Client.ts index 590abe088..5f691c17f 100644 --- a/src/api/resources/loyalty/resources/programs/resources/promotions/client/Client.ts +++ b/src/api/resources/loyalty/resources/programs/resources/promotions/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Promotions { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace Promotions { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -80,11 +80,11 @@ export class Promotions { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -190,11 +190,11 @@ export class Promotions { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -270,11 +270,11 @@ export class Promotions { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -351,11 +351,11 @@ export class Promotions { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/loyalty/resources/rewards/client/Client.ts b/src/api/resources/loyalty/resources/rewards/client/Client.ts index c5544de17..d8c2408af 100644 --- a/src/api/resources/loyalty/resources/rewards/client/Client.ts +++ b/src/api/resources/loyalty/resources/rewards/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Rewards { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace Rewards { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -74,11 +74,11 @@ export class Rewards { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -159,11 +159,11 @@ export class Rewards { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -236,11 +236,11 @@ export class Rewards { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -319,11 +319,11 @@ export class Rewards { method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -406,11 +406,11 @@ export class Rewards { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/merchants/client/Client.ts b/src/api/resources/merchants/client/Client.ts index 8ced35200..52a71546d 100644 --- a/src/api/resources/merchants/client/Client.ts +++ b/src/api/resources/merchants/client/Client.ts @@ -18,7 +18,7 @@ export declare namespace Merchants { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -30,7 +30,7 @@ export declare namespace Merchants { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -88,11 +88,11 @@ export class Merchants { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -169,11 +169,11 @@ export class Merchants { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/merchants/resources/customAttributeDefinitions/client/Client.ts b/src/api/resources/merchants/resources/customAttributeDefinitions/client/Client.ts index f1e4377cc..880a7b351 100644 --- a/src/api/resources/merchants/resources/customAttributeDefinitions/client/Client.ts +++ b/src/api/resources/merchants/resources/customAttributeDefinitions/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace CustomAttributeDefinitions { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace CustomAttributeDefinitions { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -80,11 +80,11 @@ export class CustomAttributeDefinitions { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -179,11 +179,11 @@ export class CustomAttributeDefinitions { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -265,11 +265,11 @@ export class CustomAttributeDefinitions { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -348,11 +348,11 @@ export class CustomAttributeDefinitions { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -430,11 +430,11 @@ export class CustomAttributeDefinitions { method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/merchants/resources/customAttributes/client/Client.ts b/src/api/resources/merchants/resources/customAttributes/client/Client.ts index 8d5f58898..9ee446b83 100644 --- a/src/api/resources/merchants/resources/customAttributes/client/Client.ts +++ b/src/api/resources/merchants/resources/customAttributes/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace CustomAttributes { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace CustomAttributes { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -71,11 +71,11 @@ export class CustomAttributes { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -173,11 +173,11 @@ export class CustomAttributes { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -276,11 +276,11 @@ export class CustomAttributes { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -373,11 +373,11 @@ export class CustomAttributes { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -458,11 +458,11 @@ export class CustomAttributes { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -540,11 +540,11 @@ export class CustomAttributes { method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/mobile/client/Client.ts b/src/api/resources/mobile/client/Client.ts index 035f56058..2e99abdaa 100644 --- a/src/api/resources/mobile/client/Client.ts +++ b/src/api/resources/mobile/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Mobile { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace Mobile { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -76,11 +76,11 @@ export class Mobile { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/oAuth/client/Client.ts b/src/api/resources/oAuth/client/Client.ts index f26b0a53c..3c73a7240 100644 --- a/src/api/resources/oAuth/client/Client.ts +++ b/src/api/resources/oAuth/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace OAuth { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace OAuth { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -76,11 +76,11 @@ export class OAuth { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -175,11 +175,11 @@ export class OAuth { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -260,11 +260,11 @@ export class OAuth { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -324,11 +324,11 @@ export class OAuth { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/orders/client/Client.ts b/src/api/resources/orders/client/Client.ts index 4fe85e282..45fba02af 100644 --- a/src/api/resources/orders/client/Client.ts +++ b/src/api/resources/orders/client/Client.ts @@ -18,7 +18,7 @@ export declare namespace Orders { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -30,7 +30,7 @@ export declare namespace Orders { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -126,11 +126,11 @@ export class Orders { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -205,11 +205,11 @@ export class Orders { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -303,11 +303,11 @@ export class Orders { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -382,11 +382,11 @@ export class Orders { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -493,11 +493,11 @@ export class Orders { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -570,11 +570,11 @@ export class Orders { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -672,11 +672,11 @@ export class Orders { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -764,11 +764,11 @@ export class Orders { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/orders/resources/customAttributeDefinitions/client/Client.ts b/src/api/resources/orders/resources/customAttributeDefinitions/client/Client.ts index 800281398..6f841dd7d 100644 --- a/src/api/resources/orders/resources/customAttributeDefinitions/client/Client.ts +++ b/src/api/resources/orders/resources/customAttributeDefinitions/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace CustomAttributeDefinitions { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace CustomAttributeDefinitions { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -82,11 +82,11 @@ export class CustomAttributeDefinitions { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -177,11 +177,11 @@ export class CustomAttributeDefinitions { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -265,11 +265,11 @@ export class CustomAttributeDefinitions { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -349,11 +349,11 @@ export class CustomAttributeDefinitions { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -430,11 +430,11 @@ export class CustomAttributeDefinitions { method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/orders/resources/customAttributes/client/Client.ts b/src/api/resources/orders/resources/customAttributes/client/Client.ts index 460c95732..3206a4f17 100644 --- a/src/api/resources/orders/resources/customAttributes/client/Client.ts +++ b/src/api/resources/orders/resources/customAttributes/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace CustomAttributes { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace CustomAttributes { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -84,11 +84,11 @@ export class CustomAttributes { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -192,11 +192,11 @@ export class CustomAttributes { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -297,11 +297,11 @@ export class CustomAttributes { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -397,11 +397,11 @@ export class CustomAttributes { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -487,11 +487,11 @@ export class CustomAttributes { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -571,11 +571,11 @@ export class CustomAttributes { method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/payments/client/Client.ts b/src/api/resources/payments/client/Client.ts index e2e50aa40..e96c64bad 100644 --- a/src/api/resources/payments/client/Client.ts +++ b/src/api/resources/payments/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Payments { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace Payments { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -132,11 +132,11 @@ export class Payments { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -233,11 +233,11 @@ export class Payments { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -319,11 +319,11 @@ export class Payments { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -396,11 +396,11 @@ export class Payments { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -482,11 +482,11 @@ export class Payments { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -560,11 +560,11 @@ export class Payments { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -638,11 +638,11 @@ export class Payments { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/payouts/client/Client.ts b/src/api/resources/payouts/client/Client.ts index 300928565..d3ed66192 100644 --- a/src/api/resources/payouts/client/Client.ts +++ b/src/api/resources/payouts/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Payouts { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace Payouts { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -92,11 +92,11 @@ export class Payouts { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -174,11 +174,11 @@ export class Payouts { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -262,11 +262,11 @@ export class Payouts { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/refunds/client/Client.ts b/src/api/resources/refunds/client/Client.ts index 114d0e09c..8e4f35fbe 100644 --- a/src/api/resources/refunds/client/Client.ts +++ b/src/api/resources/refunds/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Refunds { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace Refunds { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -116,11 +116,11 @@ export class Refunds { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -209,11 +209,11 @@ export class Refunds { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -286,11 +286,11 @@ export class Refunds { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/sites/client/Client.ts b/src/api/resources/sites/client/Client.ts index 6d494bb92..78bf6b337 100644 --- a/src/api/resources/sites/client/Client.ts +++ b/src/api/resources/sites/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Sites { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace Sites { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -59,11 +59,11 @@ export class Sites { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/snippets/client/Client.ts b/src/api/resources/snippets/client/Client.ts index fedbbf7c1..9f32c2ac3 100644 --- a/src/api/resources/snippets/client/Client.ts +++ b/src/api/resources/snippets/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Snippets { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace Snippets { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -68,11 +68,11 @@ export class Snippets { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -150,11 +150,11 @@ export class Snippets { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -232,11 +232,11 @@ export class Snippets { method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/subscriptions/client/Client.ts b/src/api/resources/subscriptions/client/Client.ts index 3d49bb862..20baa9d7b 100644 --- a/src/api/resources/subscriptions/client/Client.ts +++ b/src/api/resources/subscriptions/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Subscriptions { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace Subscriptions { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -82,11 +82,11 @@ export class Subscriptions { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -161,11 +161,11 @@ export class Subscriptions { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -258,11 +258,11 @@ export class Subscriptions { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -340,11 +340,11 @@ export class Subscriptions { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -420,11 +420,11 @@ export class Subscriptions { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -500,11 +500,11 @@ export class Subscriptions { method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -577,11 +577,11 @@ export class Subscriptions { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -658,11 +658,11 @@ export class Subscriptions { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -743,11 +743,11 @@ export class Subscriptions { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -826,11 +826,11 @@ export class Subscriptions { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -905,11 +905,11 @@ export class Subscriptions { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -990,11 +990,11 @@ export class Subscriptions { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/team/client/Client.ts b/src/api/resources/team/client/Client.ts index 75867b707..adba03ac3 100644 --- a/src/api/resources/team/client/Client.ts +++ b/src/api/resources/team/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Team { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace Team { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -66,11 +66,11 @@ export class Team { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -144,11 +144,11 @@ export class Team { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -221,11 +221,11 @@ export class Team { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -302,11 +302,11 @@ export class Team { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/teamMembers/client/Client.ts b/src/api/resources/teamMembers/client/Client.ts index 311448f51..39dfe6e70 100644 --- a/src/api/resources/teamMembers/client/Client.ts +++ b/src/api/resources/teamMembers/client/Client.ts @@ -17,7 +17,7 @@ export declare namespace TeamMembers { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -29,7 +29,7 @@ export declare namespace TeamMembers { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -105,11 +105,11 @@ export class TeamMembers { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -212,11 +212,11 @@ export class TeamMembers { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -322,11 +322,11 @@ export class TeamMembers { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -406,11 +406,11 @@ export class TeamMembers { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -484,11 +484,11 @@ export class TeamMembers { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -593,11 +593,11 @@ export class TeamMembers { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/teamMembers/resources/wageSetting/client/Client.ts b/src/api/resources/teamMembers/resources/wageSetting/client/Client.ts index baabad85b..e7dc3d8b1 100644 --- a/src/api/resources/teamMembers/resources/wageSetting/client/Client.ts +++ b/src/api/resources/teamMembers/resources/wageSetting/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace WageSetting { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace WageSetting { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -68,11 +68,11 @@ export class WageSetting { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -169,11 +169,11 @@ export class WageSetting { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/terminal/client/Client.ts b/src/api/resources/terminal/client/Client.ts index 970c3c0b4..c43a9348d 100644 --- a/src/api/resources/terminal/client/Client.ts +++ b/src/api/resources/terminal/client/Client.ts @@ -19,7 +19,7 @@ export declare namespace Terminal { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -31,7 +31,7 @@ export declare namespace Terminal { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -84,11 +84,11 @@ export class Terminal { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -159,11 +159,11 @@ export class Terminal { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -234,11 +234,11 @@ export class Terminal { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/terminal/resources/actions/client/Client.ts b/src/api/resources/terminal/resources/actions/client/Client.ts index 76736c0c4..a3d2cac4e 100644 --- a/src/api/resources/terminal/resources/actions/client/Client.ts +++ b/src/api/resources/terminal/resources/actions/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Actions { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace Actions { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -71,11 +71,11 @@ export class Actions { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -157,11 +157,11 @@ export class Actions { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -234,11 +234,11 @@ export class Actions { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -309,11 +309,11 @@ export class Actions { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/terminal/resources/checkouts/client/Client.ts b/src/api/resources/terminal/resources/checkouts/client/Client.ts index f2ee2410b..b36c70bdc 100644 --- a/src/api/resources/terminal/resources/checkouts/client/Client.ts +++ b/src/api/resources/terminal/resources/checkouts/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Checkouts { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace Checkouts { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -74,11 +74,11 @@ export class Checkouts { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -155,11 +155,11 @@ export class Checkouts { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -234,11 +234,11 @@ export class Checkouts { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -309,11 +309,11 @@ export class Checkouts { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/terminal/resources/refunds/client/Client.ts b/src/api/resources/terminal/resources/refunds/client/Client.ts index 3439a063a..fbbf9e09c 100644 --- a/src/api/resources/terminal/resources/refunds/client/Client.ts +++ b/src/api/resources/terminal/resources/refunds/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Refunds { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace Refunds { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -71,11 +71,11 @@ export class Refunds { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -152,11 +152,11 @@ export class Refunds { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -229,11 +229,11 @@ export class Refunds { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -304,11 +304,11 @@ export class Refunds { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/v1Transactions/client/Client.ts b/src/api/resources/v1Transactions/client/Client.ts index 691c65f09..a5599184e 100644 --- a/src/api/resources/v1Transactions/client/Client.ts +++ b/src/api/resources/v1Transactions/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace V1Transactions { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace V1Transactions { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -79,11 +79,11 @@ export class V1Transactions { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -154,11 +154,11 @@ export class V1Transactions { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -231,11 +231,11 @@ export class V1Transactions { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/vendors/client/Client.ts b/src/api/resources/vendors/client/Client.ts index c6847fbe1..83b12a4f1 100644 --- a/src/api/resources/vendors/client/Client.ts +++ b/src/api/resources/vendors/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Vendors { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace Vendors { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -82,11 +82,11 @@ export class Vendors { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -158,11 +158,11 @@ export class Vendors { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -241,11 +241,11 @@ export class Vendors { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -336,11 +336,11 @@ export class Vendors { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -410,11 +410,11 @@ export class Vendors { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -487,11 +487,11 @@ export class Vendors { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -569,11 +569,11 @@ export class Vendors { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/webhooks/client/Client.ts b/src/api/resources/webhooks/client/Client.ts index 3d2b11b9b..3d7d2cc41 100644 --- a/src/api/resources/webhooks/client/Client.ts +++ b/src/api/resources/webhooks/client/Client.ts @@ -14,7 +14,7 @@ export declare namespace Webhooks { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -26,7 +26,7 @@ export declare namespace Webhooks { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } diff --git a/src/api/resources/webhooks/resources/eventTypes/client/Client.ts b/src/api/resources/webhooks/resources/eventTypes/client/Client.ts index 521e7bc74..7b8bffe15 100644 --- a/src/api/resources/webhooks/resources/eventTypes/client/Client.ts +++ b/src/api/resources/webhooks/resources/eventTypes/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace EventTypes { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace EventTypes { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -66,11 +66,11 @@ export class EventTypes { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/webhooks/resources/subscriptions/client/Client.ts b/src/api/resources/webhooks/resources/subscriptions/client/Client.ts index eaeffd923..69c7a8803 100644 --- a/src/api/resources/webhooks/resources/subscriptions/client/Client.ts +++ b/src/api/resources/webhooks/resources/subscriptions/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Subscriptions { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; fetcher?: core.FetchFunction; } @@ -28,7 +28,7 @@ export declare namespace Subscriptions { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2025-05-21"; + version?: "2025-06-18"; /** Additional headers to include in the request. */ headers?: Record; } @@ -80,11 +80,11 @@ export class Subscriptions { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -168,11 +168,11 @@ export class Subscriptions { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -245,11 +245,11 @@ export class Subscriptions { method: "GET", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -324,11 +324,11 @@ export class Subscriptions { method: "PUT", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -403,11 +403,11 @@ export class Subscriptions { method: "DELETE", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -479,11 +479,11 @@ export class Subscriptions { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -559,11 +559,11 @@ export class Subscriptions { method: "POST", headers: { Authorization: await this._getAuthorizationHeader(), - "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-05-21", + "Square-Version": requestOptions?.version ?? this._options?.version ?? "2025-06-18", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "square", - "X-Fern-SDK-Version": "42.3.0", - "User-Agent": "square/42.3.0", + "X-Fern-SDK-Version": "43.0.0", + "User-Agent": "square/43.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/types/BankAccountCreatedEvent.ts b/src/api/types/BankAccountCreatedEvent.ts new file mode 100644 index 000000000..71b39e5cf --- /dev/null +++ b/src/api/types/BankAccountCreatedEvent.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when you link an external bank account to a Square + * account in the Seller Dashboard. Square sets the initial status to + * `VERIFICATION_IN_PROGRESS` and publishes the event. + */ +export interface BankAccountCreatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The ID of the target location associated with the event. */ + locationId?: string | null; + /** The type of event this represents, `"bank_account.created"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.BankAccountCreatedEventData; +} diff --git a/src/api/types/BankAccountCreatedEventData.ts b/src/api/types/BankAccountCreatedEventData.ts new file mode 100644 index 000000000..f3fedf2ea --- /dev/null +++ b/src/api/types/BankAccountCreatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface BankAccountCreatedEventData { + /** Name of the affected object’s type, `"bank_account"`. */ + type?: string | null; + /** ID of the affected bank account. */ + id?: string; + /** An object containing the created bank account. */ + object?: Square.BankAccountCreatedEventObject; +} diff --git a/src/api/types/BankAccountCreatedEventObject.ts b/src/api/types/BankAccountCreatedEventObject.ts new file mode 100644 index 000000000..34545b8dc --- /dev/null +++ b/src/api/types/BankAccountCreatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface BankAccountCreatedEventObject { + /** The created bank account. */ + bankAccount?: Square.BankAccount; +} diff --git a/src/api/types/BankAccountDisabledEvent.ts b/src/api/types/BankAccountDisabledEvent.ts new file mode 100644 index 000000000..9e54b24de --- /dev/null +++ b/src/api/types/BankAccountDisabledEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when Square sets the status of a + * [BankAccount](entity:BankAccount) to `DISABLED`. + */ +export interface BankAccountDisabledEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The ID of the target location associated with the event. */ + locationId?: string | null; + /** The type of event this represents, `"bank_account.disabled"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was disabled, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.BankAccountDisabledEventData; +} diff --git a/src/api/types/BankAccountDisabledEventData.ts b/src/api/types/BankAccountDisabledEventData.ts new file mode 100644 index 000000000..842bb3dac --- /dev/null +++ b/src/api/types/BankAccountDisabledEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface BankAccountDisabledEventData { + /** Name of the affected object’s type, `"bank_account"`. */ + type?: string | null; + /** ID of the affected bank account. */ + id?: string; + /** An object containing the disabled bank account. */ + object?: Square.BankAccountDisabledEventObject; +} diff --git a/src/api/types/BankAccountDisabledEventObject.ts b/src/api/types/BankAccountDisabledEventObject.ts new file mode 100644 index 000000000..8ef0589dc --- /dev/null +++ b/src/api/types/BankAccountDisabledEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface BankAccountDisabledEventObject { + /** The disabled bank account. */ + bankAccount?: Square.BankAccount; +} diff --git a/src/api/types/BankAccountVerifiedEvent.ts b/src/api/types/BankAccountVerifiedEvent.ts new file mode 100644 index 000000000..ffbf6a3a2 --- /dev/null +++ b/src/api/types/BankAccountVerifiedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when Square sets the status of a + * [BankAccount](entity:BankAccount) to `VERIFIED`. + */ +export interface BankAccountVerifiedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The ID of the target location associated with the event. */ + locationId?: string | null; + /** The type of event this represents, `"bank_account.verified"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was verified, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.BankAccountVerifiedEventData; +} diff --git a/src/api/types/BankAccountVerifiedEventData.ts b/src/api/types/BankAccountVerifiedEventData.ts new file mode 100644 index 000000000..7976fc30a --- /dev/null +++ b/src/api/types/BankAccountVerifiedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface BankAccountVerifiedEventData { + /** Name of the affected object’s type, `"bank_account"`. */ + type?: string | null; + /** ID of the affected bank account. */ + id?: string; + /** An object containing the verified bank account. */ + object?: Square.BankAccountVerifiedEventObject; +} diff --git a/src/api/types/BankAccountVerifiedEventObject.ts b/src/api/types/BankAccountVerifiedEventObject.ts new file mode 100644 index 000000000..26af16448 --- /dev/null +++ b/src/api/types/BankAccountVerifiedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface BankAccountVerifiedEventObject { + /** The verified bank account. */ + bankAccount?: Square.BankAccount; +} diff --git a/src/api/types/BookingCreatedEvent.ts b/src/api/types/BookingCreatedEvent.ts new file mode 100644 index 000000000..646208cca --- /dev/null +++ b/src/api/types/BookingCreatedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a booking is created. + * + * To receive this event with buyer-level permissions, you must have `APPOINTMENTS_READ` set for the OAuth scope. + * To receive this event with seller-level permissions, you must have `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` set for the OAuth scope. + */ +export interface BookingCreatedEvent { + /** The ID of the target seller associated with the event. */ + merchantId?: string | null; + /** The type of this event. The value is `"booking.created"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.BookingCreatedEventData; +} diff --git a/src/api/types/BookingCreatedEventData.ts b/src/api/types/BookingCreatedEventData.ts new file mode 100644 index 000000000..ec3d1584d --- /dev/null +++ b/src/api/types/BookingCreatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface BookingCreatedEventData { + /** The type of the event data object. The value is `"booking"`. */ + type?: string | null; + /** The ID of the event data object. */ + id?: string; + /** An object containing the created booking. */ + object?: Square.BookingCreatedEventObject; +} diff --git a/src/api/types/BookingCreatedEventObject.ts b/src/api/types/BookingCreatedEventObject.ts new file mode 100644 index 000000000..1d59263ab --- /dev/null +++ b/src/api/types/BookingCreatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface BookingCreatedEventObject { + /** The created booking. */ + booking?: Square.Booking; +} diff --git a/src/api/types/BookingCustomAttributeDefinitionOwnedCreatedEvent.ts b/src/api/types/BookingCustomAttributeDefinitionOwnedCreatedEvent.ts new file mode 100644 index 000000000..d0fa96275 --- /dev/null +++ b/src/api/types/BookingCustomAttributeDefinitionOwnedCreatedEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a booking [custom attribute definition](entity:CustomAttributeDefinition) + * is created by the subscribing application. Subscribe to this event to be notified + * when your application creates a booking custom attribute definition. + */ +export interface BookingCustomAttributeDefinitionOwnedCreatedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"booking.custom_attribute_definition.owned.created"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/BookingCustomAttributeDefinitionOwnedDeletedEvent.ts b/src/api/types/BookingCustomAttributeDefinitionOwnedDeletedEvent.ts new file mode 100644 index 000000000..6088ec85c --- /dev/null +++ b/src/api/types/BookingCustomAttributeDefinitionOwnedDeletedEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a booking [custom attribute definition](entity:CustomAttributeDefinition) + * is deleted by the subscribing application. Subscribe to this event to be notified + * when your application deletes a booking custom attribute definition. + */ +export interface BookingCustomAttributeDefinitionOwnedDeletedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"booking.custom_attribute_definition.owned.deleted"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/BookingCustomAttributeDefinitionOwnedUpdatedEvent.ts b/src/api/types/BookingCustomAttributeDefinitionOwnedUpdatedEvent.ts new file mode 100644 index 000000000..426ba305f --- /dev/null +++ b/src/api/types/BookingCustomAttributeDefinitionOwnedUpdatedEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a booking [custom attribute definition](entity:CustomAttributeDefinition) + * is updated by the subscribing application. Subscribe to this event to be notified + * when your application updates a booking custom attribute definition. + */ +export interface BookingCustomAttributeDefinitionOwnedUpdatedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"booking.custom_attribute_definition.owned.updated"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/BookingCustomAttributeDefinitionVisibleCreatedEvent.ts b/src/api/types/BookingCustomAttributeDefinitionVisibleCreatedEvent.ts new file mode 100644 index 000000000..42a436488 --- /dev/null +++ b/src/api/types/BookingCustomAttributeDefinitionVisibleCreatedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a booking [custom attribute definition](entity:CustomAttributeDefinition) + * with the `visibility` field set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES` is created. + * An application that subscribes to this event is notified when a booking custom attribute definition is created + * by any application for which the subscribing application has read access to the booking custom attribute definition. + */ +export interface BookingCustomAttributeDefinitionVisibleCreatedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"booking.custom_attribute_definition.visible.created"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/BookingCustomAttributeDefinitionVisibleDeletedEvent.ts b/src/api/types/BookingCustomAttributeDefinitionVisibleDeletedEvent.ts new file mode 100644 index 000000000..9f4cb79d4 --- /dev/null +++ b/src/api/types/BookingCustomAttributeDefinitionVisibleDeletedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a booking [custom attribute definition](entity:CustomAttributeDefinition) + * with the `visibility` field set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES` is deleted. + * An application that subscribes to this event is notified when a booking custom attribute definition is deleted + * by any application for which the subscribing application has read access to the booking custom attribute definition. + */ +export interface BookingCustomAttributeDefinitionVisibleDeletedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"booking.custom_attribute_definition.visible.deleted"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/BookingCustomAttributeDefinitionVisibleUpdatedEvent.ts b/src/api/types/BookingCustomAttributeDefinitionVisibleUpdatedEvent.ts new file mode 100644 index 000000000..01afeca30 --- /dev/null +++ b/src/api/types/BookingCustomAttributeDefinitionVisibleUpdatedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a booking [custom attribute definition](entity:CustomAttributeDefinition) + * with the `visibility` field set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES` is updated. + * An application that subscribes to this event is notified when a booking custom attribute definition is updated + * by any application for which the subscribing application has read access to the booking custom attribute definition. + */ +export interface BookingCustomAttributeDefinitionVisibleUpdatedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"booking.custom_attribute_definition.visible.updated"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/BookingCustomAttributeOwnedDeletedEvent.ts b/src/api/types/BookingCustomAttributeOwnedDeletedEvent.ts new file mode 100644 index 000000000..00ea41bcb --- /dev/null +++ b/src/api/types/BookingCustomAttributeOwnedDeletedEvent.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a booking [custom attribute](entity:CustomAttribute) + * associated with a [custom attribute definition](entity:CustomAttributeDefinition) that is + * owned by the subscribing application is deleted. + * Subscribe to this event to be notified + * when your application deletes a booking custom attribute. + */ +export interface BookingCustomAttributeOwnedDeletedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"booking.custom_attribute.owned.deleted"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeEventData; +} diff --git a/src/api/types/BookingCustomAttributeOwnedUpdatedEvent.ts b/src/api/types/BookingCustomAttributeOwnedUpdatedEvent.ts new file mode 100644 index 000000000..60c9a8944 --- /dev/null +++ b/src/api/types/BookingCustomAttributeOwnedUpdatedEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a booking [custom attribute](entity:CustomAttribute) + * is updated by the subscribing application. Subscribe to this event to be notified + * when your application updates a booking custom attribute. + */ +export interface BookingCustomAttributeOwnedUpdatedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"booking.custom_attribute.owned.updated"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeEventData; +} diff --git a/src/api/types/BookingCustomAttributeVisibleDeletedEvent.ts b/src/api/types/BookingCustomAttributeVisibleDeletedEvent.ts new file mode 100644 index 000000000..b3c26f81a --- /dev/null +++ b/src/api/types/BookingCustomAttributeVisibleDeletedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a booking [custom attribute](entity:CustomAttribute) with + * the `visibility` field set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES` is deleted. + * An application that subscribes to this event is notified when a booking custom attribute is deleted + * by any application for which the subscribing application has read access to the booking custom attribute. + */ +export interface BookingCustomAttributeVisibleDeletedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"booking.custom_attribute.visible.deleted"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeEventData; +} diff --git a/src/api/types/BookingCustomAttributeVisibleUpdatedEvent.ts b/src/api/types/BookingCustomAttributeVisibleUpdatedEvent.ts new file mode 100644 index 000000000..8451ca112 --- /dev/null +++ b/src/api/types/BookingCustomAttributeVisibleUpdatedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a booking [custom attribute](entity:CustomAttribute) + * with the `visibility` field set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES` is updated. + * An application that subscribes to this event is notified when a booking custom attribute is updated + * by any application for which the subscribing application has read access to the booking custom attribute. + */ +export interface BookingCustomAttributeVisibleUpdatedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"booking.custom_attribute.visible.updated"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeEventData; +} diff --git a/src/api/types/BookingUpdatedEvent.ts b/src/api/types/BookingUpdatedEvent.ts new file mode 100644 index 000000000..5304a624b --- /dev/null +++ b/src/api/types/BookingUpdatedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a booking is updated or cancelled. + * + * To receive this event with buyer-level permissions, you must have `APPOINTMENTS_READ` set for the OAuth scope. + * To receive this event with seller-level permissions, you must have `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` set for the OAuth scope. + */ +export interface BookingUpdatedEvent { + /** The ID of the target seller associated with the event. */ + merchantId?: string | null; + /** The type of this event. The value is `"booking.updated"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.BookingUpdatedEventData; +} diff --git a/src/api/types/BookingUpdatedEventData.ts b/src/api/types/BookingUpdatedEventData.ts new file mode 100644 index 000000000..9bf4fd8f5 --- /dev/null +++ b/src/api/types/BookingUpdatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface BookingUpdatedEventData { + /** The type of the event data object. The value is `"booking"`. */ + type?: string | null; + /** The ID of the event data object. */ + id?: string; + /** An object containing the updated booking. */ + object?: Square.BookingUpdatedEventObject; +} diff --git a/src/api/types/BookingUpdatedEventObject.ts b/src/api/types/BookingUpdatedEventObject.ts new file mode 100644 index 000000000..98f157bb1 --- /dev/null +++ b/src/api/types/BookingUpdatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface BookingUpdatedEventObject { + /** The updated booking. */ + booking?: Square.Booking; +} diff --git a/src/api/types/CardAutomaticallyUpdatedEvent.ts b/src/api/types/CardAutomaticallyUpdatedEvent.ts new file mode 100644 index 000000000..552768192 --- /dev/null +++ b/src/api/types/CardAutomaticallyUpdatedEvent.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when Square automatically updates the expiration date or + * primary account number (PAN) of a [card](entity:Card) or adds or removes an issuer alert. + */ +export interface CardAutomaticallyUpdatedEvent { + /** The ID of the target seller associated with the event. */ + merchantId?: string | null; + /** The type of this event. The value is `"card.automatically_updated"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.CardAutomaticallyUpdatedEventData; +} diff --git a/src/api/types/CardAutomaticallyUpdatedEventData.ts b/src/api/types/CardAutomaticallyUpdatedEventData.ts new file mode 100644 index 000000000..73ff03d7a --- /dev/null +++ b/src/api/types/CardAutomaticallyUpdatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface CardAutomaticallyUpdatedEventData { + /** The type of the event data object. The value is `"card"`. */ + type?: string | null; + /** The ID of the event data object. */ + id?: string; + /** An object containing the automatically updated card. */ + object?: Square.CardAutomaticallyUpdatedEventObject; +} diff --git a/src/api/types/CardAutomaticallyUpdatedEventObject.ts b/src/api/types/CardAutomaticallyUpdatedEventObject.ts new file mode 100644 index 000000000..7c5569acd --- /dev/null +++ b/src/api/types/CardAutomaticallyUpdatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface CardAutomaticallyUpdatedEventObject { + /** The automatically updated card. */ + card?: Square.Card; +} diff --git a/src/api/types/CardCreatedEvent.ts b/src/api/types/CardCreatedEvent.ts new file mode 100644 index 000000000..810bc27f7 --- /dev/null +++ b/src/api/types/CardCreatedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [card](entity:Card) is created or imported. + */ +export interface CardCreatedEvent { + /** The ID of the target seller associated with the event. */ + merchantId?: string | null; + /** The type of this event. The value is `"card.created"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.CardCreatedEventData; +} diff --git a/src/api/types/CardCreatedEventData.ts b/src/api/types/CardCreatedEventData.ts new file mode 100644 index 000000000..054e9e4bb --- /dev/null +++ b/src/api/types/CardCreatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface CardCreatedEventData { + /** The type of the event data object. The value is `"card"`. */ + type?: string | null; + /** The ID of the event data object. */ + id?: string; + /** An object containing the created card. */ + object?: Square.CardCreatedEventObject; +} diff --git a/src/api/types/CardCreatedEventObject.ts b/src/api/types/CardCreatedEventObject.ts new file mode 100644 index 000000000..2dafa7445 --- /dev/null +++ b/src/api/types/CardCreatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface CardCreatedEventObject { + /** The created card. */ + card?: Square.Card; +} diff --git a/src/api/types/CardDisabledEvent.ts b/src/api/types/CardDisabledEvent.ts new file mode 100644 index 000000000..2ecede520 --- /dev/null +++ b/src/api/types/CardDisabledEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [card](entity:Card) is disabled. + */ +export interface CardDisabledEvent { + /** The ID of the target seller associated with the event. */ + merchantId?: string | null; + /** The type of this event. The value is `"card.disabled"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.CardDisabledEventData; +} diff --git a/src/api/types/CardDisabledEventData.ts b/src/api/types/CardDisabledEventData.ts new file mode 100644 index 000000000..24cbc2d0b --- /dev/null +++ b/src/api/types/CardDisabledEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface CardDisabledEventData { + /** The type of the event data object. The value is `"card"`. */ + type?: string | null; + /** The ID of the event data object. */ + id?: string; + /** An object containing the disabled card. */ + object?: Square.CardDisabledEventObject; +} diff --git a/src/api/types/CardDisabledEventObject.ts b/src/api/types/CardDisabledEventObject.ts new file mode 100644 index 000000000..f5f765ed1 --- /dev/null +++ b/src/api/types/CardDisabledEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface CardDisabledEventObject { + /** The disabled card. */ + card?: Square.Card; +} diff --git a/src/api/types/CardForgottenEvent.ts b/src/api/types/CardForgottenEvent.ts new file mode 100644 index 000000000..fff5cdcc0 --- /dev/null +++ b/src/api/types/CardForgottenEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [card](entity:Card) is GDPR forgotten or vaulted. + */ +export interface CardForgottenEvent { + /** The ID of the target seller associated with the event. */ + merchantId?: string | null; + /** The type of this event. The value is `"card.forgotten"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.CardForgottenEventData; +} diff --git a/src/api/types/CardForgottenEventCard.ts b/src/api/types/CardForgottenEventCard.ts new file mode 100644 index 000000000..af07de106 --- /dev/null +++ b/src/api/types/CardForgottenEventCard.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface CardForgottenEventCard { + /** Unique ID for this card. Generated by Square. */ + id?: string; + /** The ID of a customer created using the Customers API associated with the card. */ + customerId?: string | null; + /** Indicates whether or not a card can be used for payments. */ + enabled?: boolean | null; + /** + * 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. + */ + referenceId?: string | null; + /** + * Current version number of the card. Increments with each card update. Requests to update an + * existing Card object will be rejected unless the version in the request matches the current + * version for the Card. + */ + version?: bigint; + /** The ID of the merchant associated with the card. */ + merchantId?: string | null; +} diff --git a/src/api/types/CardForgottenEventData.ts b/src/api/types/CardForgottenEventData.ts new file mode 100644 index 000000000..b6dcb0633 --- /dev/null +++ b/src/api/types/CardForgottenEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface CardForgottenEventData { + /** The type of the event data object. The value is `"card"`. */ + type?: string | null; + /** The ID of the event data object. */ + id?: string; + /** An object containing the forgotten card. */ + object?: Square.CardForgottenEventObject; +} diff --git a/src/api/types/CardForgottenEventObject.ts b/src/api/types/CardForgottenEventObject.ts new file mode 100644 index 000000000..0c49c64d6 --- /dev/null +++ b/src/api/types/CardForgottenEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface CardForgottenEventObject { + /** The forgotten card. */ + card?: Square.CardForgottenEventCard; +} diff --git a/src/api/types/CardUpdatedEvent.ts b/src/api/types/CardUpdatedEvent.ts new file mode 100644 index 000000000..2ac6ab047 --- /dev/null +++ b/src/api/types/CardUpdatedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [card](entity:Card) is updated by the seller in the Square Dashboard. + */ +export interface CardUpdatedEvent { + /** The ID of the target seller associated with the event. */ + merchantId?: string | null; + /** The type of this event. The value is `"card.updated"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.CardUpdatedEventData; +} diff --git a/src/api/types/CardUpdatedEventData.ts b/src/api/types/CardUpdatedEventData.ts new file mode 100644 index 000000000..1185c80fe --- /dev/null +++ b/src/api/types/CardUpdatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface CardUpdatedEventData { + /** The type of the event data object. The value is `"card"`. */ + type?: string | null; + /** The ID of the event data object. */ + id?: string; + /** An object containing the updated card. */ + object?: Square.CardUpdatedEventObject; +} diff --git a/src/api/types/CardUpdatedEventObject.ts b/src/api/types/CardUpdatedEventObject.ts new file mode 100644 index 000000000..8bf011a65 --- /dev/null +++ b/src/api/types/CardUpdatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface CardUpdatedEventObject { + /** The updated card. */ + card?: Square.Card; +} diff --git a/src/api/types/CatalogVersionUpdatedEvent.ts b/src/api/types/CatalogVersionUpdatedEvent.ts new file mode 100644 index 000000000..d7cf3d759 --- /dev/null +++ b/src/api/types/CatalogVersionUpdatedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when the catalog is updated. + */ +export interface CatalogVersionUpdatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.CatalogVersionUpdatedEventData; +} diff --git a/src/api/types/CatalogVersionUpdatedEventCatalogVersion.ts b/src/api/types/CatalogVersionUpdatedEventCatalogVersion.ts new file mode 100644 index 000000000..917e5cf61 --- /dev/null +++ b/src/api/types/CatalogVersionUpdatedEventCatalogVersion.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface CatalogVersionUpdatedEventCatalogVersion { + /** Last modification timestamp in RFC 3339 format. */ + updatedAt?: string; +} diff --git a/src/api/types/CatalogVersionUpdatedEventData.ts b/src/api/types/CatalogVersionUpdatedEventData.ts new file mode 100644 index 000000000..c554fd6ee --- /dev/null +++ b/src/api/types/CatalogVersionUpdatedEventData.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface CatalogVersionUpdatedEventData { + /** Name of the affected object’s type. */ + type?: string | null; + /** An object containing fields and values relevant to the event. Is absent if affected object was deleted. */ + object?: Square.CatalogVersionUpdatedEventObject; +} diff --git a/src/api/types/CatalogVersionUpdatedEventObject.ts b/src/api/types/CatalogVersionUpdatedEventObject.ts new file mode 100644 index 000000000..d2ee6eaa8 --- /dev/null +++ b/src/api/types/CatalogVersionUpdatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface CatalogVersionUpdatedEventObject { + /** The version of the object. */ + catalogVersion?: Square.CatalogVersionUpdatedEventCatalogVersion; +} diff --git a/src/api/types/CustomAttributeDefinitionEventData.ts b/src/api/types/CustomAttributeDefinitionEventData.ts new file mode 100644 index 000000000..d128a0008 --- /dev/null +++ b/src/api/types/CustomAttributeDefinitionEventData.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Represents an object in the CustomAttributeDefinition event notification + * payload that contains the affected custom attribute definition. + */ +export interface CustomAttributeDefinitionEventData { + /** The type of the event data object. The value is `"custom_attribute_definition"`. */ + type?: string | null; + /** The ID of the event data object. */ + id?: string; + /** An object containing the custom attribute definition. */ + object?: Square.CustomAttributeDefinitionEventDataObject; +} diff --git a/src/api/types/CustomAttributeDefinitionEventDataObject.ts b/src/api/types/CustomAttributeDefinitionEventDataObject.ts new file mode 100644 index 000000000..597e74c37 --- /dev/null +++ b/src/api/types/CustomAttributeDefinitionEventDataObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface CustomAttributeDefinitionEventDataObject { + /** The custom attribute definition. */ + customAttributeDefinition?: Square.CustomAttributeDefinition; +} diff --git a/src/api/types/CustomAttributeEventData.ts b/src/api/types/CustomAttributeEventData.ts new file mode 100644 index 000000000..ff4eba0ac --- /dev/null +++ b/src/api/types/CustomAttributeEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface CustomAttributeEventData { + /** The type of the event data object. The value is `"custom_attribute"`. */ + type?: string | null; + /** The ID of the event data object. */ + id?: string; + /** An object containing the custom attribute. */ + object?: Square.CustomAttributeEventDataObject; +} diff --git a/src/api/types/CustomAttributeEventDataObject.ts b/src/api/types/CustomAttributeEventDataObject.ts new file mode 100644 index 000000000..fe08aa765 --- /dev/null +++ b/src/api/types/CustomAttributeEventDataObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface CustomAttributeEventDataObject { + /** The custom attribute. */ + customAttribute?: Square.CustomAttribute; +} diff --git a/src/api/types/CustomerCreatedEvent.ts b/src/api/types/CustomerCreatedEvent.ts new file mode 100644 index 000000000..d990529e3 --- /dev/null +++ b/src/api/types/CustomerCreatedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [customer](entity:Customer) is created. Subscribe to this event to track customer profiles affected by a merge operation. + * For more information, see [Use Customer Webhooks](https://developer.squareup.com/docs/customers-api/use-the-api/customer-webhooks). + * + * The `customer` object in the event notification does not include the `segment_ids` field. + */ +export interface CustomerCreatedEvent { + /** The ID of the seller associated with the event. */ + merchantId?: string | null; + /** The type of event. For this object, the value is `customer.created`. */ + type?: string | null; + /** The unique ID of the event, which is used for [idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.CustomerCreatedEventData; +} diff --git a/src/api/types/CustomerCreatedEventData.ts b/src/api/types/CustomerCreatedEventData.ts new file mode 100644 index 000000000..b5462a273 --- /dev/null +++ b/src/api/types/CustomerCreatedEventData.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * The data associated with the event. + */ +export interface CustomerCreatedEventData { + /** The type of object affected by the event. For this event, the value is `customer`. */ + type?: string | null; + /** The ID of the new customer. */ + id?: string; + /** An object that contains the new customer. */ + object?: Square.CustomerCreatedEventObject; +} diff --git a/src/api/types/CustomerCreatedEventEventContext.ts b/src/api/types/CustomerCreatedEventEventContext.ts new file mode 100644 index 000000000..cffb661e6 --- /dev/null +++ b/src/api/types/CustomerCreatedEventEventContext.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Information about the change that triggered the event. + */ +export interface CustomerCreatedEventEventContext { + /** Information about the merge operation associated with the event. */ + merge?: Square.CustomerCreatedEventEventContextMerge; +} diff --git a/src/api/types/CustomerCreatedEventEventContextMerge.ts b/src/api/types/CustomerCreatedEventEventContextMerge.ts new file mode 100644 index 000000000..2fc291518 --- /dev/null +++ b/src/api/types/CustomerCreatedEventEventContextMerge.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * Information about a merge operation, which creates a new customer using aggregated properties from two or more existing customers. + */ +export interface CustomerCreatedEventEventContextMerge { + /** The IDs of the existing customers that were merged and then deleted. */ + fromCustomerIds?: string[] | null; + /** The ID of the new customer created by the merge. */ + toCustomerId?: string | null; +} diff --git a/src/api/types/CustomerCreatedEventObject.ts b/src/api/types/CustomerCreatedEventObject.ts new file mode 100644 index 000000000..123408329 --- /dev/null +++ b/src/api/types/CustomerCreatedEventObject.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * An object that contains the customer associated with the event. + */ +export interface CustomerCreatedEventObject { + /** The new customer. */ + customer?: Square.Customer; + /** Information about the change that triggered the event. This field is returned only if the customer is created by a merge operation. */ + eventContext?: Square.CustomerCreatedEventEventContext; +} diff --git a/src/api/types/CustomerCustomAttributeDefinitionCreatedEvent.ts b/src/api/types/CustomerCustomAttributeDefinitionCreatedEvent.ts new file mode 100644 index 000000000..b7d19dab5 --- /dev/null +++ b/src/api/types/CustomerCustomAttributeDefinitionCreatedEvent.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a customer [custom attribute definition](entity:CustomAttributeDefinition) + * is created by the subscribing application. + * + * This event is replaced by + * [customer.custom_attribute_definition.owned.created](webhook:customer.custom_attribute_definition.owned.created). + */ +export interface CustomerCustomAttributeDefinitionCreatedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"customer.custom_attribute_definition.created"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/CustomerCustomAttributeDefinitionCreatedPublicEvent.ts b/src/api/types/CustomerCustomAttributeDefinitionCreatedPublicEvent.ts new file mode 100644 index 000000000..e1226f9d7 --- /dev/null +++ b/src/api/types/CustomerCustomAttributeDefinitionCreatedPublicEvent.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a customer [custom attribute definition](entity:CustomAttributeDefinition) + * that is visible to all applications is created. A notification is sent when any application creates a custom + * attribute definition whose `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. + * + * This event is replaced by + * [customer.custom_attribute_definition.visible.created](webhook:customer.custom_attribute_definition.visible.created), + * which applies to custom attribute definitions that are visible to the subscribing application. + */ +export interface CustomerCustomAttributeDefinitionCreatedPublicEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"customer.custom_attribute_definition.public.created"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/CustomerCustomAttributeDefinitionDeletedEvent.ts b/src/api/types/CustomerCustomAttributeDefinitionDeletedEvent.ts new file mode 100644 index 000000000..58b5c9d58 --- /dev/null +++ b/src/api/types/CustomerCustomAttributeDefinitionDeletedEvent.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a customer [custom attribute definition](entity:CustomAttributeDefinition) + * created by the subscribing application is deleted. A custom attribute definition can only be deleted by + * the application that created it. + * + * This event is replaced by + * [customer.custom_attribute_definition.owned.deleted](webhook:customer.custom_attribute_definition.owned.deleted). + */ +export interface CustomerCustomAttributeDefinitionDeletedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"customer.custom_attribute_definition.deleted"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/CustomerCustomAttributeDefinitionDeletedPublicEvent.ts b/src/api/types/CustomerCustomAttributeDefinitionDeletedPublicEvent.ts new file mode 100644 index 000000000..3b1c5fc47 --- /dev/null +++ b/src/api/types/CustomerCustomAttributeDefinitionDeletedPublicEvent.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a customer [custom attribute definition](entity:CustomAttributeDefinition) + * that is visible to all applications is deleted. A notification is sent when any application deletes a custom + * attribute definition whose `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. + * + * This event is replaced by + * [customer.custom_attribute_definition.visible.deleted](webhook:customer.custom_attribute_definition.visible.deleted), + * which applies to custom attribute definitions that are visible to the subscribing application. + */ +export interface CustomerCustomAttributeDefinitionDeletedPublicEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"customer.custom_attribute_definition.public.deleted"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/CustomerCustomAttributeDefinitionOwnedCreatedEvent.ts b/src/api/types/CustomerCustomAttributeDefinitionOwnedCreatedEvent.ts new file mode 100644 index 000000000..4bdd8bdfa --- /dev/null +++ b/src/api/types/CustomerCustomAttributeDefinitionOwnedCreatedEvent.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a customer [custom attribute definition](entity:CustomAttributeDefinition) + * is created by the subscribing application. + */ +export interface CustomerCustomAttributeDefinitionOwnedCreatedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"customer.custom_attribute_definition.owned.created"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/CustomerCustomAttributeDefinitionOwnedDeletedEvent.ts b/src/api/types/CustomerCustomAttributeDefinitionOwnedDeletedEvent.ts new file mode 100644 index 000000000..485f48e57 --- /dev/null +++ b/src/api/types/CustomerCustomAttributeDefinitionOwnedDeletedEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a customer [custom attribute definition](entity:CustomAttributeDefinition) + * created by the subscribing application is deleted. A custom attribute definition can only be deleted by + * the application that created it. + */ +export interface CustomerCustomAttributeDefinitionOwnedDeletedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"customer.custom_attribute_definition.owned.deleted"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/CustomerCustomAttributeDefinitionOwnedUpdatedEvent.ts b/src/api/types/CustomerCustomAttributeDefinitionOwnedUpdatedEvent.ts new file mode 100644 index 000000000..72cf63c0c --- /dev/null +++ b/src/api/types/CustomerCustomAttributeDefinitionOwnedUpdatedEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a customer [custom attribute definition](entity:CustomAttributeDefinition) + * created by the subscribing application is updated. A custom attribute definition can only be updated by + * the application that created it. + */ +export interface CustomerCustomAttributeDefinitionOwnedUpdatedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"customer.custom_attribute_definition.owned.updated"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/CustomerCustomAttributeDefinitionUpdatedEvent.ts b/src/api/types/CustomerCustomAttributeDefinitionUpdatedEvent.ts new file mode 100644 index 000000000..d5fd169b3 --- /dev/null +++ b/src/api/types/CustomerCustomAttributeDefinitionUpdatedEvent.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a customer [custom attribute definition](entity:CustomAttributeDefinition) + * created by the subscribing application is updated. A custom attribute definition can only be updated by + * the application that created it. + * + * This event is replaced by + * [customer.custom_attribute_definition.owned.updated](webhook:customer.custom_attribute_definition.owned.updated). + */ +export interface CustomerCustomAttributeDefinitionUpdatedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"customer.custom_attribute_definition.updated"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/CustomerCustomAttributeDefinitionUpdatedPublicEvent.ts b/src/api/types/CustomerCustomAttributeDefinitionUpdatedPublicEvent.ts new file mode 100644 index 000000000..b457074b0 --- /dev/null +++ b/src/api/types/CustomerCustomAttributeDefinitionUpdatedPublicEvent.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a customer [custom attribute definition](entity:CustomAttributeDefinition) + * that is visible to all applications is updated. A notification is sent when any application updates a custom + * attribute definition whose `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. + * + * This event is replaced by + * [customer.custom_attribute_definition.visible.updated](webhook:customer.custom_attribute_definition.visible.updated), + * which applies to custom attribute definitions that are visible to the subscribing application. + */ +export interface CustomerCustomAttributeDefinitionUpdatedPublicEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"customer.custom_attribute_definition.public.updated"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/CustomerCustomAttributeDefinitionVisibleCreatedEvent.ts b/src/api/types/CustomerCustomAttributeDefinitionVisibleCreatedEvent.ts new file mode 100644 index 000000000..a5c4e8a57 --- /dev/null +++ b/src/api/types/CustomerCustomAttributeDefinitionVisibleCreatedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a customer [custom attribute definition](entity:CustomAttributeDefinition) + * that is visible to the subscribing application is created. A notification is sent when your application + * creates a custom attribute definition or another application creates a custom attribute definition whose + * `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. + */ +export interface CustomerCustomAttributeDefinitionVisibleCreatedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"customer.custom_attribute_definition.visible.created"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/CustomerCustomAttributeDefinitionVisibleDeletedEvent.ts b/src/api/types/CustomerCustomAttributeDefinitionVisibleDeletedEvent.ts new file mode 100644 index 000000000..9f69e1548 --- /dev/null +++ b/src/api/types/CustomerCustomAttributeDefinitionVisibleDeletedEvent.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a customer [custom attribute definition](entity:CustomAttributeDefinition) + * that is visible to the subscribing application is deleted. A custom attribute definition can only be deleted + * by the application that created it. A notification is sent when your application deletes a custom attribute + * definition or when another application deletes a custom attribute definition whose `visibility` is + * `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. + */ +export interface CustomerCustomAttributeDefinitionVisibleDeletedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"customer.custom_attribute_definition.visible.deleted"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/CustomerCustomAttributeDefinitionVisibleUpdatedEvent.ts b/src/api/types/CustomerCustomAttributeDefinitionVisibleUpdatedEvent.ts new file mode 100644 index 000000000..0f6ca331c --- /dev/null +++ b/src/api/types/CustomerCustomAttributeDefinitionVisibleUpdatedEvent.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a customer [custom attribute definition](entity:CustomAttributeDefinition) + * that is visible to the subscribing application is updated. A custom attribute definition can only be updated + * by the application that created it. A notification is sent when your application updates a custom + * attribute definition or when another application updates a custom attribute definition whose `visibility` is + * `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. + */ +export interface CustomerCustomAttributeDefinitionVisibleUpdatedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"customer.custom_attribute_definition.visible.updated"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/CustomerCustomAttributeDeletedEvent.ts b/src/api/types/CustomerCustomAttributeDeletedEvent.ts new file mode 100644 index 000000000..67472d51f --- /dev/null +++ b/src/api/types/CustomerCustomAttributeDeletedEvent.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a customer [custom attribute](entity:CustomAttribute) owned by the + * subscribing application is deleted. Custom attributes are owned by the application that created the + * corresponding [custom attribute definition](entity:CustomAttributeDefinition). Custom attributes whose + * `visibility` is `VISIBILITY_READ_WRITE_VALUES` can be deleted by any application. + * + * This event is replaced by + * [customer.custom_attribute.owned.deleted](webhook:customer.custom_attribute.owned.deleted). + */ +export interface CustomerCustomAttributeDeletedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"customer.custom_attribute.deleted"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeEventData; +} diff --git a/src/api/types/CustomerCustomAttributeDeletedPublicEvent.ts b/src/api/types/CustomerCustomAttributeDeletedPublicEvent.ts new file mode 100644 index 000000000..905861835 --- /dev/null +++ b/src/api/types/CustomerCustomAttributeDeletedPublicEvent.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a customer [custom attribute](entity:CustomAttribute) that is visible + * to all applications is deleted. A notification is sent when any application deletes a custom attribute + * whose `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. + * + * This event is replaced by + * [customer.custom_attribute.visible.deleted](webhook:customer.custom_attribute.visible.deleted), + * which applies to custom attributes that are visible to the subscribing application. + */ +export interface CustomerCustomAttributeDeletedPublicEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"customer.custom_attribute.public.deleted"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeEventData; +} diff --git a/src/api/types/CustomerCustomAttributeOwnedDeletedEvent.ts b/src/api/types/CustomerCustomAttributeOwnedDeletedEvent.ts new file mode 100644 index 000000000..e2d18f053 --- /dev/null +++ b/src/api/types/CustomerCustomAttributeOwnedDeletedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a customer [custom attribute](entity:CustomAttribute) owned by the + * subscribing application is deleted. Custom attributes are owned by the application that created the + * corresponding [custom attribute definition](entity:CustomAttributeDefinition). Custom attributes whose + * `visibility` is `VISIBILITY_READ_WRITE_VALUES` can be deleted by any application. + */ +export interface CustomerCustomAttributeOwnedDeletedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"customer.custom_attribute.owned.deleted"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeEventData; +} diff --git a/src/api/types/CustomerCustomAttributeOwnedUpdatedEvent.ts b/src/api/types/CustomerCustomAttributeOwnedUpdatedEvent.ts new file mode 100644 index 000000000..307c5c9d7 --- /dev/null +++ b/src/api/types/CustomerCustomAttributeOwnedUpdatedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a customer [custom attribute](entity:CustomAttribute) owned by the + * subscribing application is created or updated. Custom attributes are owned by the application that created + * the corresponding [custom attribute definition](entity:CustomAttributeDefinition). Custom attributes whose + * `visibility` is `VISIBILITY_READ_WRITE_VALUES` can be created or updated by any application. + */ +export interface CustomerCustomAttributeOwnedUpdatedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"customer.custom_attribute.owned.updated"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeEventData; +} diff --git a/src/api/types/CustomerCustomAttributeUpdatedEvent.ts b/src/api/types/CustomerCustomAttributeUpdatedEvent.ts new file mode 100644 index 000000000..d426f098f --- /dev/null +++ b/src/api/types/CustomerCustomAttributeUpdatedEvent.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a customer [custom attribute](entity:CustomAttribute) owned by the + * subscribing application is created or updated. Custom attributes are owned by the application that created + * the corresponding [custom attribute definition](entity:CustomAttributeDefinition). Custom attributes whose + * `visibility` is `VISIBILITY_READ_WRITE_VALUES` can be created or updated by any application. + * + * This event is replaced by + * [customer.custom_attribute.owned.updated](webhook:customer.custom_attribute.owned.updated). + */ +export interface CustomerCustomAttributeUpdatedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"customer.custom_attribute.updated"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeEventData; +} diff --git a/src/api/types/CustomerCustomAttributeUpdatedPublicEvent.ts b/src/api/types/CustomerCustomAttributeUpdatedPublicEvent.ts new file mode 100644 index 000000000..c4f4819e3 --- /dev/null +++ b/src/api/types/CustomerCustomAttributeUpdatedPublicEvent.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a customer [custom attribute](entity:CustomAttribute) that is visible + * to all applications is created or updated. A notification is sent when any application creates or updates + * a custom attribute whose `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. + * + * This event is replaced by + * [customer.custom_attribute.visible.updated](webhook:customer.custom_attribute.visible.updated), + * which applies to custom attributes that are visible to the subscribing application. + */ +export interface CustomerCustomAttributeUpdatedPublicEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"customer.custom_attribute.public.updated"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeEventData; +} diff --git a/src/api/types/CustomerCustomAttributeVisibleDeletedEvent.ts b/src/api/types/CustomerCustomAttributeVisibleDeletedEvent.ts new file mode 100644 index 000000000..1a12c2c3d --- /dev/null +++ b/src/api/types/CustomerCustomAttributeVisibleDeletedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a customer [custom attribute](entity:CustomAttribute) that is visible to the + * subscribing application is deleted. A notification is sent when: + * - Your application deletes a custom attribute owned by your application, regardless of the `visibility` setting. + * - Any application deletes a custom attribute whose `visibility` is `VISIBILITY_READ_ONLY` + * or `VISIBILITY_READ_WRITE_VALUES`. + * + * Custom attributes set to `VISIBILITY_READ_WRITE_VALUES` can be deleted by any application, but those set to + * `VISIBILITY_READ_ONLY` or `VISIBILITY_HIDDEN` can only be deleted by the owner. Custom attributes are owned + * by the application that created the corresponding [custom attribute definition](entity:CustomAttributeDefinition). + */ +export interface CustomerCustomAttributeVisibleDeletedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"customer.custom_attribute.visible.deleted"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeEventData; +} diff --git a/src/api/types/CustomerCustomAttributeVisibleUpdatedEvent.ts b/src/api/types/CustomerCustomAttributeVisibleUpdatedEvent.ts new file mode 100644 index 000000000..151a94dac --- /dev/null +++ b/src/api/types/CustomerCustomAttributeVisibleUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a customer [custom attribute](entity:CustomAttribute) that is visible to the + * subscribing application is created or updated. A notification is sent when: + * - Your application creates or updates a custom attribute owned by your application, regardless of the `visibility` setting. + * - Any application creates or updates a custom attribute whose `visibility` is `VISIBILITY_READ_ONLY` + * or `VISIBILITY_READ_WRITE_VALUES`. + * + * Custom attributes set to `VISIBILITY_READ_WRITE_VALUES` can be created or updated by any application, but those set to + * `VISIBILITY_READ_ONLY` or `VISIBILITY_HIDDEN` can only be created or updated by the owner. Custom attributes are owned + * by the application that created the corresponding [custom attribute definition](entity:CustomAttributeDefinition). + */ +export interface CustomerCustomAttributeVisibleUpdatedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"customer.custom_attribute.visible.updated"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeEventData; +} diff --git a/src/api/types/CustomerDeletedEvent.ts b/src/api/types/CustomerDeletedEvent.ts new file mode 100644 index 000000000..6b4f4a606 --- /dev/null +++ b/src/api/types/CustomerDeletedEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [customer](entity:Customer) is deleted. For more information, see [Use Customer Webhooks](https://developer.squareup.com/docs/customers-api/use-the-api/customer-webhooks). + * + * The `customer` object in the event notification does not include the following fields: `group_ids` and `segment_ids`. + */ +export interface CustomerDeletedEvent { + /** The ID of the seller associated with the event. */ + merchantId?: string | null; + /** The type of event. For this object, the value is `customer.deleted`. */ + type?: string | null; + /** The unique ID of the event, which is used for [idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.CustomerDeletedEventData; +} diff --git a/src/api/types/CustomerDeletedEventData.ts b/src/api/types/CustomerDeletedEventData.ts new file mode 100644 index 000000000..6f163c33e --- /dev/null +++ b/src/api/types/CustomerDeletedEventData.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * The data associated with the event. + */ +export interface CustomerDeletedEventData { + /** The type of object affected by the event. For this event, the value is `customer`. */ + type?: string | null; + /** The ID of the deleted customer. */ + id?: string; + /** An object that contains the deleted customer. */ + object?: Square.CustomerDeletedEventObject; +} diff --git a/src/api/types/CustomerDeletedEventEventContext.ts b/src/api/types/CustomerDeletedEventEventContext.ts new file mode 100644 index 000000000..e9dc77218 --- /dev/null +++ b/src/api/types/CustomerDeletedEventEventContext.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Information about the change that triggered the event. + */ +export interface CustomerDeletedEventEventContext { + /** Information about the merge operation associated with the event. */ + merge?: Square.CustomerDeletedEventEventContextMerge; +} diff --git a/src/api/types/CustomerDeletedEventEventContextMerge.ts b/src/api/types/CustomerDeletedEventEventContextMerge.ts new file mode 100644 index 000000000..edab8c7f9 --- /dev/null +++ b/src/api/types/CustomerDeletedEventEventContextMerge.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * Information about a merge operation, which creates a new customer using aggregated properties from two or more existing customers. + */ +export interface CustomerDeletedEventEventContextMerge { + /** The IDs of the existing customers that were merged and then deleted. */ + fromCustomerIds?: string[] | null; + /** The ID of the new customer created by the merge. */ + toCustomerId?: string | null; +} diff --git a/src/api/types/CustomerDeletedEventObject.ts b/src/api/types/CustomerDeletedEventObject.ts new file mode 100644 index 000000000..1e347011a --- /dev/null +++ b/src/api/types/CustomerDeletedEventObject.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * An object that contains the customer associated with the event. + */ +export interface CustomerDeletedEventObject { + /** The deleted customer. */ + customer?: Square.Customer; + /** Information about the change that triggered the event. This field is returned only if the customer is deleted by a merge operation. */ + eventContext?: Square.CustomerDeletedEventEventContext; +} diff --git a/src/api/types/CustomerUpdatedEvent.ts b/src/api/types/CustomerUpdatedEvent.ts new file mode 100644 index 000000000..9bbb4aa96 --- /dev/null +++ b/src/api/types/CustomerUpdatedEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [customer](entity:Customer) is updated. For more information, see [Use Customer Webhooks](https://developer.squareup.com/docs/customers-api/use-the-api/customer-webhooks). + * + * Updates to the 'segment_ids' customer field does not invoke a `customer.updated` event. In addition, the `customer` object in the event notification does not include this field. + */ +export interface CustomerUpdatedEvent { + /** The ID of the seller associated with the event. */ + merchantId?: string | null; + /** The type of event. For this object, the value is `customer.updated`. */ + type?: string | null; + /** The unique ID of the event, which is used for [idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.CustomerUpdatedEventData; +} diff --git a/src/api/types/CustomerUpdatedEventData.ts b/src/api/types/CustomerUpdatedEventData.ts new file mode 100644 index 000000000..143415a30 --- /dev/null +++ b/src/api/types/CustomerUpdatedEventData.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * The data associated with the event. + */ +export interface CustomerUpdatedEventData { + /** The type of object affected by the event. For this event, the value is `customer`. */ + type?: string | null; + /** The ID of the updated customer. */ + id?: string; + /** An object that contains the updated customer. */ + object?: Square.CustomerUpdatedEventObject; +} diff --git a/src/api/types/CustomerUpdatedEventObject.ts b/src/api/types/CustomerUpdatedEventObject.ts new file mode 100644 index 000000000..666d5fa91 --- /dev/null +++ b/src/api/types/CustomerUpdatedEventObject.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * An object that contains the customer associated with the event. + */ +export interface CustomerUpdatedEventObject { + /** The updated customer. */ + customer?: Square.Customer; +} diff --git a/src/api/types/DeviceCodePairedEvent.ts b/src/api/types/DeviceCodePairedEvent.ts new file mode 100644 index 000000000..df8d3398d --- /dev/null +++ b/src/api/types/DeviceCodePairedEvent.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a Square Terminal has been paired with a + * Terminal API client and the device_id of the paired Square Terminal is + * available. + */ +export interface DeviceCodePairedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The ID of the target location associated with the event. */ + locationId?: string | null; + /** The type of event this represents, `"device.code.paired"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** RFC 3339 timestamp of when the event was created. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.DeviceCodePairedEventData; +} diff --git a/src/api/types/DeviceCodePairedEventData.ts b/src/api/types/DeviceCodePairedEventData.ts new file mode 100644 index 000000000..a310beca5 --- /dev/null +++ b/src/api/types/DeviceCodePairedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface DeviceCodePairedEventData { + /** Name of the paired object’s type, `"device_code"`. */ + type?: string | null; + /** ID of the paired device code. */ + id?: string; + /** An object containing the paired device code. */ + object?: Square.DeviceCodePairedEventObject; +} diff --git a/src/api/types/DeviceCodePairedEventObject.ts b/src/api/types/DeviceCodePairedEventObject.ts new file mode 100644 index 000000000..e634cc245 --- /dev/null +++ b/src/api/types/DeviceCodePairedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface DeviceCodePairedEventObject { + /** The created terminal checkout */ + deviceCode?: Square.DeviceCode; +} diff --git a/src/api/types/DeviceCreatedEvent.ts b/src/api/types/DeviceCreatedEvent.ts new file mode 100644 index 000000000..c84998fe9 --- /dev/null +++ b/src/api/types/DeviceCreatedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a Device is created. + */ +export interface DeviceCreatedEvent { + /** The merchant the newly created device belongs to. */ + merchantId?: string | null; + /** The type of event this represents. The value is `"device.created"`. */ + type?: string | null; + /** A UUID that uniquely identifies this device creation event. */ + eventId?: string | null; + /** The time when the device creation event was first created, in RFC 3339 format. */ + createdAt?: string; + /** The metadata associated with the device creation event. */ + data?: Square.DeviceCreatedEventData; +} diff --git a/src/api/types/DeviceCreatedEventData.ts b/src/api/types/DeviceCreatedEventData.ts new file mode 100644 index 000000000..e28b29517 --- /dev/null +++ b/src/api/types/DeviceCreatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface DeviceCreatedEventData { + /** The type of the event data object. The value is `"device"`. */ + type?: string | null; + /** The ID of the device. */ + id?: string; + /** An object containing the created device. */ + object?: Square.DeviceCreatedEventObject; +} diff --git a/src/api/types/DeviceCreatedEventObject.ts b/src/api/types/DeviceCreatedEventObject.ts new file mode 100644 index 000000000..849560516 --- /dev/null +++ b/src/api/types/DeviceCreatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface DeviceCreatedEventObject { + /** The created device. */ + device?: Square.Device; +} diff --git a/src/api/types/DisputeCreatedEvent.ts b/src/api/types/DisputeCreatedEvent.ts new file mode 100644 index 000000000..b9e946c8f --- /dev/null +++ b/src/api/types/DisputeCreatedEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [Dispute](entity:Dispute) is created. + */ +export interface DisputeCreatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The ID of the target location associated with the event. */ + locationId?: string | null; + /** The type of event this represents. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.DisputeCreatedEventData; +} diff --git a/src/api/types/DisputeCreatedEventData.ts b/src/api/types/DisputeCreatedEventData.ts new file mode 100644 index 000000000..e6f6bf112 --- /dev/null +++ b/src/api/types/DisputeCreatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface DisputeCreatedEventData { + /** Name of the affected dispute's type. */ + type?: string | null; + /** ID of the affected dispute. */ + id?: string; + /** An object containing fields and values relevant to the event. */ + object?: Square.DisputeCreatedEventObject; +} diff --git a/src/api/types/DisputeCreatedEventObject.ts b/src/api/types/DisputeCreatedEventObject.ts new file mode 100644 index 000000000..1c12a8303 --- /dev/null +++ b/src/api/types/DisputeCreatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface DisputeCreatedEventObject { + /** The dispute object. */ + object?: Square.Dispute; +} diff --git a/src/api/types/DisputeEvidenceAddedEvent.ts b/src/api/types/DisputeEvidenceAddedEvent.ts new file mode 100644 index 000000000..895c5c6b4 --- /dev/null +++ b/src/api/types/DisputeEvidenceAddedEvent.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when evidence is added to a [Dispute](entity:Dispute) + * from the Disputes Dashboard in the Seller Dashboard, the Square Point of Sale app, + * or by calling either [CreateDisputeEvidenceFile](api-endpoint:Disputes-CreateDisputeEvidenceFile) or [CreateDisputeEvidenceText](api-endpoint:Disputes-CreateDisputeEvidenceText). + */ +export interface DisputeEvidenceAddedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The ID of the target location associated with the event. */ + locationId?: string | null; + /** The type of event this represents. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.DisputeEvidenceAddedEventData; +} diff --git a/src/api/types/DisputeEvidenceAddedEventData.ts b/src/api/types/DisputeEvidenceAddedEventData.ts new file mode 100644 index 000000000..5f6b1fe5d --- /dev/null +++ b/src/api/types/DisputeEvidenceAddedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface DisputeEvidenceAddedEventData { + /** Name of the affected dispute's type. */ + type?: string | null; + /** ID of the affected dispute. */ + id?: string; + /** An object containing fields and values relevant to the event. */ + object?: Square.DisputeEvidenceAddedEventObject; +} diff --git a/src/api/types/DisputeEvidenceAddedEventObject.ts b/src/api/types/DisputeEvidenceAddedEventObject.ts new file mode 100644 index 000000000..08116c916 --- /dev/null +++ b/src/api/types/DisputeEvidenceAddedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface DisputeEvidenceAddedEventObject { + /** The dispute object. */ + object?: Square.Dispute; +} diff --git a/src/api/types/DisputeEvidenceCreatedEvent.ts b/src/api/types/DisputeEvidenceCreatedEvent.ts new file mode 100644 index 000000000..7f08581f3 --- /dev/null +++ b/src/api/types/DisputeEvidenceCreatedEvent.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when evidence is added to a [Dispute](entity:Dispute) + * from the Disputes Dashboard in the Seller Dashboard, the Square Point of Sale app, + * or by calling either [CreateDisputeEvidenceFile](api-endpoint:Disputes-CreateDisputeEvidenceFile) or [CreateDisputeEvidenceText](api-endpoint:Disputes-CreateDisputeEvidenceText). + */ +export interface DisputeEvidenceCreatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The ID of the target location associated with the event. */ + locationId?: string | null; + /** The type of event this represents. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.DisputeEvidenceCreatedEventData; +} diff --git a/src/api/types/DisputeEvidenceCreatedEventData.ts b/src/api/types/DisputeEvidenceCreatedEventData.ts new file mode 100644 index 000000000..bad96233d --- /dev/null +++ b/src/api/types/DisputeEvidenceCreatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface DisputeEvidenceCreatedEventData { + /** Name of the affected dispute's type. */ + type?: string | null; + /** ID of the affected dispute. */ + id?: string; + /** An object containing fields and values relevant to the event. */ + object?: Square.DisputeEvidenceCreatedEventObject; +} diff --git a/src/api/types/DisputeEvidenceCreatedEventObject.ts b/src/api/types/DisputeEvidenceCreatedEventObject.ts new file mode 100644 index 000000000..0255378b7 --- /dev/null +++ b/src/api/types/DisputeEvidenceCreatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface DisputeEvidenceCreatedEventObject { + /** The dispute object. */ + object?: Square.Dispute; +} diff --git a/src/api/types/DisputeEvidenceDeletedEvent.ts b/src/api/types/DisputeEvidenceDeletedEvent.ts new file mode 100644 index 000000000..3c178b634 --- /dev/null +++ b/src/api/types/DisputeEvidenceDeletedEvent.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when evidence is removed from a [Dispute](entity:Dispute) + * from the Disputes Dashboard in the Seller Dashboard, the Square Point of Sale app, + * or by calling [DeleteDisputeEvidence](api-endpoint:Disputes-DeleteDisputeEvidence). + */ +export interface DisputeEvidenceDeletedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The ID of the target location associated with the event. */ + locationId?: string | null; + /** The type of event this represents. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.DisputeEvidenceDeletedEventData; +} diff --git a/src/api/types/DisputeEvidenceDeletedEventData.ts b/src/api/types/DisputeEvidenceDeletedEventData.ts new file mode 100644 index 000000000..d81b1aabf --- /dev/null +++ b/src/api/types/DisputeEvidenceDeletedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface DisputeEvidenceDeletedEventData { + /** Name of the affected dispute's type. */ + type?: string | null; + /** ID of the affected dispute. */ + id?: string; + /** An object containing fields and values relevant to the event. */ + object?: Square.DisputeEvidenceDeletedEventObject; +} diff --git a/src/api/types/DisputeEvidenceDeletedEventObject.ts b/src/api/types/DisputeEvidenceDeletedEventObject.ts new file mode 100644 index 000000000..c6c07882e --- /dev/null +++ b/src/api/types/DisputeEvidenceDeletedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface DisputeEvidenceDeletedEventObject { + /** The dispute object. */ + object?: Square.Dispute; +} diff --git a/src/api/types/DisputeEvidenceRemovedEvent.ts b/src/api/types/DisputeEvidenceRemovedEvent.ts new file mode 100644 index 000000000..d4e31851b --- /dev/null +++ b/src/api/types/DisputeEvidenceRemovedEvent.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when evidence is removed from a [Dispute](entity:Dispute) + * from the Disputes Dashboard in the Seller Dashboard, the Square Point of Sale app, + * or by calling [DeleteDisputeEvidence](api-endpoint:Disputes-DeleteDisputeEvidence). + */ +export interface DisputeEvidenceRemovedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The ID of the target location associated with the event. */ + locationId?: string | null; + /** The type of event this represents. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.DisputeEvidenceRemovedEventData; +} diff --git a/src/api/types/DisputeEvidenceRemovedEventData.ts b/src/api/types/DisputeEvidenceRemovedEventData.ts new file mode 100644 index 000000000..fdbad3646 --- /dev/null +++ b/src/api/types/DisputeEvidenceRemovedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface DisputeEvidenceRemovedEventData { + /** Name of the affected dispute's type. */ + type?: string | null; + /** ID of the affected dispute. */ + id?: string; + /** An object containing fields and values relevant to the event. */ + object?: Square.DisputeEvidenceRemovedEventObject; +} diff --git a/src/api/types/DisputeEvidenceRemovedEventObject.ts b/src/api/types/DisputeEvidenceRemovedEventObject.ts new file mode 100644 index 000000000..4ad892935 --- /dev/null +++ b/src/api/types/DisputeEvidenceRemovedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface DisputeEvidenceRemovedEventObject { + /** The dispute object. */ + object?: Square.Dispute; +} diff --git a/src/api/types/DisputeStateChangedEvent.ts b/src/api/types/DisputeStateChangedEvent.ts new file mode 100644 index 000000000..ed1a0b03b --- /dev/null +++ b/src/api/types/DisputeStateChangedEvent.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when the state of a [Dispute](entity:Dispute) changes. + * This includes the dispute resolution (WON, LOST) reported by the bank. The event + * data includes details of what changed. + */ +export interface DisputeStateChangedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The ID of the target location associated with the event. */ + locationId?: string | null; + /** The type of event this represents. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.DisputeStateChangedEventData; +} diff --git a/src/api/types/DisputeStateChangedEventData.ts b/src/api/types/DisputeStateChangedEventData.ts new file mode 100644 index 000000000..dde8e9f45 --- /dev/null +++ b/src/api/types/DisputeStateChangedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface DisputeStateChangedEventData { + /** Name of the affected dispute's type. */ + type?: string | null; + /** ID of the affected dispute. */ + id?: string; + /** An object containing fields and values relevant to the event. */ + object?: Square.DisputeStateChangedEventObject; +} diff --git a/src/api/types/DisputeStateChangedEventObject.ts b/src/api/types/DisputeStateChangedEventObject.ts new file mode 100644 index 000000000..9166ecb26 --- /dev/null +++ b/src/api/types/DisputeStateChangedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface DisputeStateChangedEventObject { + /** The dispute object. */ + object?: Square.Dispute; +} diff --git a/src/api/types/DisputeStateUpdatedEvent.ts b/src/api/types/DisputeStateUpdatedEvent.ts new file mode 100644 index 000000000..2182af2cf --- /dev/null +++ b/src/api/types/DisputeStateUpdatedEvent.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when the state of a [Dispute](entity:Dispute) changes. + * This includes the dispute resolution (WON, LOST) reported by the bank. The event + * data includes details of what changed. + */ +export interface DisputeStateUpdatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The ID of the target location associated with the event. */ + locationId?: string | null; + /** The type of event this represents. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.DisputeStateUpdatedEventData; +} diff --git a/src/api/types/DisputeStateUpdatedEventData.ts b/src/api/types/DisputeStateUpdatedEventData.ts new file mode 100644 index 000000000..981082463 --- /dev/null +++ b/src/api/types/DisputeStateUpdatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface DisputeStateUpdatedEventData { + /** Name of the affected dispute's type. */ + type?: string | null; + /** ID of the affected dispute. */ + id?: string; + /** An object containing fields and values relevant to the event. */ + object?: Square.DisputeStateUpdatedEventObject; +} diff --git a/src/api/types/DisputeStateUpdatedEventObject.ts b/src/api/types/DisputeStateUpdatedEventObject.ts new file mode 100644 index 000000000..12aa43443 --- /dev/null +++ b/src/api/types/DisputeStateUpdatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface DisputeStateUpdatedEventObject { + /** The dispute object. */ + object?: Square.Dispute; +} diff --git a/src/api/types/EcomVisibility.ts b/src/api/types/EcomVisibility.ts new file mode 100644 index 000000000..aeeec9a94 --- /dev/null +++ b/src/api/types/EcomVisibility.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * Determines item visibility in Ecom (Online Store) and Online Checkout. + */ +export type EcomVisibility = "UNINDEXED" | "UNAVAILABLE" | "HIDDEN" | "VISIBLE"; +export const EcomVisibility = { + Unindexed: "UNINDEXED", + Unavailable: "UNAVAILABLE", + Hidden: "HIDDEN", + Visible: "VISIBLE", +} as const; diff --git a/src/api/types/GetBookingRequest.ts b/src/api/types/GetBookingRequest.ts new file mode 100644 index 000000000..3d13e82c9 --- /dev/null +++ b/src/api/types/GetBookingRequest.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GetBookingRequest = unknown; diff --git a/src/api/types/GetBusinessBookingProfileRequest.ts b/src/api/types/GetBusinessBookingProfileRequest.ts new file mode 100644 index 000000000..aefa167f4 --- /dev/null +++ b/src/api/types/GetBusinessBookingProfileRequest.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GetBusinessBookingProfileRequest = unknown; diff --git a/src/api/types/GetCardRequest.ts b/src/api/types/GetCardRequest.ts new file mode 100644 index 000000000..a24eec96f --- /dev/null +++ b/src/api/types/GetCardRequest.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GetCardRequest = unknown; diff --git a/src/api/types/GetCustomerGroupRequest.ts b/src/api/types/GetCustomerGroupRequest.ts new file mode 100644 index 000000000..7511737ba --- /dev/null +++ b/src/api/types/GetCustomerGroupRequest.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GetCustomerGroupRequest = unknown; diff --git a/src/api/types/GetCustomerRequest.ts b/src/api/types/GetCustomerRequest.ts new file mode 100644 index 000000000..aa6515c1b --- /dev/null +++ b/src/api/types/GetCustomerRequest.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GetCustomerRequest = unknown; diff --git a/src/api/types/GetCustomerSegmentRequest.ts b/src/api/types/GetCustomerSegmentRequest.ts new file mode 100644 index 000000000..548e71c69 --- /dev/null +++ b/src/api/types/GetCustomerSegmentRequest.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GetCustomerSegmentRequest = unknown; diff --git a/src/api/types/GetDisputeEvidenceRequest.ts b/src/api/types/GetDisputeEvidenceRequest.ts new file mode 100644 index 000000000..7bab2adc2 --- /dev/null +++ b/src/api/types/GetDisputeEvidenceRequest.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GetDisputeEvidenceRequest = unknown; diff --git a/src/api/types/GetDisputeRequest.ts b/src/api/types/GetDisputeRequest.ts new file mode 100644 index 000000000..d41f72517 --- /dev/null +++ b/src/api/types/GetDisputeRequest.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GetDisputeRequest = unknown; diff --git a/src/api/types/GetEmployeeRequest.ts b/src/api/types/GetEmployeeRequest.ts new file mode 100644 index 000000000..a85cb2cfc --- /dev/null +++ b/src/api/types/GetEmployeeRequest.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GetEmployeeRequest = unknown; diff --git a/src/api/types/GetGiftCardRequest.ts b/src/api/types/GetGiftCardRequest.ts new file mode 100644 index 000000000..d4632f78c --- /dev/null +++ b/src/api/types/GetGiftCardRequest.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GetGiftCardRequest = unknown; diff --git a/src/api/types/GetInventoryAdjustmentRequest.ts b/src/api/types/GetInventoryAdjustmentRequest.ts new file mode 100644 index 000000000..2b69c2f4d --- /dev/null +++ b/src/api/types/GetInventoryAdjustmentRequest.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GetInventoryAdjustmentRequest = unknown; diff --git a/src/api/types/GetInventoryPhysicalCountRequest.ts b/src/api/types/GetInventoryPhysicalCountRequest.ts new file mode 100644 index 000000000..4e423b2a8 --- /dev/null +++ b/src/api/types/GetInventoryPhysicalCountRequest.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GetInventoryPhysicalCountRequest = unknown; diff --git a/src/api/types/GetInventoryTransferRequest.ts b/src/api/types/GetInventoryTransferRequest.ts new file mode 100644 index 000000000..91ff3d2c4 --- /dev/null +++ b/src/api/types/GetInventoryTransferRequest.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GetInventoryTransferRequest = unknown; diff --git a/src/api/types/GetLocationRequest.ts b/src/api/types/GetLocationRequest.ts new file mode 100644 index 000000000..ba6883ff1 --- /dev/null +++ b/src/api/types/GetLocationRequest.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GetLocationRequest = unknown; diff --git a/src/api/types/GetLoyaltyAccountRequest.ts b/src/api/types/GetLoyaltyAccountRequest.ts new file mode 100644 index 000000000..4c4b168fe --- /dev/null +++ b/src/api/types/GetLoyaltyAccountRequest.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GetLoyaltyAccountRequest = unknown; diff --git a/src/api/types/GetLoyaltyProgramRequest.ts b/src/api/types/GetLoyaltyProgramRequest.ts new file mode 100644 index 000000000..dd7259869 --- /dev/null +++ b/src/api/types/GetLoyaltyProgramRequest.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GetLoyaltyProgramRequest = unknown; diff --git a/src/api/types/GetLoyaltyPromotionRequest.ts b/src/api/types/GetLoyaltyPromotionRequest.ts new file mode 100644 index 000000000..4817ea7a7 --- /dev/null +++ b/src/api/types/GetLoyaltyPromotionRequest.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GetLoyaltyPromotionRequest = unknown; diff --git a/src/api/types/GetLoyaltyRewardRequest.ts b/src/api/types/GetLoyaltyRewardRequest.ts new file mode 100644 index 000000000..6cae255b6 --- /dev/null +++ b/src/api/types/GetLoyaltyRewardRequest.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GetLoyaltyRewardRequest = unknown; diff --git a/src/api/types/GetMerchantRequest.ts b/src/api/types/GetMerchantRequest.ts new file mode 100644 index 000000000..21042b11b --- /dev/null +++ b/src/api/types/GetMerchantRequest.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GetMerchantRequest = unknown; diff --git a/src/api/types/GetOrderRequest.ts b/src/api/types/GetOrderRequest.ts new file mode 100644 index 000000000..afbc2cb24 --- /dev/null +++ b/src/api/types/GetOrderRequest.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GetOrderRequest = unknown; diff --git a/src/api/types/GetPaymentLinkRequest.ts b/src/api/types/GetPaymentLinkRequest.ts new file mode 100644 index 000000000..6997b357e --- /dev/null +++ b/src/api/types/GetPaymentLinkRequest.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GetPaymentLinkRequest = unknown; diff --git a/src/api/types/GetSnippetRequest.ts b/src/api/types/GetSnippetRequest.ts new file mode 100644 index 000000000..ae27a6a6e --- /dev/null +++ b/src/api/types/GetSnippetRequest.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GetSnippetRequest = unknown; diff --git a/src/api/types/GetTeamMemberBookingProfileRequest.ts b/src/api/types/GetTeamMemberBookingProfileRequest.ts new file mode 100644 index 000000000..63c0e3f3e --- /dev/null +++ b/src/api/types/GetTeamMemberBookingProfileRequest.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GetTeamMemberBookingProfileRequest = unknown; diff --git a/src/api/types/GetTeamMemberRequest.ts b/src/api/types/GetTeamMemberRequest.ts new file mode 100644 index 000000000..c19ab9437 --- /dev/null +++ b/src/api/types/GetTeamMemberRequest.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GetTeamMemberRequest = unknown; diff --git a/src/api/types/GetTransactionRequest.ts b/src/api/types/GetTransactionRequest.ts new file mode 100644 index 000000000..2e5fc36c7 --- /dev/null +++ b/src/api/types/GetTransactionRequest.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GetTransactionRequest = unknown; diff --git a/src/api/types/GetVendorRequest.ts b/src/api/types/GetVendorRequest.ts new file mode 100644 index 000000000..96956cd9b --- /dev/null +++ b/src/api/types/GetVendorRequest.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GetVendorRequest = unknown; diff --git a/src/api/types/GetWageSettingRequest.ts b/src/api/types/GetWageSettingRequest.ts new file mode 100644 index 000000000..befc636af --- /dev/null +++ b/src/api/types/GetWageSettingRequest.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GetWageSettingRequest = unknown; diff --git a/src/api/types/GetWebhookSubscriptionRequest.ts b/src/api/types/GetWebhookSubscriptionRequest.ts new file mode 100644 index 000000000..94e94c97b --- /dev/null +++ b/src/api/types/GetWebhookSubscriptionRequest.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GetWebhookSubscriptionRequest = unknown; diff --git a/src/api/types/GiftCardActivityCreatedEvent.ts b/src/api/types/GiftCardActivityCreatedEvent.ts new file mode 100644 index 000000000..0bb4409dc --- /dev/null +++ b/src/api/types/GiftCardActivityCreatedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [gift card activity](entity:GiftCardActivity) is created. + */ +export interface GiftCardActivityCreatedEvent { + /** The ID of the Square seller associated with the event. */ + merchantId?: string | null; + /** The type of event. For this event, the value is `gift_card.activity.created`. */ + type?: string | null; + /** + * The unique ID of the event, which is used for + * [idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.GiftCardActivityCreatedEventData; +} diff --git a/src/api/types/GiftCardActivityCreatedEventData.ts b/src/api/types/GiftCardActivityCreatedEventData.ts new file mode 100644 index 000000000..7b92234e8 --- /dev/null +++ b/src/api/types/GiftCardActivityCreatedEventData.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Represents the data associated with a `gift_card.activity.created` event. + */ +export interface GiftCardActivityCreatedEventData { + /** The type of object affected by the event. For this event, the value is `gift_card_activity`. */ + type?: string | null; + /** The ID of the new gift card activity. */ + id?: string; + /** An object that contains the new gift card activity. */ + object?: Square.GiftCardActivityCreatedEventObject; +} diff --git a/src/api/types/GiftCardActivityCreatedEventObject.ts b/src/api/types/GiftCardActivityCreatedEventObject.ts new file mode 100644 index 000000000..fe1ca38ff --- /dev/null +++ b/src/api/types/GiftCardActivityCreatedEventObject.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * An object that contains the gift card activity associated with a + * `gift_card.activity.created` event. + */ +export interface GiftCardActivityCreatedEventObject { + /** The new gift card activity. */ + giftCardActivity?: Square.GiftCardActivity; +} diff --git a/src/api/types/GiftCardActivityUpdatedEvent.ts b/src/api/types/GiftCardActivityUpdatedEvent.ts new file mode 100644 index 000000000..f693bdab8 --- /dev/null +++ b/src/api/types/GiftCardActivityUpdatedEvent.ts @@ -0,0 +1,28 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [gift card activity](entity:GiftCardActivity) is updated. + * Subscribe to this event to be notified about the following changes: + * - An update to the `REDEEM` activity for a gift card redemption made from a Square product (such as Square Point of Sale). + * These redemptions are initially assigned a `PENDING` state, but then change to a `COMPLETED` or `CANCELED` state. + * - An update to the `IMPORT` activity for an imported gift card when the balance is later adjusted by Square. + */ +export interface GiftCardActivityUpdatedEvent { + /** The ID of the Square seller associated with the event. */ + merchantId?: string | null; + /** The type of event. For this event, the value is `gift_card.activity.updated`. */ + type?: string | null; + /** + * The unique ID of the event, which is used for + * [idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.GiftCardActivityUpdatedEventData; +} diff --git a/src/api/types/GiftCardActivityUpdatedEventData.ts b/src/api/types/GiftCardActivityUpdatedEventData.ts new file mode 100644 index 000000000..473d79192 --- /dev/null +++ b/src/api/types/GiftCardActivityUpdatedEventData.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * The data associated with a `gift_card.activity.updated` event. + */ +export interface GiftCardActivityUpdatedEventData { + /** The type of object affected by the event. For this event, the value is `gift_card_activity`. */ + type?: string | null; + /** The ID of the updated gift card activity. */ + id?: string; + /** An object that contains the updated gift card activity. */ + object?: Square.GiftCardActivityUpdatedEventObject; +} diff --git a/src/api/types/GiftCardActivityUpdatedEventObject.ts b/src/api/types/GiftCardActivityUpdatedEventObject.ts new file mode 100644 index 000000000..b0f319574 --- /dev/null +++ b/src/api/types/GiftCardActivityUpdatedEventObject.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * An object that contains the gift card activity associated with a + * `gift_card.activity.updated` event. + */ +export interface GiftCardActivityUpdatedEventObject { + /** The updated gift card activity. */ + giftCardActivity?: Square.GiftCardActivity; +} diff --git a/src/api/types/GiftCardCreatedEvent.ts b/src/api/types/GiftCardCreatedEvent.ts new file mode 100644 index 000000000..806cf9e84 --- /dev/null +++ b/src/api/types/GiftCardCreatedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [gift card](entity:GiftCard) is created. + */ +export interface GiftCardCreatedEvent { + /** The ID of the Square seller associated with the event. */ + merchantId?: string | null; + /** The type of event. For this event, the value is `gift_card.created`. */ + type?: string | null; + /** + * The unique ID of the event, which is used for + * [idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.GiftCardCreatedEventData; +} diff --git a/src/api/types/GiftCardCreatedEventData.ts b/src/api/types/GiftCardCreatedEventData.ts new file mode 100644 index 000000000..5377785bb --- /dev/null +++ b/src/api/types/GiftCardCreatedEventData.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * The data associated with a `gift_card.created` event. + */ +export interface GiftCardCreatedEventData { + /** The type of object affected by the event. For this event, the value is `gift_card`. */ + type?: string | null; + /** The ID of the new gift card. */ + id?: string; + /** An object that contains the new gift card. */ + object?: Square.GiftCardCreatedEventObject; +} diff --git a/src/api/types/GiftCardCreatedEventObject.ts b/src/api/types/GiftCardCreatedEventObject.ts new file mode 100644 index 000000000..3b3f72a26 --- /dev/null +++ b/src/api/types/GiftCardCreatedEventObject.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * An object that contains the gift card associated with a `gift_card.created` event. + */ +export interface GiftCardCreatedEventObject { + /** The new gift card. */ + giftCard?: Square.GiftCard; +} diff --git a/src/api/types/GiftCardCustomerLinkedEvent.ts b/src/api/types/GiftCardCustomerLinkedEvent.ts new file mode 100644 index 000000000..81d22c4f2 --- /dev/null +++ b/src/api/types/GiftCardCustomerLinkedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [customer](entity:Customer) is linked to a [gift card](entity:GiftCard). + */ +export interface GiftCardCustomerLinkedEvent { + /** The ID of the Square seller associated with the event. */ + merchantId?: string | null; + /** The type of event. For this event, the value is `gift_card.customer_linked`. */ + type?: string | null; + /** + * The unique ID of the event, which is used for + * [idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.GiftCardCustomerLinkedEventData; +} diff --git a/src/api/types/GiftCardCustomerLinkedEventData.ts b/src/api/types/GiftCardCustomerLinkedEventData.ts new file mode 100644 index 000000000..386681909 --- /dev/null +++ b/src/api/types/GiftCardCustomerLinkedEventData.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * The data associated with a `gift_card.customer_linked` event. + */ +export interface GiftCardCustomerLinkedEventData { + /** The type of object affected by the event. For this event, the value is `gift_card`. */ + type?: string | null; + /** The ID of the updated gift card. */ + id?: string; + /** An object that contains the updated gift card and the ID of the linked customer. */ + object?: Square.GiftCardCustomerLinkedEventObject; +} diff --git a/src/api/types/GiftCardCustomerLinkedEventObject.ts b/src/api/types/GiftCardCustomerLinkedEventObject.ts new file mode 100644 index 000000000..2f0d47889 --- /dev/null +++ b/src/api/types/GiftCardCustomerLinkedEventObject.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * An object that contains the gift card and customer ID associated with a + * `gift_card.customer_linked` event. + */ +export interface GiftCardCustomerLinkedEventObject { + /** The gift card with the updated `customer_ids` field. */ + giftCard?: Square.GiftCard; + /** The ID of the linked [customer](entity:Customer). */ + linkedCustomerId?: string | null; +} diff --git a/src/api/types/GiftCardCustomerUnlinkedEvent.ts b/src/api/types/GiftCardCustomerUnlinkedEvent.ts new file mode 100644 index 000000000..f2e4e6806 --- /dev/null +++ b/src/api/types/GiftCardCustomerUnlinkedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [customer](entity:Customer) is unlinked from a [gift card](entity:GiftCard). + */ +export interface GiftCardCustomerUnlinkedEvent { + /** The ID of the Square seller associated with the event. */ + merchantId?: string | null; + /** The type of event. For this event, the value is `gift_card.customer_unlinked`. */ + type?: string | null; + /** + * The unique ID of the event, which is used for + * [idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.GiftCardCustomerUnlinkedEventData; +} diff --git a/src/api/types/GiftCardCustomerUnlinkedEventData.ts b/src/api/types/GiftCardCustomerUnlinkedEventData.ts new file mode 100644 index 000000000..46aba1266 --- /dev/null +++ b/src/api/types/GiftCardCustomerUnlinkedEventData.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * The data associated with a `gift_card.customer_unlinked` event. + */ +export interface GiftCardCustomerUnlinkedEventData { + /** The type of object affected by the event. For this event, the value is `gift_card`. */ + type?: string | null; + /** The ID of the updated gift card. */ + id?: string; + /** An object that contains the updated gift card and the ID of the unlinked customer. */ + object?: Square.GiftCardCustomerUnlinkedEventObject; +} diff --git a/src/api/types/GiftCardCustomerUnlinkedEventObject.ts b/src/api/types/GiftCardCustomerUnlinkedEventObject.ts new file mode 100644 index 000000000..ede810855 --- /dev/null +++ b/src/api/types/GiftCardCustomerUnlinkedEventObject.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * An object that contains the gift card and the customer ID associated with a + * `gift_card.customer_linked` event. + */ +export interface GiftCardCustomerUnlinkedEventObject { + /** + * The gift card with the updated `customer_ids` field. + * The field is removed if the gift card is not linked to any customers. + */ + giftCard?: Square.GiftCard; + /** The ID of the unlinked [customer](entity:Customer). */ + unlinkedCustomerId?: string | null; +} diff --git a/src/api/types/GiftCardUpdatedEvent.ts b/src/api/types/GiftCardUpdatedEvent.ts new file mode 100644 index 000000000..466c2fb45 --- /dev/null +++ b/src/api/types/GiftCardUpdatedEvent.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [gift card](entity:GiftCard) is updated. This includes + * changes to the state, balance, and customer association. + */ +export interface GiftCardUpdatedEvent { + /** The ID of the Square seller associated with the event. */ + merchantId?: string | null; + /** The type of this event. For this event, the value is `gift_card.updated`. */ + type?: string | null; + /** + * The unique ID of the event, which is used for + * [idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.GiftCardUpdatedEventData; +} diff --git a/src/api/types/GiftCardUpdatedEventData.ts b/src/api/types/GiftCardUpdatedEventData.ts new file mode 100644 index 000000000..96c5db2f1 --- /dev/null +++ b/src/api/types/GiftCardUpdatedEventData.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * The data associated with a `gift_card.updated` event. + */ +export interface GiftCardUpdatedEventData { + /** The type of object affected by the event. For this event, the value is `gift_card`. */ + type?: string | null; + /** The ID of the updated gift card. */ + id?: string; + /** An object that contains the updated gift card. */ + object?: Square.GiftCardUpdatedEventObject; +} diff --git a/src/api/types/GiftCardUpdatedEventObject.ts b/src/api/types/GiftCardUpdatedEventObject.ts new file mode 100644 index 000000000..2b9aa6532 --- /dev/null +++ b/src/api/types/GiftCardUpdatedEventObject.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * An object that contains the gift card associated with a `gift_card.updated` event. + */ +export interface GiftCardUpdatedEventObject { + /** + * The gift card with the updated `balance_money`, `state`, or `customer_ids` field. + * Some events can affect both `balance_money` and `state`. + */ + giftCard?: Square.GiftCard; +} diff --git a/src/api/types/InventoryCountUpdatedEvent.ts b/src/api/types/InventoryCountUpdatedEvent.ts new file mode 100644 index 000000000..6ac19435a --- /dev/null +++ b/src/api/types/InventoryCountUpdatedEvent.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when the quantity is updated for a + * [CatalogItemVariation](entity:CatalogItemVariation). + */ +export interface InventoryCountUpdatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.InventoryCountUpdatedEventData; +} diff --git a/src/api/types/InventoryCountUpdatedEventData.ts b/src/api/types/InventoryCountUpdatedEventData.ts new file mode 100644 index 000000000..b88761e37 --- /dev/null +++ b/src/api/types/InventoryCountUpdatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface InventoryCountUpdatedEventData { + /** Name of the affected object’s type. For this event, the value is `inventory_counts`. */ + type?: string | null; + /** ID of the affected object. */ + id?: string; + /** An object containing fields and values relevant to the event. Is absent if affected object was deleted. */ + object?: Square.InventoryCountUpdatedEventObject; +} diff --git a/src/api/types/InventoryCountUpdatedEventObject.ts b/src/api/types/InventoryCountUpdatedEventObject.ts new file mode 100644 index 000000000..fb145136a --- /dev/null +++ b/src/api/types/InventoryCountUpdatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface InventoryCountUpdatedEventObject { + /** The inventory counts. */ + inventoryCounts?: Square.InventoryCount[] | null; +} diff --git a/src/api/types/InvoiceCanceledEvent.ts b/src/api/types/InvoiceCanceledEvent.ts new file mode 100644 index 000000000..06f8098a4 --- /dev/null +++ b/src/api/types/InvoiceCanceledEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when an [Invoice](entity:Invoice) is canceled. + */ +export interface InvoiceCanceledEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"invoice.canceled"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.InvoiceCanceledEventData; +} diff --git a/src/api/types/InvoiceCanceledEventData.ts b/src/api/types/InvoiceCanceledEventData.ts new file mode 100644 index 000000000..7fc4fffed --- /dev/null +++ b/src/api/types/InvoiceCanceledEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface InvoiceCanceledEventData { + /** Name of the affected object’s type, `"invoice"`. */ + type?: string | null; + /** ID of the affected invoice. */ + id?: string; + /** An object containing the canceled invoice. */ + object?: Square.InvoiceCanceledEventObject; +} diff --git a/src/api/types/InvoiceCanceledEventObject.ts b/src/api/types/InvoiceCanceledEventObject.ts new file mode 100644 index 000000000..887f3ac67 --- /dev/null +++ b/src/api/types/InvoiceCanceledEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface InvoiceCanceledEventObject { + /** The related invoice. */ + invoice?: Square.Invoice; +} diff --git a/src/api/types/InvoiceCreatedEvent.ts b/src/api/types/InvoiceCreatedEvent.ts new file mode 100644 index 000000000..f2e6515aa --- /dev/null +++ b/src/api/types/InvoiceCreatedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when an [Invoice](entity:Invoice) is created. + */ +export interface InvoiceCreatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"invoice.created"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.InvoiceCreatedEventData; +} diff --git a/src/api/types/InvoiceCreatedEventData.ts b/src/api/types/InvoiceCreatedEventData.ts new file mode 100644 index 000000000..21a388170 --- /dev/null +++ b/src/api/types/InvoiceCreatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface InvoiceCreatedEventData { + /** Name of the affected object’s type, `"invoice"`. */ + type?: string | null; + /** ID of the affected invoice. */ + id?: string; + /** An object containing the created invoice. */ + object?: Square.InvoiceCreatedEventObject; +} diff --git a/src/api/types/InvoiceCreatedEventObject.ts b/src/api/types/InvoiceCreatedEventObject.ts new file mode 100644 index 000000000..48de67333 --- /dev/null +++ b/src/api/types/InvoiceCreatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface InvoiceCreatedEventObject { + /** The related invoice. */ + invoice?: Square.Invoice; +} diff --git a/src/api/types/InvoiceDeletedEvent.ts b/src/api/types/InvoiceDeletedEvent.ts new file mode 100644 index 000000000..388a6abb5 --- /dev/null +++ b/src/api/types/InvoiceDeletedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a draft [Invoice](entity:Invoice) is deleted. + */ +export interface InvoiceDeletedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"invoice.deleted"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.InvoiceDeletedEventData; +} diff --git a/src/api/types/InvoiceDeletedEventData.ts b/src/api/types/InvoiceDeletedEventData.ts new file mode 100644 index 000000000..bd53f5ecd --- /dev/null +++ b/src/api/types/InvoiceDeletedEventData.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface InvoiceDeletedEventData { + /** Name of the affected object’s type, `"invoice"`. */ + type?: string | null; + /** ID of the affected invoice. */ + id?: string; + /** Indicates that the invoice was deleted. */ + deleted?: boolean | null; +} diff --git a/src/api/types/InvoicePaymentMadeEvent.ts b/src/api/types/InvoicePaymentMadeEvent.ts new file mode 100644 index 000000000..9f782fddd --- /dev/null +++ b/src/api/types/InvoicePaymentMadeEvent.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a payment that is associated with an [invoice](entity:Invoice) is completed. + * For more information about invoice payments, see [Pay an invoice](https://developer.squareup.com/docs/invoices-api/pay-refund-invoices#pay-invoice). + */ +export interface InvoicePaymentMadeEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"invoice.payment_made"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.InvoicePaymentMadeEventData; +} diff --git a/src/api/types/InvoicePaymentMadeEventData.ts b/src/api/types/InvoicePaymentMadeEventData.ts new file mode 100644 index 000000000..ec74fbf5d --- /dev/null +++ b/src/api/types/InvoicePaymentMadeEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface InvoicePaymentMadeEventData { + /** Name of the affected object’s type, `"invoice"`. */ + type?: string | null; + /** ID of the affected invoice. */ + id?: string; + /** An object containing the invoice that was paid. */ + object?: Square.InvoicePaymentMadeEventObject; +} diff --git a/src/api/types/InvoicePaymentMadeEventObject.ts b/src/api/types/InvoicePaymentMadeEventObject.ts new file mode 100644 index 000000000..71dff4017 --- /dev/null +++ b/src/api/types/InvoicePaymentMadeEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface InvoicePaymentMadeEventObject { + /** The related invoice. */ + invoice?: Square.Invoice; +} diff --git a/src/api/types/InvoicePublishedEvent.ts b/src/api/types/InvoicePublishedEvent.ts new file mode 100644 index 000000000..53b1c9ab2 --- /dev/null +++ b/src/api/types/InvoicePublishedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when an [Invoice](entity:Invoice) transitions from a draft to a non-draft status. + */ +export interface InvoicePublishedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"invoice.published"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.InvoicePublishedEventData; +} diff --git a/src/api/types/InvoicePublishedEventData.ts b/src/api/types/InvoicePublishedEventData.ts new file mode 100644 index 000000000..0087be06c --- /dev/null +++ b/src/api/types/InvoicePublishedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface InvoicePublishedEventData { + /** Name of the affected object’s type, `"invoice"`. */ + type?: string | null; + /** ID of the affected invoice. */ + id?: string; + /** An object containing the published invoice. */ + object?: Square.InvoicePublishedEventObject; +} diff --git a/src/api/types/InvoicePublishedEventObject.ts b/src/api/types/InvoicePublishedEventObject.ts new file mode 100644 index 000000000..3b6d290cb --- /dev/null +++ b/src/api/types/InvoicePublishedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface InvoicePublishedEventObject { + /** The related invoice. */ + invoice?: Square.Invoice; +} diff --git a/src/api/types/InvoiceRefundedEvent.ts b/src/api/types/InvoiceRefundedEvent.ts new file mode 100644 index 000000000..323f4d1e6 --- /dev/null +++ b/src/api/types/InvoiceRefundedEvent.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a refund is applied toward a payment of an [invoice](entity:Invoice). + * For more information about invoice refunds, see [Refund an invoice](https://developer.squareup.com/docs/invoices-api/pay-refund-invoices#refund-invoice). + */ +export interface InvoiceRefundedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"invoice.refunded"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.InvoiceRefundedEventData; +} diff --git a/src/api/types/InvoiceRefundedEventData.ts b/src/api/types/InvoiceRefundedEventData.ts new file mode 100644 index 000000000..a8dcf2de6 --- /dev/null +++ b/src/api/types/InvoiceRefundedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface InvoiceRefundedEventData { + /** Name of the affected object’s type, `"invoice"`. */ + type?: string | null; + /** ID of the affected invoice. */ + id?: string; + /** An object containing the refunded invoice. */ + object?: Square.InvoiceRefundedEventObject; +} diff --git a/src/api/types/InvoiceRefundedEventObject.ts b/src/api/types/InvoiceRefundedEventObject.ts new file mode 100644 index 000000000..9975bfd57 --- /dev/null +++ b/src/api/types/InvoiceRefundedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface InvoiceRefundedEventObject { + /** The related invoice. */ + invoice?: Square.Invoice; +} diff --git a/src/api/types/InvoiceScheduledChargeFailedEvent.ts b/src/api/types/InvoiceScheduledChargeFailedEvent.ts new file mode 100644 index 000000000..a8ea74ed4 --- /dev/null +++ b/src/api/types/InvoiceScheduledChargeFailedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when an automatic scheduled payment for an [Invoice](entity:Invoice) has failed. + */ +export interface InvoiceScheduledChargeFailedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"invoice.scheduled_charge_failed"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.InvoiceScheduledChargeFailedEventData; +} diff --git a/src/api/types/InvoiceScheduledChargeFailedEventData.ts b/src/api/types/InvoiceScheduledChargeFailedEventData.ts new file mode 100644 index 000000000..ba7b88e9d --- /dev/null +++ b/src/api/types/InvoiceScheduledChargeFailedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface InvoiceScheduledChargeFailedEventData { + /** Name of the affected object’s type, `"invoice"`. */ + type?: string | null; + /** ID of the affected invoice. */ + id?: string; + /** An object containing the invoice that experienced the failed scheduled charge. */ + object?: Square.InvoiceScheduledChargeFailedEventObject; +} diff --git a/src/api/types/InvoiceScheduledChargeFailedEventObject.ts b/src/api/types/InvoiceScheduledChargeFailedEventObject.ts new file mode 100644 index 000000000..53871b634 --- /dev/null +++ b/src/api/types/InvoiceScheduledChargeFailedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface InvoiceScheduledChargeFailedEventObject { + /** The related invoice. */ + invoice?: Square.Invoice; +} diff --git a/src/api/types/InvoiceUpdatedEvent.ts b/src/api/types/InvoiceUpdatedEvent.ts new file mode 100644 index 000000000..26e446131 --- /dev/null +++ b/src/api/types/InvoiceUpdatedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when an [Invoice](entity:Invoice) is updated. + */ +export interface InvoiceUpdatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"invoice.updated"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.InvoiceUpdatedEventData; +} diff --git a/src/api/types/InvoiceUpdatedEventData.ts b/src/api/types/InvoiceUpdatedEventData.ts new file mode 100644 index 000000000..666c6f156 --- /dev/null +++ b/src/api/types/InvoiceUpdatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface InvoiceUpdatedEventData { + /** Name of the affected object’s type, `"invoice"`. */ + type?: string | null; + /** ID of the affected invoice. */ + id?: string; + /** An object containing the updated invoice. */ + object?: Square.InvoiceUpdatedEventObject; +} diff --git a/src/api/types/InvoiceUpdatedEventObject.ts b/src/api/types/InvoiceUpdatedEventObject.ts new file mode 100644 index 000000000..743f7b063 --- /dev/null +++ b/src/api/types/InvoiceUpdatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface InvoiceUpdatedEventObject { + /** The related invoice. */ + invoice?: Square.Invoice; +} diff --git a/src/api/types/JobCreatedEvent.ts b/src/api/types/JobCreatedEvent.ts new file mode 100644 index 000000000..886336561 --- /dev/null +++ b/src/api/types/JobCreatedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a Job is created. + */ +export interface JobCreatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"job.created"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.JobCreatedEventData; +} diff --git a/src/api/types/JobCreatedEventData.ts b/src/api/types/JobCreatedEventData.ts new file mode 100644 index 000000000..75849b538 --- /dev/null +++ b/src/api/types/JobCreatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface JobCreatedEventData { + /** Name of the affected object’s type, `"job"`. */ + type?: string | null; + /** ID of the created job. */ + id?: string; + /** An object containing the created job. */ + object?: Square.JobCreatedEventObject; +} diff --git a/src/api/types/JobCreatedEventObject.ts b/src/api/types/JobCreatedEventObject.ts new file mode 100644 index 000000000..b1ff685a5 --- /dev/null +++ b/src/api/types/JobCreatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface JobCreatedEventObject { + /** The created job. */ + job?: Square.Job; +} diff --git a/src/api/types/JobUpdatedEvent.ts b/src/api/types/JobUpdatedEvent.ts new file mode 100644 index 000000000..4fb5b31f5 --- /dev/null +++ b/src/api/types/JobUpdatedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a Job is updated. + */ +export interface JobUpdatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"job.updated"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.JobUpdatedEventData; +} diff --git a/src/api/types/JobUpdatedEventData.ts b/src/api/types/JobUpdatedEventData.ts new file mode 100644 index 000000000..ad8f20cc1 --- /dev/null +++ b/src/api/types/JobUpdatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface JobUpdatedEventData { + /** Name of the affected object’s type, `"job"`. */ + type?: string | null; + /** ID of the updated job. */ + id?: string; + /** An object containing the updated job. */ + object?: Square.JobUpdatedEventObject; +} diff --git a/src/api/types/JobUpdatedEventObject.ts b/src/api/types/JobUpdatedEventObject.ts new file mode 100644 index 000000000..69142b916 --- /dev/null +++ b/src/api/types/JobUpdatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface JobUpdatedEventObject { + /** The updated job. */ + job?: Square.Job; +} diff --git a/src/api/types/LaborScheduledShiftCreatedEvent.ts b/src/api/types/LaborScheduledShiftCreatedEvent.ts new file mode 100644 index 000000000..f77eedcbb --- /dev/null +++ b/src/api/types/LaborScheduledShiftCreatedEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [ScheduledShift](entity:ScheduledShift) is created. + */ +export interface LaborScheduledShiftCreatedEvent { + /** The ID of the merchant associated with the event. */ + merchantId?: string | null; + /** The ID of the location associated with the event. */ + locationId?: string | null; + /** The type of event. For this event, the value is `labor.scheduled_shift.created`. */ + type?: string | null; + /** The unique ID for the event. */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.LaborScheduledShiftCreatedEventData; +} diff --git a/src/api/types/LaborScheduledShiftCreatedEventData.ts b/src/api/types/LaborScheduledShiftCreatedEventData.ts new file mode 100644 index 000000000..f710a9ce6 --- /dev/null +++ b/src/api/types/LaborScheduledShiftCreatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface LaborScheduledShiftCreatedEventData { + /** The type of object affected by the event. For this event, the value is `scheduled_shift`. */ + type?: string | null; + /** The ID of the affected `ScheduledShift`. */ + id?: string; + /** An object containing the affected `ScheduledShift`. */ + object?: Square.LaborScheduledShiftCreatedEventObject; +} diff --git a/src/api/types/LaborScheduledShiftCreatedEventObject.ts b/src/api/types/LaborScheduledShiftCreatedEventObject.ts new file mode 100644 index 000000000..b78cc2241 --- /dev/null +++ b/src/api/types/LaborScheduledShiftCreatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface LaborScheduledShiftCreatedEventObject { + /** The new `ScheduledShift`. */ + scheduledShift?: Square.ScheduledShift; +} diff --git a/src/api/types/LaborScheduledShiftDeletedEvent.ts b/src/api/types/LaborScheduledShiftDeletedEvent.ts new file mode 100644 index 000000000..20af8987c --- /dev/null +++ b/src/api/types/LaborScheduledShiftDeletedEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [ScheduledShift](entity:ScheduledShift) is deleted. + */ +export interface LaborScheduledShiftDeletedEvent { + /** The ID of the merchant associated with the event. */ + merchantId?: string | null; + /** The ID of the location associated with the event. */ + locationId?: string | null; + /** The type of event. For this event, the value is `labor.scheduled_shift.deleted`. */ + type?: string | null; + /** The unique ID for the event. */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.LaborScheduledShiftDeletedEventData; +} diff --git a/src/api/types/LaborScheduledShiftDeletedEventData.ts b/src/api/types/LaborScheduledShiftDeletedEventData.ts new file mode 100644 index 000000000..d948a68a0 --- /dev/null +++ b/src/api/types/LaborScheduledShiftDeletedEventData.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface LaborScheduledShiftDeletedEventData { + /** The type of object affected by the event. For this event, the value is `scheduled_shift`. */ + type?: string | null; + /** The ID of the affected `ScheduledShift`. */ + id?: string; + /** Is true if the affected object was deleted. Otherwise absent. */ + deleted?: boolean | null; +} diff --git a/src/api/types/LaborScheduledShiftPublishedEvent.ts b/src/api/types/LaborScheduledShiftPublishedEvent.ts new file mode 100644 index 000000000..2b03c27ea --- /dev/null +++ b/src/api/types/LaborScheduledShiftPublishedEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [ScheduledShift](entity:ScheduledShift) is published. + */ +export interface LaborScheduledShiftPublishedEvent { + /** The ID of the merchant associated with the event. */ + merchantId?: string | null; + /** The ID of the location associated with the event. */ + locationId?: string | null; + /** The type of event. For this event, the value is `labor.scheduled_shift.published`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.LaborScheduledShiftPublishedEventData; +} diff --git a/src/api/types/LaborScheduledShiftPublishedEventData.ts b/src/api/types/LaborScheduledShiftPublishedEventData.ts new file mode 100644 index 000000000..a837ce599 --- /dev/null +++ b/src/api/types/LaborScheduledShiftPublishedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface LaborScheduledShiftPublishedEventData { + /** The type of object affected by the event. For this event, the value is `scheduled_shift`. */ + type?: string | null; + /** The ID of the affected `ScheduledShift`. */ + id?: string; + /** An object containing the affected `ScheduledShift`. */ + object?: Square.LaborScheduledShiftPublishedEventObject; +} diff --git a/src/api/types/LaborScheduledShiftPublishedEventObject.ts b/src/api/types/LaborScheduledShiftPublishedEventObject.ts new file mode 100644 index 000000000..56f68ace8 --- /dev/null +++ b/src/api/types/LaborScheduledShiftPublishedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface LaborScheduledShiftPublishedEventObject { + /** The published `ScheduledShift`. */ + scheduledShift?: Square.ScheduledShift; +} diff --git a/src/api/types/LaborScheduledShiftUpdatedEvent.ts b/src/api/types/LaborScheduledShiftUpdatedEvent.ts new file mode 100644 index 000000000..ff1177120 --- /dev/null +++ b/src/api/types/LaborScheduledShiftUpdatedEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [ScheduledShift](entity:ScheduledShift) is updated. + */ +export interface LaborScheduledShiftUpdatedEvent { + /** The ID of the merchant associated with the event. */ + merchantId?: string | null; + /** The ID of the location associated with the event. */ + locationId?: string | null; + /** The type of event. For this event, the value is `labor.scheduled_shift.updated`. */ + type?: string | null; + /** The unique ID for the event. */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.LaborScheduledShiftUpdatedEventData; +} diff --git a/src/api/types/LaborScheduledShiftUpdatedEventData.ts b/src/api/types/LaborScheduledShiftUpdatedEventData.ts new file mode 100644 index 000000000..10a6bfebd --- /dev/null +++ b/src/api/types/LaborScheduledShiftUpdatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface LaborScheduledShiftUpdatedEventData { + /** The type of object affected by the event. For this event, the value is `scheduled_shift`. */ + type?: string | null; + /** The ID of the affected `ScheduledShift`. */ + id?: string; + /** An object containing the affected `ScheduledShift`. */ + object?: Square.LaborScheduledShiftUpdatedEventObject; +} diff --git a/src/api/types/LaborScheduledShiftUpdatedEventObject.ts b/src/api/types/LaborScheduledShiftUpdatedEventObject.ts new file mode 100644 index 000000000..726c1cb02 --- /dev/null +++ b/src/api/types/LaborScheduledShiftUpdatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface LaborScheduledShiftUpdatedEventObject { + /** The updated `ScheduledShift`. */ + scheduledShift?: Square.ScheduledShift; +} diff --git a/src/api/types/LaborShiftCreatedEvent.ts b/src/api/types/LaborShiftCreatedEvent.ts new file mode 100644 index 000000000..50f481c25 --- /dev/null +++ b/src/api/types/LaborShiftCreatedEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a worker starts a [Shift](entity:Shift). + * + * Deprecated at Square API version 2025-05-21. Replaced by `labor.timecard.created`. + */ +export interface LaborShiftCreatedEvent { + /** The ID of the merchant associated with the event. */ + merchantId?: string | null; + /** The type of event. For this event, the value is `labor.shift.created`. */ + type?: string | null; + /** The unique ID for the event. */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.LaborShiftCreatedEventData; +} diff --git a/src/api/types/LaborShiftCreatedEventData.ts b/src/api/types/LaborShiftCreatedEventData.ts new file mode 100644 index 000000000..59b9bfbcf --- /dev/null +++ b/src/api/types/LaborShiftCreatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface LaborShiftCreatedEventData { + /** The type of object affected by the event. For this event, the value is `shift`. */ + type?: string | null; + /** The ID of the affected `Shift`. */ + id?: string; + /** An object containing the affected `Shift`. */ + object?: Square.LaborShiftCreatedEventObject; +} diff --git a/src/api/types/LaborShiftCreatedEventObject.ts b/src/api/types/LaborShiftCreatedEventObject.ts new file mode 100644 index 000000000..b5d179491 --- /dev/null +++ b/src/api/types/LaborShiftCreatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface LaborShiftCreatedEventObject { + /** The new `Shift`. */ + shift?: Square.Shift; +} diff --git a/src/api/types/LaborShiftDeletedEvent.ts b/src/api/types/LaborShiftDeletedEvent.ts new file mode 100644 index 000000000..3f89ce20f --- /dev/null +++ b/src/api/types/LaborShiftDeletedEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [Shift](entity:Shift) is deleted. + * + * Deprecated at Square API version 2025-05-21. Replaced by `labor.timecard.deleted`. + */ +export interface LaborShiftDeletedEvent { + /** The ID of the merchant associated with the event. */ + merchantId?: string | null; + /** The type of event. For this event, the value is `labor.shift.deleted`. */ + type?: string | null; + /** The unique ID for the event. */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.LaborShiftDeletedEventData; +} diff --git a/src/api/types/LaborShiftDeletedEventData.ts b/src/api/types/LaborShiftDeletedEventData.ts new file mode 100644 index 000000000..ead517c78 --- /dev/null +++ b/src/api/types/LaborShiftDeletedEventData.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface LaborShiftDeletedEventData { + /** The type of object affected by the event. For this event, the value is `shift`. */ + type?: string | null; + /** The ID of the affected `Shift`. */ + id?: string; + /** Is true if the affected object was deleted. Otherwise absent. */ + deleted?: boolean | null; +} diff --git a/src/api/types/LaborShiftUpdatedEvent.ts b/src/api/types/LaborShiftUpdatedEvent.ts new file mode 100644 index 000000000..b5d16a143 --- /dev/null +++ b/src/api/types/LaborShiftUpdatedEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [Shift](entity:Shift) is updated. + * + * Deprecated at Square API version 2025-05-21. Replaced by `labor.timecard.updated`. + */ +export interface LaborShiftUpdatedEvent { + /** The ID of the merchant associated with the event. */ + merchantId?: string | null; + /** The type of event. For this event, the value is `labor.shift.updated`. */ + type?: string | null; + /** The unique ID for the event. */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.LaborShiftUpdatedEventData; +} diff --git a/src/api/types/LaborShiftUpdatedEventData.ts b/src/api/types/LaborShiftUpdatedEventData.ts new file mode 100644 index 000000000..fe716c7d6 --- /dev/null +++ b/src/api/types/LaborShiftUpdatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface LaborShiftUpdatedEventData { + /** The type of object affected by the event. For this event, the value is `shift`. */ + type?: string | null; + /** ID of the affected `Shift`. */ + id?: string; + /** An object containing the affected `Shift`. */ + object?: Square.LaborShiftUpdatedEventObject; +} diff --git a/src/api/types/LaborShiftUpdatedEventObject.ts b/src/api/types/LaborShiftUpdatedEventObject.ts new file mode 100644 index 000000000..aca0d470e --- /dev/null +++ b/src/api/types/LaborShiftUpdatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface LaborShiftUpdatedEventObject { + /** The updated `Shift`. */ + shift?: Square.Shift; +} diff --git a/src/api/types/LaborTimecardCreatedEvent.ts b/src/api/types/LaborTimecardCreatedEvent.ts new file mode 100644 index 000000000..5b4512fe8 --- /dev/null +++ b/src/api/types/LaborTimecardCreatedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a worker starts a [Timecard](entity:Timecard). + */ +export interface LaborTimecardCreatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event. For this event, the value is `labor.timecard.created`. */ + type?: string | null; + /** The unique ID for the event. */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.LaborTimecardCreatedEventData; +} diff --git a/src/api/types/LaborTimecardCreatedEventData.ts b/src/api/types/LaborTimecardCreatedEventData.ts new file mode 100644 index 000000000..71fd122e8 --- /dev/null +++ b/src/api/types/LaborTimecardCreatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface LaborTimecardCreatedEventData { + /** The type of object affected by the event. For this event, the value is `timecard`. */ + type?: string | null; + /** The ID of the affected `Timecard`. */ + id?: string; + /** An object containing the affected `Timecard`. */ + object?: Square.LaborTimecardCreatedEventObject; +} diff --git a/src/api/types/LaborTimecardCreatedEventObject.ts b/src/api/types/LaborTimecardCreatedEventObject.ts new file mode 100644 index 000000000..703303338 --- /dev/null +++ b/src/api/types/LaborTimecardCreatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface LaborTimecardCreatedEventObject { + /** The new `Timecard`. */ + timecard?: Square.Timecard; +} diff --git a/src/api/types/LaborTimecardDeletedEvent.ts b/src/api/types/LaborTimecardDeletedEvent.ts new file mode 100644 index 000000000..7f914a3c2 --- /dev/null +++ b/src/api/types/LaborTimecardDeletedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [Timecard](entity:Timecard) is deleted. + */ +export interface LaborTimecardDeletedEvent { + /** The ID of the merchant associated with the event. */ + merchantId?: string | null; + /** The type of event. For this event, the value is `labor.timecard.deleted`. */ + type?: string | null; + /** The unique ID for the event. */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.LaborTimecardDeletedEventData; +} diff --git a/src/api/types/LaborTimecardDeletedEventData.ts b/src/api/types/LaborTimecardDeletedEventData.ts new file mode 100644 index 000000000..5ad7bf3da --- /dev/null +++ b/src/api/types/LaborTimecardDeletedEventData.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface LaborTimecardDeletedEventData { + /** The type of object affected by the event. For this event, the value is `timecard`. */ + type?: string | null; + /** The ID of the affected `Timecard`. */ + id?: string; + /** Is true if the affected object was deleted. Otherwise absent. */ + deleted?: boolean | null; +} diff --git a/src/api/types/LaborTimecardUpdatedEvent.ts b/src/api/types/LaborTimecardUpdatedEvent.ts new file mode 100644 index 000000000..cae70aa2e --- /dev/null +++ b/src/api/types/LaborTimecardUpdatedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [Timecard](entity:Timecard) is updated. + */ +export interface LaborTimecardUpdatedEvent { + /** The ID of the merchant associated with the event. */ + merchantId?: string | null; + /** The type of event. For this event, the value is `labor.timecard.updated`. */ + type?: string | null; + /** The unique ID for the event. */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.LaborTimecardUpdatedEventData; +} diff --git a/src/api/types/LaborTimecardUpdatedEventData.ts b/src/api/types/LaborTimecardUpdatedEventData.ts new file mode 100644 index 000000000..a4a26e515 --- /dev/null +++ b/src/api/types/LaborTimecardUpdatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface LaborTimecardUpdatedEventData { + /** The type of object affected by the event. For this event, the value is `timecard`. */ + type?: string | null; + /** The ID of the affected `Timecard`. */ + id?: string; + /** An object containing the affected `Timecard`. */ + object?: Square.LaborTimecardUpdatedEventObject; +} diff --git a/src/api/types/LaborTimecardUpdatedEventObject.ts b/src/api/types/LaborTimecardUpdatedEventObject.ts new file mode 100644 index 000000000..72c23a258 --- /dev/null +++ b/src/api/types/LaborTimecardUpdatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface LaborTimecardUpdatedEventObject { + /** The updated `Timecard`. */ + timecard?: Square.Timecard; +} diff --git a/src/api/types/LocationCreatedEvent.ts b/src/api/types/LocationCreatedEvent.ts new file mode 100644 index 000000000..00654f2b6 --- /dev/null +++ b/src/api/types/LocationCreatedEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [Location](entity:Location) is created. + */ +export interface LocationCreatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The ID of the [Location](entity:Location) associated with the event. */ + locationId?: string | null; + /** The type of event this represents, `"location.created"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.LocationCreatedEventData; +} diff --git a/src/api/types/LocationCreatedEventData.ts b/src/api/types/LocationCreatedEventData.ts new file mode 100644 index 000000000..a55b34988 --- /dev/null +++ b/src/api/types/LocationCreatedEventData.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface LocationCreatedEventData { + /** Name of the affected object’s type, `"location"`. */ + type?: string | null; + /** ID of the updated [Location](entity:Location). */ + id?: string; +} diff --git a/src/api/types/LocationCustomAttributeDefinitionOwnedCreatedEvent.ts b/src/api/types/LocationCustomAttributeDefinitionOwnedCreatedEvent.ts new file mode 100644 index 000000000..5139600a2 --- /dev/null +++ b/src/api/types/LocationCustomAttributeDefinitionOwnedCreatedEvent.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a location [custom attribute definition](entity:CustomAttributeDefinition) + * is created by the subscribing application. + */ +export interface LocationCustomAttributeDefinitionOwnedCreatedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"location.custom_attribute_definition.owned.created"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/LocationCustomAttributeDefinitionOwnedDeletedEvent.ts b/src/api/types/LocationCustomAttributeDefinitionOwnedDeletedEvent.ts new file mode 100644 index 000000000..e0e5da3aa --- /dev/null +++ b/src/api/types/LocationCustomAttributeDefinitionOwnedDeletedEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a location [custom attribute definition](entity:CustomAttributeDefinition) + * created by the subscribing application is deleted. A custom attribute definition can only be deleted by + * the application that created it. + */ +export interface LocationCustomAttributeDefinitionOwnedDeletedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"location.custom_attribute_definition.owned.deleted"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/LocationCustomAttributeDefinitionOwnedUpdatedEvent.ts b/src/api/types/LocationCustomAttributeDefinitionOwnedUpdatedEvent.ts new file mode 100644 index 000000000..d187dd3f1 --- /dev/null +++ b/src/api/types/LocationCustomAttributeDefinitionOwnedUpdatedEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a location [custom attribute definition](entity:CustomAttributeDefinition) + * created by the subscribing application is updated. A custom attribute definition can only be updated + * by the application that created it. + */ +export interface LocationCustomAttributeDefinitionOwnedUpdatedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"location.custom_attribute_definition.owned.updated"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/LocationCustomAttributeDefinitionVisibleCreatedEvent.ts b/src/api/types/LocationCustomAttributeDefinitionVisibleCreatedEvent.ts new file mode 100644 index 000000000..e1093a350 --- /dev/null +++ b/src/api/types/LocationCustomAttributeDefinitionVisibleCreatedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a location [custom attribute definition](entity:CustomAttributeDefinition) + * that is visible to the subscribing application is created. A notification is sent when your application + * creates a custom attribute definition or another application creates a custom attribute definition whose + * `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. + */ +export interface LocationCustomAttributeDefinitionVisibleCreatedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"location.custom_attribute_definition.visible.created"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/LocationCustomAttributeDefinitionVisibleDeletedEvent.ts b/src/api/types/LocationCustomAttributeDefinitionVisibleDeletedEvent.ts new file mode 100644 index 000000000..bf624af8b --- /dev/null +++ b/src/api/types/LocationCustomAttributeDefinitionVisibleDeletedEvent.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a location [custom attribute definition](entity:CustomAttributeDefinition) + * that is visible to the subscribing application is deleted. A custom attribute definition can only + * be deleted by the application that created it. A notification is sent when your application deletes + * a custom attribute definition or when another application deletes a custom attribute definition whose + * `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. + */ +export interface LocationCustomAttributeDefinitionVisibleDeletedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"location.custom_attribute_definition.visible.deleted"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/LocationCustomAttributeDefinitionVisibleUpdatedEvent.ts b/src/api/types/LocationCustomAttributeDefinitionVisibleUpdatedEvent.ts new file mode 100644 index 000000000..dca159f86 --- /dev/null +++ b/src/api/types/LocationCustomAttributeDefinitionVisibleUpdatedEvent.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a location [custom attribute definition](entity:CustomAttributeDefinition) + * that is visible to the subscribing application is updated. A custom attribute definition can only be updated + * by the application that created it. A notification is sent when your application updates a custom attribute + * definition or when another application updates a custom attribute definition whose `visibility` is + * `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. + */ +export interface LocationCustomAttributeDefinitionVisibleUpdatedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"location.custom_attribute_definition.visible.updated"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/LocationCustomAttributeOwnedDeletedEvent.ts b/src/api/types/LocationCustomAttributeOwnedDeletedEvent.ts new file mode 100644 index 000000000..3fc2337b4 --- /dev/null +++ b/src/api/types/LocationCustomAttributeOwnedDeletedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a location [custom attribute](entity:CustomAttribute) + * owned by the subscribing application is deleted. Custom attributes are owned by the + * application that created the corresponding [custom attribute definition](entity:CustomAttributeDefinition). + * Custom attributes whose `visibility` is `VISIBILITY_READ_WRITE_VALUES` can be deleted by any application. + */ +export interface LocationCustomAttributeOwnedDeletedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"location.custom_attribute.owned.deleted"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeEventData; +} diff --git a/src/api/types/LocationCustomAttributeOwnedUpdatedEvent.ts b/src/api/types/LocationCustomAttributeOwnedUpdatedEvent.ts new file mode 100644 index 000000000..7323a84e1 --- /dev/null +++ b/src/api/types/LocationCustomAttributeOwnedUpdatedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a location [custom attribute](entity:CustomAttribute) owned by the + * subscribing application is created or updated. Custom attributes are owned by the application that created + * the corresponding [custom attribute definition](entity:CustomAttributeDefinition). Custom attributes whose + * `visibility` is `VISIBILITY_READ_WRITE_VALUES` can be created or updated by any application. + */ +export interface LocationCustomAttributeOwnedUpdatedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"location.custom_attribute.owned.updated"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeEventData; +} diff --git a/src/api/types/LocationCustomAttributeVisibleDeletedEvent.ts b/src/api/types/LocationCustomAttributeVisibleDeletedEvent.ts new file mode 100644 index 000000000..e9ef28cb5 --- /dev/null +++ b/src/api/types/LocationCustomAttributeVisibleDeletedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a location [custom attribute](entity:CustomAttribute) that is visible to the + * subscribing application is deleted. A notification is sent when: + * - Your application deletes a custom attribute owned by your application, regardless of the `visibility` setting. + * - Any application deletes a custom attribute whose `visibility` is `VISIBILITY_READ_ONLY` + * or `VISIBILITY_READ_WRITE_VALUES`. + * + * Custom attributes set to `VISIBILITY_READ_WRITE_VALUES` can be deleted by any application, but those set to + * `VISIBILITY_READ_ONLY` or `VISIBILITY_HIDDEN` can only be deleted by the owner. Custom attributes are owned + * by the application that created the corresponding [custom attribute definition](entity:CustomAttributeDefinition). + */ +export interface LocationCustomAttributeVisibleDeletedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"location.custom_attribute.visible.deleted"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeEventData; +} diff --git a/src/api/types/LocationCustomAttributeVisibleUpdatedEvent.ts b/src/api/types/LocationCustomAttributeVisibleUpdatedEvent.ts new file mode 100644 index 000000000..68db4d117 --- /dev/null +++ b/src/api/types/LocationCustomAttributeVisibleUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a location [custom attribute](entity:CustomAttribute) that is visible + * to the subscribing application is created or updated. A notification is sent when: + * - Your application creates or updates a custom attribute owned by your application, regardless of the `visibility` setting. + * - Any application creates or updates a custom attribute whose `visibility` is `VISIBILITY_READ_ONLY` + * or `VISIBILITY_READ_WRITE_VALUES`. + * + * Custom attributes set to `VISIBILITY_READ_WRITE_VALUES` can be created or updated by any application, but those set to + * `VISIBILITY_READ_ONLY` or `VISIBILITY_HIDDEN` can only be created or updated by the owner. Custom attributes are owned + * by the application that created the corresponding [custom attribute definition](entity:CustomAttributeDefinition). + */ +export interface LocationCustomAttributeVisibleUpdatedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"location.custom_attribute.visible.updated"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeEventData; +} diff --git a/src/api/types/LocationSettingsUpdatedEvent.ts b/src/api/types/LocationSettingsUpdatedEvent.ts new file mode 100644 index 000000000..d5156843c --- /dev/null +++ b/src/api/types/LocationSettingsUpdatedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when online checkout location settings are updated + */ +export interface LocationSettingsUpdatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"online_checkout.location_settings.updated"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** RFC 3339 timestamp of when the event was created. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.LocationSettingsUpdatedEventData; +} diff --git a/src/api/types/LocationSettingsUpdatedEventData.ts b/src/api/types/LocationSettingsUpdatedEventData.ts new file mode 100644 index 000000000..cc5d90a38 --- /dev/null +++ b/src/api/types/LocationSettingsUpdatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface LocationSettingsUpdatedEventData { + /** Name of the updated object’s type, `"online_checkout.location_settings"`. */ + type?: string | null; + /** ID of the updated location settings. */ + id?: string; + /** An object containing the updated location settings. */ + object?: Square.LocationSettingsUpdatedEventObject; +} diff --git a/src/api/types/LocationSettingsUpdatedEventObject.ts b/src/api/types/LocationSettingsUpdatedEventObject.ts new file mode 100644 index 000000000..ca7ef9d8e --- /dev/null +++ b/src/api/types/LocationSettingsUpdatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface LocationSettingsUpdatedEventObject { + /** The updated location settings. */ + locationSettings?: Square.CheckoutLocationSettings; +} diff --git a/src/api/types/LocationUpdatedEvent.ts b/src/api/types/LocationUpdatedEvent.ts new file mode 100644 index 000000000..ad9581061 --- /dev/null +++ b/src/api/types/LocationUpdatedEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [Location](entity:Location) is updated. + */ +export interface LocationUpdatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The ID of the [Location](entity:Location) associated with the event. */ + locationId?: string | null; + /** The type of event this represents, `"location.updated"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.LocationUpdatedEventData; +} diff --git a/src/api/types/LocationUpdatedEventData.ts b/src/api/types/LocationUpdatedEventData.ts new file mode 100644 index 000000000..f5bd36949 --- /dev/null +++ b/src/api/types/LocationUpdatedEventData.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface LocationUpdatedEventData { + /** Name of the affected object’s type, `"location"`. */ + type?: string | null; + /** ID of the updated [Location](entity:Location). */ + id?: string; +} diff --git a/src/api/types/LoyaltyAccountCreatedEvent.ts b/src/api/types/LoyaltyAccountCreatedEvent.ts new file mode 100644 index 000000000..f903e6b8e --- /dev/null +++ b/src/api/types/LoyaltyAccountCreatedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [loyalty account](entity:LoyaltyAccount) is created. + */ +export interface LoyaltyAccountCreatedEvent { + /** The ID of the Square seller associated with the event. */ + merchantId?: string | null; + /** The type of event. For this event, the value is `loyalty.account.created`. */ + type?: string | null; + /** + * The unique ID for the event, which is used for + * [idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.LoyaltyAccountCreatedEventData; +} diff --git a/src/api/types/LoyaltyAccountCreatedEventData.ts b/src/api/types/LoyaltyAccountCreatedEventData.ts new file mode 100644 index 000000000..e2121f78b --- /dev/null +++ b/src/api/types/LoyaltyAccountCreatedEventData.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * The data associated with a `loyalty.account.created` event. + */ +export interface LoyaltyAccountCreatedEventData { + /** The type of object affected by the event. For this event, the value is `loyalty_account`. */ + type?: string | null; + /** The ID of the affected loyalty account. */ + id?: string; + /** An object that contains the new loyalty account. */ + object?: Square.LoyaltyAccountCreatedEventObject; +} diff --git a/src/api/types/LoyaltyAccountCreatedEventObject.ts b/src/api/types/LoyaltyAccountCreatedEventObject.ts new file mode 100644 index 000000000..42652de88 --- /dev/null +++ b/src/api/types/LoyaltyAccountCreatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface LoyaltyAccountCreatedEventObject { + /** The loyalty account that was created. */ + loyaltyAccount?: Square.LoyaltyAccount; +} diff --git a/src/api/types/LoyaltyAccountDeletedEvent.ts b/src/api/types/LoyaltyAccountDeletedEvent.ts new file mode 100644 index 000000000..111ab9f04 --- /dev/null +++ b/src/api/types/LoyaltyAccountDeletedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [loyalty account](entity:LoyaltyAccount) is deleted. + */ +export interface LoyaltyAccountDeletedEvent { + /** The ID of the Square seller associated with the event. */ + merchantId?: string | null; + /** The type of event. For this event, the value is `loyalty.account.deleted`. */ + type?: string | null; + /** + * The unique ID for the event, which is used for + * [idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.LoyaltyAccountDeletedEventData; +} diff --git a/src/api/types/LoyaltyAccountDeletedEventData.ts b/src/api/types/LoyaltyAccountDeletedEventData.ts new file mode 100644 index 000000000..bb91e983f --- /dev/null +++ b/src/api/types/LoyaltyAccountDeletedEventData.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * The data associated with a `loyalty.account.deleted` event. + */ +export interface LoyaltyAccountDeletedEventData { + /** The type of object affected by the event. For this event, the value is `loyalty_account`. */ + type?: string | null; + /** The ID of the affected loyalty account. */ + id?: string; + /** An object that contains the loyalty account that was deleted. */ + object?: Square.LoyaltyAccountDeletedEventObject; +} diff --git a/src/api/types/LoyaltyAccountDeletedEventObject.ts b/src/api/types/LoyaltyAccountDeletedEventObject.ts new file mode 100644 index 000000000..f873af4e0 --- /dev/null +++ b/src/api/types/LoyaltyAccountDeletedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface LoyaltyAccountDeletedEventObject { + /** The loyalty account that was deleted. */ + loyaltyAccount?: Square.LoyaltyAccount; +} diff --git a/src/api/types/LoyaltyAccountMappingType.ts b/src/api/types/LoyaltyAccountMappingType.ts new file mode 100644 index 000000000..3824a4777 --- /dev/null +++ b/src/api/types/LoyaltyAccountMappingType.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The type of mapping. + */ +export type LoyaltyAccountMappingType = "PHONE"; diff --git a/src/api/types/LoyaltyAccountUpdatedEvent.ts b/src/api/types/LoyaltyAccountUpdatedEvent.ts new file mode 100644 index 000000000..e42a752b9 --- /dev/null +++ b/src/api/types/LoyaltyAccountUpdatedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [loyalty account](entity:LoyaltyAccount) is updated. + */ +export interface LoyaltyAccountUpdatedEvent { + /** The ID of the Square seller associated with the event. */ + merchantId?: string | null; + /** The type of event. For this event, the value is `loyalty.account.updated`. */ + type?: string | null; + /** + * The unique ID for the event, which is used for + * [idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.LoyaltyAccountUpdatedEventData; +} diff --git a/src/api/types/LoyaltyAccountUpdatedEventData.ts b/src/api/types/LoyaltyAccountUpdatedEventData.ts new file mode 100644 index 000000000..32ef96617 --- /dev/null +++ b/src/api/types/LoyaltyAccountUpdatedEventData.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * The data associated with a `loyalty.account.updated` event. + */ +export interface LoyaltyAccountUpdatedEventData { + /** The type of object affected by the event. For this event, the value is `loyalty_account`. */ + type?: string | null; + /** The ID of the affected loyalty account. */ + id?: string; + /** An object that contains the loyalty account that was updated. */ + object?: Square.LoyaltyAccountUpdatedEventObject; +} diff --git a/src/api/types/LoyaltyAccountUpdatedEventObject.ts b/src/api/types/LoyaltyAccountUpdatedEventObject.ts new file mode 100644 index 000000000..e9d837fc5 --- /dev/null +++ b/src/api/types/LoyaltyAccountUpdatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface LoyaltyAccountUpdatedEventObject { + /** The loyalty account that was updated. */ + loyaltyAccount?: Square.LoyaltyAccount; +} diff --git a/src/api/types/LoyaltyEventCreatedEvent.ts b/src/api/types/LoyaltyEventCreatedEvent.ts new file mode 100644 index 000000000..686c00240 --- /dev/null +++ b/src/api/types/LoyaltyEventCreatedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [loyalty event](entity:LoyaltyEvent) is created. + */ +export interface LoyaltyEventCreatedEvent { + /** The ID of the Square seller associated with the event. */ + merchantId?: string | null; + /** The type of event. For this event, the value is `loyalty.event.created`. */ + type?: string | null; + /** + * The unique ID for the event, which is used for + * [idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.LoyaltyEventCreatedEventData; +} diff --git a/src/api/types/LoyaltyEventCreatedEventData.ts b/src/api/types/LoyaltyEventCreatedEventData.ts new file mode 100644 index 000000000..874b67bcd --- /dev/null +++ b/src/api/types/LoyaltyEventCreatedEventData.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * The data associated with a `loyalty.event.created` event. + */ +export interface LoyaltyEventCreatedEventData { + /** The type of object affected by the event. For this event, the value is `loyalty_event`. */ + type?: string | null; + /** ID of the affected loyalty event. */ + id?: string; + /** An object that contains the new loyalty event. */ + object?: Square.LoyaltyEventCreatedEventObject; +} diff --git a/src/api/types/LoyaltyEventCreatedEventObject.ts b/src/api/types/LoyaltyEventCreatedEventObject.ts new file mode 100644 index 000000000..0dd22c3f2 --- /dev/null +++ b/src/api/types/LoyaltyEventCreatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface LoyaltyEventCreatedEventObject { + /** The loyalty event that was created. */ + loyaltyEvent?: Square.LoyaltyEvent; +} diff --git a/src/api/types/LoyaltyProgramCreatedEvent.ts b/src/api/types/LoyaltyProgramCreatedEvent.ts new file mode 100644 index 000000000..c1acfa5ed --- /dev/null +++ b/src/api/types/LoyaltyProgramCreatedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [loyalty program](entity:LoyaltyProgram) is created. + */ +export interface LoyaltyProgramCreatedEvent { + /** The ID of the Square seller associated with the event. */ + merchantId?: string | null; + /** The type of event. For this event, the value is `loyalty.program.created`. */ + type?: string | null; + /** + * The unique ID for the event, which is used for + * [idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.LoyaltyProgramCreatedEventData; +} diff --git a/src/api/types/LoyaltyProgramCreatedEventData.ts b/src/api/types/LoyaltyProgramCreatedEventData.ts new file mode 100644 index 000000000..3c93f2b74 --- /dev/null +++ b/src/api/types/LoyaltyProgramCreatedEventData.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * The data associated with a `loyalty.program.created` event. + */ +export interface LoyaltyProgramCreatedEventData { + /** The type of object affected by the event. For this event, the value is `loyalty_program`. */ + type?: string | null; + /** The ID of the created loyalty program. */ + id?: string; + /** An object that contains the loyalty program that was created. */ + object?: Square.LoyaltyProgramCreatedEventObject; +} diff --git a/src/api/types/LoyaltyProgramCreatedEventObject.ts b/src/api/types/LoyaltyProgramCreatedEventObject.ts new file mode 100644 index 000000000..5a047e101 --- /dev/null +++ b/src/api/types/LoyaltyProgramCreatedEventObject.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * An object that contains the loyalty program associated with a `loyalty.program.created` event. + */ +export interface LoyaltyProgramCreatedEventObject { + /** The loyalty program that was created. */ + loyaltyProgram?: Square.LoyaltyProgram; +} diff --git a/src/api/types/LoyaltyProgramRewardDefinition.ts b/src/api/types/LoyaltyProgramRewardDefinition.ts deleted file mode 100644 index 9529fddac..000000000 --- a/src/api/types/LoyaltyProgramRewardDefinition.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Square from "../index"; - -/** - * Provides details about the reward tier discount. DEPRECATED at version 2020-12-16. Discount details - * are now defined using a catalog pricing rule and other catalog objects. For more information, see - * [Getting discount details for a reward tier](https://developer.squareup.com/docs/loyalty-api/loyalty-rewards#get-discount-details). - */ -export interface LoyaltyProgramRewardDefinition { - /** - * Indicates the scope of the reward tier. DEPRECATED at version 2020-12-16. You can find this information in the - * `product_set_data` field of the `PRODUCT_SET` catalog object referenced by the pricing rule. For `ORDER` scopes, - * `all_products` is true. For `ITEM_VARIATION` or `CATEGORY` scopes, `product_ids_any` is a list of - * catalog object IDs of the given type. - * See [LoyaltyProgramRewardDefinitionScope](#type-loyaltyprogramrewarddefinitionscope) for possible values - */ - scope: Square.LoyaltyProgramRewardDefinitionScope; - /** - * The type of discount the reward tier offers. DEPRECATED at version 2020-12-16. You can find this information - * in the `discount_data.discount_type` field of the `DISCOUNT` catalog object referenced by the pricing rule. - * See [LoyaltyProgramRewardDefinitionType](#type-loyaltyprogramrewarddefinitiontype) for possible values - */ - discountType: Square.LoyaltyProgramRewardDefinitionType; - /** - * The fixed percentage of the discount. Present if `discount_type` is `FIXED_PERCENTAGE`. - * For example, a 7.25% off discount will be represented as "7.25". DEPRECATED at version 2020-12-16. You can find this - * information in the `discount_data.percentage` field of the `DISCOUNT` catalog object referenced by the pricing rule. - */ - percentageDiscount?: string; - /** - * The list of catalog objects to which this reward can be applied. They are either all item-variation ids or category ids, depending on the `type` field. - * DEPRECATED at version 2020-12-16. You can find this information in the `product_set_data.product_ids_any` field - * of the `PRODUCT_SET` catalog object referenced by the pricing rule. - */ - catalogObjectIds?: string[]; - /** - * The amount of the discount. Present if `discount_type` is `FIXED_AMOUNT`. For example, $5 off. - * DEPRECATED at version 2020-12-16. You can find this information in the `discount_data.amount_money` field of the - * `DISCOUNT` catalog object referenced by the pricing rule. - */ - fixedDiscountMoney?: Square.Money; - /** - * When `discount_type` is `FIXED_PERCENTAGE`, the maximum discount amount that can be applied. - * DEPRECATED at version 2020-12-16. You can find this information in the `discount_data.maximum_amount_money` field - * of the `DISCOUNT` catalog object referenced by the the pricing rule. - */ - maxDiscountMoney?: Square.Money; -} diff --git a/src/api/types/LoyaltyProgramRewardDefinitionScope.ts b/src/api/types/LoyaltyProgramRewardDefinitionScope.ts deleted file mode 100644 index 30d65b976..000000000 --- a/src/api/types/LoyaltyProgramRewardDefinitionScope.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * Indicates the scope of the reward tier. DEPRECATED at version 2020-12-16. Discount details - * are now defined using a catalog pricing rule and other catalog objects. For more information, see - * [Getting discount details for a reward tier](https://developer.squareup.com/docs/loyalty-api/loyalty-rewards#get-discount-details). - */ -export type LoyaltyProgramRewardDefinitionScope = "ORDER" | "ITEM_VARIATION" | "CATEGORY"; -export const LoyaltyProgramRewardDefinitionScope = { - Order: "ORDER", - ItemVariation: "ITEM_VARIATION", - Category: "CATEGORY", -} as const; diff --git a/src/api/types/LoyaltyProgramRewardDefinitionType.ts b/src/api/types/LoyaltyProgramRewardDefinitionType.ts deleted file mode 100644 index 000593f12..000000000 --- a/src/api/types/LoyaltyProgramRewardDefinitionType.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * The type of discount the reward tier offers. DEPRECATED at version 2020-12-16. Discount details - * are now defined using a catalog pricing rule and other catalog objects. For more information, see - * [Getting discount details for a reward tier](https://developer.squareup.com/docs/loyalty-api/loyalty-rewards#get-discount-details). - */ -export type LoyaltyProgramRewardDefinitionType = "FIXED_AMOUNT" | "FIXED_PERCENTAGE"; -export const LoyaltyProgramRewardDefinitionType = { - FixedAmount: "FIXED_AMOUNT", - FixedPercentage: "FIXED_PERCENTAGE", -} as const; diff --git a/src/api/types/LoyaltyProgramRewardTier.ts b/src/api/types/LoyaltyProgramRewardTier.ts index 77bb2ec6a..76b4bebf2 100644 --- a/src/api/types/LoyaltyProgramRewardTier.ts +++ b/src/api/types/LoyaltyProgramRewardTier.ts @@ -14,11 +14,6 @@ export interface LoyaltyProgramRewardTier { points: number; /** The name of the reward tier. */ name?: string; - /** - * Provides details about the reward tier definition. - * DEPRECATED at version 2020-12-16. Replaced by the `pricing_rule_reference` field. - */ - definition?: Square.LoyaltyProgramRewardDefinition; /** The timestamp when the reward tier was created, in RFC 3339 format. */ createdAt?: string; /** diff --git a/src/api/types/LoyaltyProgramUpdatedEvent.ts b/src/api/types/LoyaltyProgramUpdatedEvent.ts new file mode 100644 index 000000000..eba64dade --- /dev/null +++ b/src/api/types/LoyaltyProgramUpdatedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [loyalty program](entity:LoyaltyProgram) is updated. + */ +export interface LoyaltyProgramUpdatedEvent { + /** The ID of the Square seller associated with the event. */ + merchantId?: string | null; + /** The type of event. For this event, the value is `loyalty.program.updated`. */ + type?: string | null; + /** + * The unique ID for the event, which is used for + * [idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.LoyaltyProgramUpdatedEventData; +} diff --git a/src/api/types/LoyaltyProgramUpdatedEventData.ts b/src/api/types/LoyaltyProgramUpdatedEventData.ts new file mode 100644 index 000000000..4e91d3814 --- /dev/null +++ b/src/api/types/LoyaltyProgramUpdatedEventData.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * The data associated with a `loyalty.program.updated` event. + */ +export interface LoyaltyProgramUpdatedEventData { + /** The type of object affected by the event. For this event, the value is `loyalty_program`. */ + type?: string | null; + /** The ID of the affected loyalty program. */ + id?: string; + /** An object that contains the loyalty program that was updated. */ + object?: Square.LoyaltyProgramUpdatedEventObject; +} diff --git a/src/api/types/LoyaltyProgramUpdatedEventObject.ts b/src/api/types/LoyaltyProgramUpdatedEventObject.ts new file mode 100644 index 000000000..474f5dea7 --- /dev/null +++ b/src/api/types/LoyaltyProgramUpdatedEventObject.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * An object that contains the loyalty program associated with a `loyalty.program.updated` event. + */ +export interface LoyaltyProgramUpdatedEventObject { + /** The loyalty program that was updated. */ + loyaltyProgram?: Square.LoyaltyProgram; +} diff --git a/src/api/types/LoyaltyPromotionCreatedEvent.ts b/src/api/types/LoyaltyPromotionCreatedEvent.ts new file mode 100644 index 000000000..5351bf9a9 --- /dev/null +++ b/src/api/types/LoyaltyPromotionCreatedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [loyalty promotion](entity:LoyaltyPromotion) is created. + */ +export interface LoyaltyPromotionCreatedEvent { + /** The ID of the Square seller associated with the event. */ + merchantId?: string | null; + /** The type of event. For this event, the value is `loyalty.promotion.created`. */ + type?: string | null; + /** + * The unique ID for the event, which is used for + * [idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.LoyaltyPromotionCreatedEventData; +} diff --git a/src/api/types/LoyaltyPromotionCreatedEventData.ts b/src/api/types/LoyaltyPromotionCreatedEventData.ts new file mode 100644 index 000000000..6609ce34e --- /dev/null +++ b/src/api/types/LoyaltyPromotionCreatedEventData.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * The data associated with a `loyalty.promotion.created` event. + */ +export interface LoyaltyPromotionCreatedEventData { + /** The type of object affected by the event. For this event, the value is `loyalty_promotion`. */ + type?: string | null; + /** The ID of the affected loyalty promotion. */ + id?: string; + /** An object that contains the loyalty promotion that was created. */ + object?: Square.LoyaltyPromotionCreatedEventObject; +} diff --git a/src/api/types/LoyaltyPromotionCreatedEventObject.ts b/src/api/types/LoyaltyPromotionCreatedEventObject.ts new file mode 100644 index 000000000..6385e2e20 --- /dev/null +++ b/src/api/types/LoyaltyPromotionCreatedEventObject.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * An object that contains the loyalty promotion associated with a `loyalty.promotion.created` event. + */ +export interface LoyaltyPromotionCreatedEventObject { + /** The loyalty promotion that was created. */ + loyaltyPromotion?: Square.LoyaltyPromotion; +} diff --git a/src/api/types/LoyaltyPromotionUpdatedEvent.ts b/src/api/types/LoyaltyPromotionUpdatedEvent.ts new file mode 100644 index 000000000..344a7bd25 --- /dev/null +++ b/src/api/types/LoyaltyPromotionUpdatedEvent.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [loyalty promotion](entity:LoyaltyPromotion) is updated. This event is + * invoked only when a loyalty promotion is canceled. + */ +export interface LoyaltyPromotionUpdatedEvent { + /** The ID of the Square seller associated with the event. */ + merchantId?: string | null; + /** The type of event. For this event, the value is `loyalty.promotion.updated`. */ + type?: string | null; + /** + * The unique ID for the event, which is used for + * [idempotency support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.LoyaltyPromotionUpdatedEventData; +} diff --git a/src/api/types/LoyaltyPromotionUpdatedEventData.ts b/src/api/types/LoyaltyPromotionUpdatedEventData.ts new file mode 100644 index 000000000..130e22019 --- /dev/null +++ b/src/api/types/LoyaltyPromotionUpdatedEventData.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * The data associated with a `loyalty.promotion.updated` event. + */ +export interface LoyaltyPromotionUpdatedEventData { + /** The type of object affected by the event. For this event, the value is `loyalty_promotion`. */ + type?: string | null; + /** The ID of the affected loyalty promotion. */ + id?: string; + /** An object that contains the loyalty promotion that was updated. */ + object?: Square.LoyaltyPromotionUpdatedEventObject; +} diff --git a/src/api/types/LoyaltyPromotionUpdatedEventObject.ts b/src/api/types/LoyaltyPromotionUpdatedEventObject.ts new file mode 100644 index 000000000..1bae561db --- /dev/null +++ b/src/api/types/LoyaltyPromotionUpdatedEventObject.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * An object that contains the loyalty promotion associated with a `loyalty.promotion.updated` event. + */ +export interface LoyaltyPromotionUpdatedEventObject { + /** The loyalty promotion that was updated. */ + loyaltyPromotion?: Square.LoyaltyPromotion; +} diff --git a/src/api/types/MerchantCustomAttributeDefinitionOwnedCreatedEvent.ts b/src/api/types/MerchantCustomAttributeDefinitionOwnedCreatedEvent.ts new file mode 100644 index 000000000..b0451b41a --- /dev/null +++ b/src/api/types/MerchantCustomAttributeDefinitionOwnedCreatedEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a merchant [custom attribute definition](entity:CustomAttributeDefinition) + * is created by the subscribing application. Subscribe to this event to be notified + * when your application creates a merchant custom attribute definition. + */ +export interface MerchantCustomAttributeDefinitionOwnedCreatedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"merchant.custom_attribute_definition.owned.created"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/MerchantCustomAttributeDefinitionOwnedDeletedEvent.ts b/src/api/types/MerchantCustomAttributeDefinitionOwnedDeletedEvent.ts new file mode 100644 index 000000000..533e9c170 --- /dev/null +++ b/src/api/types/MerchantCustomAttributeDefinitionOwnedDeletedEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a merchant [custom attribute definition](entity:CustomAttributeDefinition) + * is deleted by the subscribing application. Subscribe to this event to be notified + * when your application deletes a merchant custom attribute definition. + */ +export interface MerchantCustomAttributeDefinitionOwnedDeletedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"merchant.custom_attribute_definition.owned.deleted"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/MerchantCustomAttributeDefinitionOwnedUpdatedEvent.ts b/src/api/types/MerchantCustomAttributeDefinitionOwnedUpdatedEvent.ts new file mode 100644 index 000000000..0b18b5657 --- /dev/null +++ b/src/api/types/MerchantCustomAttributeDefinitionOwnedUpdatedEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a merchant [custom attribute definition](entity:CustomAttributeDefinition) + * is updated by the subscribing application. Subscribe to this event to be notified + * when your application updates a merchant custom attribute definition. + */ +export interface MerchantCustomAttributeDefinitionOwnedUpdatedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"merchant.custom_attribute_definition.owned.updated"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/MerchantCustomAttributeDefinitionVisibleCreatedEvent.ts b/src/api/types/MerchantCustomAttributeDefinitionVisibleCreatedEvent.ts new file mode 100644 index 000000000..37e808296 --- /dev/null +++ b/src/api/types/MerchantCustomAttributeDefinitionVisibleCreatedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a merchant [custom attribute definition](entity:CustomAttributeDefinition) + * that is visible to the subscribing application is created. A notification is sent when your application + * creates a custom attribute definition or another application creates a custom attribute definition whose + * `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. + */ +export interface MerchantCustomAttributeDefinitionVisibleCreatedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"merchant.custom_attribute_definition.visible.created"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/MerchantCustomAttributeDefinitionVisibleDeletedEvent.ts b/src/api/types/MerchantCustomAttributeDefinitionVisibleDeletedEvent.ts new file mode 100644 index 000000000..43aba2dd7 --- /dev/null +++ b/src/api/types/MerchantCustomAttributeDefinitionVisibleDeletedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a merchant [custom attribute definition](entity:CustomAttributeDefinition) + * that is visible to the subscribing application is deleted. A notification is sent when your application + * deletes a custom attribute definition or another application deletes a custom attribute definition whose + * `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. + */ +export interface MerchantCustomAttributeDefinitionVisibleDeletedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"merchant.custom_attribute_definition.visible.deleted"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/MerchantCustomAttributeDefinitionVisibleUpdatedEvent.ts b/src/api/types/MerchantCustomAttributeDefinitionVisibleUpdatedEvent.ts new file mode 100644 index 000000000..078ff840f --- /dev/null +++ b/src/api/types/MerchantCustomAttributeDefinitionVisibleUpdatedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a merchant [custom attribute definition](entity:CustomAttributeDefinition) + * that is visible to the subscribing application is updated. A notification is sent when your application + * updates a custom attribute definition or another application updates a custom attribute definition whose + * `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. + */ +export interface MerchantCustomAttributeDefinitionVisibleUpdatedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"merchant.custom_attribute_definition.visible.updated"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/MerchantCustomAttributeOwnedDeletedEvent.ts b/src/api/types/MerchantCustomAttributeOwnedDeletedEvent.ts new file mode 100644 index 000000000..3c08c957b --- /dev/null +++ b/src/api/types/MerchantCustomAttributeOwnedDeletedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a merchant [custom attribute](entity:CustomAttribute) + * associated with a [custom attribute definition](entity:CustomAttributeDefinition) that is + * owned by the subscribing application is deleted. Subscribe to this event to be notified + * when your application deletes a merchant custom attribute. + */ +export interface MerchantCustomAttributeOwnedDeletedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"merchant.custom_attribute.owned.deleted"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeEventData; +} diff --git a/src/api/types/MerchantCustomAttributeOwnedUpdatedEvent.ts b/src/api/types/MerchantCustomAttributeOwnedUpdatedEvent.ts new file mode 100644 index 000000000..af81e52f6 --- /dev/null +++ b/src/api/types/MerchantCustomAttributeOwnedUpdatedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a merchant [custom attribute](entity:CustomAttribute) + * associated with a [custom attribute definition](entity:CustomAttributeDefinition) that is + * owned by the subscribing application is updated. Subscribe to this event to be notified + * when your application updates a merchant custom attribute. + */ +export interface MerchantCustomAttributeOwnedUpdatedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"merchant.custom_attribute.owned.updated"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeEventData; +} diff --git a/src/api/types/MerchantCustomAttributeVisibleDeletedEvent.ts b/src/api/types/MerchantCustomAttributeVisibleDeletedEvent.ts new file mode 100644 index 000000000..b83c5ad28 --- /dev/null +++ b/src/api/types/MerchantCustomAttributeVisibleDeletedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a merchant [custom attribute](entity:CustomAttribute) with + * the `visibility` field set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES` is deleted. + * An application that subscribes to this event is notified when a merchant custom attribute is deleted + * by any application for which the subscribing application has read access to the merchant custom attribute. + */ +export interface MerchantCustomAttributeVisibleDeletedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"merchant.custom_attribute.visible.deleted"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeEventData; +} diff --git a/src/api/types/MerchantCustomAttributeVisibleUpdatedEvent.ts b/src/api/types/MerchantCustomAttributeVisibleUpdatedEvent.ts new file mode 100644 index 000000000..96b485192 --- /dev/null +++ b/src/api/types/MerchantCustomAttributeVisibleUpdatedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a merchant [custom attribute](entity:CustomAttribute) with + * the `visibility` field set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES` is updated. + * An application that subscribes to this event is notified when a merchant custom attribute is updated + * by any application for which the subscribing application has read access to the merchant custom attribute. + */ +export interface MerchantCustomAttributeVisibleUpdatedEvent { + /** The ID of the seller associated with the event that triggered the event notification. */ + merchantId?: string | null; + /** The type of this event. The value is `"merchant.custom_attribute.visible.updated"`. */ + type?: string | null; + /** A unique ID for the event notification. */ + eventId?: string | null; + /** The timestamp that indicates when the event notification was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event that triggered the event notification. */ + data?: Square.CustomAttributeEventData; +} diff --git a/src/api/types/MerchantSettingsUpdatedEvent.ts b/src/api/types/MerchantSettingsUpdatedEvent.ts new file mode 100644 index 000000000..03e615b56 --- /dev/null +++ b/src/api/types/MerchantSettingsUpdatedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when online checkout merchant settings are updated + */ +export interface MerchantSettingsUpdatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"online_checkout.merchant_settings.updated"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** RFC 3339 timestamp of when the event was created. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.MerchantSettingsUpdatedEventData; +} diff --git a/src/api/types/MerchantSettingsUpdatedEventData.ts b/src/api/types/MerchantSettingsUpdatedEventData.ts new file mode 100644 index 000000000..e4d739c63 --- /dev/null +++ b/src/api/types/MerchantSettingsUpdatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface MerchantSettingsUpdatedEventData { + /** Name of the updated object’s type, `"online_checkout.merchant_settings"`. */ + type?: string | null; + /** ID of the updated merchant settings. */ + id?: string; + /** An object containing the updated merchant settings. */ + object?: Square.MerchantSettingsUpdatedEventObject; +} diff --git a/src/api/types/MerchantSettingsUpdatedEventObject.ts b/src/api/types/MerchantSettingsUpdatedEventObject.ts new file mode 100644 index 000000000..32b98e67b --- /dev/null +++ b/src/api/types/MerchantSettingsUpdatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface MerchantSettingsUpdatedEventObject { + /** The updated merchant settings. */ + merchantSettings?: Square.CheckoutMerchantSettings; +} diff --git a/src/api/types/OauthAuthorizationRevokedEvent.ts b/src/api/types/OauthAuthorizationRevokedEvent.ts new file mode 100644 index 000000000..f10413cce --- /dev/null +++ b/src/api/types/OauthAuthorizationRevokedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a merchant/application revokes all access tokens and refresh tokens granted to an application. + */ +export interface OauthAuthorizationRevokedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"oauth.authorization.revoked"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.OauthAuthorizationRevokedEventData; +} diff --git a/src/api/types/OauthAuthorizationRevokedEventData.ts b/src/api/types/OauthAuthorizationRevokedEventData.ts new file mode 100644 index 000000000..3cd2ae5da --- /dev/null +++ b/src/api/types/OauthAuthorizationRevokedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface OauthAuthorizationRevokedEventData { + /** Name of the affected object’s type, `"revocation"`. */ + type?: string | null; + /** Not applicable, revocation is not an object */ + id?: string; + /** An object containing information about revocation event. */ + object?: Square.OauthAuthorizationRevokedEventObject; +} diff --git a/src/api/types/OauthAuthorizationRevokedEventObject.ts b/src/api/types/OauthAuthorizationRevokedEventObject.ts new file mode 100644 index 000000000..a95fcc143 --- /dev/null +++ b/src/api/types/OauthAuthorizationRevokedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface OauthAuthorizationRevokedEventObject { + /** The revocation event. */ + revocation?: Square.OauthAuthorizationRevokedEventRevocationObject; +} diff --git a/src/api/types/OauthAuthorizationRevokedEventRevocationObject.ts b/src/api/types/OauthAuthorizationRevokedEventRevocationObject.ts new file mode 100644 index 000000000..e22a2cfe7 --- /dev/null +++ b/src/api/types/OauthAuthorizationRevokedEventRevocationObject.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface OauthAuthorizationRevokedEventRevocationObject { + /** Timestamp of when the revocation event occurred, in RFC 3339 format. */ + revokedAt?: string | null; + /** + * Type of client that performed the revocation, either APPLICATION, MERCHANT, or SQUARE. + * See [OauthAuthorizationRevokedEventRevokerType](#type-oauthauthorizationrevokedeventrevokertype) for possible values + */ + revokerType?: Square.OauthAuthorizationRevokedEventRevokerType; +} diff --git a/src/api/types/OauthAuthorizationRevokedEventRevokerType.ts b/src/api/types/OauthAuthorizationRevokedEventRevokerType.ts new file mode 100644 index 000000000..c4fbb2e47 --- /dev/null +++ b/src/api/types/OauthAuthorizationRevokedEventRevokerType.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * Defines the possible types for the revoking client. + */ +export type OauthAuthorizationRevokedEventRevokerType = "APPLICATION" | "MERCHANT" | "SQUARE"; +export const OauthAuthorizationRevokedEventRevokerType = { + Application: "APPLICATION", + Merchant: "MERCHANT", + Square: "SQUARE", +} as const; diff --git a/src/api/types/OrderCreated.ts b/src/api/types/OrderCreated.ts new file mode 100644 index 000000000..fc76f4128 --- /dev/null +++ b/src/api/types/OrderCreated.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface OrderCreated { + /** The order's unique ID. */ + orderId?: string | null; + /** + * 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) + */ + version?: number; + /** The ID of the seller location that this order is associated with. */ + locationId?: string | null; + /** + * The state of the order. + * See [OrderState](#type-orderstate) for possible values + */ + state?: Square.OrderState; + /** The timestamp for when the order was created, in RFC 3339 format. */ + createdAt?: string; +} diff --git a/src/api/types/OrderCreatedEvent.ts b/src/api/types/OrderCreatedEvent.ts new file mode 100644 index 000000000..27cbad469 --- /dev/null +++ b/src/api/types/OrderCreatedEvent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when an [Order](entity:Order) is created. This event is + * triggered only by the [CreateOrder](api-endpoint:Orders-CreateOrder) endpoint call. + * + * Creating an order in the Point of Sale app will **not** publish this event. + */ +export interface OrderCreatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"order.created"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.OrderCreatedEventData; +} diff --git a/src/api/types/OrderCreatedEventData.ts b/src/api/types/OrderCreatedEventData.ts new file mode 100644 index 000000000..5cc34d44f --- /dev/null +++ b/src/api/types/OrderCreatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface OrderCreatedEventData { + /** Name of the affected object’s type, `"order_created"`. */ + type?: string | null; + /** ID of the affected order. */ + id?: string; + /** An object containing information about the created Order. */ + object?: Square.OrderCreatedObject; +} diff --git a/src/api/types/OrderCreatedObject.ts b/src/api/types/OrderCreatedObject.ts new file mode 100644 index 000000000..228dfb0dc --- /dev/null +++ b/src/api/types/OrderCreatedObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface OrderCreatedObject { + /** Information about the created order. */ + orderCreated?: Square.OrderCreated; +} diff --git a/src/api/types/OrderCustomAttributeDefinitionOwnedCreatedEvent.ts b/src/api/types/OrderCustomAttributeDefinitionOwnedCreatedEvent.ts new file mode 100644 index 000000000..5f129058a --- /dev/null +++ b/src/api/types/OrderCustomAttributeDefinitionOwnedCreatedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when an order [custom attribute definition](entity:CustomAttributeDefinition) that is owned by the subscribing app is created. + */ +export interface OrderCustomAttributeDefinitionOwnedCreatedEvent { + /** The ID of the target seller associated with the event. */ + merchantId?: string | null; + /** The type of this event. The value is `"order.custom_attribute_definition.owned.created"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/OrderCustomAttributeDefinitionOwnedDeletedEvent.ts b/src/api/types/OrderCustomAttributeDefinitionOwnedDeletedEvent.ts new file mode 100644 index 000000000..87c99a7aa --- /dev/null +++ b/src/api/types/OrderCustomAttributeDefinitionOwnedDeletedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when an order [custom attribute definition](entity:CustomAttributeDefinition) that is owned by the subscribing app is deleted. + */ +export interface OrderCustomAttributeDefinitionOwnedDeletedEvent { + /** The ID of the target seller associated with the event. */ + merchantId?: string | null; + /** The type of this event. The value is `"order.custom_attribute_definition.owned.deleted"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/OrderCustomAttributeDefinitionOwnedUpdatedEvent.ts b/src/api/types/OrderCustomAttributeDefinitionOwnedUpdatedEvent.ts new file mode 100644 index 000000000..beeb443d6 --- /dev/null +++ b/src/api/types/OrderCustomAttributeDefinitionOwnedUpdatedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when an order [custom attribute definition](entity:CustomAttributeDefinition) that is owned by the subscribing app is updated. + */ +export interface OrderCustomAttributeDefinitionOwnedUpdatedEvent { + /** The ID of the target seller associated with the event. */ + merchantId?: string | null; + /** The type of this event. The value is `"order.custom_attribute_definition.owned.updated"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/OrderCustomAttributeDefinitionVisibleCreatedEvent.ts b/src/api/types/OrderCustomAttributeDefinitionVisibleCreatedEvent.ts new file mode 100644 index 000000000..4dddaa8ef --- /dev/null +++ b/src/api/types/OrderCustomAttributeDefinitionVisibleCreatedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when an order [custom attribute definition](entity:CustomAttributeDefinition) that is visible to the subscribing app is created. + */ +export interface OrderCustomAttributeDefinitionVisibleCreatedEvent { + /** The ID of the target seller associated with the event. */ + merchantId?: string | null; + /** The type of this event. The value is `"order.custom_attribute_definition.visible.created"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/OrderCustomAttributeDefinitionVisibleDeletedEvent.ts b/src/api/types/OrderCustomAttributeDefinitionVisibleDeletedEvent.ts new file mode 100644 index 000000000..6b6dc2e5b --- /dev/null +++ b/src/api/types/OrderCustomAttributeDefinitionVisibleDeletedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when an order [custom attribute definition](entity:CustomAttributeDefinition) that is visible to the subscribing app is deleted. + */ +export interface OrderCustomAttributeDefinitionVisibleDeletedEvent { + /** The ID of the target seller associated with the event. */ + merchantId?: string | null; + /** The type of this event. The value is `"order.custom_attribute_definition.visible.deleted"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/OrderCustomAttributeDefinitionVisibleUpdatedEvent.ts b/src/api/types/OrderCustomAttributeDefinitionVisibleUpdatedEvent.ts new file mode 100644 index 000000000..34d7b3031 --- /dev/null +++ b/src/api/types/OrderCustomAttributeDefinitionVisibleUpdatedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when an order [custom attribute definition](entity:CustomAttributeDefinition) that is visible to the subscribing app is updated. + */ +export interface OrderCustomAttributeDefinitionVisibleUpdatedEvent { + /** The ID of the target seller associated with the event. */ + merchantId?: string | null; + /** The type of this event. The value is `"order.custom_attribute_definition.visible.updated"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.CustomAttributeDefinitionEventData; +} diff --git a/src/api/types/OrderCustomAttributeOwnedDeletedEvent.ts b/src/api/types/OrderCustomAttributeOwnedDeletedEvent.ts new file mode 100644 index 000000000..3d31e8a36 --- /dev/null +++ b/src/api/types/OrderCustomAttributeOwnedDeletedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when an order [custom attribute](entity:CustomAttribute) associated with a [custom attribute definition](entity:CustomAttributeDefinition) that is owned by the subscribing app is deleted. + */ +export interface OrderCustomAttributeOwnedDeletedEvent { + /** The ID of the target seller associated with the event. */ + merchantId?: string | null; + /** The type of this event. The value is `"order.custom_attribute.owned.deleted"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.CustomAttributeEventData; +} diff --git a/src/api/types/OrderCustomAttributeOwnedUpdatedEvent.ts b/src/api/types/OrderCustomAttributeOwnedUpdatedEvent.ts new file mode 100644 index 000000000..0ec5b4d1a --- /dev/null +++ b/src/api/types/OrderCustomAttributeOwnedUpdatedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when an order [custom attribute](entity:CustomAttribute) associated with a [custom attribute definition](entity:CustomAttributeDefinition) that is owned by the subscribing app is updated. + */ +export interface OrderCustomAttributeOwnedUpdatedEvent { + /** The ID of the target seller associated with the event. */ + merchantId?: string | null; + /** The type of this event. The value is `"order.custom_attribute.owned.updated"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.CustomAttributeEventData; +} diff --git a/src/api/types/OrderCustomAttributeVisibleDeletedEvent.ts b/src/api/types/OrderCustomAttributeVisibleDeletedEvent.ts new file mode 100644 index 000000000..00b526c6f --- /dev/null +++ b/src/api/types/OrderCustomAttributeVisibleDeletedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when an order [custom attribute](entity:CustomAttribute) that is visible to the subscribing app is deleted. + */ +export interface OrderCustomAttributeVisibleDeletedEvent { + /** The ID of the target seller associated with the event. */ + merchantId?: string | null; + /** The type of this event. The value is `"order.custom_attribute.visible.deleted"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.CustomAttributeEventData; +} diff --git a/src/api/types/OrderCustomAttributeVisibleUpdatedEvent.ts b/src/api/types/OrderCustomAttributeVisibleUpdatedEvent.ts new file mode 100644 index 000000000..55d63c538 --- /dev/null +++ b/src/api/types/OrderCustomAttributeVisibleUpdatedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when an order [custom attribute](entity:CustomAttribute) that is visible to the subscribing app is updated. + */ +export interface OrderCustomAttributeVisibleUpdatedEvent { + /** The ID of the target seller associated with the event. */ + merchantId?: string | null; + /** The type of this event. The value is `"order.custom_attribute.visible.updated"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** The timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** The data associated with the event. */ + data?: Square.CustomAttributeEventData; +} diff --git a/src/api/types/OrderFulfillmentDeliveryDetailsScheduleType.ts b/src/api/types/OrderFulfillmentDeliveryDetailsScheduleType.ts new file mode 100644 index 000000000..54fbf5ddc --- /dev/null +++ b/src/api/types/OrderFulfillmentDeliveryDetailsScheduleType.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The schedule type of the delivery fulfillment. + */ +export type OrderFulfillmentDeliveryDetailsScheduleType = "SCHEDULED" | "ASAP"; +export const OrderFulfillmentDeliveryDetailsScheduleType = { + Scheduled: "SCHEDULED", + Asap: "ASAP", +} as const; diff --git a/src/api/types/OrderFulfillmentFulfillmentLineItemApplication.ts b/src/api/types/OrderFulfillmentFulfillmentLineItemApplication.ts new file mode 100644 index 000000000..b88f9010b --- /dev/null +++ b/src/api/types/OrderFulfillmentFulfillmentLineItemApplication.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * 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. + */ +export type OrderFulfillmentFulfillmentLineItemApplication = "ALL" | "ENTRY_LIST"; +export const OrderFulfillmentFulfillmentLineItemApplication = { + All: "ALL", + EntryList: "ENTRY_LIST", +} as const; diff --git a/src/api/types/OrderFulfillmentPickupDetailsScheduleType.ts b/src/api/types/OrderFulfillmentPickupDetailsScheduleType.ts new file mode 100644 index 000000000..4a4452749 --- /dev/null +++ b/src/api/types/OrderFulfillmentPickupDetailsScheduleType.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The schedule type of the pickup fulfillment. + */ +export type OrderFulfillmentPickupDetailsScheduleType = "SCHEDULED" | "ASAP"; +export const OrderFulfillmentPickupDetailsScheduleType = { + Scheduled: "SCHEDULED", + Asap: "ASAP", +} as const; diff --git a/src/api/types/OrderFulfillmentState.ts b/src/api/types/OrderFulfillmentState.ts new file mode 100644 index 000000000..ad143297d --- /dev/null +++ b/src/api/types/OrderFulfillmentState.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The current state of this fulfillment. + */ +export type OrderFulfillmentState = "PROPOSED" | "RESERVED" | "PREPARED" | "COMPLETED" | "CANCELED" | "FAILED"; +export const OrderFulfillmentState = { + Proposed: "PROPOSED", + Reserved: "RESERVED", + Prepared: "PREPARED", + Completed: "COMPLETED", + Canceled: "CANCELED", + Failed: "FAILED", +} as const; diff --git a/src/api/types/OrderFulfillmentType.ts b/src/api/types/OrderFulfillmentType.ts new file mode 100644 index 000000000..ef8e220f5 --- /dev/null +++ b/src/api/types/OrderFulfillmentType.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The type of fulfillment. + */ +export type OrderFulfillmentType = "PICKUP" | "SHIPMENT" | "DELIVERY"; +export const OrderFulfillmentType = { + Pickup: "PICKUP", + Shipment: "SHIPMENT", + Delivery: "DELIVERY", +} as const; diff --git a/src/api/types/OrderFulfillmentUpdated.ts b/src/api/types/OrderFulfillmentUpdated.ts new file mode 100644 index 000000000..088c57d49 --- /dev/null +++ b/src/api/types/OrderFulfillmentUpdated.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface OrderFulfillmentUpdated { + /** The order's unique ID. */ + orderId?: string | null; + /** + * 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) + */ + version?: number; + /** The ID of the seller location that this order is associated with. */ + locationId?: string | null; + /** + * The state of the order. + * See [OrderState](#type-orderstate) for possible values + */ + state?: Square.OrderState; + /** The timestamp for when the order was created, in RFC 3339 format. */ + createdAt?: string; + /** The timestamp for when the order was last updated, in RFC 3339 format. */ + updatedAt?: string; + /** The fulfillments that were updated with this version change. */ + fulfillmentUpdate?: Square.OrderFulfillmentUpdatedUpdate[] | null; +} diff --git a/src/api/types/OrderFulfillmentUpdatedEvent.ts b/src/api/types/OrderFulfillmentUpdatedEvent.ts new file mode 100644 index 000000000..c396022e6 --- /dev/null +++ b/src/api/types/OrderFulfillmentUpdatedEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when an [OrderFulfillment](entity:OrderFulfillment) + * is created or updated. This event is triggered only by the + * [UpdateOrder](api-endpoint:Orders-UpdateOrder) endpoint call. + */ +export interface OrderFulfillmentUpdatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"order.fulfillment.updated"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.OrderFulfillmentUpdatedEventData; +} diff --git a/src/api/types/OrderFulfillmentUpdatedEventData.ts b/src/api/types/OrderFulfillmentUpdatedEventData.ts new file mode 100644 index 000000000..ea8cfcf5e --- /dev/null +++ b/src/api/types/OrderFulfillmentUpdatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface OrderFulfillmentUpdatedEventData { + /** Name of the affected object’s type, `"order_fulfillment_updated"`. */ + type?: string | null; + /** ID of the affected order. */ + id?: string; + /** An object containing information about the updated Order. */ + object?: Square.OrderFulfillmentUpdatedObject; +} diff --git a/src/api/types/OrderFulfillmentUpdatedObject.ts b/src/api/types/OrderFulfillmentUpdatedObject.ts new file mode 100644 index 000000000..5c587e29f --- /dev/null +++ b/src/api/types/OrderFulfillmentUpdatedObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface OrderFulfillmentUpdatedObject { + /** Information about the updated order fulfillment. */ + orderFulfillmentUpdated?: Square.OrderFulfillmentUpdated; +} diff --git a/src/api/types/OrderFulfillmentUpdatedUpdate.ts b/src/api/types/OrderFulfillmentUpdatedUpdate.ts new file mode 100644 index 000000000..266b6d6e4 --- /dev/null +++ b/src/api/types/OrderFulfillmentUpdatedUpdate.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Information about fulfillment updates. + */ +export interface OrderFulfillmentUpdatedUpdate { + /** A unique ID that identifies the fulfillment only within this order. */ + fulfillmentUid?: string | null; + /** + * The state of the fulfillment before the change. + * The state is not populated if the fulfillment is created with this new `Order` version. + */ + oldState?: Square.FulfillmentState; + /** + * The state of the fulfillment after the change. The state might be equal to `old_state` if a non-state + * field was changed on the fulfillment (such as the tracking number). + */ + newState?: Square.FulfillmentState; +} diff --git a/src/api/types/OrderUpdated.ts b/src/api/types/OrderUpdated.ts new file mode 100644 index 000000000..e9d9371d4 --- /dev/null +++ b/src/api/types/OrderUpdated.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface OrderUpdated { + /** The order's unique ID. */ + orderId?: string | null; + /** + * 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) + */ + version?: number; + /** The ID of the seller location that this order is associated with. */ + locationId?: string | null; + /** + * The state of the order. + * See [OrderState](#type-orderstate) for possible values + */ + state?: Square.OrderState; + /** The timestamp for when the order was created, in RFC 3339 format. */ + createdAt?: string; + /** The timestamp for when the order was last updated, in RFC 3339 format. */ + updatedAt?: string; +} diff --git a/src/api/types/OrderUpdatedEvent.ts b/src/api/types/OrderUpdatedEvent.ts new file mode 100644 index 000000000..99045bcbb --- /dev/null +++ b/src/api/types/OrderUpdatedEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when an [Order](entity:Order) is updated. This + * event is triggered by the [UpdateOrder](api-endpoint:Orders-UpdateOrder) + * endpoint call, Order Manager, or the Square Dashboard. + */ +export interface OrderUpdatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"order.updated"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.OrderUpdatedEventData; +} diff --git a/src/api/types/OrderUpdatedEventData.ts b/src/api/types/OrderUpdatedEventData.ts new file mode 100644 index 000000000..a077e59f3 --- /dev/null +++ b/src/api/types/OrderUpdatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface OrderUpdatedEventData { + /** Name of the affected object’s type, `"order_updated"`. */ + type?: string | null; + /** ID of the affected order. */ + id?: string; + /** An object containing information about the updated Order. */ + object?: Square.OrderUpdatedObject; +} diff --git a/src/api/types/OrderUpdatedObject.ts b/src/api/types/OrderUpdatedObject.ts new file mode 100644 index 000000000..476a7ad60 --- /dev/null +++ b/src/api/types/OrderUpdatedObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface OrderUpdatedObject { + /** Information about the updated order. */ + orderUpdated?: Square.OrderUpdated; +} diff --git a/src/api/types/PaymentCreatedEvent.ts b/src/api/types/PaymentCreatedEvent.ts new file mode 100644 index 000000000..3e865157b --- /dev/null +++ b/src/api/types/PaymentCreatedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [Payment](entity:Payment) is created. + */ +export interface PaymentCreatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"payment.created"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.PaymentCreatedEventData; +} diff --git a/src/api/types/PaymentCreatedEventData.ts b/src/api/types/PaymentCreatedEventData.ts new file mode 100644 index 000000000..39936a8d2 --- /dev/null +++ b/src/api/types/PaymentCreatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface PaymentCreatedEventData { + /** Name of the affected object’s type, `"payment"`. */ + type?: string | null; + /** ID of the affected payment. */ + id?: string; + /** An object containing the created payment. */ + object?: Square.PaymentCreatedEventObject; +} diff --git a/src/api/types/PaymentCreatedEventObject.ts b/src/api/types/PaymentCreatedEventObject.ts new file mode 100644 index 000000000..6fe3ce9c8 --- /dev/null +++ b/src/api/types/PaymentCreatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface PaymentCreatedEventObject { + /** The created payment. */ + payment?: Square.Payment; +} diff --git a/src/api/types/PaymentUpdatedEvent.ts b/src/api/types/PaymentUpdatedEvent.ts new file mode 100644 index 000000000..60a30a58c --- /dev/null +++ b/src/api/types/PaymentUpdatedEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [Payment](entity:Payment) is updated. + * Typically the `payment.status`, or `card_details.status` fields are updated + * as a payment is canceled, authorized, or completed. + */ +export interface PaymentUpdatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"payment.updated"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.PaymentUpdatedEventData; +} diff --git a/src/api/types/PaymentUpdatedEventData.ts b/src/api/types/PaymentUpdatedEventData.ts new file mode 100644 index 000000000..69310b4da --- /dev/null +++ b/src/api/types/PaymentUpdatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface PaymentUpdatedEventData { + /** Name of the affected object’s type, `"payment"`. */ + type?: string | null; + /** ID of the affected payment. */ + id?: string; + /** An object containing the updated payment. */ + object?: Square.PaymentUpdatedEventObject; +} diff --git a/src/api/types/PaymentUpdatedEventObject.ts b/src/api/types/PaymentUpdatedEventObject.ts new file mode 100644 index 000000000..4c3d2fc5b --- /dev/null +++ b/src/api/types/PaymentUpdatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface PaymentUpdatedEventObject { + /** The updated payment. */ + payment?: Square.Payment; +} diff --git a/src/api/types/PayoutFailedEvent.ts b/src/api/types/PayoutFailedEvent.ts new file mode 100644 index 000000000..02b523dec --- /dev/null +++ b/src/api/types/PayoutFailedEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [Payout](entity:Payout) has failed. + */ +export interface PayoutFailedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The ID of the target location associated with the event. */ + locationId?: string | null; + /** The type of event that this represents, `payout.failed`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** The timestamp of when the event was verified, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.PayoutFailedEventData; +} diff --git a/src/api/types/PayoutFailedEventData.ts b/src/api/types/PayoutFailedEventData.ts new file mode 100644 index 000000000..c81cca237 --- /dev/null +++ b/src/api/types/PayoutFailedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface PayoutFailedEventData { + /** The name of the affected object's type, `payout`. */ + type?: string | null; + /** The ID of the failed payout. */ + id?: string; + /** An object containing the failed payout. */ + object?: Square.PayoutFailedEventObject; +} diff --git a/src/api/types/PayoutFailedEventObject.ts b/src/api/types/PayoutFailedEventObject.ts new file mode 100644 index 000000000..92a5df18a --- /dev/null +++ b/src/api/types/PayoutFailedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface PayoutFailedEventObject { + /** The payout that failed. */ + payout?: Square.Payout; +} diff --git a/src/api/types/PayoutPaidEvent.ts b/src/api/types/PayoutPaidEvent.ts new file mode 100644 index 000000000..b781c6cdf --- /dev/null +++ b/src/api/types/PayoutPaidEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [Payout](entity:Payout) is complete. + */ +export interface PayoutPaidEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The ID of the target location associated with the event. */ + locationId?: string | null; + /** The type of event this represents, `"payout.paid"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was verified, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.PayoutPaidEventData; +} diff --git a/src/api/types/PayoutPaidEventData.ts b/src/api/types/PayoutPaidEventData.ts new file mode 100644 index 000000000..f91bfda41 --- /dev/null +++ b/src/api/types/PayoutPaidEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface PayoutPaidEventData { + /** Name of the affected object’s type, `"payout"`. */ + type?: string | null; + /** ID of the completed payout. */ + id?: string; + /** An object containing the completed payout. */ + object?: Square.PayoutPaidEventObject; +} diff --git a/src/api/types/PayoutPaidEventObject.ts b/src/api/types/PayoutPaidEventObject.ts new file mode 100644 index 000000000..295d4d3a8 --- /dev/null +++ b/src/api/types/PayoutPaidEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface PayoutPaidEventObject { + /** The payout that has completed. */ + payout?: Square.Payout; +} diff --git a/src/api/types/PayoutSentEvent.ts b/src/api/types/PayoutSentEvent.ts new file mode 100644 index 000000000..8a6bd6f40 --- /dev/null +++ b/src/api/types/PayoutSentEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [Payout](entity:Payout) is sent. + */ +export interface PayoutSentEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The ID of the target location associated with the event. */ + locationId?: string | null; + /** The type of event this represents, `"payout.sent"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was verified, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.PayoutSentEventData; +} diff --git a/src/api/types/PayoutSentEventData.ts b/src/api/types/PayoutSentEventData.ts new file mode 100644 index 000000000..5882f125e --- /dev/null +++ b/src/api/types/PayoutSentEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface PayoutSentEventData { + /** Name of the affected object’s type, `"payout"`. */ + type?: string | null; + /** ID of the sent payout. */ + id?: string; + /** An object containing the sent payout. */ + object?: Square.PayoutSentEventObject; +} diff --git a/src/api/types/PayoutSentEventObject.ts b/src/api/types/PayoutSentEventObject.ts new file mode 100644 index 000000000..d776568b3 --- /dev/null +++ b/src/api/types/PayoutSentEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface PayoutSentEventObject { + /** The payout that was sent. */ + payout?: Square.Payout; +} diff --git a/src/api/types/Refund.ts b/src/api/types/Refund.ts index 23a0bd2be..3614a38f5 100644 --- a/src/api/types/Refund.ts +++ b/src/api/types/Refund.ts @@ -15,7 +15,7 @@ export interface Refund { /** The ID of the transaction that the refunded tender is part of. */ transactionId?: string | null; /** The ID of the refunded tender. */ - tenderId: string; + tenderId?: string | null; /** The timestamp for when the refund was created, in RFC 3339 format. */ createdAt?: string; /** The reason for the refund being issued. */ diff --git a/src/api/types/RefundCreatedEvent.ts b/src/api/types/RefundCreatedEvent.ts new file mode 100644 index 000000000..39ab7bd33 --- /dev/null +++ b/src/api/types/RefundCreatedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [Refund](entity:PaymentRefund) is created. + */ +export interface RefundCreatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"refund.created"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.RefundCreatedEventData; +} diff --git a/src/api/types/RefundCreatedEventData.ts b/src/api/types/RefundCreatedEventData.ts new file mode 100644 index 000000000..e2b8b8c75 --- /dev/null +++ b/src/api/types/RefundCreatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface RefundCreatedEventData { + /** Name of the affected object’s type, `"refund"`. */ + type?: string | null; + /** ID of the affected refund. */ + id?: string; + /** An object containing the created refund. */ + object?: Square.RefundCreatedEventObject; +} diff --git a/src/api/types/RefundCreatedEventObject.ts b/src/api/types/RefundCreatedEventObject.ts new file mode 100644 index 000000000..4f04f92b8 --- /dev/null +++ b/src/api/types/RefundCreatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface RefundCreatedEventObject { + /** The created refund. */ + refund?: Square.PaymentRefund; +} diff --git a/src/api/types/RefundUpdatedEvent.ts b/src/api/types/RefundUpdatedEvent.ts new file mode 100644 index 000000000..605abdeda --- /dev/null +++ b/src/api/types/RefundUpdatedEvent.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [Refund](entity:PaymentRefund) is updated. + * Typically the `refund.status` changes when a refund is completed. + */ +export interface RefundUpdatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"refund.updated"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.RefundUpdatedEventData; +} diff --git a/src/api/types/RefundUpdatedEventData.ts b/src/api/types/RefundUpdatedEventData.ts new file mode 100644 index 000000000..289303776 --- /dev/null +++ b/src/api/types/RefundUpdatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface RefundUpdatedEventData { + /** Name of the affected object’s type, `"refund"`. */ + type?: string | null; + /** ID of the affected refund. */ + id?: string; + /** An object containing the updated refund. */ + object?: Square.RefundUpdatedEventObject; +} diff --git a/src/api/types/RefundUpdatedEventObject.ts b/src/api/types/RefundUpdatedEventObject.ts new file mode 100644 index 000000000..acfb97f5b --- /dev/null +++ b/src/api/types/RefundUpdatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface RefundUpdatedEventObject { + /** The updated refund. */ + refund?: Square.PaymentRefund; +} diff --git a/src/api/types/SubscriptionCreatedEvent.ts b/src/api/types/SubscriptionCreatedEvent.ts new file mode 100644 index 000000000..438c22f09 --- /dev/null +++ b/src/api/types/SubscriptionCreatedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [Subscription](entity:Subscription) is created. + */ +export interface SubscriptionCreatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"subscription.created"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.SubscriptionCreatedEventData; +} diff --git a/src/api/types/SubscriptionCreatedEventData.ts b/src/api/types/SubscriptionCreatedEventData.ts new file mode 100644 index 000000000..560b27b55 --- /dev/null +++ b/src/api/types/SubscriptionCreatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface SubscriptionCreatedEventData { + /** Name of the affected object’s type, `"subscription"`. */ + type?: string | null; + /** ID of the affected subscription. */ + id?: string; + /** An object containing the created subscription. */ + object?: Square.SubscriptionCreatedEventObject; +} diff --git a/src/api/types/SubscriptionCreatedEventObject.ts b/src/api/types/SubscriptionCreatedEventObject.ts new file mode 100644 index 000000000..d9c964abc --- /dev/null +++ b/src/api/types/SubscriptionCreatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface SubscriptionCreatedEventObject { + /** The created subscription. */ + subscription?: Square.Subscription; +} diff --git a/src/api/types/SubscriptionUpdatedEvent.ts b/src/api/types/SubscriptionUpdatedEvent.ts new file mode 100644 index 000000000..6e2b3ceaa --- /dev/null +++ b/src/api/types/SubscriptionUpdatedEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [Subscription](entity:Subscription) is updated. + * Typically the `subscription.status` is updated as subscriptions become active + * or cancelled. + */ +export interface SubscriptionUpdatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"subscription.updated"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.SubscriptionUpdatedEventData; +} diff --git a/src/api/types/SubscriptionUpdatedEventData.ts b/src/api/types/SubscriptionUpdatedEventData.ts new file mode 100644 index 000000000..5d66a89cc --- /dev/null +++ b/src/api/types/SubscriptionUpdatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface SubscriptionUpdatedEventData { + /** Name of the affected object’s type, `"subscription"`. */ + type?: string | null; + /** ID of the affected subscription. */ + id?: string; + /** An object containing the updated subscription. */ + object?: Square.SubscriptionUpdatedEventObject; +} diff --git a/src/api/types/SubscriptionUpdatedEventObject.ts b/src/api/types/SubscriptionUpdatedEventObject.ts new file mode 100644 index 000000000..e284b9256 --- /dev/null +++ b/src/api/types/SubscriptionUpdatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface SubscriptionUpdatedEventObject { + /** The updated subscription. */ + subscription?: Square.Subscription; +} diff --git a/src/api/types/TeamMemberCreatedEvent.ts b/src/api/types/TeamMemberCreatedEvent.ts new file mode 100644 index 000000000..f7dfbae12 --- /dev/null +++ b/src/api/types/TeamMemberCreatedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a Team Member is created. + */ +export interface TeamMemberCreatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"team_member.created"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.TeamMemberCreatedEventData; +} diff --git a/src/api/types/TeamMemberCreatedEventData.ts b/src/api/types/TeamMemberCreatedEventData.ts new file mode 100644 index 000000000..af2f3edfc --- /dev/null +++ b/src/api/types/TeamMemberCreatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface TeamMemberCreatedEventData { + /** Name of the affected object’s type, `"team_member"`. */ + type?: string | null; + /** ID of the created team member. */ + id?: string; + /** An object containing the created team member. */ + object?: Square.TeamMemberCreatedEventObject; +} diff --git a/src/api/types/TeamMemberCreatedEventObject.ts b/src/api/types/TeamMemberCreatedEventObject.ts new file mode 100644 index 000000000..5b001c88e --- /dev/null +++ b/src/api/types/TeamMemberCreatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface TeamMemberCreatedEventObject { + /** The created team member. */ + teamMember?: Square.TeamMember; +} diff --git a/src/api/types/TeamMemberInvitationStatus.ts b/src/api/types/TeamMemberInvitationStatus.ts new file mode 100644 index 000000000..4335971bb --- /dev/null +++ b/src/api/types/TeamMemberInvitationStatus.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * Enumerates the possible invitation statuses the team member can have within a business. + */ +export type TeamMemberInvitationStatus = "UNINVITED" | "PENDING" | "ACCEPTED"; +export const TeamMemberInvitationStatus = { + Uninvited: "UNINVITED", + Pending: "PENDING", + Accepted: "ACCEPTED", +} as const; diff --git a/src/api/types/TeamMemberUpdatedEvent.ts b/src/api/types/TeamMemberUpdatedEvent.ts new file mode 100644 index 000000000..dc8c82260 --- /dev/null +++ b/src/api/types/TeamMemberUpdatedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a Team Member is updated. + */ +export interface TeamMemberUpdatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"team_member.updated"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.TeamMemberUpdatedEventData; +} diff --git a/src/api/types/TeamMemberUpdatedEventData.ts b/src/api/types/TeamMemberUpdatedEventData.ts new file mode 100644 index 000000000..4d7f14acc --- /dev/null +++ b/src/api/types/TeamMemberUpdatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface TeamMemberUpdatedEventData { + /** Name of the affected object’s type, `"team_member"`. */ + type?: string | null; + /** ID of the affected team member. */ + id?: string; + /** An object containing the updated team member. */ + object?: Square.TeamMemberUpdatedEventObject; +} diff --git a/src/api/types/TeamMemberUpdatedEventObject.ts b/src/api/types/TeamMemberUpdatedEventObject.ts new file mode 100644 index 000000000..ce01e2842 --- /dev/null +++ b/src/api/types/TeamMemberUpdatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface TeamMemberUpdatedEventObject { + /** The updated team member. */ + teamMember?: Square.TeamMember; +} diff --git a/src/api/types/TeamMemberWageSettingUpdatedEvent.ts b/src/api/types/TeamMemberWageSettingUpdatedEvent.ts new file mode 100644 index 000000000..a307690d4 --- /dev/null +++ b/src/api/types/TeamMemberWageSettingUpdatedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a Wage Setting is updated. + */ +export interface TeamMemberWageSettingUpdatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"team_member.wage_setting.updated"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** Timestamp of when the event was created, in RFC 3339 format. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.TeamMemberWageSettingUpdatedEventData; +} diff --git a/src/api/types/TeamMemberWageSettingUpdatedEventData.ts b/src/api/types/TeamMemberWageSettingUpdatedEventData.ts new file mode 100644 index 000000000..29d21b315 --- /dev/null +++ b/src/api/types/TeamMemberWageSettingUpdatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface TeamMemberWageSettingUpdatedEventData { + /** Name of the affected object’s type, `"wage_setting"`. */ + type?: string | null; + /** ID of the updated team member wage setting. */ + id?: string; + /** An object containing the updated team member wage setting. */ + object?: Square.TeamMemberWageSettingUpdatedEventObject; +} diff --git a/src/api/types/TeamMemberWageSettingUpdatedEventObject.ts b/src/api/types/TeamMemberWageSettingUpdatedEventObject.ts new file mode 100644 index 000000000..5c51b6ca5 --- /dev/null +++ b/src/api/types/TeamMemberWageSettingUpdatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface TeamMemberWageSettingUpdatedEventObject { + /** The updated team member wage setting. */ + wageSetting?: Square.WageSetting; +} diff --git a/src/api/types/TerminalActionCreatedEvent.ts b/src/api/types/TerminalActionCreatedEvent.ts new file mode 100644 index 000000000..f2adf234a --- /dev/null +++ b/src/api/types/TerminalActionCreatedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a TerminalAction is created. + */ +export interface TerminalActionCreatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"terminal.action.created"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** RFC 3339 timestamp of when the event was created. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.TerminalActionCreatedEventData; +} diff --git a/src/api/types/TerminalActionCreatedEventData.ts b/src/api/types/TerminalActionCreatedEventData.ts new file mode 100644 index 000000000..cc97f575a --- /dev/null +++ b/src/api/types/TerminalActionCreatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface TerminalActionCreatedEventData { + /** Name of the created object’s type, `"action"`. */ + type?: string | null; + /** ID of the created terminal action. */ + id?: string; + /** An object containing the created terminal action. */ + object?: Square.TerminalActionCreatedEventObject; +} diff --git a/src/api/types/TerminalActionCreatedEventObject.ts b/src/api/types/TerminalActionCreatedEventObject.ts new file mode 100644 index 000000000..abc06f71c --- /dev/null +++ b/src/api/types/TerminalActionCreatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface TerminalActionCreatedEventObject { + /** The created terminal action. */ + action?: Square.TerminalAction; +} diff --git a/src/api/types/TerminalActionUpdatedEvent.ts b/src/api/types/TerminalActionUpdatedEvent.ts new file mode 100644 index 000000000..df9adb9ad --- /dev/null +++ b/src/api/types/TerminalActionUpdatedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a TerminalAction is updated. + */ +export interface TerminalActionUpdatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"terminal.action.updated"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** RFC 3339 timestamp of when the event was created. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.TerminalActionUpdatedEventData; +} diff --git a/src/api/types/TerminalActionUpdatedEventData.ts b/src/api/types/TerminalActionUpdatedEventData.ts new file mode 100644 index 000000000..785ba72e8 --- /dev/null +++ b/src/api/types/TerminalActionUpdatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface TerminalActionUpdatedEventData { + /** Name of the updated object’s type, `"action"`. */ + type?: string | null; + /** ID of the updated terminal action. */ + id?: string; + /** An object containing the updated terminal action. */ + object?: Square.TerminalActionUpdatedEventObject; +} diff --git a/src/api/types/TerminalActionUpdatedEventObject.ts b/src/api/types/TerminalActionUpdatedEventObject.ts new file mode 100644 index 000000000..e287bb58d --- /dev/null +++ b/src/api/types/TerminalActionUpdatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface TerminalActionUpdatedEventObject { + /** The updated terminal action. */ + action?: Square.TerminalAction; +} diff --git a/src/api/types/TerminalCheckoutCreatedEvent.ts b/src/api/types/TerminalCheckoutCreatedEvent.ts new file mode 100644 index 000000000..882e22032 --- /dev/null +++ b/src/api/types/TerminalCheckoutCreatedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [TerminalCheckout](entity:TerminalCheckout) is created. + */ +export interface TerminalCheckoutCreatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"terminal.checkout.created"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** RFC 3339 timestamp of when the event was created. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.TerminalCheckoutCreatedEventData; +} diff --git a/src/api/types/TerminalCheckoutCreatedEventData.ts b/src/api/types/TerminalCheckoutCreatedEventData.ts new file mode 100644 index 000000000..185540003 --- /dev/null +++ b/src/api/types/TerminalCheckoutCreatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface TerminalCheckoutCreatedEventData { + /** Name of the created object’s type, `"checkout"`. */ + type?: string | null; + /** ID of the created terminal checkout. */ + id?: string; + /** An object containing the created terminal checkout */ + object?: Square.TerminalCheckoutCreatedEventObject; +} diff --git a/src/api/types/TerminalCheckoutCreatedEventObject.ts b/src/api/types/TerminalCheckoutCreatedEventObject.ts new file mode 100644 index 000000000..95871ff27 --- /dev/null +++ b/src/api/types/TerminalCheckoutCreatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface TerminalCheckoutCreatedEventObject { + /** The created terminal checkout */ + checkout?: Square.TerminalCheckout; +} diff --git a/src/api/types/TerminalCheckoutUpdatedEvent.ts b/src/api/types/TerminalCheckoutUpdatedEvent.ts new file mode 100644 index 000000000..5a3e54993 --- /dev/null +++ b/src/api/types/TerminalCheckoutUpdatedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [TerminalCheckout](entity:TerminalCheckout) is updated. + */ +export interface TerminalCheckoutUpdatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"terminal.checkout.updated"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** RFC 3339 timestamp of when the event was created. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.TerminalCheckoutUpdatedEventData; +} diff --git a/src/api/types/TerminalCheckoutUpdatedEventData.ts b/src/api/types/TerminalCheckoutUpdatedEventData.ts new file mode 100644 index 000000000..eec1ee3d3 --- /dev/null +++ b/src/api/types/TerminalCheckoutUpdatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface TerminalCheckoutUpdatedEventData { + /** Name of the updated object’s type, `"checkout"`. */ + type?: string | null; + /** ID of the updated terminal checkout. */ + id?: string; + /** An object containing the updated terminal checkout */ + object?: Square.TerminalCheckoutUpdatedEventObject; +} diff --git a/src/api/types/TerminalCheckoutUpdatedEventObject.ts b/src/api/types/TerminalCheckoutUpdatedEventObject.ts new file mode 100644 index 000000000..7a51fb290 --- /dev/null +++ b/src/api/types/TerminalCheckoutUpdatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface TerminalCheckoutUpdatedEventObject { + /** The updated terminal checkout */ + checkout?: Square.TerminalCheckout; +} diff --git a/src/api/types/TerminalRefundCreatedEvent.ts b/src/api/types/TerminalRefundCreatedEvent.ts new file mode 100644 index 000000000..4b4dab55a --- /dev/null +++ b/src/api/types/TerminalRefundCreatedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a Terminal API refund is created. + */ +export interface TerminalRefundCreatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"terminal.refund.created"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** RFC 3339 timestamp of when the event was created. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.TerminalRefundCreatedEventData; +} diff --git a/src/api/types/TerminalRefundCreatedEventData.ts b/src/api/types/TerminalRefundCreatedEventData.ts new file mode 100644 index 000000000..f8477f22a --- /dev/null +++ b/src/api/types/TerminalRefundCreatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface TerminalRefundCreatedEventData { + /** Name of the created object’s type, `"refund"`. */ + type?: string | null; + /** ID of the created terminal refund. */ + id?: string; + /** An object containing the created terminal refund. */ + object?: Square.TerminalRefundCreatedEventObject; +} diff --git a/src/api/types/TerminalRefundCreatedEventObject.ts b/src/api/types/TerminalRefundCreatedEventObject.ts new file mode 100644 index 000000000..5cc3e3ac0 --- /dev/null +++ b/src/api/types/TerminalRefundCreatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface TerminalRefundCreatedEventObject { + /** The created terminal refund. */ + refund?: Square.TerminalRefund; +} diff --git a/src/api/types/TerminalRefundUpdatedEvent.ts b/src/api/types/TerminalRefundUpdatedEvent.ts new file mode 100644 index 000000000..fd38c9e1d --- /dev/null +++ b/src/api/types/TerminalRefundUpdatedEvent.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a Terminal API refund is updated. + */ +export interface TerminalRefundUpdatedEvent { + /** The ID of the target merchant associated with the event. */ + merchantId?: string | null; + /** The type of event this represents, `"terminal.refund.updated"`. */ + type?: string | null; + /** A unique ID for the event. */ + eventId?: string | null; + /** RFC 3339 timestamp of when the event was created. */ + createdAt?: string; + /** Data associated with the event. */ + data?: Square.TerminalRefundUpdatedEventData; +} diff --git a/src/api/types/TerminalRefundUpdatedEventData.ts b/src/api/types/TerminalRefundUpdatedEventData.ts new file mode 100644 index 000000000..ec64faf3a --- /dev/null +++ b/src/api/types/TerminalRefundUpdatedEventData.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface TerminalRefundUpdatedEventData { + /** Name of the updated object’s type, `"refund"`. */ + type?: string | null; + /** ID of the updated terminal refund. */ + id?: string; + /** An object containing the updated terminal refund. */ + object?: Square.TerminalRefundUpdatedEventObject; +} diff --git a/src/api/types/TerminalRefundUpdatedEventObject.ts b/src/api/types/TerminalRefundUpdatedEventObject.ts new file mode 100644 index 000000000..2f20e8473 --- /dev/null +++ b/src/api/types/TerminalRefundUpdatedEventObject.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface TerminalRefundUpdatedEventObject { + /** The updated terminal refund. */ + refund?: Square.TerminalRefund; +} diff --git a/src/api/types/TransactionType.ts b/src/api/types/TransactionType.ts new file mode 100644 index 000000000..c9e6b3317 --- /dev/null +++ b/src/api/types/TransactionType.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The transaction type used in the disputed payment. + */ +export type TransactionType = "DEBIT" | "CREDIT"; +export const TransactionType = { + Debit: "DEBIT", + Credit: "CREDIT", +} as const; diff --git a/src/api/types/V1GetPaymentRequest.ts b/src/api/types/V1GetPaymentRequest.ts new file mode 100644 index 000000000..fb4bbb8fa --- /dev/null +++ b/src/api/types/V1GetPaymentRequest.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type V1GetPaymentRequest = unknown; diff --git a/src/api/types/V1GetSettlementRequest.ts b/src/api/types/V1GetSettlementRequest.ts new file mode 100644 index 000000000..cca5a78b5 --- /dev/null +++ b/src/api/types/V1GetSettlementRequest.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type V1GetSettlementRequest = unknown; diff --git a/src/api/types/VendorCreatedEvent.ts b/src/api/types/VendorCreatedEvent.ts new file mode 100644 index 000000000..640126d7b --- /dev/null +++ b/src/api/types/VendorCreatedEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [Vendor](entity:Vendor) is created. + */ +export interface VendorCreatedEvent { + /** The ID of a seller associated with this event. */ + merchantId?: string | null; + /** The ID of a location associated with the event, if the event is associated with the location of the seller. */ + locationId?: string | null; + /** The type of this event. The value is `"vendor.created".` */ + type?: string | null; + /** A unique ID for this event. */ + eventId?: string | null; + /** The RFC 3339-formatted time when the underlying event data object is created. */ + createdAt?: string; + /** The data associated with this event. */ + data?: Square.VendorCreatedEventData; +} diff --git a/src/api/types/VendorCreatedEventData.ts b/src/api/types/VendorCreatedEventData.ts new file mode 100644 index 000000000..da0989ecc --- /dev/null +++ b/src/api/types/VendorCreatedEventData.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Defines the `vendor.created` event data structure. + */ +export interface VendorCreatedEventData { + /** The type of the event data object. The value is `vendor` */ + type?: string | null; + /** The ID of the event data object. */ + id?: string; + /** An object containing the created vendor. */ + object?: Square.VendorCreatedEventObject; +} diff --git a/src/api/types/VendorCreatedEventObject.ts b/src/api/types/VendorCreatedEventObject.ts new file mode 100644 index 000000000..67c918471 --- /dev/null +++ b/src/api/types/VendorCreatedEventObject.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface VendorCreatedEventObject { + /** + * The operation on the vendor that caused the event to be published. The value is `CREATED`. + * See [Operation](#type-operation) for possible values + */ + operation?: Square.VendorCreatedEventObjectOperation; + /** The created vendor as the result of the specified operation. */ + vendor?: Square.Vendor; +} diff --git a/src/api/types/VendorCreatedEventObjectOperation.ts b/src/api/types/VendorCreatedEventObjectOperation.ts new file mode 100644 index 000000000..03a3e2265 --- /dev/null +++ b/src/api/types/VendorCreatedEventObjectOperation.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The operation that can be performed against a vendor to cause the event to be published. + */ +export type VendorCreatedEventObjectOperation = "CREATED"; diff --git a/src/api/types/VendorUpdatedEvent.ts b/src/api/types/VendorUpdatedEvent.ts new file mode 100644 index 000000000..1afc531b4 --- /dev/null +++ b/src/api/types/VendorUpdatedEvent.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Published when a [Vendor](entity:Vendor) is updated. + */ +export interface VendorUpdatedEvent { + /** The ID of a seller associated with this event. */ + merchantId?: string | null; + /** The ID of a seller location associated with this event, if the event is associated with the location. */ + locationId?: string | null; + /** The type of this event. The value is `"vendor.updated".` */ + type?: string | null; + /** A unique ID for this webhoook event. */ + eventId?: string | null; + /** The RFC 3339-formatted time when the underlying event data object is created. */ + createdAt?: string; + /** The data associated with this event. */ + data?: Square.VendorUpdatedEventData; +} diff --git a/src/api/types/VendorUpdatedEventData.ts b/src/api/types/VendorUpdatedEventData.ts new file mode 100644 index 000000000..fd4562112 --- /dev/null +++ b/src/api/types/VendorUpdatedEventData.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +/** + * Defines the `vendor.updated` event data structure. + */ +export interface VendorUpdatedEventData { + /** The type of the event data object. The value is `vendor`. */ + type?: string | null; + /** The ID of the event data object. */ + id?: string; + /** An object containing updated vendor. */ + object?: Square.VendorUpdatedEventObject; +} diff --git a/src/api/types/VendorUpdatedEventObject.ts b/src/api/types/VendorUpdatedEventObject.ts new file mode 100644 index 000000000..21f421374 --- /dev/null +++ b/src/api/types/VendorUpdatedEventObject.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Square from "../index"; + +export interface VendorUpdatedEventObject { + /** + * The operation on the vendor that caused the event to be published. The value is `UPDATED`. + * See [Operation](#type-operation) for possible values + */ + operation?: Square.VendorUpdatedEventObjectOperation; + /** The updated vendor as the result of the specified operation. */ + vendor?: Square.Vendor; +} diff --git a/src/api/types/VendorUpdatedEventObjectOperation.ts b/src/api/types/VendorUpdatedEventObjectOperation.ts new file mode 100644 index 000000000..58abba863 --- /dev/null +++ b/src/api/types/VendorUpdatedEventObjectOperation.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The operation that can be performed against a vendor to cause the event to be published. + */ +export type VendorUpdatedEventObjectOperation = "UPDATED"; diff --git a/src/api/types/index.ts b/src/api/types/index.ts index c395ef6c8..58eb9f815 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -16,9 +16,18 @@ export * from "./AppointmentSegment"; export * from "./ArchivedState"; export * from "./Availability"; export * from "./BankAccount"; +export * from "./BankAccountCreatedEvent"; +export * from "./BankAccountCreatedEventData"; +export * from "./BankAccountCreatedEventObject"; +export * from "./BankAccountDisabledEvent"; +export * from "./BankAccountDisabledEventData"; +export * from "./BankAccountDisabledEventObject"; export * from "./BankAccountPaymentDetails"; export * from "./BankAccountStatus"; export * from "./BankAccountType"; +export * from "./BankAccountVerifiedEvent"; +export * from "./BankAccountVerifiedEventData"; +export * from "./BankAccountVerifiedEventObject"; export * from "./BatchChangeInventoryRequest"; export * from "./BatchChangeInventoryResponse"; export * from "./BatchDeleteCatalogObjectsResponse"; @@ -31,13 +40,29 @@ export * from "./BatchGetOrdersResponse"; export * from "./BatchUpsertCatalogObjectsResponse"; export * from "./Booking"; export * from "./BookingBookingSource"; +export * from "./BookingCreatedEvent"; +export * from "./BookingCreatedEventData"; +export * from "./BookingCreatedEventObject"; export * from "./BookingCreatorDetails"; export * from "./BookingCreatorDetailsCreatorType"; +export * from "./BookingCustomAttributeDefinitionOwnedCreatedEvent"; +export * from "./BookingCustomAttributeDefinitionOwnedDeletedEvent"; +export * from "./BookingCustomAttributeDefinitionOwnedUpdatedEvent"; +export * from "./BookingCustomAttributeDefinitionVisibleCreatedEvent"; +export * from "./BookingCustomAttributeDefinitionVisibleDeletedEvent"; +export * from "./BookingCustomAttributeDefinitionVisibleUpdatedEvent"; export * from "./BookingCustomAttributeDeleteRequest"; export * from "./BookingCustomAttributeDeleteResponse"; +export * from "./BookingCustomAttributeOwnedDeletedEvent"; +export * from "./BookingCustomAttributeOwnedUpdatedEvent"; export * from "./BookingCustomAttributeUpsertRequest"; export * from "./BookingCustomAttributeUpsertResponse"; +export * from "./BookingCustomAttributeVisibleDeletedEvent"; +export * from "./BookingCustomAttributeVisibleUpdatedEvent"; export * from "./BookingStatus"; +export * from "./BookingUpdatedEvent"; +export * from "./BookingUpdatedEventData"; +export * from "./BookingUpdatedEventObject"; export * from "./Break"; export * from "./BreakType"; export * from "./BulkCreateCustomerData"; @@ -101,13 +126,29 @@ export * from "./CancelTerminalCheckoutResponse"; export * from "./CancelTerminalRefundResponse"; export * from "./CaptureTransactionResponse"; export * from "./Card"; +export * from "./CardAutomaticallyUpdatedEvent"; +export * from "./CardAutomaticallyUpdatedEventData"; +export * from "./CardAutomaticallyUpdatedEventObject"; export * from "./CardBrand"; export * from "./CardCoBrand"; +export * from "./CardCreatedEvent"; +export * from "./CardCreatedEventData"; +export * from "./CardCreatedEventObject"; +export * from "./CardDisabledEvent"; +export * from "./CardDisabledEventData"; +export * from "./CardDisabledEventObject"; +export * from "./CardForgottenEvent"; +export * from "./CardForgottenEventCard"; +export * from "./CardForgottenEventData"; +export * from "./CardForgottenEventObject"; export * from "./CardIssuerAlert"; export * from "./CardPaymentDetails"; export * from "./CardPaymentTimeline"; export * from "./CardPrepaidType"; export * from "./CardType"; +export * from "./CardUpdatedEvent"; +export * from "./CardUpdatedEventData"; +export * from "./CardUpdatedEventObject"; export * from "./CashAppDetails"; export * from "./CashDrawerDevice"; export * from "./CashDrawerEventType"; @@ -186,6 +227,10 @@ export * from "./CatalogSubscriptionPlanVariation"; export * from "./CatalogTax"; export * from "./CatalogTimePeriod"; export * from "./CatalogV1Id"; +export * from "./CatalogVersionUpdatedEvent"; +export * from "./CatalogVersionUpdatedEventCatalogVersion"; +export * from "./CatalogVersionUpdatedEventData"; +export * from "./CatalogVersionUpdatedEventObject"; export * from "./CategoryPathToRootNode"; export * from "./ChangeBillingAnchorDateResponse"; export * from "./ChangeTiming"; @@ -262,16 +307,50 @@ export * from "./CreateWebhookSubscriptionResponse"; export * from "./Currency"; export * from "./CustomAttribute"; export * from "./CustomAttributeDefinition"; +export * from "./CustomAttributeDefinitionEventData"; +export * from "./CustomAttributeDefinitionEventDataObject"; export * from "./CustomAttributeDefinitionVisibility"; +export * from "./CustomAttributeEventData"; +export * from "./CustomAttributeEventDataObject"; export * from "./CustomAttributeFilter"; export * from "./CustomField"; export * from "./Customer"; export * from "./CustomerAddressFilter"; +export * from "./CustomerCreatedEvent"; +export * from "./CustomerCreatedEventData"; +export * from "./CustomerCreatedEventEventContext"; +export * from "./CustomerCreatedEventEventContextMerge"; +export * from "./CustomerCreatedEventObject"; export * from "./CustomerCreationSource"; export * from "./CustomerCreationSourceFilter"; +export * from "./CustomerCustomAttributeDefinitionCreatedEvent"; +export * from "./CustomerCustomAttributeDefinitionCreatedPublicEvent"; +export * from "./CustomerCustomAttributeDefinitionDeletedEvent"; +export * from "./CustomerCustomAttributeDefinitionDeletedPublicEvent"; +export * from "./CustomerCustomAttributeDefinitionOwnedCreatedEvent"; +export * from "./CustomerCustomAttributeDefinitionOwnedDeletedEvent"; +export * from "./CustomerCustomAttributeDefinitionOwnedUpdatedEvent"; +export * from "./CustomerCustomAttributeDefinitionUpdatedEvent"; +export * from "./CustomerCustomAttributeDefinitionUpdatedPublicEvent"; +export * from "./CustomerCustomAttributeDefinitionVisibleCreatedEvent"; +export * from "./CustomerCustomAttributeDefinitionVisibleDeletedEvent"; +export * from "./CustomerCustomAttributeDefinitionVisibleUpdatedEvent"; +export * from "./CustomerCustomAttributeDeletedEvent"; +export * from "./CustomerCustomAttributeDeletedPublicEvent"; export * from "./CustomerCustomAttributeFilter"; export * from "./CustomerCustomAttributeFilterValue"; export * from "./CustomerCustomAttributeFilters"; +export * from "./CustomerCustomAttributeOwnedDeletedEvent"; +export * from "./CustomerCustomAttributeOwnedUpdatedEvent"; +export * from "./CustomerCustomAttributeUpdatedEvent"; +export * from "./CustomerCustomAttributeUpdatedPublicEvent"; +export * from "./CustomerCustomAttributeVisibleDeletedEvent"; +export * from "./CustomerCustomAttributeVisibleUpdatedEvent"; +export * from "./CustomerDeletedEvent"; +export * from "./CustomerDeletedEventData"; +export * from "./CustomerDeletedEventEventContext"; +export * from "./CustomerDeletedEventEventContextMerge"; +export * from "./CustomerDeletedEventObject"; export * from "./CustomerDetails"; export * from "./CustomerFilter"; export * from "./CustomerGroup"; @@ -283,6 +362,9 @@ export * from "./CustomerSort"; export * from "./CustomerSortField"; export * from "./CustomerTaxIds"; export * from "./CustomerTextFilter"; +export * from "./CustomerUpdatedEvent"; +export * from "./CustomerUpdatedEventData"; +export * from "./CustomerUpdatedEventObject"; export * from "./DataCollectionOptions"; export * from "./DataCollectionOptionsInputType"; export * from "./DateRange"; @@ -323,6 +405,9 @@ export * from "./DeviceAttributes"; export * from "./DeviceAttributesDeviceType"; export * from "./DeviceCheckoutOptions"; export * from "./DeviceCode"; +export * from "./DeviceCodePairedEvent"; +export * from "./DeviceCodePairedEventData"; +export * from "./DeviceCodePairedEventObject"; export * from "./DeviceCodeStatus"; export * from "./DeviceComponentDetailsApplicationDetails"; export * from "./DeviceComponentDetailsBatteryDetails"; @@ -331,6 +416,9 @@ export * from "./DeviceComponentDetailsEthernetDetails"; export * from "./DeviceComponentDetailsExternalPower"; export * from "./DeviceComponentDetailsMeasurement"; export * from "./DeviceComponentDetailsWiFiDetails"; +export * from "./DeviceCreatedEvent"; +export * from "./DeviceCreatedEventData"; +export * from "./DeviceCreatedEventObject"; export * from "./DeviceDetails"; export * from "./DeviceMetadata"; export * from "./DeviceStatus"; @@ -342,12 +430,34 @@ export * from "./DismissTerminalActionResponse"; export * from "./DismissTerminalCheckoutResponse"; export * from "./DismissTerminalRefundResponse"; export * from "./Dispute"; +export * from "./DisputeCreatedEvent"; +export * from "./DisputeCreatedEventData"; +export * from "./DisputeCreatedEventObject"; export * from "./DisputeEvidence"; +export * from "./DisputeEvidenceAddedEvent"; +export * from "./DisputeEvidenceAddedEventData"; +export * from "./DisputeEvidenceAddedEventObject"; +export * from "./DisputeEvidenceCreatedEvent"; +export * from "./DisputeEvidenceCreatedEventData"; +export * from "./DisputeEvidenceCreatedEventObject"; +export * from "./DisputeEvidenceDeletedEvent"; +export * from "./DisputeEvidenceDeletedEventData"; +export * from "./DisputeEvidenceDeletedEventObject"; export * from "./DisputeEvidenceFile"; +export * from "./DisputeEvidenceRemovedEvent"; +export * from "./DisputeEvidenceRemovedEventData"; +export * from "./DisputeEvidenceRemovedEventObject"; export * from "./DisputeEvidenceType"; export * from "./DisputeReason"; export * from "./DisputeState"; +export * from "./DisputeStateChangedEvent"; +export * from "./DisputeStateChangedEventData"; +export * from "./DisputeStateChangedEventObject"; +export * from "./DisputeStateUpdatedEvent"; +export * from "./DisputeStateUpdatedEventData"; +export * from "./DisputeStateUpdatedEventObject"; export * from "./DisputedPayment"; +export * from "./EcomVisibility"; export * from "./Employee"; export * from "./EmployeeStatus"; export * from "./EmployeeWage"; @@ -401,6 +511,9 @@ export * from "./GiftCardActivityBlock"; export * from "./GiftCardActivityBlockReason"; export * from "./GiftCardActivityClearBalance"; export * from "./GiftCardActivityClearBalanceReason"; +export * from "./GiftCardActivityCreatedEvent"; +export * from "./GiftCardActivityCreatedEventData"; +export * from "./GiftCardActivityCreatedEventObject"; export * from "./GiftCardActivityDeactivate"; export * from "./GiftCardActivityDeactivateReason"; export * from "./GiftCardActivityImport"; @@ -415,15 +528,33 @@ export * from "./GiftCardActivityType"; export * from "./GiftCardActivityUnblock"; export * from "./GiftCardActivityUnblockReason"; export * from "./GiftCardActivityUnlinkedActivityRefund"; +export * from "./GiftCardActivityUpdatedEvent"; +export * from "./GiftCardActivityUpdatedEventData"; +export * from "./GiftCardActivityUpdatedEventObject"; +export * from "./GiftCardCreatedEvent"; +export * from "./GiftCardCreatedEventData"; +export * from "./GiftCardCreatedEventObject"; +export * from "./GiftCardCustomerLinkedEvent"; +export * from "./GiftCardCustomerLinkedEventData"; +export * from "./GiftCardCustomerLinkedEventObject"; +export * from "./GiftCardCustomerUnlinkedEvent"; +export * from "./GiftCardCustomerUnlinkedEventData"; +export * from "./GiftCardCustomerUnlinkedEventObject"; export * from "./GiftCardGanSource"; export * from "./GiftCardStatus"; export * from "./GiftCardType"; +export * from "./GiftCardUpdatedEvent"; +export * from "./GiftCardUpdatedEventData"; +export * from "./GiftCardUpdatedEventObject"; export * from "./InventoryAdjustment"; export * from "./InventoryAdjustmentGroup"; export * from "./InventoryAlertType"; export * from "./InventoryChange"; export * from "./InventoryChangeType"; export * from "./InventoryCount"; +export * from "./InventoryCountUpdatedEvent"; +export * from "./InventoryCountUpdatedEventData"; +export * from "./InventoryCountUpdatedEventObject"; export * from "./InventoryPhysicalCount"; export * from "./InventoryState"; export * from "./InventoryTransfer"; @@ -431,25 +562,81 @@ export * from "./Invoice"; export * from "./InvoiceAcceptedPaymentMethods"; export * from "./InvoiceAttachment"; export * from "./InvoiceAutomaticPaymentSource"; +export * from "./InvoiceCanceledEvent"; +export * from "./InvoiceCanceledEventData"; +export * from "./InvoiceCanceledEventObject"; +export * from "./InvoiceCreatedEvent"; +export * from "./InvoiceCreatedEventData"; +export * from "./InvoiceCreatedEventObject"; export * from "./InvoiceCustomField"; export * from "./InvoiceCustomFieldPlacement"; +export * from "./InvoiceDeletedEvent"; +export * from "./InvoiceDeletedEventData"; export * from "./InvoiceDeliveryMethod"; export * from "./InvoiceFilter"; +export * from "./InvoicePaymentMadeEvent"; +export * from "./InvoicePaymentMadeEventData"; +export * from "./InvoicePaymentMadeEventObject"; export * from "./InvoicePaymentReminder"; export * from "./InvoicePaymentReminderStatus"; export * from "./InvoicePaymentRequest"; +export * from "./InvoicePublishedEvent"; +export * from "./InvoicePublishedEventData"; +export * from "./InvoicePublishedEventObject"; export * from "./InvoiceQuery"; export * from "./InvoiceRecipient"; export * from "./InvoiceRecipientTaxIds"; +export * from "./InvoiceRefundedEvent"; +export * from "./InvoiceRefundedEventData"; +export * from "./InvoiceRefundedEventObject"; export * from "./InvoiceRequestMethod"; export * from "./InvoiceRequestType"; +export * from "./InvoiceScheduledChargeFailedEvent"; +export * from "./InvoiceScheduledChargeFailedEventData"; +export * from "./InvoiceScheduledChargeFailedEventObject"; export * from "./InvoiceSort"; export * from "./InvoiceSortField"; export * from "./InvoiceStatus"; +export * from "./InvoiceUpdatedEvent"; +export * from "./InvoiceUpdatedEventData"; +export * from "./InvoiceUpdatedEventObject"; export * from "./ItemVariationLocationOverrides"; export * from "./Job"; export * from "./JobAssignment"; export * from "./JobAssignmentPayType"; +export * from "./JobCreatedEvent"; +export * from "./JobCreatedEventData"; +export * from "./JobCreatedEventObject"; +export * from "./JobUpdatedEvent"; +export * from "./JobUpdatedEventData"; +export * from "./JobUpdatedEventObject"; +export * from "./LaborScheduledShiftCreatedEvent"; +export * from "./LaborScheduledShiftCreatedEventData"; +export * from "./LaborScheduledShiftCreatedEventObject"; +export * from "./LaborScheduledShiftDeletedEvent"; +export * from "./LaborScheduledShiftDeletedEventData"; +export * from "./LaborScheduledShiftPublishedEvent"; +export * from "./LaborScheduledShiftPublishedEventData"; +export * from "./LaborScheduledShiftPublishedEventObject"; +export * from "./LaborScheduledShiftUpdatedEvent"; +export * from "./LaborScheduledShiftUpdatedEventData"; +export * from "./LaborScheduledShiftUpdatedEventObject"; +export * from "./LaborShiftCreatedEvent"; +export * from "./LaborShiftCreatedEventData"; +export * from "./LaborShiftCreatedEventObject"; +export * from "./LaborShiftDeletedEvent"; +export * from "./LaborShiftDeletedEventData"; +export * from "./LaborShiftUpdatedEvent"; +export * from "./LaborShiftUpdatedEventData"; +export * from "./LaborShiftUpdatedEventObject"; +export * from "./LaborTimecardCreatedEvent"; +export * from "./LaborTimecardCreatedEventData"; +export * from "./LaborTimecardCreatedEventObject"; +export * from "./LaborTimecardDeletedEvent"; +export * from "./LaborTimecardDeletedEventData"; +export * from "./LaborTimecardUpdatedEvent"; +export * from "./LaborTimecardUpdatedEventData"; +export * from "./LaborTimecardUpdatedEventObject"; export * from "./LinkCustomerToGiftCardResponse"; export * from "./ListBankAccountsResponse"; export * from "./ListBookingCustomAttributeDefinitionsResponse"; @@ -505,16 +692,46 @@ export * from "./ListWorkweekConfigsResponse"; export * from "./Location"; export * from "./LocationBookingProfile"; export * from "./LocationCapability"; +export * from "./LocationCreatedEvent"; +export * from "./LocationCreatedEventData"; +export * from "./LocationCustomAttributeDefinitionOwnedCreatedEvent"; +export * from "./LocationCustomAttributeDefinitionOwnedDeletedEvent"; +export * from "./LocationCustomAttributeDefinitionOwnedUpdatedEvent"; +export * from "./LocationCustomAttributeDefinitionVisibleCreatedEvent"; +export * from "./LocationCustomAttributeDefinitionVisibleDeletedEvent"; +export * from "./LocationCustomAttributeDefinitionVisibleUpdatedEvent"; +export * from "./LocationCustomAttributeOwnedDeletedEvent"; +export * from "./LocationCustomAttributeOwnedUpdatedEvent"; +export * from "./LocationCustomAttributeVisibleDeletedEvent"; +export * from "./LocationCustomAttributeVisibleUpdatedEvent"; +export * from "./LocationSettingsUpdatedEvent"; +export * from "./LocationSettingsUpdatedEventData"; +export * from "./LocationSettingsUpdatedEventObject"; export * from "./LocationStatus"; export * from "./LocationType"; +export * from "./LocationUpdatedEvent"; +export * from "./LocationUpdatedEventData"; export * from "./LoyaltyAccount"; +export * from "./LoyaltyAccountCreatedEvent"; +export * from "./LoyaltyAccountCreatedEventData"; +export * from "./LoyaltyAccountCreatedEventObject"; +export * from "./LoyaltyAccountDeletedEvent"; +export * from "./LoyaltyAccountDeletedEventData"; +export * from "./LoyaltyAccountDeletedEventObject"; export * from "./LoyaltyAccountExpiringPointDeadline"; export * from "./LoyaltyAccountMapping"; +export * from "./LoyaltyAccountMappingType"; +export * from "./LoyaltyAccountUpdatedEvent"; +export * from "./LoyaltyAccountUpdatedEventData"; +export * from "./LoyaltyAccountUpdatedEventObject"; export * from "./LoyaltyEvent"; export * from "./LoyaltyEventAccumulatePoints"; export * from "./LoyaltyEventAccumulatePromotionPoints"; export * from "./LoyaltyEventAdjustPoints"; export * from "./LoyaltyEventCreateReward"; +export * from "./LoyaltyEventCreatedEvent"; +export * from "./LoyaltyEventCreatedEventData"; +export * from "./LoyaltyEventCreatedEventObject"; export * from "./LoyaltyEventDateTimeFilter"; export * from "./LoyaltyEventDeleteReward"; export * from "./LoyaltyEventExpirePoints"; @@ -536,15 +753,21 @@ export * from "./LoyaltyProgramAccrualRuleSpendData"; export * from "./LoyaltyProgramAccrualRuleTaxMode"; export * from "./LoyaltyProgramAccrualRuleType"; export * from "./LoyaltyProgramAccrualRuleVisitData"; +export * from "./LoyaltyProgramCreatedEvent"; +export * from "./LoyaltyProgramCreatedEventData"; +export * from "./LoyaltyProgramCreatedEventObject"; export * from "./LoyaltyProgramExpirationPolicy"; -export * from "./LoyaltyProgramRewardDefinition"; -export * from "./LoyaltyProgramRewardDefinitionScope"; -export * from "./LoyaltyProgramRewardDefinitionType"; export * from "./LoyaltyProgramRewardTier"; export * from "./LoyaltyProgramStatus"; export * from "./LoyaltyProgramTerminology"; +export * from "./LoyaltyProgramUpdatedEvent"; +export * from "./LoyaltyProgramUpdatedEventData"; +export * from "./LoyaltyProgramUpdatedEventObject"; export * from "./LoyaltyPromotion"; export * from "./LoyaltyPromotionAvailableTimeData"; +export * from "./LoyaltyPromotionCreatedEvent"; +export * from "./LoyaltyPromotionCreatedEventData"; +export * from "./LoyaltyPromotionCreatedEventObject"; export * from "./LoyaltyPromotionIncentive"; export * from "./LoyaltyPromotionIncentivePointsAdditionData"; export * from "./LoyaltyPromotionIncentivePointsMultiplierData"; @@ -552,6 +775,9 @@ export * from "./LoyaltyPromotionIncentiveType"; export * from "./LoyaltyPromotionStatus"; export * from "./LoyaltyPromotionTriggerLimit"; export * from "./LoyaltyPromotionTriggerLimitInterval"; +export * from "./LoyaltyPromotionUpdatedEvent"; +export * from "./LoyaltyPromotionUpdatedEventData"; +export * from "./LoyaltyPromotionUpdatedEventObject"; export * from "./LoyaltyReward"; export * from "./LoyaltyRewardStatus"; export * from "./MeasurementUnit"; @@ -564,13 +790,55 @@ export * from "./MeasurementUnitUnitType"; export * from "./MeasurementUnitVolume"; export * from "./MeasurementUnitWeight"; export * from "./Merchant"; +export * from "./MerchantCustomAttributeDefinitionOwnedCreatedEvent"; +export * from "./MerchantCustomAttributeDefinitionOwnedDeletedEvent"; +export * from "./MerchantCustomAttributeDefinitionOwnedUpdatedEvent"; +export * from "./MerchantCustomAttributeDefinitionVisibleCreatedEvent"; +export * from "./MerchantCustomAttributeDefinitionVisibleDeletedEvent"; +export * from "./MerchantCustomAttributeDefinitionVisibleUpdatedEvent"; +export * from "./MerchantCustomAttributeOwnedDeletedEvent"; +export * from "./MerchantCustomAttributeOwnedUpdatedEvent"; +export * from "./MerchantCustomAttributeVisibleDeletedEvent"; +export * from "./MerchantCustomAttributeVisibleUpdatedEvent"; +export * from "./MerchantSettingsUpdatedEvent"; +export * from "./MerchantSettingsUpdatedEventData"; +export * from "./MerchantSettingsUpdatedEventObject"; export * from "./MerchantStatus"; export * from "./ModifierLocationOverrides"; export * from "./Money"; +export * from "./OauthAuthorizationRevokedEvent"; +export * from "./OauthAuthorizationRevokedEventData"; +export * from "./OauthAuthorizationRevokedEventObject"; +export * from "./OauthAuthorizationRevokedEventRevocationObject"; +export * from "./OauthAuthorizationRevokedEventRevokerType"; export * from "./ObtainTokenResponse"; export * from "./OfflinePaymentDetails"; export * from "./Order"; +export * from "./OrderCreated"; +export * from "./OrderCreatedEvent"; +export * from "./OrderCreatedEventData"; +export * from "./OrderCreatedObject"; +export * from "./OrderCustomAttributeDefinitionOwnedCreatedEvent"; +export * from "./OrderCustomAttributeDefinitionOwnedDeletedEvent"; +export * from "./OrderCustomAttributeDefinitionOwnedUpdatedEvent"; +export * from "./OrderCustomAttributeDefinitionVisibleCreatedEvent"; +export * from "./OrderCustomAttributeDefinitionVisibleDeletedEvent"; +export * from "./OrderCustomAttributeDefinitionVisibleUpdatedEvent"; +export * from "./OrderCustomAttributeOwnedDeletedEvent"; +export * from "./OrderCustomAttributeOwnedUpdatedEvent"; +export * from "./OrderCustomAttributeVisibleDeletedEvent"; +export * from "./OrderCustomAttributeVisibleUpdatedEvent"; export * from "./OrderEntry"; +export * from "./OrderFulfillmentDeliveryDetailsScheduleType"; +export * from "./OrderFulfillmentFulfillmentLineItemApplication"; +export * from "./OrderFulfillmentPickupDetailsScheduleType"; +export * from "./OrderFulfillmentState"; +export * from "./OrderFulfillmentType"; +export * from "./OrderFulfillmentUpdated"; +export * from "./OrderFulfillmentUpdatedEvent"; +export * from "./OrderFulfillmentUpdatedEventData"; +export * from "./OrderFulfillmentUpdatedObject"; +export * from "./OrderFulfillmentUpdatedUpdate"; export * from "./OrderLineItem"; export * from "./OrderLineItemAppliedDiscount"; export * from "./OrderLineItemAppliedServiceCharge"; @@ -605,6 +873,10 @@ export * from "./OrderServiceChargeTreatmentType"; export * from "./OrderServiceChargeType"; export * from "./OrderSource"; export * from "./OrderState"; +export * from "./OrderUpdated"; +export * from "./OrderUpdatedEvent"; +export * from "./OrderUpdatedEventData"; +export * from "./OrderUpdatedObject"; export * from "./PauseSubscriptionResponse"; export * from "./PayOrderResponse"; export * from "./Payment"; @@ -633,15 +905,30 @@ export * from "./PaymentBalanceActivitySquarePayrollTransferReversedDetail"; export * from "./PaymentBalanceActivityTaxOnFeeDetail"; export * from "./PaymentBalanceActivityThirdPartyFeeDetail"; export * from "./PaymentBalanceActivityThirdPartyFeeRefundDetail"; +export * from "./PaymentCreatedEvent"; +export * from "./PaymentCreatedEventData"; +export * from "./PaymentCreatedEventObject"; export * from "./PaymentLink"; export * from "./PaymentLinkRelatedResources"; export * from "./PaymentOptions"; export * from "./PaymentOptionsDelayAction"; export * from "./PaymentRefund"; +export * from "./PaymentUpdatedEvent"; +export * from "./PaymentUpdatedEventData"; +export * from "./PaymentUpdatedEventObject"; export * from "./Payout"; export * from "./PayoutEntry"; +export * from "./PayoutFailedEvent"; +export * from "./PayoutFailedEventData"; +export * from "./PayoutFailedEventObject"; export * from "./PayoutFee"; export * from "./PayoutFeeType"; +export * from "./PayoutPaidEvent"; +export * from "./PayoutPaidEventData"; +export * from "./PayoutPaidEventObject"; +export * from "./PayoutSentEvent"; +export * from "./PayoutSentEventData"; +export * from "./PayoutSentEventObject"; export * from "./PayoutStatus"; export * from "./PayoutType"; export * from "./Phase"; @@ -658,8 +945,14 @@ export * from "./Range"; export * from "./ReceiptOptions"; export * from "./RedeemLoyaltyRewardResponse"; export * from "./Refund"; +export * from "./RefundCreatedEvent"; +export * from "./RefundCreatedEventData"; +export * from "./RefundCreatedEventObject"; export * from "./RefundPaymentResponse"; export * from "./RefundStatus"; +export * from "./RefundUpdatedEvent"; +export * from "./RefundUpdatedEventData"; +export * from "./RefundUpdatedEventObject"; export * from "./RegisterDomainResponse"; export * from "./RegisterDomainResponseStatus"; export * from "./RemoveGroupFromCustomerResponse"; @@ -803,6 +1096,9 @@ export * from "./Subscription"; export * from "./SubscriptionAction"; export * from "./SubscriptionActionType"; export * from "./SubscriptionCadence"; +export * from "./SubscriptionCreatedEvent"; +export * from "./SubscriptionCreatedEventData"; +export * from "./SubscriptionCreatedEventObject"; export * from "./SubscriptionEvent"; export * from "./SubscriptionEventInfo"; export * from "./SubscriptionEventInfoCode"; @@ -813,6 +1109,9 @@ export * from "./SubscriptionPricingType"; export * from "./SubscriptionSource"; export * from "./SubscriptionStatus"; export * from "./SubscriptionTestResult"; +export * from "./SubscriptionUpdatedEvent"; +export * from "./SubscriptionUpdatedEventData"; +export * from "./SubscriptionUpdatedEventObject"; export * from "./SwapPlanResponse"; export * from "./TaxCalculationPhase"; export * from "./TaxIds"; @@ -821,8 +1120,18 @@ export * from "./TeamMember"; export * from "./TeamMemberAssignedLocations"; export * from "./TeamMemberAssignedLocationsAssignmentType"; export * from "./TeamMemberBookingProfile"; +export * from "./TeamMemberCreatedEvent"; +export * from "./TeamMemberCreatedEventData"; +export * from "./TeamMemberCreatedEventObject"; +export * from "./TeamMemberInvitationStatus"; export * from "./TeamMemberStatus"; +export * from "./TeamMemberUpdatedEvent"; +export * from "./TeamMemberUpdatedEventData"; +export * from "./TeamMemberUpdatedEventObject"; export * from "./TeamMemberWage"; +export * from "./TeamMemberWageSettingUpdatedEvent"; +export * from "./TeamMemberWageSettingUpdatedEventData"; +export * from "./TeamMemberWageSettingUpdatedEventObject"; export * from "./Tender"; export * from "./TenderBankAccountDetails"; export * from "./TenderBankAccountDetailsStatus"; @@ -838,17 +1147,35 @@ export * from "./TenderSquareAccountDetailsStatus"; export * from "./TenderType"; export * from "./TerminalAction"; export * from "./TerminalActionActionType"; +export * from "./TerminalActionCreatedEvent"; +export * from "./TerminalActionCreatedEventData"; +export * from "./TerminalActionCreatedEventObject"; export * from "./TerminalActionQuery"; export * from "./TerminalActionQueryFilter"; export * from "./TerminalActionQuerySort"; +export * from "./TerminalActionUpdatedEvent"; +export * from "./TerminalActionUpdatedEventData"; +export * from "./TerminalActionUpdatedEventObject"; export * from "./TerminalCheckout"; +export * from "./TerminalCheckoutCreatedEvent"; +export * from "./TerminalCheckoutCreatedEventData"; +export * from "./TerminalCheckoutCreatedEventObject"; export * from "./TerminalCheckoutQuery"; export * from "./TerminalCheckoutQueryFilter"; export * from "./TerminalCheckoutQuerySort"; +export * from "./TerminalCheckoutUpdatedEvent"; +export * from "./TerminalCheckoutUpdatedEventData"; +export * from "./TerminalCheckoutUpdatedEventObject"; export * from "./TerminalRefund"; +export * from "./TerminalRefundCreatedEvent"; +export * from "./TerminalRefundCreatedEventData"; +export * from "./TerminalRefundCreatedEventObject"; export * from "./TerminalRefundQuery"; export * from "./TerminalRefundQueryFilter"; export * from "./TerminalRefundQuerySort"; +export * from "./TerminalRefundUpdatedEvent"; +export * from "./TerminalRefundUpdatedEventData"; +export * from "./TerminalRefundUpdatedEventObject"; export * from "./TestWebhookSubscriptionResponse"; export * from "./TimeRange"; export * from "./Timecard"; @@ -864,6 +1191,7 @@ export * from "./TimecardWorkdayMatcher"; export * from "./TipSettings"; export * from "./Transaction"; export * from "./TransactionProduct"; +export * from "./TransactionType"; export * from "./UnlinkCustomerFromGiftCardResponse"; export * from "./UpdateBookingCustomAttributeDefinitionResponse"; export * from "./UpdateBookingResponse"; @@ -917,7 +1245,15 @@ export * from "./V1TenderType"; export * from "./V1UpdateOrderRequestAction"; export * from "./Vendor"; export * from "./VendorContact"; +export * from "./VendorCreatedEvent"; +export * from "./VendorCreatedEventData"; +export * from "./VendorCreatedEventObject"; +export * from "./VendorCreatedEventObjectOperation"; export * from "./VendorStatus"; +export * from "./VendorUpdatedEvent"; +export * from "./VendorUpdatedEventData"; +export * from "./VendorUpdatedEventObject"; +export * from "./VendorUpdatedEventObjectOperation"; export * from "./VisibilityFilter"; export * from "./VoidTransactionResponse"; export * from "./WageSetting"; @@ -942,3 +1278,33 @@ export * from "./CatalogObjectCustomAttributeDefinition"; export * from "./CatalogObjectQuickAmountsSettings"; export * from "./CatalogObjectSubscriptionPlan"; export * from "./CatalogObjectAvailabilityPeriod"; +export * from "./GetLoyaltyAccountRequest"; +export * from "./GetLoyaltyProgramRequest"; +export * from "./GetLoyaltyPromotionRequest"; +export * from "./GetLoyaltyRewardRequest"; +export * from "./GetCardRequest"; +export * from "./GetDisputeEvidenceRequest"; +export * from "./GetDisputeRequest"; +export * from "./V1GetPaymentRequest"; +export * from "./V1GetSettlementRequest"; +export * from "./GetCustomerGroupRequest"; +export * from "./GetCustomerRequest"; +export * from "./GetCustomerSegmentRequest"; +export * from "./GetTransactionRequest"; +export * from "./GetBookingRequest"; +export * from "./GetBusinessBookingProfileRequest"; +export * from "./GetTeamMemberBookingProfileRequest"; +export * from "./GetSnippetRequest"; +export * from "./GetInventoryAdjustmentRequest"; +export * from "./GetInventoryPhysicalCountRequest"; +export * from "./GetInventoryTransferRequest"; +export * from "./GetVendorRequest"; +export * from "./GetPaymentLinkRequest"; +export * from "./GetGiftCardRequest"; +export * from "./GetOrderRequest"; +export * from "./GetEmployeeRequest"; +export * from "./GetLocationRequest"; +export * from "./GetMerchantRequest"; +export * from "./GetTeamMemberRequest"; +export * from "./GetWageSettingRequest"; +export * from "./GetWebhookSubscriptionRequest"; diff --git a/src/serialization/types/BankAccountCreatedEvent.ts b/src/serialization/types/BankAccountCreatedEvent.ts new file mode 100644 index 000000000..f7b60414b --- /dev/null +++ b/src/serialization/types/BankAccountCreatedEvent.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { BankAccountCreatedEventData } from "./BankAccountCreatedEventData"; + +export const BankAccountCreatedEvent: core.serialization.ObjectSchema< + serializers.BankAccountCreatedEvent.Raw, + Square.BankAccountCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + locationId: core.serialization.property("location_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: BankAccountCreatedEventData.optional(), +}); + +export declare namespace BankAccountCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + location_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: BankAccountCreatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/BankAccountCreatedEventData.ts b/src/serialization/types/BankAccountCreatedEventData.ts new file mode 100644 index 000000000..4039ba596 --- /dev/null +++ b/src/serialization/types/BankAccountCreatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { BankAccountCreatedEventObject } from "./BankAccountCreatedEventObject"; + +export const BankAccountCreatedEventData: core.serialization.ObjectSchema< + serializers.BankAccountCreatedEventData.Raw, + Square.BankAccountCreatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: BankAccountCreatedEventObject.optional(), +}); + +export declare namespace BankAccountCreatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: BankAccountCreatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/BankAccountCreatedEventObject.ts b/src/serialization/types/BankAccountCreatedEventObject.ts new file mode 100644 index 000000000..f37db6a8a --- /dev/null +++ b/src/serialization/types/BankAccountCreatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { BankAccount } from "./BankAccount"; + +export const BankAccountCreatedEventObject: core.serialization.ObjectSchema< + serializers.BankAccountCreatedEventObject.Raw, + Square.BankAccountCreatedEventObject +> = core.serialization.object({ + bankAccount: core.serialization.property("bank_account", BankAccount.optional()), +}); + +export declare namespace BankAccountCreatedEventObject { + export interface Raw { + bank_account?: BankAccount.Raw | null; + } +} diff --git a/src/serialization/types/BankAccountDisabledEvent.ts b/src/serialization/types/BankAccountDisabledEvent.ts new file mode 100644 index 000000000..816ccc1b4 --- /dev/null +++ b/src/serialization/types/BankAccountDisabledEvent.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { BankAccountDisabledEventData } from "./BankAccountDisabledEventData"; + +export const BankAccountDisabledEvent: core.serialization.ObjectSchema< + serializers.BankAccountDisabledEvent.Raw, + Square.BankAccountDisabledEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + locationId: core.serialization.property("location_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: BankAccountDisabledEventData.optional(), +}); + +export declare namespace BankAccountDisabledEvent { + export interface Raw { + merchant_id?: (string | null) | null; + location_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: BankAccountDisabledEventData.Raw | null; + } +} diff --git a/src/serialization/types/BankAccountDisabledEventData.ts b/src/serialization/types/BankAccountDisabledEventData.ts new file mode 100644 index 000000000..713331f7c --- /dev/null +++ b/src/serialization/types/BankAccountDisabledEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { BankAccountDisabledEventObject } from "./BankAccountDisabledEventObject"; + +export const BankAccountDisabledEventData: core.serialization.ObjectSchema< + serializers.BankAccountDisabledEventData.Raw, + Square.BankAccountDisabledEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: BankAccountDisabledEventObject.optional(), +}); + +export declare namespace BankAccountDisabledEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: BankAccountDisabledEventObject.Raw | null; + } +} diff --git a/src/serialization/types/BankAccountDisabledEventObject.ts b/src/serialization/types/BankAccountDisabledEventObject.ts new file mode 100644 index 000000000..4ae222e30 --- /dev/null +++ b/src/serialization/types/BankAccountDisabledEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { BankAccount } from "./BankAccount"; + +export const BankAccountDisabledEventObject: core.serialization.ObjectSchema< + serializers.BankAccountDisabledEventObject.Raw, + Square.BankAccountDisabledEventObject +> = core.serialization.object({ + bankAccount: core.serialization.property("bank_account", BankAccount.optional()), +}); + +export declare namespace BankAccountDisabledEventObject { + export interface Raw { + bank_account?: BankAccount.Raw | null; + } +} diff --git a/src/serialization/types/BankAccountVerifiedEvent.ts b/src/serialization/types/BankAccountVerifiedEvent.ts new file mode 100644 index 000000000..59d4dd820 --- /dev/null +++ b/src/serialization/types/BankAccountVerifiedEvent.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { BankAccountVerifiedEventData } from "./BankAccountVerifiedEventData"; + +export const BankAccountVerifiedEvent: core.serialization.ObjectSchema< + serializers.BankAccountVerifiedEvent.Raw, + Square.BankAccountVerifiedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + locationId: core.serialization.property("location_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: BankAccountVerifiedEventData.optional(), +}); + +export declare namespace BankAccountVerifiedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + location_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: BankAccountVerifiedEventData.Raw | null; + } +} diff --git a/src/serialization/types/BankAccountVerifiedEventData.ts b/src/serialization/types/BankAccountVerifiedEventData.ts new file mode 100644 index 000000000..5da93bb5e --- /dev/null +++ b/src/serialization/types/BankAccountVerifiedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { BankAccountVerifiedEventObject } from "./BankAccountVerifiedEventObject"; + +export const BankAccountVerifiedEventData: core.serialization.ObjectSchema< + serializers.BankAccountVerifiedEventData.Raw, + Square.BankAccountVerifiedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: BankAccountVerifiedEventObject.optional(), +}); + +export declare namespace BankAccountVerifiedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: BankAccountVerifiedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/BankAccountVerifiedEventObject.ts b/src/serialization/types/BankAccountVerifiedEventObject.ts new file mode 100644 index 000000000..f9a9214d7 --- /dev/null +++ b/src/serialization/types/BankAccountVerifiedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { BankAccount } from "./BankAccount"; + +export const BankAccountVerifiedEventObject: core.serialization.ObjectSchema< + serializers.BankAccountVerifiedEventObject.Raw, + Square.BankAccountVerifiedEventObject +> = core.serialization.object({ + bankAccount: core.serialization.property("bank_account", BankAccount.optional()), +}); + +export declare namespace BankAccountVerifiedEventObject { + export interface Raw { + bank_account?: BankAccount.Raw | null; + } +} diff --git a/src/serialization/types/BookingCreatedEvent.ts b/src/serialization/types/BookingCreatedEvent.ts new file mode 100644 index 000000000..0b4853f56 --- /dev/null +++ b/src/serialization/types/BookingCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { BookingCreatedEventData } from "./BookingCreatedEventData"; + +export const BookingCreatedEvent: core.serialization.ObjectSchema< + serializers.BookingCreatedEvent.Raw, + Square.BookingCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: BookingCreatedEventData.optional(), +}); + +export declare namespace BookingCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: BookingCreatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/BookingCreatedEventData.ts b/src/serialization/types/BookingCreatedEventData.ts new file mode 100644 index 000000000..2634c25da --- /dev/null +++ b/src/serialization/types/BookingCreatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { BookingCreatedEventObject } from "./BookingCreatedEventObject"; + +export const BookingCreatedEventData: core.serialization.ObjectSchema< + serializers.BookingCreatedEventData.Raw, + Square.BookingCreatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: BookingCreatedEventObject.optional(), +}); + +export declare namespace BookingCreatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: BookingCreatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/BookingCreatedEventObject.ts b/src/serialization/types/BookingCreatedEventObject.ts new file mode 100644 index 000000000..24f223757 --- /dev/null +++ b/src/serialization/types/BookingCreatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Booking } from "./Booking"; + +export const BookingCreatedEventObject: core.serialization.ObjectSchema< + serializers.BookingCreatedEventObject.Raw, + Square.BookingCreatedEventObject +> = core.serialization.object({ + booking: Booking.optional(), +}); + +export declare namespace BookingCreatedEventObject { + export interface Raw { + booking?: Booking.Raw | null; + } +} diff --git a/src/serialization/types/BookingCustomAttributeDefinitionOwnedCreatedEvent.ts b/src/serialization/types/BookingCustomAttributeDefinitionOwnedCreatedEvent.ts new file mode 100644 index 000000000..32240578b --- /dev/null +++ b/src/serialization/types/BookingCustomAttributeDefinitionOwnedCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const BookingCustomAttributeDefinitionOwnedCreatedEvent: core.serialization.ObjectSchema< + serializers.BookingCustomAttributeDefinitionOwnedCreatedEvent.Raw, + Square.BookingCustomAttributeDefinitionOwnedCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace BookingCustomAttributeDefinitionOwnedCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/BookingCustomAttributeDefinitionOwnedDeletedEvent.ts b/src/serialization/types/BookingCustomAttributeDefinitionOwnedDeletedEvent.ts new file mode 100644 index 000000000..33b42ada4 --- /dev/null +++ b/src/serialization/types/BookingCustomAttributeDefinitionOwnedDeletedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const BookingCustomAttributeDefinitionOwnedDeletedEvent: core.serialization.ObjectSchema< + serializers.BookingCustomAttributeDefinitionOwnedDeletedEvent.Raw, + Square.BookingCustomAttributeDefinitionOwnedDeletedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace BookingCustomAttributeDefinitionOwnedDeletedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/BookingCustomAttributeDefinitionOwnedUpdatedEvent.ts b/src/serialization/types/BookingCustomAttributeDefinitionOwnedUpdatedEvent.ts new file mode 100644 index 000000000..42143c6fb --- /dev/null +++ b/src/serialization/types/BookingCustomAttributeDefinitionOwnedUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const BookingCustomAttributeDefinitionOwnedUpdatedEvent: core.serialization.ObjectSchema< + serializers.BookingCustomAttributeDefinitionOwnedUpdatedEvent.Raw, + Square.BookingCustomAttributeDefinitionOwnedUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace BookingCustomAttributeDefinitionOwnedUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/BookingCustomAttributeDefinitionVisibleCreatedEvent.ts b/src/serialization/types/BookingCustomAttributeDefinitionVisibleCreatedEvent.ts new file mode 100644 index 000000000..92130d330 --- /dev/null +++ b/src/serialization/types/BookingCustomAttributeDefinitionVisibleCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const BookingCustomAttributeDefinitionVisibleCreatedEvent: core.serialization.ObjectSchema< + serializers.BookingCustomAttributeDefinitionVisibleCreatedEvent.Raw, + Square.BookingCustomAttributeDefinitionVisibleCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace BookingCustomAttributeDefinitionVisibleCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/BookingCustomAttributeDefinitionVisibleDeletedEvent.ts b/src/serialization/types/BookingCustomAttributeDefinitionVisibleDeletedEvent.ts new file mode 100644 index 000000000..97f7b7586 --- /dev/null +++ b/src/serialization/types/BookingCustomAttributeDefinitionVisibleDeletedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const BookingCustomAttributeDefinitionVisibleDeletedEvent: core.serialization.ObjectSchema< + serializers.BookingCustomAttributeDefinitionVisibleDeletedEvent.Raw, + Square.BookingCustomAttributeDefinitionVisibleDeletedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace BookingCustomAttributeDefinitionVisibleDeletedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/BookingCustomAttributeDefinitionVisibleUpdatedEvent.ts b/src/serialization/types/BookingCustomAttributeDefinitionVisibleUpdatedEvent.ts new file mode 100644 index 000000000..dcdef9d35 --- /dev/null +++ b/src/serialization/types/BookingCustomAttributeDefinitionVisibleUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const BookingCustomAttributeDefinitionVisibleUpdatedEvent: core.serialization.ObjectSchema< + serializers.BookingCustomAttributeDefinitionVisibleUpdatedEvent.Raw, + Square.BookingCustomAttributeDefinitionVisibleUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace BookingCustomAttributeDefinitionVisibleUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/BookingCustomAttributeOwnedDeletedEvent.ts b/src/serialization/types/BookingCustomAttributeOwnedDeletedEvent.ts new file mode 100644 index 000000000..c3aa6d573 --- /dev/null +++ b/src/serialization/types/BookingCustomAttributeOwnedDeletedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeEventData } from "./CustomAttributeEventData"; + +export const BookingCustomAttributeOwnedDeletedEvent: core.serialization.ObjectSchema< + serializers.BookingCustomAttributeOwnedDeletedEvent.Raw, + Square.BookingCustomAttributeOwnedDeletedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeEventData.optional(), +}); + +export declare namespace BookingCustomAttributeOwnedDeletedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeEventData.Raw | null; + } +} diff --git a/src/serialization/types/BookingCustomAttributeOwnedUpdatedEvent.ts b/src/serialization/types/BookingCustomAttributeOwnedUpdatedEvent.ts new file mode 100644 index 000000000..4d98023a8 --- /dev/null +++ b/src/serialization/types/BookingCustomAttributeOwnedUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeEventData } from "./CustomAttributeEventData"; + +export const BookingCustomAttributeOwnedUpdatedEvent: core.serialization.ObjectSchema< + serializers.BookingCustomAttributeOwnedUpdatedEvent.Raw, + Square.BookingCustomAttributeOwnedUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeEventData.optional(), +}); + +export declare namespace BookingCustomAttributeOwnedUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeEventData.Raw | null; + } +} diff --git a/src/serialization/types/BookingCustomAttributeVisibleDeletedEvent.ts b/src/serialization/types/BookingCustomAttributeVisibleDeletedEvent.ts new file mode 100644 index 000000000..586fef885 --- /dev/null +++ b/src/serialization/types/BookingCustomAttributeVisibleDeletedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeEventData } from "./CustomAttributeEventData"; + +export const BookingCustomAttributeVisibleDeletedEvent: core.serialization.ObjectSchema< + serializers.BookingCustomAttributeVisibleDeletedEvent.Raw, + Square.BookingCustomAttributeVisibleDeletedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeEventData.optional(), +}); + +export declare namespace BookingCustomAttributeVisibleDeletedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeEventData.Raw | null; + } +} diff --git a/src/serialization/types/BookingCustomAttributeVisibleUpdatedEvent.ts b/src/serialization/types/BookingCustomAttributeVisibleUpdatedEvent.ts new file mode 100644 index 000000000..5cd434ad0 --- /dev/null +++ b/src/serialization/types/BookingCustomAttributeVisibleUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeEventData } from "./CustomAttributeEventData"; + +export const BookingCustomAttributeVisibleUpdatedEvent: core.serialization.ObjectSchema< + serializers.BookingCustomAttributeVisibleUpdatedEvent.Raw, + Square.BookingCustomAttributeVisibleUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeEventData.optional(), +}); + +export declare namespace BookingCustomAttributeVisibleUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeEventData.Raw | null; + } +} diff --git a/src/serialization/types/BookingUpdatedEvent.ts b/src/serialization/types/BookingUpdatedEvent.ts new file mode 100644 index 000000000..5b7414856 --- /dev/null +++ b/src/serialization/types/BookingUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { BookingUpdatedEventData } from "./BookingUpdatedEventData"; + +export const BookingUpdatedEvent: core.serialization.ObjectSchema< + serializers.BookingUpdatedEvent.Raw, + Square.BookingUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: BookingUpdatedEventData.optional(), +}); + +export declare namespace BookingUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: BookingUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/BookingUpdatedEventData.ts b/src/serialization/types/BookingUpdatedEventData.ts new file mode 100644 index 000000000..1e4adbe2e --- /dev/null +++ b/src/serialization/types/BookingUpdatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { BookingUpdatedEventObject } from "./BookingUpdatedEventObject"; + +export const BookingUpdatedEventData: core.serialization.ObjectSchema< + serializers.BookingUpdatedEventData.Raw, + Square.BookingUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: BookingUpdatedEventObject.optional(), +}); + +export declare namespace BookingUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: BookingUpdatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/BookingUpdatedEventObject.ts b/src/serialization/types/BookingUpdatedEventObject.ts new file mode 100644 index 000000000..5dcf7f4cc --- /dev/null +++ b/src/serialization/types/BookingUpdatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Booking } from "./Booking"; + +export const BookingUpdatedEventObject: core.serialization.ObjectSchema< + serializers.BookingUpdatedEventObject.Raw, + Square.BookingUpdatedEventObject +> = core.serialization.object({ + booking: Booking.optional(), +}); + +export declare namespace BookingUpdatedEventObject { + export interface Raw { + booking?: Booking.Raw | null; + } +} diff --git a/src/serialization/types/CardAutomaticallyUpdatedEvent.ts b/src/serialization/types/CardAutomaticallyUpdatedEvent.ts new file mode 100644 index 000000000..c99f5340c --- /dev/null +++ b/src/serialization/types/CardAutomaticallyUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CardAutomaticallyUpdatedEventData } from "./CardAutomaticallyUpdatedEventData"; + +export const CardAutomaticallyUpdatedEvent: core.serialization.ObjectSchema< + serializers.CardAutomaticallyUpdatedEvent.Raw, + Square.CardAutomaticallyUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CardAutomaticallyUpdatedEventData.optional(), +}); + +export declare namespace CardAutomaticallyUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CardAutomaticallyUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/CardAutomaticallyUpdatedEventData.ts b/src/serialization/types/CardAutomaticallyUpdatedEventData.ts new file mode 100644 index 000000000..c785306c8 --- /dev/null +++ b/src/serialization/types/CardAutomaticallyUpdatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CardAutomaticallyUpdatedEventObject } from "./CardAutomaticallyUpdatedEventObject"; + +export const CardAutomaticallyUpdatedEventData: core.serialization.ObjectSchema< + serializers.CardAutomaticallyUpdatedEventData.Raw, + Square.CardAutomaticallyUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: CardAutomaticallyUpdatedEventObject.optional(), +}); + +export declare namespace CardAutomaticallyUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: CardAutomaticallyUpdatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/CardAutomaticallyUpdatedEventObject.ts b/src/serialization/types/CardAutomaticallyUpdatedEventObject.ts new file mode 100644 index 000000000..c326dd874 --- /dev/null +++ b/src/serialization/types/CardAutomaticallyUpdatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Card } from "./Card"; + +export const CardAutomaticallyUpdatedEventObject: core.serialization.ObjectSchema< + serializers.CardAutomaticallyUpdatedEventObject.Raw, + Square.CardAutomaticallyUpdatedEventObject +> = core.serialization.object({ + card: Card.optional(), +}); + +export declare namespace CardAutomaticallyUpdatedEventObject { + export interface Raw { + card?: Card.Raw | null; + } +} diff --git a/src/serialization/types/CardCreatedEvent.ts b/src/serialization/types/CardCreatedEvent.ts new file mode 100644 index 000000000..b028b724b --- /dev/null +++ b/src/serialization/types/CardCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CardCreatedEventData } from "./CardCreatedEventData"; + +export const CardCreatedEvent: core.serialization.ObjectSchema< + serializers.CardCreatedEvent.Raw, + Square.CardCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CardCreatedEventData.optional(), +}); + +export declare namespace CardCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CardCreatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/CardCreatedEventData.ts b/src/serialization/types/CardCreatedEventData.ts new file mode 100644 index 000000000..862a2f3be --- /dev/null +++ b/src/serialization/types/CardCreatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CardCreatedEventObject } from "./CardCreatedEventObject"; + +export const CardCreatedEventData: core.serialization.ObjectSchema< + serializers.CardCreatedEventData.Raw, + Square.CardCreatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: CardCreatedEventObject.optional(), +}); + +export declare namespace CardCreatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: CardCreatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/CardCreatedEventObject.ts b/src/serialization/types/CardCreatedEventObject.ts new file mode 100644 index 000000000..3899a5f66 --- /dev/null +++ b/src/serialization/types/CardCreatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Card } from "./Card"; + +export const CardCreatedEventObject: core.serialization.ObjectSchema< + serializers.CardCreatedEventObject.Raw, + Square.CardCreatedEventObject +> = core.serialization.object({ + card: Card.optional(), +}); + +export declare namespace CardCreatedEventObject { + export interface Raw { + card?: Card.Raw | null; + } +} diff --git a/src/serialization/types/CardDisabledEvent.ts b/src/serialization/types/CardDisabledEvent.ts new file mode 100644 index 000000000..5db7cd7b1 --- /dev/null +++ b/src/serialization/types/CardDisabledEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CardDisabledEventData } from "./CardDisabledEventData"; + +export const CardDisabledEvent: core.serialization.ObjectSchema< + serializers.CardDisabledEvent.Raw, + Square.CardDisabledEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CardDisabledEventData.optional(), +}); + +export declare namespace CardDisabledEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CardDisabledEventData.Raw | null; + } +} diff --git a/src/serialization/types/CardDisabledEventData.ts b/src/serialization/types/CardDisabledEventData.ts new file mode 100644 index 000000000..ef3a1e42b --- /dev/null +++ b/src/serialization/types/CardDisabledEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CardDisabledEventObject } from "./CardDisabledEventObject"; + +export const CardDisabledEventData: core.serialization.ObjectSchema< + serializers.CardDisabledEventData.Raw, + Square.CardDisabledEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: CardDisabledEventObject.optional(), +}); + +export declare namespace CardDisabledEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: CardDisabledEventObject.Raw | null; + } +} diff --git a/src/serialization/types/CardDisabledEventObject.ts b/src/serialization/types/CardDisabledEventObject.ts new file mode 100644 index 000000000..9e3b79fa9 --- /dev/null +++ b/src/serialization/types/CardDisabledEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Card } from "./Card"; + +export const CardDisabledEventObject: core.serialization.ObjectSchema< + serializers.CardDisabledEventObject.Raw, + Square.CardDisabledEventObject +> = core.serialization.object({ + card: Card.optional(), +}); + +export declare namespace CardDisabledEventObject { + export interface Raw { + card?: Card.Raw | null; + } +} diff --git a/src/serialization/types/CardForgottenEvent.ts b/src/serialization/types/CardForgottenEvent.ts new file mode 100644 index 000000000..f13d157f2 --- /dev/null +++ b/src/serialization/types/CardForgottenEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CardForgottenEventData } from "./CardForgottenEventData"; + +export const CardForgottenEvent: core.serialization.ObjectSchema< + serializers.CardForgottenEvent.Raw, + Square.CardForgottenEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CardForgottenEventData.optional(), +}); + +export declare namespace CardForgottenEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CardForgottenEventData.Raw | null; + } +} diff --git a/src/serialization/types/CardForgottenEventCard.ts b/src/serialization/types/CardForgottenEventCard.ts new file mode 100644 index 000000000..4e246906e --- /dev/null +++ b/src/serialization/types/CardForgottenEventCard.ts @@ -0,0 +1,30 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const CardForgottenEventCard: core.serialization.ObjectSchema< + serializers.CardForgottenEventCard.Raw, + Square.CardForgottenEventCard +> = core.serialization.object({ + id: core.serialization.string().optional(), + customerId: core.serialization.property("customer_id", core.serialization.string().optionalNullable()), + enabled: core.serialization.boolean().optionalNullable(), + referenceId: core.serialization.property("reference_id", core.serialization.string().optionalNullable()), + version: core.serialization.bigint().optional(), + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), +}); + +export declare namespace CardForgottenEventCard { + export interface Raw { + id?: string | null; + customer_id?: (string | null) | null; + enabled?: (boolean | null) | null; + reference_id?: (string | null) | null; + version?: (bigint | number) | null; + merchant_id?: (string | null) | null; + } +} diff --git a/src/serialization/types/CardForgottenEventData.ts b/src/serialization/types/CardForgottenEventData.ts new file mode 100644 index 000000000..fd8adc9f8 --- /dev/null +++ b/src/serialization/types/CardForgottenEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CardForgottenEventObject } from "./CardForgottenEventObject"; + +export const CardForgottenEventData: core.serialization.ObjectSchema< + serializers.CardForgottenEventData.Raw, + Square.CardForgottenEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: CardForgottenEventObject.optional(), +}); + +export declare namespace CardForgottenEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: CardForgottenEventObject.Raw | null; + } +} diff --git a/src/serialization/types/CardForgottenEventObject.ts b/src/serialization/types/CardForgottenEventObject.ts new file mode 100644 index 000000000..fc22e5208 --- /dev/null +++ b/src/serialization/types/CardForgottenEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CardForgottenEventCard } from "./CardForgottenEventCard"; + +export const CardForgottenEventObject: core.serialization.ObjectSchema< + serializers.CardForgottenEventObject.Raw, + Square.CardForgottenEventObject +> = core.serialization.object({ + card: CardForgottenEventCard.optional(), +}); + +export declare namespace CardForgottenEventObject { + export interface Raw { + card?: CardForgottenEventCard.Raw | null; + } +} diff --git a/src/serialization/types/CardUpdatedEvent.ts b/src/serialization/types/CardUpdatedEvent.ts new file mode 100644 index 000000000..e5cd408bf --- /dev/null +++ b/src/serialization/types/CardUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CardUpdatedEventData } from "./CardUpdatedEventData"; + +export const CardUpdatedEvent: core.serialization.ObjectSchema< + serializers.CardUpdatedEvent.Raw, + Square.CardUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CardUpdatedEventData.optional(), +}); + +export declare namespace CardUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CardUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/CardUpdatedEventData.ts b/src/serialization/types/CardUpdatedEventData.ts new file mode 100644 index 000000000..3cd16e1cb --- /dev/null +++ b/src/serialization/types/CardUpdatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CardUpdatedEventObject } from "./CardUpdatedEventObject"; + +export const CardUpdatedEventData: core.serialization.ObjectSchema< + serializers.CardUpdatedEventData.Raw, + Square.CardUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: CardUpdatedEventObject.optional(), +}); + +export declare namespace CardUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: CardUpdatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/CardUpdatedEventObject.ts b/src/serialization/types/CardUpdatedEventObject.ts new file mode 100644 index 000000000..4609f9e56 --- /dev/null +++ b/src/serialization/types/CardUpdatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Card } from "./Card"; + +export const CardUpdatedEventObject: core.serialization.ObjectSchema< + serializers.CardUpdatedEventObject.Raw, + Square.CardUpdatedEventObject +> = core.serialization.object({ + card: Card.optional(), +}); + +export declare namespace CardUpdatedEventObject { + export interface Raw { + card?: Card.Raw | null; + } +} diff --git a/src/serialization/types/CatalogVersionUpdatedEvent.ts b/src/serialization/types/CatalogVersionUpdatedEvent.ts new file mode 100644 index 000000000..bf46f373e --- /dev/null +++ b/src/serialization/types/CatalogVersionUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CatalogVersionUpdatedEventData } from "./CatalogVersionUpdatedEventData"; + +export const CatalogVersionUpdatedEvent: core.serialization.ObjectSchema< + serializers.CatalogVersionUpdatedEvent.Raw, + Square.CatalogVersionUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CatalogVersionUpdatedEventData.optional(), +}); + +export declare namespace CatalogVersionUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CatalogVersionUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/CatalogVersionUpdatedEventCatalogVersion.ts b/src/serialization/types/CatalogVersionUpdatedEventCatalogVersion.ts new file mode 100644 index 000000000..15e95fe91 --- /dev/null +++ b/src/serialization/types/CatalogVersionUpdatedEventCatalogVersion.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const CatalogVersionUpdatedEventCatalogVersion: core.serialization.ObjectSchema< + serializers.CatalogVersionUpdatedEventCatalogVersion.Raw, + Square.CatalogVersionUpdatedEventCatalogVersion +> = core.serialization.object({ + updatedAt: core.serialization.property("updated_at", core.serialization.string().optional()), +}); + +export declare namespace CatalogVersionUpdatedEventCatalogVersion { + export interface Raw { + updated_at?: string | null; + } +} diff --git a/src/serialization/types/CatalogVersionUpdatedEventData.ts b/src/serialization/types/CatalogVersionUpdatedEventData.ts new file mode 100644 index 000000000..99612b052 --- /dev/null +++ b/src/serialization/types/CatalogVersionUpdatedEventData.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CatalogVersionUpdatedEventObject } from "./CatalogVersionUpdatedEventObject"; + +export const CatalogVersionUpdatedEventData: core.serialization.ObjectSchema< + serializers.CatalogVersionUpdatedEventData.Raw, + Square.CatalogVersionUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + object: CatalogVersionUpdatedEventObject.optional(), +}); + +export declare namespace CatalogVersionUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + object?: CatalogVersionUpdatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/CatalogVersionUpdatedEventObject.ts b/src/serialization/types/CatalogVersionUpdatedEventObject.ts new file mode 100644 index 000000000..1e1dd79c1 --- /dev/null +++ b/src/serialization/types/CatalogVersionUpdatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CatalogVersionUpdatedEventCatalogVersion } from "./CatalogVersionUpdatedEventCatalogVersion"; + +export const CatalogVersionUpdatedEventObject: core.serialization.ObjectSchema< + serializers.CatalogVersionUpdatedEventObject.Raw, + Square.CatalogVersionUpdatedEventObject +> = core.serialization.object({ + catalogVersion: core.serialization.property("catalog_version", CatalogVersionUpdatedEventCatalogVersion.optional()), +}); + +export declare namespace CatalogVersionUpdatedEventObject { + export interface Raw { + catalog_version?: CatalogVersionUpdatedEventCatalogVersion.Raw | null; + } +} diff --git a/src/serialization/types/CustomAttributeDefinitionEventData.ts b/src/serialization/types/CustomAttributeDefinitionEventData.ts new file mode 100644 index 000000000..c18b9bfa7 --- /dev/null +++ b/src/serialization/types/CustomAttributeDefinitionEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventDataObject } from "./CustomAttributeDefinitionEventDataObject"; + +export const CustomAttributeDefinitionEventData: core.serialization.ObjectSchema< + serializers.CustomAttributeDefinitionEventData.Raw, + Square.CustomAttributeDefinitionEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: CustomAttributeDefinitionEventDataObject.optional(), +}); + +export declare namespace CustomAttributeDefinitionEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: CustomAttributeDefinitionEventDataObject.Raw | null; + } +} diff --git a/src/serialization/types/CustomAttributeDefinitionEventDataObject.ts b/src/serialization/types/CustomAttributeDefinitionEventDataObject.ts new file mode 100644 index 000000000..29edfb185 --- /dev/null +++ b/src/serialization/types/CustomAttributeDefinitionEventDataObject.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinition } from "./CustomAttributeDefinition"; + +export const CustomAttributeDefinitionEventDataObject: core.serialization.ObjectSchema< + serializers.CustomAttributeDefinitionEventDataObject.Raw, + Square.CustomAttributeDefinitionEventDataObject +> = core.serialization.object({ + customAttributeDefinition: core.serialization.property( + "custom_attribute_definition", + CustomAttributeDefinition.optional(), + ), +}); + +export declare namespace CustomAttributeDefinitionEventDataObject { + export interface Raw { + custom_attribute_definition?: CustomAttributeDefinition.Raw | null; + } +} diff --git a/src/serialization/types/CustomAttributeEventData.ts b/src/serialization/types/CustomAttributeEventData.ts new file mode 100644 index 000000000..7b5a892d1 --- /dev/null +++ b/src/serialization/types/CustomAttributeEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeEventDataObject } from "./CustomAttributeEventDataObject"; + +export const CustomAttributeEventData: core.serialization.ObjectSchema< + serializers.CustomAttributeEventData.Raw, + Square.CustomAttributeEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: CustomAttributeEventDataObject.optional(), +}); + +export declare namespace CustomAttributeEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: CustomAttributeEventDataObject.Raw | null; + } +} diff --git a/src/serialization/types/CustomAttributeEventDataObject.ts b/src/serialization/types/CustomAttributeEventDataObject.ts new file mode 100644 index 000000000..f67e51e7f --- /dev/null +++ b/src/serialization/types/CustomAttributeEventDataObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttribute } from "./CustomAttribute"; + +export const CustomAttributeEventDataObject: core.serialization.ObjectSchema< + serializers.CustomAttributeEventDataObject.Raw, + Square.CustomAttributeEventDataObject +> = core.serialization.object({ + customAttribute: core.serialization.property("custom_attribute", CustomAttribute.optional()), +}); + +export declare namespace CustomAttributeEventDataObject { + export interface Raw { + custom_attribute?: CustomAttribute.Raw | null; + } +} diff --git a/src/serialization/types/CustomerCreatedEvent.ts b/src/serialization/types/CustomerCreatedEvent.ts new file mode 100644 index 000000000..db327a752 --- /dev/null +++ b/src/serialization/types/CustomerCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomerCreatedEventData } from "./CustomerCreatedEventData"; + +export const CustomerCreatedEvent: core.serialization.ObjectSchema< + serializers.CustomerCreatedEvent.Raw, + Square.CustomerCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomerCreatedEventData.optional(), +}); + +export declare namespace CustomerCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomerCreatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/CustomerCreatedEventData.ts b/src/serialization/types/CustomerCreatedEventData.ts new file mode 100644 index 000000000..e6d13d800 --- /dev/null +++ b/src/serialization/types/CustomerCreatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomerCreatedEventObject } from "./CustomerCreatedEventObject"; + +export const CustomerCreatedEventData: core.serialization.ObjectSchema< + serializers.CustomerCreatedEventData.Raw, + Square.CustomerCreatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: CustomerCreatedEventObject.optional(), +}); + +export declare namespace CustomerCreatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: CustomerCreatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/CustomerCreatedEventEventContext.ts b/src/serialization/types/CustomerCreatedEventEventContext.ts new file mode 100644 index 000000000..560bad1d8 --- /dev/null +++ b/src/serialization/types/CustomerCreatedEventEventContext.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomerCreatedEventEventContextMerge } from "./CustomerCreatedEventEventContextMerge"; + +export const CustomerCreatedEventEventContext: core.serialization.ObjectSchema< + serializers.CustomerCreatedEventEventContext.Raw, + Square.CustomerCreatedEventEventContext +> = core.serialization.object({ + merge: CustomerCreatedEventEventContextMerge.optional(), +}); + +export declare namespace CustomerCreatedEventEventContext { + export interface Raw { + merge?: CustomerCreatedEventEventContextMerge.Raw | null; + } +} diff --git a/src/serialization/types/CustomerCreatedEventEventContextMerge.ts b/src/serialization/types/CustomerCreatedEventEventContextMerge.ts new file mode 100644 index 000000000..ddf65c816 --- /dev/null +++ b/src/serialization/types/CustomerCreatedEventEventContextMerge.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const CustomerCreatedEventEventContextMerge: core.serialization.ObjectSchema< + serializers.CustomerCreatedEventEventContextMerge.Raw, + Square.CustomerCreatedEventEventContextMerge +> = core.serialization.object({ + fromCustomerIds: core.serialization.property( + "from_customer_ids", + core.serialization.list(core.serialization.string()).optionalNullable(), + ), + toCustomerId: core.serialization.property("to_customer_id", core.serialization.string().optionalNullable()), +}); + +export declare namespace CustomerCreatedEventEventContextMerge { + export interface Raw { + from_customer_ids?: (string[] | null) | null; + to_customer_id?: (string | null) | null; + } +} diff --git a/src/serialization/types/CustomerCreatedEventObject.ts b/src/serialization/types/CustomerCreatedEventObject.ts new file mode 100644 index 000000000..8becea722 --- /dev/null +++ b/src/serialization/types/CustomerCreatedEventObject.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Customer } from "./Customer"; +import { CustomerCreatedEventEventContext } from "./CustomerCreatedEventEventContext"; + +export const CustomerCreatedEventObject: core.serialization.ObjectSchema< + serializers.CustomerCreatedEventObject.Raw, + Square.CustomerCreatedEventObject +> = core.serialization.object({ + customer: Customer.optional(), + eventContext: core.serialization.property("event_context", CustomerCreatedEventEventContext.optional()), +}); + +export declare namespace CustomerCreatedEventObject { + export interface Raw { + customer?: Customer.Raw | null; + event_context?: CustomerCreatedEventEventContext.Raw | null; + } +} diff --git a/src/serialization/types/CustomerCustomAttributeDefinitionCreatedEvent.ts b/src/serialization/types/CustomerCustomAttributeDefinitionCreatedEvent.ts new file mode 100644 index 000000000..32262ad64 --- /dev/null +++ b/src/serialization/types/CustomerCustomAttributeDefinitionCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const CustomerCustomAttributeDefinitionCreatedEvent: core.serialization.ObjectSchema< + serializers.CustomerCustomAttributeDefinitionCreatedEvent.Raw, + Square.CustomerCustomAttributeDefinitionCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace CustomerCustomAttributeDefinitionCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/CustomerCustomAttributeDefinitionCreatedPublicEvent.ts b/src/serialization/types/CustomerCustomAttributeDefinitionCreatedPublicEvent.ts new file mode 100644 index 000000000..721e2b517 --- /dev/null +++ b/src/serialization/types/CustomerCustomAttributeDefinitionCreatedPublicEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const CustomerCustomAttributeDefinitionCreatedPublicEvent: core.serialization.ObjectSchema< + serializers.CustomerCustomAttributeDefinitionCreatedPublicEvent.Raw, + Square.CustomerCustomAttributeDefinitionCreatedPublicEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace CustomerCustomAttributeDefinitionCreatedPublicEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/CustomerCustomAttributeDefinitionDeletedEvent.ts b/src/serialization/types/CustomerCustomAttributeDefinitionDeletedEvent.ts new file mode 100644 index 000000000..3d67c4401 --- /dev/null +++ b/src/serialization/types/CustomerCustomAttributeDefinitionDeletedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const CustomerCustomAttributeDefinitionDeletedEvent: core.serialization.ObjectSchema< + serializers.CustomerCustomAttributeDefinitionDeletedEvent.Raw, + Square.CustomerCustomAttributeDefinitionDeletedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace CustomerCustomAttributeDefinitionDeletedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/CustomerCustomAttributeDefinitionDeletedPublicEvent.ts b/src/serialization/types/CustomerCustomAttributeDefinitionDeletedPublicEvent.ts new file mode 100644 index 000000000..137b4d34e --- /dev/null +++ b/src/serialization/types/CustomerCustomAttributeDefinitionDeletedPublicEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const CustomerCustomAttributeDefinitionDeletedPublicEvent: core.serialization.ObjectSchema< + serializers.CustomerCustomAttributeDefinitionDeletedPublicEvent.Raw, + Square.CustomerCustomAttributeDefinitionDeletedPublicEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace CustomerCustomAttributeDefinitionDeletedPublicEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/CustomerCustomAttributeDefinitionOwnedCreatedEvent.ts b/src/serialization/types/CustomerCustomAttributeDefinitionOwnedCreatedEvent.ts new file mode 100644 index 000000000..b601b0b63 --- /dev/null +++ b/src/serialization/types/CustomerCustomAttributeDefinitionOwnedCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const CustomerCustomAttributeDefinitionOwnedCreatedEvent: core.serialization.ObjectSchema< + serializers.CustomerCustomAttributeDefinitionOwnedCreatedEvent.Raw, + Square.CustomerCustomAttributeDefinitionOwnedCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace CustomerCustomAttributeDefinitionOwnedCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/CustomerCustomAttributeDefinitionOwnedDeletedEvent.ts b/src/serialization/types/CustomerCustomAttributeDefinitionOwnedDeletedEvent.ts new file mode 100644 index 000000000..fff983f58 --- /dev/null +++ b/src/serialization/types/CustomerCustomAttributeDefinitionOwnedDeletedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const CustomerCustomAttributeDefinitionOwnedDeletedEvent: core.serialization.ObjectSchema< + serializers.CustomerCustomAttributeDefinitionOwnedDeletedEvent.Raw, + Square.CustomerCustomAttributeDefinitionOwnedDeletedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace CustomerCustomAttributeDefinitionOwnedDeletedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/CustomerCustomAttributeDefinitionOwnedUpdatedEvent.ts b/src/serialization/types/CustomerCustomAttributeDefinitionOwnedUpdatedEvent.ts new file mode 100644 index 000000000..ebdf5a959 --- /dev/null +++ b/src/serialization/types/CustomerCustomAttributeDefinitionOwnedUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const CustomerCustomAttributeDefinitionOwnedUpdatedEvent: core.serialization.ObjectSchema< + serializers.CustomerCustomAttributeDefinitionOwnedUpdatedEvent.Raw, + Square.CustomerCustomAttributeDefinitionOwnedUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace CustomerCustomAttributeDefinitionOwnedUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/CustomerCustomAttributeDefinitionUpdatedEvent.ts b/src/serialization/types/CustomerCustomAttributeDefinitionUpdatedEvent.ts new file mode 100644 index 000000000..cab3773a0 --- /dev/null +++ b/src/serialization/types/CustomerCustomAttributeDefinitionUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const CustomerCustomAttributeDefinitionUpdatedEvent: core.serialization.ObjectSchema< + serializers.CustomerCustomAttributeDefinitionUpdatedEvent.Raw, + Square.CustomerCustomAttributeDefinitionUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace CustomerCustomAttributeDefinitionUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/CustomerCustomAttributeDefinitionUpdatedPublicEvent.ts b/src/serialization/types/CustomerCustomAttributeDefinitionUpdatedPublicEvent.ts new file mode 100644 index 000000000..12b4a1c93 --- /dev/null +++ b/src/serialization/types/CustomerCustomAttributeDefinitionUpdatedPublicEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const CustomerCustomAttributeDefinitionUpdatedPublicEvent: core.serialization.ObjectSchema< + serializers.CustomerCustomAttributeDefinitionUpdatedPublicEvent.Raw, + Square.CustomerCustomAttributeDefinitionUpdatedPublicEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace CustomerCustomAttributeDefinitionUpdatedPublicEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/CustomerCustomAttributeDefinitionVisibleCreatedEvent.ts b/src/serialization/types/CustomerCustomAttributeDefinitionVisibleCreatedEvent.ts new file mode 100644 index 000000000..00dfa6b54 --- /dev/null +++ b/src/serialization/types/CustomerCustomAttributeDefinitionVisibleCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const CustomerCustomAttributeDefinitionVisibleCreatedEvent: core.serialization.ObjectSchema< + serializers.CustomerCustomAttributeDefinitionVisibleCreatedEvent.Raw, + Square.CustomerCustomAttributeDefinitionVisibleCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace CustomerCustomAttributeDefinitionVisibleCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/CustomerCustomAttributeDefinitionVisibleDeletedEvent.ts b/src/serialization/types/CustomerCustomAttributeDefinitionVisibleDeletedEvent.ts new file mode 100644 index 000000000..0a5fbbce2 --- /dev/null +++ b/src/serialization/types/CustomerCustomAttributeDefinitionVisibleDeletedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const CustomerCustomAttributeDefinitionVisibleDeletedEvent: core.serialization.ObjectSchema< + serializers.CustomerCustomAttributeDefinitionVisibleDeletedEvent.Raw, + Square.CustomerCustomAttributeDefinitionVisibleDeletedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace CustomerCustomAttributeDefinitionVisibleDeletedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/CustomerCustomAttributeDefinitionVisibleUpdatedEvent.ts b/src/serialization/types/CustomerCustomAttributeDefinitionVisibleUpdatedEvent.ts new file mode 100644 index 000000000..d22362803 --- /dev/null +++ b/src/serialization/types/CustomerCustomAttributeDefinitionVisibleUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const CustomerCustomAttributeDefinitionVisibleUpdatedEvent: core.serialization.ObjectSchema< + serializers.CustomerCustomAttributeDefinitionVisibleUpdatedEvent.Raw, + Square.CustomerCustomAttributeDefinitionVisibleUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace CustomerCustomAttributeDefinitionVisibleUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/CustomerCustomAttributeDeletedEvent.ts b/src/serialization/types/CustomerCustomAttributeDeletedEvent.ts new file mode 100644 index 000000000..c0202a40b --- /dev/null +++ b/src/serialization/types/CustomerCustomAttributeDeletedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeEventData } from "./CustomAttributeEventData"; + +export const CustomerCustomAttributeDeletedEvent: core.serialization.ObjectSchema< + serializers.CustomerCustomAttributeDeletedEvent.Raw, + Square.CustomerCustomAttributeDeletedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeEventData.optional(), +}); + +export declare namespace CustomerCustomAttributeDeletedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeEventData.Raw | null; + } +} diff --git a/src/serialization/types/CustomerCustomAttributeDeletedPublicEvent.ts b/src/serialization/types/CustomerCustomAttributeDeletedPublicEvent.ts new file mode 100644 index 000000000..cd997be55 --- /dev/null +++ b/src/serialization/types/CustomerCustomAttributeDeletedPublicEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeEventData } from "./CustomAttributeEventData"; + +export const CustomerCustomAttributeDeletedPublicEvent: core.serialization.ObjectSchema< + serializers.CustomerCustomAttributeDeletedPublicEvent.Raw, + Square.CustomerCustomAttributeDeletedPublicEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeEventData.optional(), +}); + +export declare namespace CustomerCustomAttributeDeletedPublicEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeEventData.Raw | null; + } +} diff --git a/src/serialization/types/CustomerCustomAttributeOwnedDeletedEvent.ts b/src/serialization/types/CustomerCustomAttributeOwnedDeletedEvent.ts new file mode 100644 index 000000000..da3885373 --- /dev/null +++ b/src/serialization/types/CustomerCustomAttributeOwnedDeletedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeEventData } from "./CustomAttributeEventData"; + +export const CustomerCustomAttributeOwnedDeletedEvent: core.serialization.ObjectSchema< + serializers.CustomerCustomAttributeOwnedDeletedEvent.Raw, + Square.CustomerCustomAttributeOwnedDeletedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeEventData.optional(), +}); + +export declare namespace CustomerCustomAttributeOwnedDeletedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeEventData.Raw | null; + } +} diff --git a/src/serialization/types/CustomerCustomAttributeOwnedUpdatedEvent.ts b/src/serialization/types/CustomerCustomAttributeOwnedUpdatedEvent.ts new file mode 100644 index 000000000..bd97c5a50 --- /dev/null +++ b/src/serialization/types/CustomerCustomAttributeOwnedUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeEventData } from "./CustomAttributeEventData"; + +export const CustomerCustomAttributeOwnedUpdatedEvent: core.serialization.ObjectSchema< + serializers.CustomerCustomAttributeOwnedUpdatedEvent.Raw, + Square.CustomerCustomAttributeOwnedUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeEventData.optional(), +}); + +export declare namespace CustomerCustomAttributeOwnedUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeEventData.Raw | null; + } +} diff --git a/src/serialization/types/CustomerCustomAttributeUpdatedEvent.ts b/src/serialization/types/CustomerCustomAttributeUpdatedEvent.ts new file mode 100644 index 000000000..f16aa1bc0 --- /dev/null +++ b/src/serialization/types/CustomerCustomAttributeUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeEventData } from "./CustomAttributeEventData"; + +export const CustomerCustomAttributeUpdatedEvent: core.serialization.ObjectSchema< + serializers.CustomerCustomAttributeUpdatedEvent.Raw, + Square.CustomerCustomAttributeUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeEventData.optional(), +}); + +export declare namespace CustomerCustomAttributeUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeEventData.Raw | null; + } +} diff --git a/src/serialization/types/CustomerCustomAttributeUpdatedPublicEvent.ts b/src/serialization/types/CustomerCustomAttributeUpdatedPublicEvent.ts new file mode 100644 index 000000000..3a99d562c --- /dev/null +++ b/src/serialization/types/CustomerCustomAttributeUpdatedPublicEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeEventData } from "./CustomAttributeEventData"; + +export const CustomerCustomAttributeUpdatedPublicEvent: core.serialization.ObjectSchema< + serializers.CustomerCustomAttributeUpdatedPublicEvent.Raw, + Square.CustomerCustomAttributeUpdatedPublicEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeEventData.optional(), +}); + +export declare namespace CustomerCustomAttributeUpdatedPublicEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeEventData.Raw | null; + } +} diff --git a/src/serialization/types/CustomerCustomAttributeVisibleDeletedEvent.ts b/src/serialization/types/CustomerCustomAttributeVisibleDeletedEvent.ts new file mode 100644 index 000000000..0e34c5245 --- /dev/null +++ b/src/serialization/types/CustomerCustomAttributeVisibleDeletedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeEventData } from "./CustomAttributeEventData"; + +export const CustomerCustomAttributeVisibleDeletedEvent: core.serialization.ObjectSchema< + serializers.CustomerCustomAttributeVisibleDeletedEvent.Raw, + Square.CustomerCustomAttributeVisibleDeletedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeEventData.optional(), +}); + +export declare namespace CustomerCustomAttributeVisibleDeletedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeEventData.Raw | null; + } +} diff --git a/src/serialization/types/CustomerCustomAttributeVisibleUpdatedEvent.ts b/src/serialization/types/CustomerCustomAttributeVisibleUpdatedEvent.ts new file mode 100644 index 000000000..1e10fbf45 --- /dev/null +++ b/src/serialization/types/CustomerCustomAttributeVisibleUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeEventData } from "./CustomAttributeEventData"; + +export const CustomerCustomAttributeVisibleUpdatedEvent: core.serialization.ObjectSchema< + serializers.CustomerCustomAttributeVisibleUpdatedEvent.Raw, + Square.CustomerCustomAttributeVisibleUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeEventData.optional(), +}); + +export declare namespace CustomerCustomAttributeVisibleUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeEventData.Raw | null; + } +} diff --git a/src/serialization/types/CustomerDeletedEvent.ts b/src/serialization/types/CustomerDeletedEvent.ts new file mode 100644 index 000000000..1c2c5317a --- /dev/null +++ b/src/serialization/types/CustomerDeletedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomerDeletedEventData } from "./CustomerDeletedEventData"; + +export const CustomerDeletedEvent: core.serialization.ObjectSchema< + serializers.CustomerDeletedEvent.Raw, + Square.CustomerDeletedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomerDeletedEventData.optional(), +}); + +export declare namespace CustomerDeletedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomerDeletedEventData.Raw | null; + } +} diff --git a/src/serialization/types/CustomerDeletedEventData.ts b/src/serialization/types/CustomerDeletedEventData.ts new file mode 100644 index 000000000..6f46eb424 --- /dev/null +++ b/src/serialization/types/CustomerDeletedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomerDeletedEventObject } from "./CustomerDeletedEventObject"; + +export const CustomerDeletedEventData: core.serialization.ObjectSchema< + serializers.CustomerDeletedEventData.Raw, + Square.CustomerDeletedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: CustomerDeletedEventObject.optional(), +}); + +export declare namespace CustomerDeletedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: CustomerDeletedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/CustomerDeletedEventEventContext.ts b/src/serialization/types/CustomerDeletedEventEventContext.ts new file mode 100644 index 000000000..4c0617f8c --- /dev/null +++ b/src/serialization/types/CustomerDeletedEventEventContext.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomerDeletedEventEventContextMerge } from "./CustomerDeletedEventEventContextMerge"; + +export const CustomerDeletedEventEventContext: core.serialization.ObjectSchema< + serializers.CustomerDeletedEventEventContext.Raw, + Square.CustomerDeletedEventEventContext +> = core.serialization.object({ + merge: CustomerDeletedEventEventContextMerge.optional(), +}); + +export declare namespace CustomerDeletedEventEventContext { + export interface Raw { + merge?: CustomerDeletedEventEventContextMerge.Raw | null; + } +} diff --git a/src/serialization/types/CustomerDeletedEventEventContextMerge.ts b/src/serialization/types/CustomerDeletedEventEventContextMerge.ts new file mode 100644 index 000000000..0c39c236c --- /dev/null +++ b/src/serialization/types/CustomerDeletedEventEventContextMerge.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const CustomerDeletedEventEventContextMerge: core.serialization.ObjectSchema< + serializers.CustomerDeletedEventEventContextMerge.Raw, + Square.CustomerDeletedEventEventContextMerge +> = core.serialization.object({ + fromCustomerIds: core.serialization.property( + "from_customer_ids", + core.serialization.list(core.serialization.string()).optionalNullable(), + ), + toCustomerId: core.serialization.property("to_customer_id", core.serialization.string().optionalNullable()), +}); + +export declare namespace CustomerDeletedEventEventContextMerge { + export interface Raw { + from_customer_ids?: (string[] | null) | null; + to_customer_id?: (string | null) | null; + } +} diff --git a/src/serialization/types/CustomerDeletedEventObject.ts b/src/serialization/types/CustomerDeletedEventObject.ts new file mode 100644 index 000000000..51db7af38 --- /dev/null +++ b/src/serialization/types/CustomerDeletedEventObject.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Customer } from "./Customer"; +import { CustomerDeletedEventEventContext } from "./CustomerDeletedEventEventContext"; + +export const CustomerDeletedEventObject: core.serialization.ObjectSchema< + serializers.CustomerDeletedEventObject.Raw, + Square.CustomerDeletedEventObject +> = core.serialization.object({ + customer: Customer.optional(), + eventContext: core.serialization.property("event_context", CustomerDeletedEventEventContext.optional()), +}); + +export declare namespace CustomerDeletedEventObject { + export interface Raw { + customer?: Customer.Raw | null; + event_context?: CustomerDeletedEventEventContext.Raw | null; + } +} diff --git a/src/serialization/types/CustomerUpdatedEvent.ts b/src/serialization/types/CustomerUpdatedEvent.ts new file mode 100644 index 000000000..9be57f95c --- /dev/null +++ b/src/serialization/types/CustomerUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomerUpdatedEventData } from "./CustomerUpdatedEventData"; + +export const CustomerUpdatedEvent: core.serialization.ObjectSchema< + serializers.CustomerUpdatedEvent.Raw, + Square.CustomerUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomerUpdatedEventData.optional(), +}); + +export declare namespace CustomerUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomerUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/CustomerUpdatedEventData.ts b/src/serialization/types/CustomerUpdatedEventData.ts new file mode 100644 index 000000000..fe42f381e --- /dev/null +++ b/src/serialization/types/CustomerUpdatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomerUpdatedEventObject } from "./CustomerUpdatedEventObject"; + +export const CustomerUpdatedEventData: core.serialization.ObjectSchema< + serializers.CustomerUpdatedEventData.Raw, + Square.CustomerUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: CustomerUpdatedEventObject.optional(), +}); + +export declare namespace CustomerUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: CustomerUpdatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/CustomerUpdatedEventObject.ts b/src/serialization/types/CustomerUpdatedEventObject.ts new file mode 100644 index 000000000..8c4459af5 --- /dev/null +++ b/src/serialization/types/CustomerUpdatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Customer } from "./Customer"; + +export const CustomerUpdatedEventObject: core.serialization.ObjectSchema< + serializers.CustomerUpdatedEventObject.Raw, + Square.CustomerUpdatedEventObject +> = core.serialization.object({ + customer: Customer.optional(), +}); + +export declare namespace CustomerUpdatedEventObject { + export interface Raw { + customer?: Customer.Raw | null; + } +} diff --git a/src/serialization/types/DeviceCodePairedEvent.ts b/src/serialization/types/DeviceCodePairedEvent.ts new file mode 100644 index 000000000..29614f09a --- /dev/null +++ b/src/serialization/types/DeviceCodePairedEvent.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { DeviceCodePairedEventData } from "./DeviceCodePairedEventData"; + +export const DeviceCodePairedEvent: core.serialization.ObjectSchema< + serializers.DeviceCodePairedEvent.Raw, + Square.DeviceCodePairedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + locationId: core.serialization.property("location_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: DeviceCodePairedEventData.optional(), +}); + +export declare namespace DeviceCodePairedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + location_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: DeviceCodePairedEventData.Raw | null; + } +} diff --git a/src/serialization/types/DeviceCodePairedEventData.ts b/src/serialization/types/DeviceCodePairedEventData.ts new file mode 100644 index 000000000..d4c70f01d --- /dev/null +++ b/src/serialization/types/DeviceCodePairedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { DeviceCodePairedEventObject } from "./DeviceCodePairedEventObject"; + +export const DeviceCodePairedEventData: core.serialization.ObjectSchema< + serializers.DeviceCodePairedEventData.Raw, + Square.DeviceCodePairedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: DeviceCodePairedEventObject.optional(), +}); + +export declare namespace DeviceCodePairedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: DeviceCodePairedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/DeviceCodePairedEventObject.ts b/src/serialization/types/DeviceCodePairedEventObject.ts new file mode 100644 index 000000000..c8fcfeb25 --- /dev/null +++ b/src/serialization/types/DeviceCodePairedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { DeviceCode } from "./DeviceCode"; + +export const DeviceCodePairedEventObject: core.serialization.ObjectSchema< + serializers.DeviceCodePairedEventObject.Raw, + Square.DeviceCodePairedEventObject +> = core.serialization.object({ + deviceCode: core.serialization.property("device_code", DeviceCode.optional()), +}); + +export declare namespace DeviceCodePairedEventObject { + export interface Raw { + device_code?: DeviceCode.Raw | null; + } +} diff --git a/src/serialization/types/DeviceCreatedEvent.ts b/src/serialization/types/DeviceCreatedEvent.ts new file mode 100644 index 000000000..2f888c6be --- /dev/null +++ b/src/serialization/types/DeviceCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { DeviceCreatedEventData } from "./DeviceCreatedEventData"; + +export const DeviceCreatedEvent: core.serialization.ObjectSchema< + serializers.DeviceCreatedEvent.Raw, + Square.DeviceCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: DeviceCreatedEventData.optional(), +}); + +export declare namespace DeviceCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: DeviceCreatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/DeviceCreatedEventData.ts b/src/serialization/types/DeviceCreatedEventData.ts new file mode 100644 index 000000000..1e03bb561 --- /dev/null +++ b/src/serialization/types/DeviceCreatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { DeviceCreatedEventObject } from "./DeviceCreatedEventObject"; + +export const DeviceCreatedEventData: core.serialization.ObjectSchema< + serializers.DeviceCreatedEventData.Raw, + Square.DeviceCreatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: DeviceCreatedEventObject.optional(), +}); + +export declare namespace DeviceCreatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: DeviceCreatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/DeviceCreatedEventObject.ts b/src/serialization/types/DeviceCreatedEventObject.ts new file mode 100644 index 000000000..f4a3bde8f --- /dev/null +++ b/src/serialization/types/DeviceCreatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Device } from "./Device"; + +export const DeviceCreatedEventObject: core.serialization.ObjectSchema< + serializers.DeviceCreatedEventObject.Raw, + Square.DeviceCreatedEventObject +> = core.serialization.object({ + device: Device.optional(), +}); + +export declare namespace DeviceCreatedEventObject { + export interface Raw { + device?: Device.Raw | null; + } +} diff --git a/src/serialization/types/DisputeCreatedEvent.ts b/src/serialization/types/DisputeCreatedEvent.ts new file mode 100644 index 000000000..cadc6c3c7 --- /dev/null +++ b/src/serialization/types/DisputeCreatedEvent.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { DisputeCreatedEventData } from "./DisputeCreatedEventData"; + +export const DisputeCreatedEvent: core.serialization.ObjectSchema< + serializers.DisputeCreatedEvent.Raw, + Square.DisputeCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + locationId: core.serialization.property("location_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: DisputeCreatedEventData.optional(), +}); + +export declare namespace DisputeCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + location_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: DisputeCreatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/DisputeCreatedEventData.ts b/src/serialization/types/DisputeCreatedEventData.ts new file mode 100644 index 000000000..66bb01a23 --- /dev/null +++ b/src/serialization/types/DisputeCreatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { DisputeCreatedEventObject } from "./DisputeCreatedEventObject"; + +export const DisputeCreatedEventData: core.serialization.ObjectSchema< + serializers.DisputeCreatedEventData.Raw, + Square.DisputeCreatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: DisputeCreatedEventObject.optional(), +}); + +export declare namespace DisputeCreatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: DisputeCreatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/DisputeCreatedEventObject.ts b/src/serialization/types/DisputeCreatedEventObject.ts new file mode 100644 index 000000000..7a045ffd3 --- /dev/null +++ b/src/serialization/types/DisputeCreatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Dispute } from "./Dispute"; + +export const DisputeCreatedEventObject: core.serialization.ObjectSchema< + serializers.DisputeCreatedEventObject.Raw, + Square.DisputeCreatedEventObject +> = core.serialization.object({ + object: Dispute.optional(), +}); + +export declare namespace DisputeCreatedEventObject { + export interface Raw { + object?: Dispute.Raw | null; + } +} diff --git a/src/serialization/types/DisputeEvidenceAddedEvent.ts b/src/serialization/types/DisputeEvidenceAddedEvent.ts new file mode 100644 index 000000000..ce7890266 --- /dev/null +++ b/src/serialization/types/DisputeEvidenceAddedEvent.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { DisputeEvidenceAddedEventData } from "./DisputeEvidenceAddedEventData"; + +export const DisputeEvidenceAddedEvent: core.serialization.ObjectSchema< + serializers.DisputeEvidenceAddedEvent.Raw, + Square.DisputeEvidenceAddedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + locationId: core.serialization.property("location_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: DisputeEvidenceAddedEventData.optional(), +}); + +export declare namespace DisputeEvidenceAddedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + location_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: DisputeEvidenceAddedEventData.Raw | null; + } +} diff --git a/src/serialization/types/DisputeEvidenceAddedEventData.ts b/src/serialization/types/DisputeEvidenceAddedEventData.ts new file mode 100644 index 000000000..c8b9db56f --- /dev/null +++ b/src/serialization/types/DisputeEvidenceAddedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { DisputeEvidenceAddedEventObject } from "./DisputeEvidenceAddedEventObject"; + +export const DisputeEvidenceAddedEventData: core.serialization.ObjectSchema< + serializers.DisputeEvidenceAddedEventData.Raw, + Square.DisputeEvidenceAddedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: DisputeEvidenceAddedEventObject.optional(), +}); + +export declare namespace DisputeEvidenceAddedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: DisputeEvidenceAddedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/DisputeEvidenceAddedEventObject.ts b/src/serialization/types/DisputeEvidenceAddedEventObject.ts new file mode 100644 index 000000000..caebd0ba8 --- /dev/null +++ b/src/serialization/types/DisputeEvidenceAddedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Dispute } from "./Dispute"; + +export const DisputeEvidenceAddedEventObject: core.serialization.ObjectSchema< + serializers.DisputeEvidenceAddedEventObject.Raw, + Square.DisputeEvidenceAddedEventObject +> = core.serialization.object({ + object: Dispute.optional(), +}); + +export declare namespace DisputeEvidenceAddedEventObject { + export interface Raw { + object?: Dispute.Raw | null; + } +} diff --git a/src/serialization/types/DisputeEvidenceCreatedEvent.ts b/src/serialization/types/DisputeEvidenceCreatedEvent.ts new file mode 100644 index 000000000..ce0a33036 --- /dev/null +++ b/src/serialization/types/DisputeEvidenceCreatedEvent.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { DisputeEvidenceCreatedEventData } from "./DisputeEvidenceCreatedEventData"; + +export const DisputeEvidenceCreatedEvent: core.serialization.ObjectSchema< + serializers.DisputeEvidenceCreatedEvent.Raw, + Square.DisputeEvidenceCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + locationId: core.serialization.property("location_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: DisputeEvidenceCreatedEventData.optional(), +}); + +export declare namespace DisputeEvidenceCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + location_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: DisputeEvidenceCreatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/DisputeEvidenceCreatedEventData.ts b/src/serialization/types/DisputeEvidenceCreatedEventData.ts new file mode 100644 index 000000000..74decd9ab --- /dev/null +++ b/src/serialization/types/DisputeEvidenceCreatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { DisputeEvidenceCreatedEventObject } from "./DisputeEvidenceCreatedEventObject"; + +export const DisputeEvidenceCreatedEventData: core.serialization.ObjectSchema< + serializers.DisputeEvidenceCreatedEventData.Raw, + Square.DisputeEvidenceCreatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: DisputeEvidenceCreatedEventObject.optional(), +}); + +export declare namespace DisputeEvidenceCreatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: DisputeEvidenceCreatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/DisputeEvidenceCreatedEventObject.ts b/src/serialization/types/DisputeEvidenceCreatedEventObject.ts new file mode 100644 index 000000000..4c454286a --- /dev/null +++ b/src/serialization/types/DisputeEvidenceCreatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Dispute } from "./Dispute"; + +export const DisputeEvidenceCreatedEventObject: core.serialization.ObjectSchema< + serializers.DisputeEvidenceCreatedEventObject.Raw, + Square.DisputeEvidenceCreatedEventObject +> = core.serialization.object({ + object: Dispute.optional(), +}); + +export declare namespace DisputeEvidenceCreatedEventObject { + export interface Raw { + object?: Dispute.Raw | null; + } +} diff --git a/src/serialization/types/DisputeEvidenceDeletedEvent.ts b/src/serialization/types/DisputeEvidenceDeletedEvent.ts new file mode 100644 index 000000000..5c23ee39d --- /dev/null +++ b/src/serialization/types/DisputeEvidenceDeletedEvent.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { DisputeEvidenceDeletedEventData } from "./DisputeEvidenceDeletedEventData"; + +export const DisputeEvidenceDeletedEvent: core.serialization.ObjectSchema< + serializers.DisputeEvidenceDeletedEvent.Raw, + Square.DisputeEvidenceDeletedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + locationId: core.serialization.property("location_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: DisputeEvidenceDeletedEventData.optional(), +}); + +export declare namespace DisputeEvidenceDeletedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + location_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: DisputeEvidenceDeletedEventData.Raw | null; + } +} diff --git a/src/serialization/types/DisputeEvidenceDeletedEventData.ts b/src/serialization/types/DisputeEvidenceDeletedEventData.ts new file mode 100644 index 000000000..a4bebee39 --- /dev/null +++ b/src/serialization/types/DisputeEvidenceDeletedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { DisputeEvidenceDeletedEventObject } from "./DisputeEvidenceDeletedEventObject"; + +export const DisputeEvidenceDeletedEventData: core.serialization.ObjectSchema< + serializers.DisputeEvidenceDeletedEventData.Raw, + Square.DisputeEvidenceDeletedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: DisputeEvidenceDeletedEventObject.optional(), +}); + +export declare namespace DisputeEvidenceDeletedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: DisputeEvidenceDeletedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/DisputeEvidenceDeletedEventObject.ts b/src/serialization/types/DisputeEvidenceDeletedEventObject.ts new file mode 100644 index 000000000..a67a5890d --- /dev/null +++ b/src/serialization/types/DisputeEvidenceDeletedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Dispute } from "./Dispute"; + +export const DisputeEvidenceDeletedEventObject: core.serialization.ObjectSchema< + serializers.DisputeEvidenceDeletedEventObject.Raw, + Square.DisputeEvidenceDeletedEventObject +> = core.serialization.object({ + object: Dispute.optional(), +}); + +export declare namespace DisputeEvidenceDeletedEventObject { + export interface Raw { + object?: Dispute.Raw | null; + } +} diff --git a/src/serialization/types/DisputeEvidenceRemovedEvent.ts b/src/serialization/types/DisputeEvidenceRemovedEvent.ts new file mode 100644 index 000000000..6141b61b2 --- /dev/null +++ b/src/serialization/types/DisputeEvidenceRemovedEvent.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { DisputeEvidenceRemovedEventData } from "./DisputeEvidenceRemovedEventData"; + +export const DisputeEvidenceRemovedEvent: core.serialization.ObjectSchema< + serializers.DisputeEvidenceRemovedEvent.Raw, + Square.DisputeEvidenceRemovedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + locationId: core.serialization.property("location_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: DisputeEvidenceRemovedEventData.optional(), +}); + +export declare namespace DisputeEvidenceRemovedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + location_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: DisputeEvidenceRemovedEventData.Raw | null; + } +} diff --git a/src/serialization/types/DisputeEvidenceRemovedEventData.ts b/src/serialization/types/DisputeEvidenceRemovedEventData.ts new file mode 100644 index 000000000..7f0bc0915 --- /dev/null +++ b/src/serialization/types/DisputeEvidenceRemovedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { DisputeEvidenceRemovedEventObject } from "./DisputeEvidenceRemovedEventObject"; + +export const DisputeEvidenceRemovedEventData: core.serialization.ObjectSchema< + serializers.DisputeEvidenceRemovedEventData.Raw, + Square.DisputeEvidenceRemovedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: DisputeEvidenceRemovedEventObject.optional(), +}); + +export declare namespace DisputeEvidenceRemovedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: DisputeEvidenceRemovedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/DisputeEvidenceRemovedEventObject.ts b/src/serialization/types/DisputeEvidenceRemovedEventObject.ts new file mode 100644 index 000000000..c037d953f --- /dev/null +++ b/src/serialization/types/DisputeEvidenceRemovedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Dispute } from "./Dispute"; + +export const DisputeEvidenceRemovedEventObject: core.serialization.ObjectSchema< + serializers.DisputeEvidenceRemovedEventObject.Raw, + Square.DisputeEvidenceRemovedEventObject +> = core.serialization.object({ + object: Dispute.optional(), +}); + +export declare namespace DisputeEvidenceRemovedEventObject { + export interface Raw { + object?: Dispute.Raw | null; + } +} diff --git a/src/serialization/types/DisputeStateChangedEvent.ts b/src/serialization/types/DisputeStateChangedEvent.ts new file mode 100644 index 000000000..39ef9cf13 --- /dev/null +++ b/src/serialization/types/DisputeStateChangedEvent.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { DisputeStateChangedEventData } from "./DisputeStateChangedEventData"; + +export const DisputeStateChangedEvent: core.serialization.ObjectSchema< + serializers.DisputeStateChangedEvent.Raw, + Square.DisputeStateChangedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + locationId: core.serialization.property("location_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: DisputeStateChangedEventData.optional(), +}); + +export declare namespace DisputeStateChangedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + location_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: DisputeStateChangedEventData.Raw | null; + } +} diff --git a/src/serialization/types/DisputeStateChangedEventData.ts b/src/serialization/types/DisputeStateChangedEventData.ts new file mode 100644 index 000000000..48c566bae --- /dev/null +++ b/src/serialization/types/DisputeStateChangedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { DisputeStateChangedEventObject } from "./DisputeStateChangedEventObject"; + +export const DisputeStateChangedEventData: core.serialization.ObjectSchema< + serializers.DisputeStateChangedEventData.Raw, + Square.DisputeStateChangedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: DisputeStateChangedEventObject.optional(), +}); + +export declare namespace DisputeStateChangedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: DisputeStateChangedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/DisputeStateChangedEventObject.ts b/src/serialization/types/DisputeStateChangedEventObject.ts new file mode 100644 index 000000000..9384df171 --- /dev/null +++ b/src/serialization/types/DisputeStateChangedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Dispute } from "./Dispute"; + +export const DisputeStateChangedEventObject: core.serialization.ObjectSchema< + serializers.DisputeStateChangedEventObject.Raw, + Square.DisputeStateChangedEventObject +> = core.serialization.object({ + object: Dispute.optional(), +}); + +export declare namespace DisputeStateChangedEventObject { + export interface Raw { + object?: Dispute.Raw | null; + } +} diff --git a/src/serialization/types/DisputeStateUpdatedEvent.ts b/src/serialization/types/DisputeStateUpdatedEvent.ts new file mode 100644 index 000000000..7c05a6f04 --- /dev/null +++ b/src/serialization/types/DisputeStateUpdatedEvent.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { DisputeStateUpdatedEventData } from "./DisputeStateUpdatedEventData"; + +export const DisputeStateUpdatedEvent: core.serialization.ObjectSchema< + serializers.DisputeStateUpdatedEvent.Raw, + Square.DisputeStateUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + locationId: core.serialization.property("location_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: DisputeStateUpdatedEventData.optional(), +}); + +export declare namespace DisputeStateUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + location_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: DisputeStateUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/DisputeStateUpdatedEventData.ts b/src/serialization/types/DisputeStateUpdatedEventData.ts new file mode 100644 index 000000000..ff28f07a8 --- /dev/null +++ b/src/serialization/types/DisputeStateUpdatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { DisputeStateUpdatedEventObject } from "./DisputeStateUpdatedEventObject"; + +export const DisputeStateUpdatedEventData: core.serialization.ObjectSchema< + serializers.DisputeStateUpdatedEventData.Raw, + Square.DisputeStateUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: DisputeStateUpdatedEventObject.optional(), +}); + +export declare namespace DisputeStateUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: DisputeStateUpdatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/DisputeStateUpdatedEventObject.ts b/src/serialization/types/DisputeStateUpdatedEventObject.ts new file mode 100644 index 000000000..4bd6d4d02 --- /dev/null +++ b/src/serialization/types/DisputeStateUpdatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Dispute } from "./Dispute"; + +export const DisputeStateUpdatedEventObject: core.serialization.ObjectSchema< + serializers.DisputeStateUpdatedEventObject.Raw, + Square.DisputeStateUpdatedEventObject +> = core.serialization.object({ + object: Dispute.optional(), +}); + +export declare namespace DisputeStateUpdatedEventObject { + export interface Raw { + object?: Dispute.Raw | null; + } +} diff --git a/src/serialization/types/EcomVisibility.ts b/src/serialization/types/EcomVisibility.ts new file mode 100644 index 000000000..abbb5c027 --- /dev/null +++ b/src/serialization/types/EcomVisibility.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const EcomVisibility: core.serialization.Schema = + core.serialization.enum_(["UNINDEXED", "UNAVAILABLE", "HIDDEN", "VISIBLE"]); + +export declare namespace EcomVisibility { + export type Raw = "UNINDEXED" | "UNAVAILABLE" | "HIDDEN" | "VISIBLE"; +} diff --git a/src/serialization/types/GetBookingRequest.ts b/src/serialization/types/GetBookingRequest.ts new file mode 100644 index 000000000..d408951cc --- /dev/null +++ b/src/serialization/types/GetBookingRequest.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const GetBookingRequest: core.serialization.Schema = + core.serialization.unknown(); + +export declare namespace GetBookingRequest { + export type Raw = unknown; +} diff --git a/src/serialization/types/GetBusinessBookingProfileRequest.ts b/src/serialization/types/GetBusinessBookingProfileRequest.ts new file mode 100644 index 000000000..26bfcf738 --- /dev/null +++ b/src/serialization/types/GetBusinessBookingProfileRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const GetBusinessBookingProfileRequest: core.serialization.Schema< + serializers.GetBusinessBookingProfileRequest.Raw, + Square.GetBusinessBookingProfileRequest +> = core.serialization.unknown(); + +export declare namespace GetBusinessBookingProfileRequest { + export type Raw = unknown; +} diff --git a/src/serialization/types/GetCardRequest.ts b/src/serialization/types/GetCardRequest.ts new file mode 100644 index 000000000..12ae29f20 --- /dev/null +++ b/src/serialization/types/GetCardRequest.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const GetCardRequest: core.serialization.Schema = + core.serialization.unknown(); + +export declare namespace GetCardRequest { + export type Raw = unknown; +} diff --git a/src/serialization/types/GetCustomerGroupRequest.ts b/src/serialization/types/GetCustomerGroupRequest.ts new file mode 100644 index 000000000..f4dfa52b9 --- /dev/null +++ b/src/serialization/types/GetCustomerGroupRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const GetCustomerGroupRequest: core.serialization.Schema< + serializers.GetCustomerGroupRequest.Raw, + Square.GetCustomerGroupRequest +> = core.serialization.unknown(); + +export declare namespace GetCustomerGroupRequest { + export type Raw = unknown; +} diff --git a/src/serialization/types/GetCustomerRequest.ts b/src/serialization/types/GetCustomerRequest.ts new file mode 100644 index 000000000..8526416bd --- /dev/null +++ b/src/serialization/types/GetCustomerRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const GetCustomerRequest: core.serialization.Schema< + serializers.GetCustomerRequest.Raw, + Square.GetCustomerRequest +> = core.serialization.unknown(); + +export declare namespace GetCustomerRequest { + export type Raw = unknown; +} diff --git a/src/serialization/types/GetCustomerSegmentRequest.ts b/src/serialization/types/GetCustomerSegmentRequest.ts new file mode 100644 index 000000000..c247de446 --- /dev/null +++ b/src/serialization/types/GetCustomerSegmentRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const GetCustomerSegmentRequest: core.serialization.Schema< + serializers.GetCustomerSegmentRequest.Raw, + Square.GetCustomerSegmentRequest +> = core.serialization.unknown(); + +export declare namespace GetCustomerSegmentRequest { + export type Raw = unknown; +} diff --git a/src/serialization/types/GetDisputeEvidenceRequest.ts b/src/serialization/types/GetDisputeEvidenceRequest.ts new file mode 100644 index 000000000..63effcd24 --- /dev/null +++ b/src/serialization/types/GetDisputeEvidenceRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const GetDisputeEvidenceRequest: core.serialization.Schema< + serializers.GetDisputeEvidenceRequest.Raw, + Square.GetDisputeEvidenceRequest +> = core.serialization.unknown(); + +export declare namespace GetDisputeEvidenceRequest { + export type Raw = unknown; +} diff --git a/src/serialization/types/GetDisputeRequest.ts b/src/serialization/types/GetDisputeRequest.ts new file mode 100644 index 000000000..e8d3f5ce1 --- /dev/null +++ b/src/serialization/types/GetDisputeRequest.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const GetDisputeRequest: core.serialization.Schema = + core.serialization.unknown(); + +export declare namespace GetDisputeRequest { + export type Raw = unknown; +} diff --git a/src/serialization/types/GetEmployeeRequest.ts b/src/serialization/types/GetEmployeeRequest.ts new file mode 100644 index 000000000..136c96bbe --- /dev/null +++ b/src/serialization/types/GetEmployeeRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const GetEmployeeRequest: core.serialization.Schema< + serializers.GetEmployeeRequest.Raw, + Square.GetEmployeeRequest +> = core.serialization.unknown(); + +export declare namespace GetEmployeeRequest { + export type Raw = unknown; +} diff --git a/src/serialization/types/GetGiftCardRequest.ts b/src/serialization/types/GetGiftCardRequest.ts new file mode 100644 index 000000000..3c705f1c6 --- /dev/null +++ b/src/serialization/types/GetGiftCardRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const GetGiftCardRequest: core.serialization.Schema< + serializers.GetGiftCardRequest.Raw, + Square.GetGiftCardRequest +> = core.serialization.unknown(); + +export declare namespace GetGiftCardRequest { + export type Raw = unknown; +} diff --git a/src/serialization/types/GetInventoryAdjustmentRequest.ts b/src/serialization/types/GetInventoryAdjustmentRequest.ts new file mode 100644 index 000000000..4902f518c --- /dev/null +++ b/src/serialization/types/GetInventoryAdjustmentRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const GetInventoryAdjustmentRequest: core.serialization.Schema< + serializers.GetInventoryAdjustmentRequest.Raw, + Square.GetInventoryAdjustmentRequest +> = core.serialization.unknown(); + +export declare namespace GetInventoryAdjustmentRequest { + export type Raw = unknown; +} diff --git a/src/serialization/types/GetInventoryPhysicalCountRequest.ts b/src/serialization/types/GetInventoryPhysicalCountRequest.ts new file mode 100644 index 000000000..0df7bf141 --- /dev/null +++ b/src/serialization/types/GetInventoryPhysicalCountRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const GetInventoryPhysicalCountRequest: core.serialization.Schema< + serializers.GetInventoryPhysicalCountRequest.Raw, + Square.GetInventoryPhysicalCountRequest +> = core.serialization.unknown(); + +export declare namespace GetInventoryPhysicalCountRequest { + export type Raw = unknown; +} diff --git a/src/serialization/types/GetInventoryTransferRequest.ts b/src/serialization/types/GetInventoryTransferRequest.ts new file mode 100644 index 000000000..7d7383fce --- /dev/null +++ b/src/serialization/types/GetInventoryTransferRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const GetInventoryTransferRequest: core.serialization.Schema< + serializers.GetInventoryTransferRequest.Raw, + Square.GetInventoryTransferRequest +> = core.serialization.unknown(); + +export declare namespace GetInventoryTransferRequest { + export type Raw = unknown; +} diff --git a/src/serialization/types/GetLocationRequest.ts b/src/serialization/types/GetLocationRequest.ts new file mode 100644 index 000000000..461c0c8cc --- /dev/null +++ b/src/serialization/types/GetLocationRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const GetLocationRequest: core.serialization.Schema< + serializers.GetLocationRequest.Raw, + Square.GetLocationRequest +> = core.serialization.unknown(); + +export declare namespace GetLocationRequest { + export type Raw = unknown; +} diff --git a/src/serialization/types/GetLoyaltyAccountRequest.ts b/src/serialization/types/GetLoyaltyAccountRequest.ts new file mode 100644 index 000000000..689c3491a --- /dev/null +++ b/src/serialization/types/GetLoyaltyAccountRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const GetLoyaltyAccountRequest: core.serialization.Schema< + serializers.GetLoyaltyAccountRequest.Raw, + Square.GetLoyaltyAccountRequest +> = core.serialization.unknown(); + +export declare namespace GetLoyaltyAccountRequest { + export type Raw = unknown; +} diff --git a/src/serialization/types/GetLoyaltyProgramRequest.ts b/src/serialization/types/GetLoyaltyProgramRequest.ts new file mode 100644 index 000000000..c7ab0be0a --- /dev/null +++ b/src/serialization/types/GetLoyaltyProgramRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const GetLoyaltyProgramRequest: core.serialization.Schema< + serializers.GetLoyaltyProgramRequest.Raw, + Square.GetLoyaltyProgramRequest +> = core.serialization.unknown(); + +export declare namespace GetLoyaltyProgramRequest { + export type Raw = unknown; +} diff --git a/src/serialization/types/GetLoyaltyPromotionRequest.ts b/src/serialization/types/GetLoyaltyPromotionRequest.ts new file mode 100644 index 000000000..36531ed2e --- /dev/null +++ b/src/serialization/types/GetLoyaltyPromotionRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const GetLoyaltyPromotionRequest: core.serialization.Schema< + serializers.GetLoyaltyPromotionRequest.Raw, + Square.GetLoyaltyPromotionRequest +> = core.serialization.unknown(); + +export declare namespace GetLoyaltyPromotionRequest { + export type Raw = unknown; +} diff --git a/src/serialization/types/GetLoyaltyRewardRequest.ts b/src/serialization/types/GetLoyaltyRewardRequest.ts new file mode 100644 index 000000000..d8ecd561b --- /dev/null +++ b/src/serialization/types/GetLoyaltyRewardRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const GetLoyaltyRewardRequest: core.serialization.Schema< + serializers.GetLoyaltyRewardRequest.Raw, + Square.GetLoyaltyRewardRequest +> = core.serialization.unknown(); + +export declare namespace GetLoyaltyRewardRequest { + export type Raw = unknown; +} diff --git a/src/serialization/types/GetMerchantRequest.ts b/src/serialization/types/GetMerchantRequest.ts new file mode 100644 index 000000000..23b622a5b --- /dev/null +++ b/src/serialization/types/GetMerchantRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const GetMerchantRequest: core.serialization.Schema< + serializers.GetMerchantRequest.Raw, + Square.GetMerchantRequest +> = core.serialization.unknown(); + +export declare namespace GetMerchantRequest { + export type Raw = unknown; +} diff --git a/src/serialization/types/GetOrderRequest.ts b/src/serialization/types/GetOrderRequest.ts new file mode 100644 index 000000000..90f21d792 --- /dev/null +++ b/src/serialization/types/GetOrderRequest.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const GetOrderRequest: core.serialization.Schema = + core.serialization.unknown(); + +export declare namespace GetOrderRequest { + export type Raw = unknown; +} diff --git a/src/serialization/types/GetPaymentLinkRequest.ts b/src/serialization/types/GetPaymentLinkRequest.ts new file mode 100644 index 000000000..96dd5d8a5 --- /dev/null +++ b/src/serialization/types/GetPaymentLinkRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const GetPaymentLinkRequest: core.serialization.Schema< + serializers.GetPaymentLinkRequest.Raw, + Square.GetPaymentLinkRequest +> = core.serialization.unknown(); + +export declare namespace GetPaymentLinkRequest { + export type Raw = unknown; +} diff --git a/src/serialization/types/GetSnippetRequest.ts b/src/serialization/types/GetSnippetRequest.ts new file mode 100644 index 000000000..8bcf10913 --- /dev/null +++ b/src/serialization/types/GetSnippetRequest.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const GetSnippetRequest: core.serialization.Schema = + core.serialization.unknown(); + +export declare namespace GetSnippetRequest { + export type Raw = unknown; +} diff --git a/src/serialization/types/GetTeamMemberBookingProfileRequest.ts b/src/serialization/types/GetTeamMemberBookingProfileRequest.ts new file mode 100644 index 000000000..ff7ab4a1e --- /dev/null +++ b/src/serialization/types/GetTeamMemberBookingProfileRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const GetTeamMemberBookingProfileRequest: core.serialization.Schema< + serializers.GetTeamMemberBookingProfileRequest.Raw, + Square.GetTeamMemberBookingProfileRequest +> = core.serialization.unknown(); + +export declare namespace GetTeamMemberBookingProfileRequest { + export type Raw = unknown; +} diff --git a/src/serialization/types/GetTeamMemberRequest.ts b/src/serialization/types/GetTeamMemberRequest.ts new file mode 100644 index 000000000..b65d724ff --- /dev/null +++ b/src/serialization/types/GetTeamMemberRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const GetTeamMemberRequest: core.serialization.Schema< + serializers.GetTeamMemberRequest.Raw, + Square.GetTeamMemberRequest +> = core.serialization.unknown(); + +export declare namespace GetTeamMemberRequest { + export type Raw = unknown; +} diff --git a/src/serialization/types/GetTransactionRequest.ts b/src/serialization/types/GetTransactionRequest.ts new file mode 100644 index 000000000..f3adb132a --- /dev/null +++ b/src/serialization/types/GetTransactionRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const GetTransactionRequest: core.serialization.Schema< + serializers.GetTransactionRequest.Raw, + Square.GetTransactionRequest +> = core.serialization.unknown(); + +export declare namespace GetTransactionRequest { + export type Raw = unknown; +} diff --git a/src/serialization/types/GetVendorRequest.ts b/src/serialization/types/GetVendorRequest.ts new file mode 100644 index 000000000..4c6a3fd38 --- /dev/null +++ b/src/serialization/types/GetVendorRequest.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const GetVendorRequest: core.serialization.Schema = + core.serialization.unknown(); + +export declare namespace GetVendorRequest { + export type Raw = unknown; +} diff --git a/src/serialization/types/GetWageSettingRequest.ts b/src/serialization/types/GetWageSettingRequest.ts new file mode 100644 index 000000000..52ba32b82 --- /dev/null +++ b/src/serialization/types/GetWageSettingRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const GetWageSettingRequest: core.serialization.Schema< + serializers.GetWageSettingRequest.Raw, + Square.GetWageSettingRequest +> = core.serialization.unknown(); + +export declare namespace GetWageSettingRequest { + export type Raw = unknown; +} diff --git a/src/serialization/types/GetWebhookSubscriptionRequest.ts b/src/serialization/types/GetWebhookSubscriptionRequest.ts new file mode 100644 index 000000000..2e6771793 --- /dev/null +++ b/src/serialization/types/GetWebhookSubscriptionRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const GetWebhookSubscriptionRequest: core.serialization.Schema< + serializers.GetWebhookSubscriptionRequest.Raw, + Square.GetWebhookSubscriptionRequest +> = core.serialization.unknown(); + +export declare namespace GetWebhookSubscriptionRequest { + export type Raw = unknown; +} diff --git a/src/serialization/types/GiftCardActivityCreatedEvent.ts b/src/serialization/types/GiftCardActivityCreatedEvent.ts new file mode 100644 index 000000000..82935bdd9 --- /dev/null +++ b/src/serialization/types/GiftCardActivityCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { GiftCardActivityCreatedEventData } from "./GiftCardActivityCreatedEventData"; + +export const GiftCardActivityCreatedEvent: core.serialization.ObjectSchema< + serializers.GiftCardActivityCreatedEvent.Raw, + Square.GiftCardActivityCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: GiftCardActivityCreatedEventData.optional(), +}); + +export declare namespace GiftCardActivityCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: GiftCardActivityCreatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/GiftCardActivityCreatedEventData.ts b/src/serialization/types/GiftCardActivityCreatedEventData.ts new file mode 100644 index 000000000..1d274aa2b --- /dev/null +++ b/src/serialization/types/GiftCardActivityCreatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { GiftCardActivityCreatedEventObject } from "./GiftCardActivityCreatedEventObject"; + +export const GiftCardActivityCreatedEventData: core.serialization.ObjectSchema< + serializers.GiftCardActivityCreatedEventData.Raw, + Square.GiftCardActivityCreatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: GiftCardActivityCreatedEventObject.optional(), +}); + +export declare namespace GiftCardActivityCreatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: GiftCardActivityCreatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/GiftCardActivityCreatedEventObject.ts b/src/serialization/types/GiftCardActivityCreatedEventObject.ts new file mode 100644 index 000000000..736486217 --- /dev/null +++ b/src/serialization/types/GiftCardActivityCreatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { GiftCardActivity } from "./GiftCardActivity"; + +export const GiftCardActivityCreatedEventObject: core.serialization.ObjectSchema< + serializers.GiftCardActivityCreatedEventObject.Raw, + Square.GiftCardActivityCreatedEventObject +> = core.serialization.object({ + giftCardActivity: core.serialization.property("gift_card_activity", GiftCardActivity.optional()), +}); + +export declare namespace GiftCardActivityCreatedEventObject { + export interface Raw { + gift_card_activity?: GiftCardActivity.Raw | null; + } +} diff --git a/src/serialization/types/GiftCardActivityUpdatedEvent.ts b/src/serialization/types/GiftCardActivityUpdatedEvent.ts new file mode 100644 index 000000000..31442efd6 --- /dev/null +++ b/src/serialization/types/GiftCardActivityUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { GiftCardActivityUpdatedEventData } from "./GiftCardActivityUpdatedEventData"; + +export const GiftCardActivityUpdatedEvent: core.serialization.ObjectSchema< + serializers.GiftCardActivityUpdatedEvent.Raw, + Square.GiftCardActivityUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: GiftCardActivityUpdatedEventData.optional(), +}); + +export declare namespace GiftCardActivityUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: GiftCardActivityUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/GiftCardActivityUpdatedEventData.ts b/src/serialization/types/GiftCardActivityUpdatedEventData.ts new file mode 100644 index 000000000..b7be9ff4d --- /dev/null +++ b/src/serialization/types/GiftCardActivityUpdatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { GiftCardActivityUpdatedEventObject } from "./GiftCardActivityUpdatedEventObject"; + +export const GiftCardActivityUpdatedEventData: core.serialization.ObjectSchema< + serializers.GiftCardActivityUpdatedEventData.Raw, + Square.GiftCardActivityUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: GiftCardActivityUpdatedEventObject.optional(), +}); + +export declare namespace GiftCardActivityUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: GiftCardActivityUpdatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/GiftCardActivityUpdatedEventObject.ts b/src/serialization/types/GiftCardActivityUpdatedEventObject.ts new file mode 100644 index 000000000..0a0f6804f --- /dev/null +++ b/src/serialization/types/GiftCardActivityUpdatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { GiftCardActivity } from "./GiftCardActivity"; + +export const GiftCardActivityUpdatedEventObject: core.serialization.ObjectSchema< + serializers.GiftCardActivityUpdatedEventObject.Raw, + Square.GiftCardActivityUpdatedEventObject +> = core.serialization.object({ + giftCardActivity: core.serialization.property("gift_card_activity", GiftCardActivity.optional()), +}); + +export declare namespace GiftCardActivityUpdatedEventObject { + export interface Raw { + gift_card_activity?: GiftCardActivity.Raw | null; + } +} diff --git a/src/serialization/types/GiftCardCreatedEvent.ts b/src/serialization/types/GiftCardCreatedEvent.ts new file mode 100644 index 000000000..5a8b97b7a --- /dev/null +++ b/src/serialization/types/GiftCardCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { GiftCardCreatedEventData } from "./GiftCardCreatedEventData"; + +export const GiftCardCreatedEvent: core.serialization.ObjectSchema< + serializers.GiftCardCreatedEvent.Raw, + Square.GiftCardCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: GiftCardCreatedEventData.optional(), +}); + +export declare namespace GiftCardCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: GiftCardCreatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/GiftCardCreatedEventData.ts b/src/serialization/types/GiftCardCreatedEventData.ts new file mode 100644 index 000000000..1339cb783 --- /dev/null +++ b/src/serialization/types/GiftCardCreatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { GiftCardCreatedEventObject } from "./GiftCardCreatedEventObject"; + +export const GiftCardCreatedEventData: core.serialization.ObjectSchema< + serializers.GiftCardCreatedEventData.Raw, + Square.GiftCardCreatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: GiftCardCreatedEventObject.optional(), +}); + +export declare namespace GiftCardCreatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: GiftCardCreatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/GiftCardCreatedEventObject.ts b/src/serialization/types/GiftCardCreatedEventObject.ts new file mode 100644 index 000000000..34de654f4 --- /dev/null +++ b/src/serialization/types/GiftCardCreatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { GiftCard } from "./GiftCard"; + +export const GiftCardCreatedEventObject: core.serialization.ObjectSchema< + serializers.GiftCardCreatedEventObject.Raw, + Square.GiftCardCreatedEventObject +> = core.serialization.object({ + giftCard: core.serialization.property("gift_card", GiftCard.optional()), +}); + +export declare namespace GiftCardCreatedEventObject { + export interface Raw { + gift_card?: GiftCard.Raw | null; + } +} diff --git a/src/serialization/types/GiftCardCustomerLinkedEvent.ts b/src/serialization/types/GiftCardCustomerLinkedEvent.ts new file mode 100644 index 000000000..3bda42ea3 --- /dev/null +++ b/src/serialization/types/GiftCardCustomerLinkedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { GiftCardCustomerLinkedEventData } from "./GiftCardCustomerLinkedEventData"; + +export const GiftCardCustomerLinkedEvent: core.serialization.ObjectSchema< + serializers.GiftCardCustomerLinkedEvent.Raw, + Square.GiftCardCustomerLinkedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: GiftCardCustomerLinkedEventData.optional(), +}); + +export declare namespace GiftCardCustomerLinkedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: GiftCardCustomerLinkedEventData.Raw | null; + } +} diff --git a/src/serialization/types/GiftCardCustomerLinkedEventData.ts b/src/serialization/types/GiftCardCustomerLinkedEventData.ts new file mode 100644 index 000000000..08fd44bc4 --- /dev/null +++ b/src/serialization/types/GiftCardCustomerLinkedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { GiftCardCustomerLinkedEventObject } from "./GiftCardCustomerLinkedEventObject"; + +export const GiftCardCustomerLinkedEventData: core.serialization.ObjectSchema< + serializers.GiftCardCustomerLinkedEventData.Raw, + Square.GiftCardCustomerLinkedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: GiftCardCustomerLinkedEventObject.optional(), +}); + +export declare namespace GiftCardCustomerLinkedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: GiftCardCustomerLinkedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/GiftCardCustomerLinkedEventObject.ts b/src/serialization/types/GiftCardCustomerLinkedEventObject.ts new file mode 100644 index 000000000..78d7baf47 --- /dev/null +++ b/src/serialization/types/GiftCardCustomerLinkedEventObject.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { GiftCard } from "./GiftCard"; + +export const GiftCardCustomerLinkedEventObject: core.serialization.ObjectSchema< + serializers.GiftCardCustomerLinkedEventObject.Raw, + Square.GiftCardCustomerLinkedEventObject +> = core.serialization.object({ + giftCard: core.serialization.property("gift_card", GiftCard.optional()), + linkedCustomerId: core.serialization.property("linked_customer_id", core.serialization.string().optionalNullable()), +}); + +export declare namespace GiftCardCustomerLinkedEventObject { + export interface Raw { + gift_card?: GiftCard.Raw | null; + linked_customer_id?: (string | null) | null; + } +} diff --git a/src/serialization/types/GiftCardCustomerUnlinkedEvent.ts b/src/serialization/types/GiftCardCustomerUnlinkedEvent.ts new file mode 100644 index 000000000..fc128d347 --- /dev/null +++ b/src/serialization/types/GiftCardCustomerUnlinkedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { GiftCardCustomerUnlinkedEventData } from "./GiftCardCustomerUnlinkedEventData"; + +export const GiftCardCustomerUnlinkedEvent: core.serialization.ObjectSchema< + serializers.GiftCardCustomerUnlinkedEvent.Raw, + Square.GiftCardCustomerUnlinkedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: GiftCardCustomerUnlinkedEventData.optional(), +}); + +export declare namespace GiftCardCustomerUnlinkedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: GiftCardCustomerUnlinkedEventData.Raw | null; + } +} diff --git a/src/serialization/types/GiftCardCustomerUnlinkedEventData.ts b/src/serialization/types/GiftCardCustomerUnlinkedEventData.ts new file mode 100644 index 000000000..3208e670e --- /dev/null +++ b/src/serialization/types/GiftCardCustomerUnlinkedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { GiftCardCustomerUnlinkedEventObject } from "./GiftCardCustomerUnlinkedEventObject"; + +export const GiftCardCustomerUnlinkedEventData: core.serialization.ObjectSchema< + serializers.GiftCardCustomerUnlinkedEventData.Raw, + Square.GiftCardCustomerUnlinkedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: GiftCardCustomerUnlinkedEventObject.optional(), +}); + +export declare namespace GiftCardCustomerUnlinkedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: GiftCardCustomerUnlinkedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/GiftCardCustomerUnlinkedEventObject.ts b/src/serialization/types/GiftCardCustomerUnlinkedEventObject.ts new file mode 100644 index 000000000..2c74d9e6d --- /dev/null +++ b/src/serialization/types/GiftCardCustomerUnlinkedEventObject.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { GiftCard } from "./GiftCard"; + +export const GiftCardCustomerUnlinkedEventObject: core.serialization.ObjectSchema< + serializers.GiftCardCustomerUnlinkedEventObject.Raw, + Square.GiftCardCustomerUnlinkedEventObject +> = core.serialization.object({ + giftCard: core.serialization.property("gift_card", GiftCard.optional()), + unlinkedCustomerId: core.serialization.property( + "unlinked_customer_id", + core.serialization.string().optionalNullable(), + ), +}); + +export declare namespace GiftCardCustomerUnlinkedEventObject { + export interface Raw { + gift_card?: GiftCard.Raw | null; + unlinked_customer_id?: (string | null) | null; + } +} diff --git a/src/serialization/types/GiftCardUpdatedEvent.ts b/src/serialization/types/GiftCardUpdatedEvent.ts new file mode 100644 index 000000000..e947e260c --- /dev/null +++ b/src/serialization/types/GiftCardUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { GiftCardUpdatedEventData } from "./GiftCardUpdatedEventData"; + +export const GiftCardUpdatedEvent: core.serialization.ObjectSchema< + serializers.GiftCardUpdatedEvent.Raw, + Square.GiftCardUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: GiftCardUpdatedEventData.optional(), +}); + +export declare namespace GiftCardUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: GiftCardUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/GiftCardUpdatedEventData.ts b/src/serialization/types/GiftCardUpdatedEventData.ts new file mode 100644 index 000000000..d5dd91b53 --- /dev/null +++ b/src/serialization/types/GiftCardUpdatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { GiftCardUpdatedEventObject } from "./GiftCardUpdatedEventObject"; + +export const GiftCardUpdatedEventData: core.serialization.ObjectSchema< + serializers.GiftCardUpdatedEventData.Raw, + Square.GiftCardUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: GiftCardUpdatedEventObject.optional(), +}); + +export declare namespace GiftCardUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: GiftCardUpdatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/GiftCardUpdatedEventObject.ts b/src/serialization/types/GiftCardUpdatedEventObject.ts new file mode 100644 index 000000000..d550374cc --- /dev/null +++ b/src/serialization/types/GiftCardUpdatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { GiftCard } from "./GiftCard"; + +export const GiftCardUpdatedEventObject: core.serialization.ObjectSchema< + serializers.GiftCardUpdatedEventObject.Raw, + Square.GiftCardUpdatedEventObject +> = core.serialization.object({ + giftCard: core.serialization.property("gift_card", GiftCard.optional()), +}); + +export declare namespace GiftCardUpdatedEventObject { + export interface Raw { + gift_card?: GiftCard.Raw | null; + } +} diff --git a/src/serialization/types/InventoryCountUpdatedEvent.ts b/src/serialization/types/InventoryCountUpdatedEvent.ts new file mode 100644 index 000000000..982a5261d --- /dev/null +++ b/src/serialization/types/InventoryCountUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { InventoryCountUpdatedEventData } from "./InventoryCountUpdatedEventData"; + +export const InventoryCountUpdatedEvent: core.serialization.ObjectSchema< + serializers.InventoryCountUpdatedEvent.Raw, + Square.InventoryCountUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: InventoryCountUpdatedEventData.optional(), +}); + +export declare namespace InventoryCountUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: InventoryCountUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/InventoryCountUpdatedEventData.ts b/src/serialization/types/InventoryCountUpdatedEventData.ts new file mode 100644 index 000000000..add9c6731 --- /dev/null +++ b/src/serialization/types/InventoryCountUpdatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { InventoryCountUpdatedEventObject } from "./InventoryCountUpdatedEventObject"; + +export const InventoryCountUpdatedEventData: core.serialization.ObjectSchema< + serializers.InventoryCountUpdatedEventData.Raw, + Square.InventoryCountUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: InventoryCountUpdatedEventObject.optional(), +}); + +export declare namespace InventoryCountUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: InventoryCountUpdatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/InventoryCountUpdatedEventObject.ts b/src/serialization/types/InventoryCountUpdatedEventObject.ts new file mode 100644 index 000000000..f8329760c --- /dev/null +++ b/src/serialization/types/InventoryCountUpdatedEventObject.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { InventoryCount } from "./InventoryCount"; + +export const InventoryCountUpdatedEventObject: core.serialization.ObjectSchema< + serializers.InventoryCountUpdatedEventObject.Raw, + Square.InventoryCountUpdatedEventObject +> = core.serialization.object({ + inventoryCounts: core.serialization.property( + "inventory_counts", + core.serialization.list(InventoryCount).optionalNullable(), + ), +}); + +export declare namespace InventoryCountUpdatedEventObject { + export interface Raw { + inventory_counts?: (InventoryCount.Raw[] | null) | null; + } +} diff --git a/src/serialization/types/InvoiceCanceledEvent.ts b/src/serialization/types/InvoiceCanceledEvent.ts new file mode 100644 index 000000000..dde974a8a --- /dev/null +++ b/src/serialization/types/InvoiceCanceledEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { InvoiceCanceledEventData } from "./InvoiceCanceledEventData"; + +export const InvoiceCanceledEvent: core.serialization.ObjectSchema< + serializers.InvoiceCanceledEvent.Raw, + Square.InvoiceCanceledEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: InvoiceCanceledEventData.optional(), +}); + +export declare namespace InvoiceCanceledEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: InvoiceCanceledEventData.Raw | null; + } +} diff --git a/src/serialization/types/InvoiceCanceledEventData.ts b/src/serialization/types/InvoiceCanceledEventData.ts new file mode 100644 index 000000000..8de734272 --- /dev/null +++ b/src/serialization/types/InvoiceCanceledEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { InvoiceCanceledEventObject } from "./InvoiceCanceledEventObject"; + +export const InvoiceCanceledEventData: core.serialization.ObjectSchema< + serializers.InvoiceCanceledEventData.Raw, + Square.InvoiceCanceledEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: InvoiceCanceledEventObject.optional(), +}); + +export declare namespace InvoiceCanceledEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: InvoiceCanceledEventObject.Raw | null; + } +} diff --git a/src/serialization/types/InvoiceCanceledEventObject.ts b/src/serialization/types/InvoiceCanceledEventObject.ts new file mode 100644 index 000000000..65ee37ad2 --- /dev/null +++ b/src/serialization/types/InvoiceCanceledEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Invoice } from "./Invoice"; + +export const InvoiceCanceledEventObject: core.serialization.ObjectSchema< + serializers.InvoiceCanceledEventObject.Raw, + Square.InvoiceCanceledEventObject +> = core.serialization.object({ + invoice: Invoice.optional(), +}); + +export declare namespace InvoiceCanceledEventObject { + export interface Raw { + invoice?: Invoice.Raw | null; + } +} diff --git a/src/serialization/types/InvoiceCreatedEvent.ts b/src/serialization/types/InvoiceCreatedEvent.ts new file mode 100644 index 000000000..d9e40bc13 --- /dev/null +++ b/src/serialization/types/InvoiceCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { InvoiceCreatedEventData } from "./InvoiceCreatedEventData"; + +export const InvoiceCreatedEvent: core.serialization.ObjectSchema< + serializers.InvoiceCreatedEvent.Raw, + Square.InvoiceCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: InvoiceCreatedEventData.optional(), +}); + +export declare namespace InvoiceCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: InvoiceCreatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/InvoiceCreatedEventData.ts b/src/serialization/types/InvoiceCreatedEventData.ts new file mode 100644 index 000000000..264b2d10c --- /dev/null +++ b/src/serialization/types/InvoiceCreatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { InvoiceCreatedEventObject } from "./InvoiceCreatedEventObject"; + +export const InvoiceCreatedEventData: core.serialization.ObjectSchema< + serializers.InvoiceCreatedEventData.Raw, + Square.InvoiceCreatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: InvoiceCreatedEventObject.optional(), +}); + +export declare namespace InvoiceCreatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: InvoiceCreatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/InvoiceCreatedEventObject.ts b/src/serialization/types/InvoiceCreatedEventObject.ts new file mode 100644 index 000000000..e2599d833 --- /dev/null +++ b/src/serialization/types/InvoiceCreatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Invoice } from "./Invoice"; + +export const InvoiceCreatedEventObject: core.serialization.ObjectSchema< + serializers.InvoiceCreatedEventObject.Raw, + Square.InvoiceCreatedEventObject +> = core.serialization.object({ + invoice: Invoice.optional(), +}); + +export declare namespace InvoiceCreatedEventObject { + export interface Raw { + invoice?: Invoice.Raw | null; + } +} diff --git a/src/serialization/types/InvoiceDeletedEvent.ts b/src/serialization/types/InvoiceDeletedEvent.ts new file mode 100644 index 000000000..ce27bea56 --- /dev/null +++ b/src/serialization/types/InvoiceDeletedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { InvoiceDeletedEventData } from "./InvoiceDeletedEventData"; + +export const InvoiceDeletedEvent: core.serialization.ObjectSchema< + serializers.InvoiceDeletedEvent.Raw, + Square.InvoiceDeletedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: InvoiceDeletedEventData.optional(), +}); + +export declare namespace InvoiceDeletedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: InvoiceDeletedEventData.Raw | null; + } +} diff --git a/src/serialization/types/InvoiceDeletedEventData.ts b/src/serialization/types/InvoiceDeletedEventData.ts new file mode 100644 index 000000000..13530b55b --- /dev/null +++ b/src/serialization/types/InvoiceDeletedEventData.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const InvoiceDeletedEventData: core.serialization.ObjectSchema< + serializers.InvoiceDeletedEventData.Raw, + Square.InvoiceDeletedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + deleted: core.serialization.boolean().optionalNullable(), +}); + +export declare namespace InvoiceDeletedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + deleted?: (boolean | null) | null; + } +} diff --git a/src/serialization/types/InvoicePaymentMadeEvent.ts b/src/serialization/types/InvoicePaymentMadeEvent.ts new file mode 100644 index 000000000..f9c95fd2a --- /dev/null +++ b/src/serialization/types/InvoicePaymentMadeEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { InvoicePaymentMadeEventData } from "./InvoicePaymentMadeEventData"; + +export const InvoicePaymentMadeEvent: core.serialization.ObjectSchema< + serializers.InvoicePaymentMadeEvent.Raw, + Square.InvoicePaymentMadeEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: InvoicePaymentMadeEventData.optional(), +}); + +export declare namespace InvoicePaymentMadeEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: InvoicePaymentMadeEventData.Raw | null; + } +} diff --git a/src/serialization/types/InvoicePaymentMadeEventData.ts b/src/serialization/types/InvoicePaymentMadeEventData.ts new file mode 100644 index 000000000..6086307ac --- /dev/null +++ b/src/serialization/types/InvoicePaymentMadeEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { InvoicePaymentMadeEventObject } from "./InvoicePaymentMadeEventObject"; + +export const InvoicePaymentMadeEventData: core.serialization.ObjectSchema< + serializers.InvoicePaymentMadeEventData.Raw, + Square.InvoicePaymentMadeEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: InvoicePaymentMadeEventObject.optional(), +}); + +export declare namespace InvoicePaymentMadeEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: InvoicePaymentMadeEventObject.Raw | null; + } +} diff --git a/src/serialization/types/InvoicePaymentMadeEventObject.ts b/src/serialization/types/InvoicePaymentMadeEventObject.ts new file mode 100644 index 000000000..bdd8ab3d4 --- /dev/null +++ b/src/serialization/types/InvoicePaymentMadeEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Invoice } from "./Invoice"; + +export const InvoicePaymentMadeEventObject: core.serialization.ObjectSchema< + serializers.InvoicePaymentMadeEventObject.Raw, + Square.InvoicePaymentMadeEventObject +> = core.serialization.object({ + invoice: Invoice.optional(), +}); + +export declare namespace InvoicePaymentMadeEventObject { + export interface Raw { + invoice?: Invoice.Raw | null; + } +} diff --git a/src/serialization/types/InvoicePublishedEvent.ts b/src/serialization/types/InvoicePublishedEvent.ts new file mode 100644 index 000000000..5c69f8d03 --- /dev/null +++ b/src/serialization/types/InvoicePublishedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { InvoicePublishedEventData } from "./InvoicePublishedEventData"; + +export const InvoicePublishedEvent: core.serialization.ObjectSchema< + serializers.InvoicePublishedEvent.Raw, + Square.InvoicePublishedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: InvoicePublishedEventData.optional(), +}); + +export declare namespace InvoicePublishedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: InvoicePublishedEventData.Raw | null; + } +} diff --git a/src/serialization/types/InvoicePublishedEventData.ts b/src/serialization/types/InvoicePublishedEventData.ts new file mode 100644 index 000000000..e7eab5e8c --- /dev/null +++ b/src/serialization/types/InvoicePublishedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { InvoicePublishedEventObject } from "./InvoicePublishedEventObject"; + +export const InvoicePublishedEventData: core.serialization.ObjectSchema< + serializers.InvoicePublishedEventData.Raw, + Square.InvoicePublishedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: InvoicePublishedEventObject.optional(), +}); + +export declare namespace InvoicePublishedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: InvoicePublishedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/InvoicePublishedEventObject.ts b/src/serialization/types/InvoicePublishedEventObject.ts new file mode 100644 index 000000000..fa5cfa5a0 --- /dev/null +++ b/src/serialization/types/InvoicePublishedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Invoice } from "./Invoice"; + +export const InvoicePublishedEventObject: core.serialization.ObjectSchema< + serializers.InvoicePublishedEventObject.Raw, + Square.InvoicePublishedEventObject +> = core.serialization.object({ + invoice: Invoice.optional(), +}); + +export declare namespace InvoicePublishedEventObject { + export interface Raw { + invoice?: Invoice.Raw | null; + } +} diff --git a/src/serialization/types/InvoiceRefundedEvent.ts b/src/serialization/types/InvoiceRefundedEvent.ts new file mode 100644 index 000000000..2bc213459 --- /dev/null +++ b/src/serialization/types/InvoiceRefundedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { InvoiceRefundedEventData } from "./InvoiceRefundedEventData"; + +export const InvoiceRefundedEvent: core.serialization.ObjectSchema< + serializers.InvoiceRefundedEvent.Raw, + Square.InvoiceRefundedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: InvoiceRefundedEventData.optional(), +}); + +export declare namespace InvoiceRefundedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: InvoiceRefundedEventData.Raw | null; + } +} diff --git a/src/serialization/types/InvoiceRefundedEventData.ts b/src/serialization/types/InvoiceRefundedEventData.ts new file mode 100644 index 000000000..62397a7d0 --- /dev/null +++ b/src/serialization/types/InvoiceRefundedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { InvoiceRefundedEventObject } from "./InvoiceRefundedEventObject"; + +export const InvoiceRefundedEventData: core.serialization.ObjectSchema< + serializers.InvoiceRefundedEventData.Raw, + Square.InvoiceRefundedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: InvoiceRefundedEventObject.optional(), +}); + +export declare namespace InvoiceRefundedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: InvoiceRefundedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/InvoiceRefundedEventObject.ts b/src/serialization/types/InvoiceRefundedEventObject.ts new file mode 100644 index 000000000..3fc268233 --- /dev/null +++ b/src/serialization/types/InvoiceRefundedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Invoice } from "./Invoice"; + +export const InvoiceRefundedEventObject: core.serialization.ObjectSchema< + serializers.InvoiceRefundedEventObject.Raw, + Square.InvoiceRefundedEventObject +> = core.serialization.object({ + invoice: Invoice.optional(), +}); + +export declare namespace InvoiceRefundedEventObject { + export interface Raw { + invoice?: Invoice.Raw | null; + } +} diff --git a/src/serialization/types/InvoiceScheduledChargeFailedEvent.ts b/src/serialization/types/InvoiceScheduledChargeFailedEvent.ts new file mode 100644 index 000000000..8404aa5b2 --- /dev/null +++ b/src/serialization/types/InvoiceScheduledChargeFailedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { InvoiceScheduledChargeFailedEventData } from "./InvoiceScheduledChargeFailedEventData"; + +export const InvoiceScheduledChargeFailedEvent: core.serialization.ObjectSchema< + serializers.InvoiceScheduledChargeFailedEvent.Raw, + Square.InvoiceScheduledChargeFailedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: InvoiceScheduledChargeFailedEventData.optional(), +}); + +export declare namespace InvoiceScheduledChargeFailedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: InvoiceScheduledChargeFailedEventData.Raw | null; + } +} diff --git a/src/serialization/types/InvoiceScheduledChargeFailedEventData.ts b/src/serialization/types/InvoiceScheduledChargeFailedEventData.ts new file mode 100644 index 000000000..e694bdb82 --- /dev/null +++ b/src/serialization/types/InvoiceScheduledChargeFailedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { InvoiceScheduledChargeFailedEventObject } from "./InvoiceScheduledChargeFailedEventObject"; + +export const InvoiceScheduledChargeFailedEventData: core.serialization.ObjectSchema< + serializers.InvoiceScheduledChargeFailedEventData.Raw, + Square.InvoiceScheduledChargeFailedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: InvoiceScheduledChargeFailedEventObject.optional(), +}); + +export declare namespace InvoiceScheduledChargeFailedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: InvoiceScheduledChargeFailedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/InvoiceScheduledChargeFailedEventObject.ts b/src/serialization/types/InvoiceScheduledChargeFailedEventObject.ts new file mode 100644 index 000000000..e88fce573 --- /dev/null +++ b/src/serialization/types/InvoiceScheduledChargeFailedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Invoice } from "./Invoice"; + +export const InvoiceScheduledChargeFailedEventObject: core.serialization.ObjectSchema< + serializers.InvoiceScheduledChargeFailedEventObject.Raw, + Square.InvoiceScheduledChargeFailedEventObject +> = core.serialization.object({ + invoice: Invoice.optional(), +}); + +export declare namespace InvoiceScheduledChargeFailedEventObject { + export interface Raw { + invoice?: Invoice.Raw | null; + } +} diff --git a/src/serialization/types/InvoiceUpdatedEvent.ts b/src/serialization/types/InvoiceUpdatedEvent.ts new file mode 100644 index 000000000..11a6e1e61 --- /dev/null +++ b/src/serialization/types/InvoiceUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { InvoiceUpdatedEventData } from "./InvoiceUpdatedEventData"; + +export const InvoiceUpdatedEvent: core.serialization.ObjectSchema< + serializers.InvoiceUpdatedEvent.Raw, + Square.InvoiceUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: InvoiceUpdatedEventData.optional(), +}); + +export declare namespace InvoiceUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: InvoiceUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/InvoiceUpdatedEventData.ts b/src/serialization/types/InvoiceUpdatedEventData.ts new file mode 100644 index 000000000..ce58d91bb --- /dev/null +++ b/src/serialization/types/InvoiceUpdatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { InvoiceUpdatedEventObject } from "./InvoiceUpdatedEventObject"; + +export const InvoiceUpdatedEventData: core.serialization.ObjectSchema< + serializers.InvoiceUpdatedEventData.Raw, + Square.InvoiceUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: InvoiceUpdatedEventObject.optional(), +}); + +export declare namespace InvoiceUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: InvoiceUpdatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/InvoiceUpdatedEventObject.ts b/src/serialization/types/InvoiceUpdatedEventObject.ts new file mode 100644 index 000000000..00246a6d1 --- /dev/null +++ b/src/serialization/types/InvoiceUpdatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Invoice } from "./Invoice"; + +export const InvoiceUpdatedEventObject: core.serialization.ObjectSchema< + serializers.InvoiceUpdatedEventObject.Raw, + Square.InvoiceUpdatedEventObject +> = core.serialization.object({ + invoice: Invoice.optional(), +}); + +export declare namespace InvoiceUpdatedEventObject { + export interface Raw { + invoice?: Invoice.Raw | null; + } +} diff --git a/src/serialization/types/JobCreatedEvent.ts b/src/serialization/types/JobCreatedEvent.ts new file mode 100644 index 000000000..c2d2b0e59 --- /dev/null +++ b/src/serialization/types/JobCreatedEvent.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { JobCreatedEventData } from "./JobCreatedEventData"; + +export const JobCreatedEvent: core.serialization.ObjectSchema = + core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: JobCreatedEventData.optional(), + }); + +export declare namespace JobCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: JobCreatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/JobCreatedEventData.ts b/src/serialization/types/JobCreatedEventData.ts new file mode 100644 index 000000000..d4c691f21 --- /dev/null +++ b/src/serialization/types/JobCreatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { JobCreatedEventObject } from "./JobCreatedEventObject"; + +export const JobCreatedEventData: core.serialization.ObjectSchema< + serializers.JobCreatedEventData.Raw, + Square.JobCreatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: JobCreatedEventObject.optional(), +}); + +export declare namespace JobCreatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: JobCreatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/JobCreatedEventObject.ts b/src/serialization/types/JobCreatedEventObject.ts new file mode 100644 index 000000000..899b86a7f --- /dev/null +++ b/src/serialization/types/JobCreatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Job } from "./Job"; + +export const JobCreatedEventObject: core.serialization.ObjectSchema< + serializers.JobCreatedEventObject.Raw, + Square.JobCreatedEventObject +> = core.serialization.object({ + job: Job.optional(), +}); + +export declare namespace JobCreatedEventObject { + export interface Raw { + job?: Job.Raw | null; + } +} diff --git a/src/serialization/types/JobUpdatedEvent.ts b/src/serialization/types/JobUpdatedEvent.ts new file mode 100644 index 000000000..32bfc0f7f --- /dev/null +++ b/src/serialization/types/JobUpdatedEvent.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { JobUpdatedEventData } from "./JobUpdatedEventData"; + +export const JobUpdatedEvent: core.serialization.ObjectSchema = + core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: JobUpdatedEventData.optional(), + }); + +export declare namespace JobUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: JobUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/JobUpdatedEventData.ts b/src/serialization/types/JobUpdatedEventData.ts new file mode 100644 index 000000000..33dc5bf86 --- /dev/null +++ b/src/serialization/types/JobUpdatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { JobUpdatedEventObject } from "./JobUpdatedEventObject"; + +export const JobUpdatedEventData: core.serialization.ObjectSchema< + serializers.JobUpdatedEventData.Raw, + Square.JobUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: JobUpdatedEventObject.optional(), +}); + +export declare namespace JobUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: JobUpdatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/JobUpdatedEventObject.ts b/src/serialization/types/JobUpdatedEventObject.ts new file mode 100644 index 000000000..9aa97d5e8 --- /dev/null +++ b/src/serialization/types/JobUpdatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Job } from "./Job"; + +export const JobUpdatedEventObject: core.serialization.ObjectSchema< + serializers.JobUpdatedEventObject.Raw, + Square.JobUpdatedEventObject +> = core.serialization.object({ + job: Job.optional(), +}); + +export declare namespace JobUpdatedEventObject { + export interface Raw { + job?: Job.Raw | null; + } +} diff --git a/src/serialization/types/LaborScheduledShiftCreatedEvent.ts b/src/serialization/types/LaborScheduledShiftCreatedEvent.ts new file mode 100644 index 000000000..67c11ba57 --- /dev/null +++ b/src/serialization/types/LaborScheduledShiftCreatedEvent.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LaborScheduledShiftCreatedEventData } from "./LaborScheduledShiftCreatedEventData"; + +export const LaborScheduledShiftCreatedEvent: core.serialization.ObjectSchema< + serializers.LaborScheduledShiftCreatedEvent.Raw, + Square.LaborScheduledShiftCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + locationId: core.serialization.property("location_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: LaborScheduledShiftCreatedEventData.optional(), +}); + +export declare namespace LaborScheduledShiftCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + location_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: LaborScheduledShiftCreatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/LaborScheduledShiftCreatedEventData.ts b/src/serialization/types/LaborScheduledShiftCreatedEventData.ts new file mode 100644 index 000000000..9c0e5e3cd --- /dev/null +++ b/src/serialization/types/LaborScheduledShiftCreatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LaborScheduledShiftCreatedEventObject } from "./LaborScheduledShiftCreatedEventObject"; + +export const LaborScheduledShiftCreatedEventData: core.serialization.ObjectSchema< + serializers.LaborScheduledShiftCreatedEventData.Raw, + Square.LaborScheduledShiftCreatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: LaborScheduledShiftCreatedEventObject.optional(), +}); + +export declare namespace LaborScheduledShiftCreatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: LaborScheduledShiftCreatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/LaborScheduledShiftCreatedEventObject.ts b/src/serialization/types/LaborScheduledShiftCreatedEventObject.ts new file mode 100644 index 000000000..87a6fb088 --- /dev/null +++ b/src/serialization/types/LaborScheduledShiftCreatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { ScheduledShift } from "./ScheduledShift"; + +export const LaborScheduledShiftCreatedEventObject: core.serialization.ObjectSchema< + serializers.LaborScheduledShiftCreatedEventObject.Raw, + Square.LaborScheduledShiftCreatedEventObject +> = core.serialization.object({ + scheduledShift: core.serialization.property("ScheduledShift", ScheduledShift.optional()), +}); + +export declare namespace LaborScheduledShiftCreatedEventObject { + export interface Raw { + ScheduledShift?: ScheduledShift.Raw | null; + } +} diff --git a/src/serialization/types/LaborScheduledShiftDeletedEvent.ts b/src/serialization/types/LaborScheduledShiftDeletedEvent.ts new file mode 100644 index 000000000..e75d36060 --- /dev/null +++ b/src/serialization/types/LaborScheduledShiftDeletedEvent.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LaborScheduledShiftDeletedEventData } from "./LaborScheduledShiftDeletedEventData"; + +export const LaborScheduledShiftDeletedEvent: core.serialization.ObjectSchema< + serializers.LaborScheduledShiftDeletedEvent.Raw, + Square.LaborScheduledShiftDeletedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + locationId: core.serialization.property("location_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: LaborScheduledShiftDeletedEventData.optional(), +}); + +export declare namespace LaborScheduledShiftDeletedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + location_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: LaborScheduledShiftDeletedEventData.Raw | null; + } +} diff --git a/src/serialization/types/LaborScheduledShiftDeletedEventData.ts b/src/serialization/types/LaborScheduledShiftDeletedEventData.ts new file mode 100644 index 000000000..15a0b447b --- /dev/null +++ b/src/serialization/types/LaborScheduledShiftDeletedEventData.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const LaborScheduledShiftDeletedEventData: core.serialization.ObjectSchema< + serializers.LaborScheduledShiftDeletedEventData.Raw, + Square.LaborScheduledShiftDeletedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + deleted: core.serialization.boolean().optionalNullable(), +}); + +export declare namespace LaborScheduledShiftDeletedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + deleted?: (boolean | null) | null; + } +} diff --git a/src/serialization/types/LaborScheduledShiftPublishedEvent.ts b/src/serialization/types/LaborScheduledShiftPublishedEvent.ts new file mode 100644 index 000000000..0067662da --- /dev/null +++ b/src/serialization/types/LaborScheduledShiftPublishedEvent.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LaborScheduledShiftPublishedEventData } from "./LaborScheduledShiftPublishedEventData"; + +export const LaborScheduledShiftPublishedEvent: core.serialization.ObjectSchema< + serializers.LaborScheduledShiftPublishedEvent.Raw, + Square.LaborScheduledShiftPublishedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + locationId: core.serialization.property("location_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: LaborScheduledShiftPublishedEventData.optional(), +}); + +export declare namespace LaborScheduledShiftPublishedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + location_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: LaborScheduledShiftPublishedEventData.Raw | null; + } +} diff --git a/src/serialization/types/LaborScheduledShiftPublishedEventData.ts b/src/serialization/types/LaborScheduledShiftPublishedEventData.ts new file mode 100644 index 000000000..659a4a719 --- /dev/null +++ b/src/serialization/types/LaborScheduledShiftPublishedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LaborScheduledShiftPublishedEventObject } from "./LaborScheduledShiftPublishedEventObject"; + +export const LaborScheduledShiftPublishedEventData: core.serialization.ObjectSchema< + serializers.LaborScheduledShiftPublishedEventData.Raw, + Square.LaborScheduledShiftPublishedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: LaborScheduledShiftPublishedEventObject.optional(), +}); + +export declare namespace LaborScheduledShiftPublishedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: LaborScheduledShiftPublishedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/LaborScheduledShiftPublishedEventObject.ts b/src/serialization/types/LaborScheduledShiftPublishedEventObject.ts new file mode 100644 index 000000000..a0b8bb48e --- /dev/null +++ b/src/serialization/types/LaborScheduledShiftPublishedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { ScheduledShift } from "./ScheduledShift"; + +export const LaborScheduledShiftPublishedEventObject: core.serialization.ObjectSchema< + serializers.LaborScheduledShiftPublishedEventObject.Raw, + Square.LaborScheduledShiftPublishedEventObject +> = core.serialization.object({ + scheduledShift: core.serialization.property("ScheduledShift", ScheduledShift.optional()), +}); + +export declare namespace LaborScheduledShiftPublishedEventObject { + export interface Raw { + ScheduledShift?: ScheduledShift.Raw | null; + } +} diff --git a/src/serialization/types/LaborScheduledShiftUpdatedEvent.ts b/src/serialization/types/LaborScheduledShiftUpdatedEvent.ts new file mode 100644 index 000000000..14dd7dd7b --- /dev/null +++ b/src/serialization/types/LaborScheduledShiftUpdatedEvent.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LaborScheduledShiftUpdatedEventData } from "./LaborScheduledShiftUpdatedEventData"; + +export const LaborScheduledShiftUpdatedEvent: core.serialization.ObjectSchema< + serializers.LaborScheduledShiftUpdatedEvent.Raw, + Square.LaborScheduledShiftUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + locationId: core.serialization.property("location_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: LaborScheduledShiftUpdatedEventData.optional(), +}); + +export declare namespace LaborScheduledShiftUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + location_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: LaborScheduledShiftUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/LaborScheduledShiftUpdatedEventData.ts b/src/serialization/types/LaborScheduledShiftUpdatedEventData.ts new file mode 100644 index 000000000..52fe63804 --- /dev/null +++ b/src/serialization/types/LaborScheduledShiftUpdatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LaborScheduledShiftUpdatedEventObject } from "./LaborScheduledShiftUpdatedEventObject"; + +export const LaborScheduledShiftUpdatedEventData: core.serialization.ObjectSchema< + serializers.LaborScheduledShiftUpdatedEventData.Raw, + Square.LaborScheduledShiftUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: LaborScheduledShiftUpdatedEventObject.optional(), +}); + +export declare namespace LaborScheduledShiftUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: LaborScheduledShiftUpdatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/LaborScheduledShiftUpdatedEventObject.ts b/src/serialization/types/LaborScheduledShiftUpdatedEventObject.ts new file mode 100644 index 000000000..960cb5a79 --- /dev/null +++ b/src/serialization/types/LaborScheduledShiftUpdatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { ScheduledShift } from "./ScheduledShift"; + +export const LaborScheduledShiftUpdatedEventObject: core.serialization.ObjectSchema< + serializers.LaborScheduledShiftUpdatedEventObject.Raw, + Square.LaborScheduledShiftUpdatedEventObject +> = core.serialization.object({ + scheduledShift: core.serialization.property("ScheduledShift", ScheduledShift.optional()), +}); + +export declare namespace LaborScheduledShiftUpdatedEventObject { + export interface Raw { + ScheduledShift?: ScheduledShift.Raw | null; + } +} diff --git a/src/serialization/types/LaborShiftCreatedEvent.ts b/src/serialization/types/LaborShiftCreatedEvent.ts new file mode 100644 index 000000000..f35702b4c --- /dev/null +++ b/src/serialization/types/LaborShiftCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LaborShiftCreatedEventData } from "./LaborShiftCreatedEventData"; + +export const LaborShiftCreatedEvent: core.serialization.ObjectSchema< + serializers.LaborShiftCreatedEvent.Raw, + Square.LaborShiftCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: LaborShiftCreatedEventData.optional(), +}); + +export declare namespace LaborShiftCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: LaborShiftCreatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/LaborShiftCreatedEventData.ts b/src/serialization/types/LaborShiftCreatedEventData.ts new file mode 100644 index 000000000..73bddd4be --- /dev/null +++ b/src/serialization/types/LaborShiftCreatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LaborShiftCreatedEventObject } from "./LaborShiftCreatedEventObject"; + +export const LaborShiftCreatedEventData: core.serialization.ObjectSchema< + serializers.LaborShiftCreatedEventData.Raw, + Square.LaborShiftCreatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: LaborShiftCreatedEventObject.optional(), +}); + +export declare namespace LaborShiftCreatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: LaborShiftCreatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/LaborShiftCreatedEventObject.ts b/src/serialization/types/LaborShiftCreatedEventObject.ts new file mode 100644 index 000000000..09d3f2b67 --- /dev/null +++ b/src/serialization/types/LaborShiftCreatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Shift } from "./Shift"; + +export const LaborShiftCreatedEventObject: core.serialization.ObjectSchema< + serializers.LaborShiftCreatedEventObject.Raw, + Square.LaborShiftCreatedEventObject +> = core.serialization.object({ + shift: Shift.optional(), +}); + +export declare namespace LaborShiftCreatedEventObject { + export interface Raw { + shift?: Shift.Raw | null; + } +} diff --git a/src/serialization/types/LaborShiftDeletedEvent.ts b/src/serialization/types/LaborShiftDeletedEvent.ts new file mode 100644 index 000000000..276289782 --- /dev/null +++ b/src/serialization/types/LaborShiftDeletedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LaborShiftDeletedEventData } from "./LaborShiftDeletedEventData"; + +export const LaborShiftDeletedEvent: core.serialization.ObjectSchema< + serializers.LaborShiftDeletedEvent.Raw, + Square.LaborShiftDeletedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: LaborShiftDeletedEventData.optional(), +}); + +export declare namespace LaborShiftDeletedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: LaborShiftDeletedEventData.Raw | null; + } +} diff --git a/src/serialization/types/LaborShiftDeletedEventData.ts b/src/serialization/types/LaborShiftDeletedEventData.ts new file mode 100644 index 000000000..480316663 --- /dev/null +++ b/src/serialization/types/LaborShiftDeletedEventData.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const LaborShiftDeletedEventData: core.serialization.ObjectSchema< + serializers.LaborShiftDeletedEventData.Raw, + Square.LaborShiftDeletedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + deleted: core.serialization.boolean().optionalNullable(), +}); + +export declare namespace LaborShiftDeletedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + deleted?: (boolean | null) | null; + } +} diff --git a/src/serialization/types/LaborShiftUpdatedEvent.ts b/src/serialization/types/LaborShiftUpdatedEvent.ts new file mode 100644 index 000000000..71152c7b4 --- /dev/null +++ b/src/serialization/types/LaborShiftUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LaborShiftUpdatedEventData } from "./LaborShiftUpdatedEventData"; + +export const LaborShiftUpdatedEvent: core.serialization.ObjectSchema< + serializers.LaborShiftUpdatedEvent.Raw, + Square.LaborShiftUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: LaborShiftUpdatedEventData.optional(), +}); + +export declare namespace LaborShiftUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: LaborShiftUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/LaborShiftUpdatedEventData.ts b/src/serialization/types/LaborShiftUpdatedEventData.ts new file mode 100644 index 000000000..79c1706bc --- /dev/null +++ b/src/serialization/types/LaborShiftUpdatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LaborShiftUpdatedEventObject } from "./LaborShiftUpdatedEventObject"; + +export const LaborShiftUpdatedEventData: core.serialization.ObjectSchema< + serializers.LaborShiftUpdatedEventData.Raw, + Square.LaborShiftUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: LaborShiftUpdatedEventObject.optional(), +}); + +export declare namespace LaborShiftUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: LaborShiftUpdatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/LaborShiftUpdatedEventObject.ts b/src/serialization/types/LaborShiftUpdatedEventObject.ts new file mode 100644 index 000000000..01d6cb26b --- /dev/null +++ b/src/serialization/types/LaborShiftUpdatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Shift } from "./Shift"; + +export const LaborShiftUpdatedEventObject: core.serialization.ObjectSchema< + serializers.LaborShiftUpdatedEventObject.Raw, + Square.LaborShiftUpdatedEventObject +> = core.serialization.object({ + shift: Shift.optional(), +}); + +export declare namespace LaborShiftUpdatedEventObject { + export interface Raw { + shift?: Shift.Raw | null; + } +} diff --git a/src/serialization/types/LaborTimecardCreatedEvent.ts b/src/serialization/types/LaborTimecardCreatedEvent.ts new file mode 100644 index 000000000..94b4ebb29 --- /dev/null +++ b/src/serialization/types/LaborTimecardCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LaborTimecardCreatedEventData } from "./LaborTimecardCreatedEventData"; + +export const LaborTimecardCreatedEvent: core.serialization.ObjectSchema< + serializers.LaborTimecardCreatedEvent.Raw, + Square.LaborTimecardCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: LaborTimecardCreatedEventData.optional(), +}); + +export declare namespace LaborTimecardCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: LaborTimecardCreatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/LaborTimecardCreatedEventData.ts b/src/serialization/types/LaborTimecardCreatedEventData.ts new file mode 100644 index 000000000..c22dbf314 --- /dev/null +++ b/src/serialization/types/LaborTimecardCreatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LaborTimecardCreatedEventObject } from "./LaborTimecardCreatedEventObject"; + +export const LaborTimecardCreatedEventData: core.serialization.ObjectSchema< + serializers.LaborTimecardCreatedEventData.Raw, + Square.LaborTimecardCreatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: LaborTimecardCreatedEventObject.optional(), +}); + +export declare namespace LaborTimecardCreatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: LaborTimecardCreatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/LaborTimecardCreatedEventObject.ts b/src/serialization/types/LaborTimecardCreatedEventObject.ts new file mode 100644 index 000000000..a7fc48be9 --- /dev/null +++ b/src/serialization/types/LaborTimecardCreatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Timecard } from "./Timecard"; + +export const LaborTimecardCreatedEventObject: core.serialization.ObjectSchema< + serializers.LaborTimecardCreatedEventObject.Raw, + Square.LaborTimecardCreatedEventObject +> = core.serialization.object({ + timecard: Timecard.optional(), +}); + +export declare namespace LaborTimecardCreatedEventObject { + export interface Raw { + timecard?: Timecard.Raw | null; + } +} diff --git a/src/serialization/types/LaborTimecardDeletedEvent.ts b/src/serialization/types/LaborTimecardDeletedEvent.ts new file mode 100644 index 000000000..a5e7786ec --- /dev/null +++ b/src/serialization/types/LaborTimecardDeletedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LaborTimecardDeletedEventData } from "./LaborTimecardDeletedEventData"; + +export const LaborTimecardDeletedEvent: core.serialization.ObjectSchema< + serializers.LaborTimecardDeletedEvent.Raw, + Square.LaborTimecardDeletedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: LaborTimecardDeletedEventData.optional(), +}); + +export declare namespace LaborTimecardDeletedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: LaborTimecardDeletedEventData.Raw | null; + } +} diff --git a/src/serialization/types/LaborTimecardDeletedEventData.ts b/src/serialization/types/LaborTimecardDeletedEventData.ts new file mode 100644 index 000000000..33c1f3acf --- /dev/null +++ b/src/serialization/types/LaborTimecardDeletedEventData.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const LaborTimecardDeletedEventData: core.serialization.ObjectSchema< + serializers.LaborTimecardDeletedEventData.Raw, + Square.LaborTimecardDeletedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + deleted: core.serialization.boolean().optionalNullable(), +}); + +export declare namespace LaborTimecardDeletedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + deleted?: (boolean | null) | null; + } +} diff --git a/src/serialization/types/LaborTimecardUpdatedEvent.ts b/src/serialization/types/LaborTimecardUpdatedEvent.ts new file mode 100644 index 000000000..ab2e5088d --- /dev/null +++ b/src/serialization/types/LaborTimecardUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LaborTimecardUpdatedEventData } from "./LaborTimecardUpdatedEventData"; + +export const LaborTimecardUpdatedEvent: core.serialization.ObjectSchema< + serializers.LaborTimecardUpdatedEvent.Raw, + Square.LaborTimecardUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: LaborTimecardUpdatedEventData.optional(), +}); + +export declare namespace LaborTimecardUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: LaborTimecardUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/LaborTimecardUpdatedEventData.ts b/src/serialization/types/LaborTimecardUpdatedEventData.ts new file mode 100644 index 000000000..321f0887b --- /dev/null +++ b/src/serialization/types/LaborTimecardUpdatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LaborTimecardUpdatedEventObject } from "./LaborTimecardUpdatedEventObject"; + +export const LaborTimecardUpdatedEventData: core.serialization.ObjectSchema< + serializers.LaborTimecardUpdatedEventData.Raw, + Square.LaborTimecardUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: LaborTimecardUpdatedEventObject.optional(), +}); + +export declare namespace LaborTimecardUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: LaborTimecardUpdatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/LaborTimecardUpdatedEventObject.ts b/src/serialization/types/LaborTimecardUpdatedEventObject.ts new file mode 100644 index 000000000..8477837ab --- /dev/null +++ b/src/serialization/types/LaborTimecardUpdatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Timecard } from "./Timecard"; + +export const LaborTimecardUpdatedEventObject: core.serialization.ObjectSchema< + serializers.LaborTimecardUpdatedEventObject.Raw, + Square.LaborTimecardUpdatedEventObject +> = core.serialization.object({ + timecard: Timecard.optional(), +}); + +export declare namespace LaborTimecardUpdatedEventObject { + export interface Raw { + timecard?: Timecard.Raw | null; + } +} diff --git a/src/serialization/types/LocationCreatedEvent.ts b/src/serialization/types/LocationCreatedEvent.ts new file mode 100644 index 000000000..47b4bc155 --- /dev/null +++ b/src/serialization/types/LocationCreatedEvent.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LocationCreatedEventData } from "./LocationCreatedEventData"; + +export const LocationCreatedEvent: core.serialization.ObjectSchema< + serializers.LocationCreatedEvent.Raw, + Square.LocationCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + locationId: core.serialization.property("location_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: LocationCreatedEventData.optional(), +}); + +export declare namespace LocationCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + location_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: LocationCreatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/LocationCreatedEventData.ts b/src/serialization/types/LocationCreatedEventData.ts new file mode 100644 index 000000000..dac14e648 --- /dev/null +++ b/src/serialization/types/LocationCreatedEventData.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const LocationCreatedEventData: core.serialization.ObjectSchema< + serializers.LocationCreatedEventData.Raw, + Square.LocationCreatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), +}); + +export declare namespace LocationCreatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + } +} diff --git a/src/serialization/types/LocationCustomAttributeDefinitionOwnedCreatedEvent.ts b/src/serialization/types/LocationCustomAttributeDefinitionOwnedCreatedEvent.ts new file mode 100644 index 000000000..35d2056e3 --- /dev/null +++ b/src/serialization/types/LocationCustomAttributeDefinitionOwnedCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const LocationCustomAttributeDefinitionOwnedCreatedEvent: core.serialization.ObjectSchema< + serializers.LocationCustomAttributeDefinitionOwnedCreatedEvent.Raw, + Square.LocationCustomAttributeDefinitionOwnedCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace LocationCustomAttributeDefinitionOwnedCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/LocationCustomAttributeDefinitionOwnedDeletedEvent.ts b/src/serialization/types/LocationCustomAttributeDefinitionOwnedDeletedEvent.ts new file mode 100644 index 000000000..486528f87 --- /dev/null +++ b/src/serialization/types/LocationCustomAttributeDefinitionOwnedDeletedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const LocationCustomAttributeDefinitionOwnedDeletedEvent: core.serialization.ObjectSchema< + serializers.LocationCustomAttributeDefinitionOwnedDeletedEvent.Raw, + Square.LocationCustomAttributeDefinitionOwnedDeletedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace LocationCustomAttributeDefinitionOwnedDeletedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/LocationCustomAttributeDefinitionOwnedUpdatedEvent.ts b/src/serialization/types/LocationCustomAttributeDefinitionOwnedUpdatedEvent.ts new file mode 100644 index 000000000..f3099de04 --- /dev/null +++ b/src/serialization/types/LocationCustomAttributeDefinitionOwnedUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const LocationCustomAttributeDefinitionOwnedUpdatedEvent: core.serialization.ObjectSchema< + serializers.LocationCustomAttributeDefinitionOwnedUpdatedEvent.Raw, + Square.LocationCustomAttributeDefinitionOwnedUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace LocationCustomAttributeDefinitionOwnedUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/LocationCustomAttributeDefinitionVisibleCreatedEvent.ts b/src/serialization/types/LocationCustomAttributeDefinitionVisibleCreatedEvent.ts new file mode 100644 index 000000000..c3ad8a091 --- /dev/null +++ b/src/serialization/types/LocationCustomAttributeDefinitionVisibleCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const LocationCustomAttributeDefinitionVisibleCreatedEvent: core.serialization.ObjectSchema< + serializers.LocationCustomAttributeDefinitionVisibleCreatedEvent.Raw, + Square.LocationCustomAttributeDefinitionVisibleCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace LocationCustomAttributeDefinitionVisibleCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/LocationCustomAttributeDefinitionVisibleDeletedEvent.ts b/src/serialization/types/LocationCustomAttributeDefinitionVisibleDeletedEvent.ts new file mode 100644 index 000000000..c8165b10a --- /dev/null +++ b/src/serialization/types/LocationCustomAttributeDefinitionVisibleDeletedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const LocationCustomAttributeDefinitionVisibleDeletedEvent: core.serialization.ObjectSchema< + serializers.LocationCustomAttributeDefinitionVisibleDeletedEvent.Raw, + Square.LocationCustomAttributeDefinitionVisibleDeletedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace LocationCustomAttributeDefinitionVisibleDeletedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/LocationCustomAttributeDefinitionVisibleUpdatedEvent.ts b/src/serialization/types/LocationCustomAttributeDefinitionVisibleUpdatedEvent.ts new file mode 100644 index 000000000..fd6a95049 --- /dev/null +++ b/src/serialization/types/LocationCustomAttributeDefinitionVisibleUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const LocationCustomAttributeDefinitionVisibleUpdatedEvent: core.serialization.ObjectSchema< + serializers.LocationCustomAttributeDefinitionVisibleUpdatedEvent.Raw, + Square.LocationCustomAttributeDefinitionVisibleUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace LocationCustomAttributeDefinitionVisibleUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/LocationCustomAttributeOwnedDeletedEvent.ts b/src/serialization/types/LocationCustomAttributeOwnedDeletedEvent.ts new file mode 100644 index 000000000..450f6e1f5 --- /dev/null +++ b/src/serialization/types/LocationCustomAttributeOwnedDeletedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeEventData } from "./CustomAttributeEventData"; + +export const LocationCustomAttributeOwnedDeletedEvent: core.serialization.ObjectSchema< + serializers.LocationCustomAttributeOwnedDeletedEvent.Raw, + Square.LocationCustomAttributeOwnedDeletedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeEventData.optional(), +}); + +export declare namespace LocationCustomAttributeOwnedDeletedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeEventData.Raw | null; + } +} diff --git a/src/serialization/types/LocationCustomAttributeOwnedUpdatedEvent.ts b/src/serialization/types/LocationCustomAttributeOwnedUpdatedEvent.ts new file mode 100644 index 000000000..4b676842a --- /dev/null +++ b/src/serialization/types/LocationCustomAttributeOwnedUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeEventData } from "./CustomAttributeEventData"; + +export const LocationCustomAttributeOwnedUpdatedEvent: core.serialization.ObjectSchema< + serializers.LocationCustomAttributeOwnedUpdatedEvent.Raw, + Square.LocationCustomAttributeOwnedUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeEventData.optional(), +}); + +export declare namespace LocationCustomAttributeOwnedUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeEventData.Raw | null; + } +} diff --git a/src/serialization/types/LocationCustomAttributeVisibleDeletedEvent.ts b/src/serialization/types/LocationCustomAttributeVisibleDeletedEvent.ts new file mode 100644 index 000000000..6a9e35548 --- /dev/null +++ b/src/serialization/types/LocationCustomAttributeVisibleDeletedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeEventData } from "./CustomAttributeEventData"; + +export const LocationCustomAttributeVisibleDeletedEvent: core.serialization.ObjectSchema< + serializers.LocationCustomAttributeVisibleDeletedEvent.Raw, + Square.LocationCustomAttributeVisibleDeletedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeEventData.optional(), +}); + +export declare namespace LocationCustomAttributeVisibleDeletedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeEventData.Raw | null; + } +} diff --git a/src/serialization/types/LocationCustomAttributeVisibleUpdatedEvent.ts b/src/serialization/types/LocationCustomAttributeVisibleUpdatedEvent.ts new file mode 100644 index 000000000..4461a8c67 --- /dev/null +++ b/src/serialization/types/LocationCustomAttributeVisibleUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeEventData } from "./CustomAttributeEventData"; + +export const LocationCustomAttributeVisibleUpdatedEvent: core.serialization.ObjectSchema< + serializers.LocationCustomAttributeVisibleUpdatedEvent.Raw, + Square.LocationCustomAttributeVisibleUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeEventData.optional(), +}); + +export declare namespace LocationCustomAttributeVisibleUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeEventData.Raw | null; + } +} diff --git a/src/serialization/types/LocationSettingsUpdatedEvent.ts b/src/serialization/types/LocationSettingsUpdatedEvent.ts new file mode 100644 index 000000000..52960a31e --- /dev/null +++ b/src/serialization/types/LocationSettingsUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LocationSettingsUpdatedEventData } from "./LocationSettingsUpdatedEventData"; + +export const LocationSettingsUpdatedEvent: core.serialization.ObjectSchema< + serializers.LocationSettingsUpdatedEvent.Raw, + Square.LocationSettingsUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: LocationSettingsUpdatedEventData.optional(), +}); + +export declare namespace LocationSettingsUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: LocationSettingsUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/LocationSettingsUpdatedEventData.ts b/src/serialization/types/LocationSettingsUpdatedEventData.ts new file mode 100644 index 000000000..117f66d49 --- /dev/null +++ b/src/serialization/types/LocationSettingsUpdatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LocationSettingsUpdatedEventObject } from "./LocationSettingsUpdatedEventObject"; + +export const LocationSettingsUpdatedEventData: core.serialization.ObjectSchema< + serializers.LocationSettingsUpdatedEventData.Raw, + Square.LocationSettingsUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: LocationSettingsUpdatedEventObject.optional(), +}); + +export declare namespace LocationSettingsUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: LocationSettingsUpdatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/LocationSettingsUpdatedEventObject.ts b/src/serialization/types/LocationSettingsUpdatedEventObject.ts new file mode 100644 index 000000000..be61b400c --- /dev/null +++ b/src/serialization/types/LocationSettingsUpdatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CheckoutLocationSettings } from "./CheckoutLocationSettings"; + +export const LocationSettingsUpdatedEventObject: core.serialization.ObjectSchema< + serializers.LocationSettingsUpdatedEventObject.Raw, + Square.LocationSettingsUpdatedEventObject +> = core.serialization.object({ + locationSettings: core.serialization.property("location_settings", CheckoutLocationSettings.optional()), +}); + +export declare namespace LocationSettingsUpdatedEventObject { + export interface Raw { + location_settings?: CheckoutLocationSettings.Raw | null; + } +} diff --git a/src/serialization/types/LocationUpdatedEvent.ts b/src/serialization/types/LocationUpdatedEvent.ts new file mode 100644 index 000000000..7604abbb9 --- /dev/null +++ b/src/serialization/types/LocationUpdatedEvent.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LocationUpdatedEventData } from "./LocationUpdatedEventData"; + +export const LocationUpdatedEvent: core.serialization.ObjectSchema< + serializers.LocationUpdatedEvent.Raw, + Square.LocationUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + locationId: core.serialization.property("location_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: LocationUpdatedEventData.optional(), +}); + +export declare namespace LocationUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + location_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: LocationUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/LocationUpdatedEventData.ts b/src/serialization/types/LocationUpdatedEventData.ts new file mode 100644 index 000000000..c46891648 --- /dev/null +++ b/src/serialization/types/LocationUpdatedEventData.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const LocationUpdatedEventData: core.serialization.ObjectSchema< + serializers.LocationUpdatedEventData.Raw, + Square.LocationUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), +}); + +export declare namespace LocationUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + } +} diff --git a/src/serialization/types/LoyaltyAccountCreatedEvent.ts b/src/serialization/types/LoyaltyAccountCreatedEvent.ts new file mode 100644 index 000000000..a2493dc53 --- /dev/null +++ b/src/serialization/types/LoyaltyAccountCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LoyaltyAccountCreatedEventData } from "./LoyaltyAccountCreatedEventData"; + +export const LoyaltyAccountCreatedEvent: core.serialization.ObjectSchema< + serializers.LoyaltyAccountCreatedEvent.Raw, + Square.LoyaltyAccountCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: LoyaltyAccountCreatedEventData.optional(), +}); + +export declare namespace LoyaltyAccountCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: LoyaltyAccountCreatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/LoyaltyAccountCreatedEventData.ts b/src/serialization/types/LoyaltyAccountCreatedEventData.ts new file mode 100644 index 000000000..2845ba72c --- /dev/null +++ b/src/serialization/types/LoyaltyAccountCreatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LoyaltyAccountCreatedEventObject } from "./LoyaltyAccountCreatedEventObject"; + +export const LoyaltyAccountCreatedEventData: core.serialization.ObjectSchema< + serializers.LoyaltyAccountCreatedEventData.Raw, + Square.LoyaltyAccountCreatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: LoyaltyAccountCreatedEventObject.optional(), +}); + +export declare namespace LoyaltyAccountCreatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: LoyaltyAccountCreatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/LoyaltyAccountCreatedEventObject.ts b/src/serialization/types/LoyaltyAccountCreatedEventObject.ts new file mode 100644 index 000000000..ceb16bfca --- /dev/null +++ b/src/serialization/types/LoyaltyAccountCreatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LoyaltyAccount } from "./LoyaltyAccount"; + +export const LoyaltyAccountCreatedEventObject: core.serialization.ObjectSchema< + serializers.LoyaltyAccountCreatedEventObject.Raw, + Square.LoyaltyAccountCreatedEventObject +> = core.serialization.object({ + loyaltyAccount: core.serialization.property("loyalty_account", LoyaltyAccount.optional()), +}); + +export declare namespace LoyaltyAccountCreatedEventObject { + export interface Raw { + loyalty_account?: LoyaltyAccount.Raw | null; + } +} diff --git a/src/serialization/types/LoyaltyAccountDeletedEvent.ts b/src/serialization/types/LoyaltyAccountDeletedEvent.ts new file mode 100644 index 000000000..877fa1328 --- /dev/null +++ b/src/serialization/types/LoyaltyAccountDeletedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LoyaltyAccountDeletedEventData } from "./LoyaltyAccountDeletedEventData"; + +export const LoyaltyAccountDeletedEvent: core.serialization.ObjectSchema< + serializers.LoyaltyAccountDeletedEvent.Raw, + Square.LoyaltyAccountDeletedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: LoyaltyAccountDeletedEventData.optional(), +}); + +export declare namespace LoyaltyAccountDeletedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: LoyaltyAccountDeletedEventData.Raw | null; + } +} diff --git a/src/serialization/types/LoyaltyAccountDeletedEventData.ts b/src/serialization/types/LoyaltyAccountDeletedEventData.ts new file mode 100644 index 000000000..3cfa1878d --- /dev/null +++ b/src/serialization/types/LoyaltyAccountDeletedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LoyaltyAccountDeletedEventObject } from "./LoyaltyAccountDeletedEventObject"; + +export const LoyaltyAccountDeletedEventData: core.serialization.ObjectSchema< + serializers.LoyaltyAccountDeletedEventData.Raw, + Square.LoyaltyAccountDeletedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: LoyaltyAccountDeletedEventObject.optional(), +}); + +export declare namespace LoyaltyAccountDeletedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: LoyaltyAccountDeletedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/LoyaltyAccountDeletedEventObject.ts b/src/serialization/types/LoyaltyAccountDeletedEventObject.ts new file mode 100644 index 000000000..ad10cb8a4 --- /dev/null +++ b/src/serialization/types/LoyaltyAccountDeletedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LoyaltyAccount } from "./LoyaltyAccount"; + +export const LoyaltyAccountDeletedEventObject: core.serialization.ObjectSchema< + serializers.LoyaltyAccountDeletedEventObject.Raw, + Square.LoyaltyAccountDeletedEventObject +> = core.serialization.object({ + loyaltyAccount: core.serialization.property("loyalty_account", LoyaltyAccount.optional()), +}); + +export declare namespace LoyaltyAccountDeletedEventObject { + export interface Raw { + loyalty_account?: LoyaltyAccount.Raw | null; + } +} diff --git a/src/serialization/types/LoyaltyAccountMappingType.ts b/src/serialization/types/LoyaltyAccountMappingType.ts new file mode 100644 index 000000000..c7d2af17e --- /dev/null +++ b/src/serialization/types/LoyaltyAccountMappingType.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const LoyaltyAccountMappingType: core.serialization.Schema< + serializers.LoyaltyAccountMappingType.Raw, + Square.LoyaltyAccountMappingType +> = core.serialization.stringLiteral("PHONE"); + +export declare namespace LoyaltyAccountMappingType { + export type Raw = "PHONE"; +} diff --git a/src/serialization/types/LoyaltyAccountUpdatedEvent.ts b/src/serialization/types/LoyaltyAccountUpdatedEvent.ts new file mode 100644 index 000000000..ffe6e38af --- /dev/null +++ b/src/serialization/types/LoyaltyAccountUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LoyaltyAccountUpdatedEventData } from "./LoyaltyAccountUpdatedEventData"; + +export const LoyaltyAccountUpdatedEvent: core.serialization.ObjectSchema< + serializers.LoyaltyAccountUpdatedEvent.Raw, + Square.LoyaltyAccountUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: LoyaltyAccountUpdatedEventData.optional(), +}); + +export declare namespace LoyaltyAccountUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: LoyaltyAccountUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/LoyaltyAccountUpdatedEventData.ts b/src/serialization/types/LoyaltyAccountUpdatedEventData.ts new file mode 100644 index 000000000..f3171bd9c --- /dev/null +++ b/src/serialization/types/LoyaltyAccountUpdatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LoyaltyAccountUpdatedEventObject } from "./LoyaltyAccountUpdatedEventObject"; + +export const LoyaltyAccountUpdatedEventData: core.serialization.ObjectSchema< + serializers.LoyaltyAccountUpdatedEventData.Raw, + Square.LoyaltyAccountUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: LoyaltyAccountUpdatedEventObject.optional(), +}); + +export declare namespace LoyaltyAccountUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: LoyaltyAccountUpdatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/LoyaltyAccountUpdatedEventObject.ts b/src/serialization/types/LoyaltyAccountUpdatedEventObject.ts new file mode 100644 index 000000000..9ab327ced --- /dev/null +++ b/src/serialization/types/LoyaltyAccountUpdatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LoyaltyAccount } from "./LoyaltyAccount"; + +export const LoyaltyAccountUpdatedEventObject: core.serialization.ObjectSchema< + serializers.LoyaltyAccountUpdatedEventObject.Raw, + Square.LoyaltyAccountUpdatedEventObject +> = core.serialization.object({ + loyaltyAccount: core.serialization.property("loyalty_account", LoyaltyAccount.optional()), +}); + +export declare namespace LoyaltyAccountUpdatedEventObject { + export interface Raw { + loyalty_account?: LoyaltyAccount.Raw | null; + } +} diff --git a/src/serialization/types/LoyaltyEventCreatedEvent.ts b/src/serialization/types/LoyaltyEventCreatedEvent.ts new file mode 100644 index 000000000..21655eb60 --- /dev/null +++ b/src/serialization/types/LoyaltyEventCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LoyaltyEventCreatedEventData } from "./LoyaltyEventCreatedEventData"; + +export const LoyaltyEventCreatedEvent: core.serialization.ObjectSchema< + serializers.LoyaltyEventCreatedEvent.Raw, + Square.LoyaltyEventCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: LoyaltyEventCreatedEventData.optional(), +}); + +export declare namespace LoyaltyEventCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: LoyaltyEventCreatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/LoyaltyEventCreatedEventData.ts b/src/serialization/types/LoyaltyEventCreatedEventData.ts new file mode 100644 index 000000000..65f9620c7 --- /dev/null +++ b/src/serialization/types/LoyaltyEventCreatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LoyaltyEventCreatedEventObject } from "./LoyaltyEventCreatedEventObject"; + +export const LoyaltyEventCreatedEventData: core.serialization.ObjectSchema< + serializers.LoyaltyEventCreatedEventData.Raw, + Square.LoyaltyEventCreatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: LoyaltyEventCreatedEventObject.optional(), +}); + +export declare namespace LoyaltyEventCreatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: LoyaltyEventCreatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/LoyaltyEventCreatedEventObject.ts b/src/serialization/types/LoyaltyEventCreatedEventObject.ts new file mode 100644 index 000000000..994636b16 --- /dev/null +++ b/src/serialization/types/LoyaltyEventCreatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LoyaltyEvent } from "./LoyaltyEvent"; + +export const LoyaltyEventCreatedEventObject: core.serialization.ObjectSchema< + serializers.LoyaltyEventCreatedEventObject.Raw, + Square.LoyaltyEventCreatedEventObject +> = core.serialization.object({ + loyaltyEvent: core.serialization.property("loyalty_event", LoyaltyEvent.optional()), +}); + +export declare namespace LoyaltyEventCreatedEventObject { + export interface Raw { + loyalty_event?: LoyaltyEvent.Raw | null; + } +} diff --git a/src/serialization/types/LoyaltyProgramCreatedEvent.ts b/src/serialization/types/LoyaltyProgramCreatedEvent.ts new file mode 100644 index 000000000..c32e88ec8 --- /dev/null +++ b/src/serialization/types/LoyaltyProgramCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LoyaltyProgramCreatedEventData } from "./LoyaltyProgramCreatedEventData"; + +export const LoyaltyProgramCreatedEvent: core.serialization.ObjectSchema< + serializers.LoyaltyProgramCreatedEvent.Raw, + Square.LoyaltyProgramCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: LoyaltyProgramCreatedEventData.optional(), +}); + +export declare namespace LoyaltyProgramCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: LoyaltyProgramCreatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/LoyaltyProgramCreatedEventData.ts b/src/serialization/types/LoyaltyProgramCreatedEventData.ts new file mode 100644 index 000000000..e124e6a97 --- /dev/null +++ b/src/serialization/types/LoyaltyProgramCreatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LoyaltyProgramCreatedEventObject } from "./LoyaltyProgramCreatedEventObject"; + +export const LoyaltyProgramCreatedEventData: core.serialization.ObjectSchema< + serializers.LoyaltyProgramCreatedEventData.Raw, + Square.LoyaltyProgramCreatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: LoyaltyProgramCreatedEventObject.optional(), +}); + +export declare namespace LoyaltyProgramCreatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: LoyaltyProgramCreatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/LoyaltyProgramCreatedEventObject.ts b/src/serialization/types/LoyaltyProgramCreatedEventObject.ts new file mode 100644 index 000000000..a8e3a404b --- /dev/null +++ b/src/serialization/types/LoyaltyProgramCreatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LoyaltyProgram } from "./LoyaltyProgram"; + +export const LoyaltyProgramCreatedEventObject: core.serialization.ObjectSchema< + serializers.LoyaltyProgramCreatedEventObject.Raw, + Square.LoyaltyProgramCreatedEventObject +> = core.serialization.object({ + loyaltyProgram: core.serialization.property("loyalty_program", LoyaltyProgram.optional()), +}); + +export declare namespace LoyaltyProgramCreatedEventObject { + export interface Raw { + loyalty_program?: LoyaltyProgram.Raw | null; + } +} diff --git a/src/serialization/types/LoyaltyProgramRewardDefinition.ts b/src/serialization/types/LoyaltyProgramRewardDefinition.ts deleted file mode 100644 index c32847cd9..000000000 --- a/src/serialization/types/LoyaltyProgramRewardDefinition.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../index"; -import * as Square from "../../api/index"; -import * as core from "../../core"; -import { LoyaltyProgramRewardDefinitionScope } from "./LoyaltyProgramRewardDefinitionScope"; -import { LoyaltyProgramRewardDefinitionType } from "./LoyaltyProgramRewardDefinitionType"; -import { Money } from "./Money"; - -export const LoyaltyProgramRewardDefinition: core.serialization.ObjectSchema< - serializers.LoyaltyProgramRewardDefinition.Raw, - Square.LoyaltyProgramRewardDefinition -> = core.serialization.object({ - scope: LoyaltyProgramRewardDefinitionScope, - discountType: core.serialization.property("discount_type", LoyaltyProgramRewardDefinitionType), - percentageDiscount: core.serialization.property("percentage_discount", core.serialization.string().optional()), - catalogObjectIds: core.serialization.property( - "catalog_object_ids", - core.serialization.list(core.serialization.string()).optional(), - ), - fixedDiscountMoney: core.serialization.property("fixed_discount_money", Money.optional()), - maxDiscountMoney: core.serialization.property("max_discount_money", Money.optional()), -}); - -export declare namespace LoyaltyProgramRewardDefinition { - export interface Raw { - scope: LoyaltyProgramRewardDefinitionScope.Raw; - discount_type: LoyaltyProgramRewardDefinitionType.Raw; - percentage_discount?: string | null; - catalog_object_ids?: string[] | null; - fixed_discount_money?: Money.Raw | null; - max_discount_money?: Money.Raw | null; - } -} diff --git a/src/serialization/types/LoyaltyProgramRewardDefinitionScope.ts b/src/serialization/types/LoyaltyProgramRewardDefinitionScope.ts deleted file mode 100644 index bc58e4f6e..000000000 --- a/src/serialization/types/LoyaltyProgramRewardDefinitionScope.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../index"; -import * as Square from "../../api/index"; -import * as core from "../../core"; - -export const LoyaltyProgramRewardDefinitionScope: core.serialization.Schema< - serializers.LoyaltyProgramRewardDefinitionScope.Raw, - Square.LoyaltyProgramRewardDefinitionScope -> = core.serialization.enum_(["ORDER", "ITEM_VARIATION", "CATEGORY"]); - -export declare namespace LoyaltyProgramRewardDefinitionScope { - export type Raw = "ORDER" | "ITEM_VARIATION" | "CATEGORY"; -} diff --git a/src/serialization/types/LoyaltyProgramRewardDefinitionType.ts b/src/serialization/types/LoyaltyProgramRewardDefinitionType.ts deleted file mode 100644 index 3f1f11f61..000000000 --- a/src/serialization/types/LoyaltyProgramRewardDefinitionType.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../index"; -import * as Square from "../../api/index"; -import * as core from "../../core"; - -export const LoyaltyProgramRewardDefinitionType: core.serialization.Schema< - serializers.LoyaltyProgramRewardDefinitionType.Raw, - Square.LoyaltyProgramRewardDefinitionType -> = core.serialization.enum_(["FIXED_AMOUNT", "FIXED_PERCENTAGE"]); - -export declare namespace LoyaltyProgramRewardDefinitionType { - export type Raw = "FIXED_AMOUNT" | "FIXED_PERCENTAGE"; -} diff --git a/src/serialization/types/LoyaltyProgramRewardTier.ts b/src/serialization/types/LoyaltyProgramRewardTier.ts index ae1c4a9dc..e728ad13c 100644 --- a/src/serialization/types/LoyaltyProgramRewardTier.ts +++ b/src/serialization/types/LoyaltyProgramRewardTier.ts @@ -5,7 +5,6 @@ import * as serializers from "../index"; import * as Square from "../../api/index"; import * as core from "../../core"; -import { LoyaltyProgramRewardDefinition } from "./LoyaltyProgramRewardDefinition"; import { CatalogObjectReference } from "./CatalogObjectReference"; export const LoyaltyProgramRewardTier: core.serialization.ObjectSchema< @@ -15,7 +14,6 @@ export const LoyaltyProgramRewardTier: core.serialization.ObjectSchema< id: core.serialization.string().optional(), points: core.serialization.number(), name: core.serialization.string().optional(), - definition: LoyaltyProgramRewardDefinition.optional(), createdAt: core.serialization.property("created_at", core.serialization.string().optional()), pricingRuleReference: core.serialization.property("pricing_rule_reference", CatalogObjectReference), }); @@ -25,7 +23,6 @@ export declare namespace LoyaltyProgramRewardTier { id?: string | null; points: number; name?: string | null; - definition?: LoyaltyProgramRewardDefinition.Raw | null; created_at?: string | null; pricing_rule_reference: CatalogObjectReference.Raw; } diff --git a/src/serialization/types/LoyaltyProgramUpdatedEvent.ts b/src/serialization/types/LoyaltyProgramUpdatedEvent.ts new file mode 100644 index 000000000..3d80c96fb --- /dev/null +++ b/src/serialization/types/LoyaltyProgramUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LoyaltyProgramUpdatedEventData } from "./LoyaltyProgramUpdatedEventData"; + +export const LoyaltyProgramUpdatedEvent: core.serialization.ObjectSchema< + serializers.LoyaltyProgramUpdatedEvent.Raw, + Square.LoyaltyProgramUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: LoyaltyProgramUpdatedEventData.optional(), +}); + +export declare namespace LoyaltyProgramUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: LoyaltyProgramUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/LoyaltyProgramUpdatedEventData.ts b/src/serialization/types/LoyaltyProgramUpdatedEventData.ts new file mode 100644 index 000000000..9f6562630 --- /dev/null +++ b/src/serialization/types/LoyaltyProgramUpdatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LoyaltyProgramUpdatedEventObject } from "./LoyaltyProgramUpdatedEventObject"; + +export const LoyaltyProgramUpdatedEventData: core.serialization.ObjectSchema< + serializers.LoyaltyProgramUpdatedEventData.Raw, + Square.LoyaltyProgramUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: LoyaltyProgramUpdatedEventObject.optional(), +}); + +export declare namespace LoyaltyProgramUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: LoyaltyProgramUpdatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/LoyaltyProgramUpdatedEventObject.ts b/src/serialization/types/LoyaltyProgramUpdatedEventObject.ts new file mode 100644 index 000000000..d5069372e --- /dev/null +++ b/src/serialization/types/LoyaltyProgramUpdatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LoyaltyProgram } from "./LoyaltyProgram"; + +export const LoyaltyProgramUpdatedEventObject: core.serialization.ObjectSchema< + serializers.LoyaltyProgramUpdatedEventObject.Raw, + Square.LoyaltyProgramUpdatedEventObject +> = core.serialization.object({ + loyaltyProgram: core.serialization.property("loyalty_program", LoyaltyProgram.optional()), +}); + +export declare namespace LoyaltyProgramUpdatedEventObject { + export interface Raw { + loyalty_program?: LoyaltyProgram.Raw | null; + } +} diff --git a/src/serialization/types/LoyaltyPromotionCreatedEvent.ts b/src/serialization/types/LoyaltyPromotionCreatedEvent.ts new file mode 100644 index 000000000..f7068ab9d --- /dev/null +++ b/src/serialization/types/LoyaltyPromotionCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LoyaltyPromotionCreatedEventData } from "./LoyaltyPromotionCreatedEventData"; + +export const LoyaltyPromotionCreatedEvent: core.serialization.ObjectSchema< + serializers.LoyaltyPromotionCreatedEvent.Raw, + Square.LoyaltyPromotionCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: LoyaltyPromotionCreatedEventData.optional(), +}); + +export declare namespace LoyaltyPromotionCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: LoyaltyPromotionCreatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/LoyaltyPromotionCreatedEventData.ts b/src/serialization/types/LoyaltyPromotionCreatedEventData.ts new file mode 100644 index 000000000..456b03b56 --- /dev/null +++ b/src/serialization/types/LoyaltyPromotionCreatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LoyaltyPromotionCreatedEventObject } from "./LoyaltyPromotionCreatedEventObject"; + +export const LoyaltyPromotionCreatedEventData: core.serialization.ObjectSchema< + serializers.LoyaltyPromotionCreatedEventData.Raw, + Square.LoyaltyPromotionCreatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: LoyaltyPromotionCreatedEventObject.optional(), +}); + +export declare namespace LoyaltyPromotionCreatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: LoyaltyPromotionCreatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/LoyaltyPromotionCreatedEventObject.ts b/src/serialization/types/LoyaltyPromotionCreatedEventObject.ts new file mode 100644 index 000000000..a4023966d --- /dev/null +++ b/src/serialization/types/LoyaltyPromotionCreatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LoyaltyPromotion } from "./LoyaltyPromotion"; + +export const LoyaltyPromotionCreatedEventObject: core.serialization.ObjectSchema< + serializers.LoyaltyPromotionCreatedEventObject.Raw, + Square.LoyaltyPromotionCreatedEventObject +> = core.serialization.object({ + loyaltyPromotion: core.serialization.property("loyalty_promotion", LoyaltyPromotion.optional()), +}); + +export declare namespace LoyaltyPromotionCreatedEventObject { + export interface Raw { + loyalty_promotion?: LoyaltyPromotion.Raw | null; + } +} diff --git a/src/serialization/types/LoyaltyPromotionUpdatedEvent.ts b/src/serialization/types/LoyaltyPromotionUpdatedEvent.ts new file mode 100644 index 000000000..7c961c4e4 --- /dev/null +++ b/src/serialization/types/LoyaltyPromotionUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LoyaltyPromotionUpdatedEventData } from "./LoyaltyPromotionUpdatedEventData"; + +export const LoyaltyPromotionUpdatedEvent: core.serialization.ObjectSchema< + serializers.LoyaltyPromotionUpdatedEvent.Raw, + Square.LoyaltyPromotionUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: LoyaltyPromotionUpdatedEventData.optional(), +}); + +export declare namespace LoyaltyPromotionUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: LoyaltyPromotionUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/LoyaltyPromotionUpdatedEventData.ts b/src/serialization/types/LoyaltyPromotionUpdatedEventData.ts new file mode 100644 index 000000000..f19cbac42 --- /dev/null +++ b/src/serialization/types/LoyaltyPromotionUpdatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LoyaltyPromotionUpdatedEventObject } from "./LoyaltyPromotionUpdatedEventObject"; + +export const LoyaltyPromotionUpdatedEventData: core.serialization.ObjectSchema< + serializers.LoyaltyPromotionUpdatedEventData.Raw, + Square.LoyaltyPromotionUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: LoyaltyPromotionUpdatedEventObject.optional(), +}); + +export declare namespace LoyaltyPromotionUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: LoyaltyPromotionUpdatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/LoyaltyPromotionUpdatedEventObject.ts b/src/serialization/types/LoyaltyPromotionUpdatedEventObject.ts new file mode 100644 index 000000000..57c1a6849 --- /dev/null +++ b/src/serialization/types/LoyaltyPromotionUpdatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { LoyaltyPromotion } from "./LoyaltyPromotion"; + +export const LoyaltyPromotionUpdatedEventObject: core.serialization.ObjectSchema< + serializers.LoyaltyPromotionUpdatedEventObject.Raw, + Square.LoyaltyPromotionUpdatedEventObject +> = core.serialization.object({ + loyaltyPromotion: core.serialization.property("loyalty_promotion", LoyaltyPromotion.optional()), +}); + +export declare namespace LoyaltyPromotionUpdatedEventObject { + export interface Raw { + loyalty_promotion?: LoyaltyPromotion.Raw | null; + } +} diff --git a/src/serialization/types/MerchantCustomAttributeDefinitionOwnedCreatedEvent.ts b/src/serialization/types/MerchantCustomAttributeDefinitionOwnedCreatedEvent.ts new file mode 100644 index 000000000..0070343a3 --- /dev/null +++ b/src/serialization/types/MerchantCustomAttributeDefinitionOwnedCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const MerchantCustomAttributeDefinitionOwnedCreatedEvent: core.serialization.ObjectSchema< + serializers.MerchantCustomAttributeDefinitionOwnedCreatedEvent.Raw, + Square.MerchantCustomAttributeDefinitionOwnedCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace MerchantCustomAttributeDefinitionOwnedCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/MerchantCustomAttributeDefinitionOwnedDeletedEvent.ts b/src/serialization/types/MerchantCustomAttributeDefinitionOwnedDeletedEvent.ts new file mode 100644 index 000000000..3f5c37bb4 --- /dev/null +++ b/src/serialization/types/MerchantCustomAttributeDefinitionOwnedDeletedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const MerchantCustomAttributeDefinitionOwnedDeletedEvent: core.serialization.ObjectSchema< + serializers.MerchantCustomAttributeDefinitionOwnedDeletedEvent.Raw, + Square.MerchantCustomAttributeDefinitionOwnedDeletedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace MerchantCustomAttributeDefinitionOwnedDeletedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/MerchantCustomAttributeDefinitionOwnedUpdatedEvent.ts b/src/serialization/types/MerchantCustomAttributeDefinitionOwnedUpdatedEvent.ts new file mode 100644 index 000000000..4c0689bbd --- /dev/null +++ b/src/serialization/types/MerchantCustomAttributeDefinitionOwnedUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const MerchantCustomAttributeDefinitionOwnedUpdatedEvent: core.serialization.ObjectSchema< + serializers.MerchantCustomAttributeDefinitionOwnedUpdatedEvent.Raw, + Square.MerchantCustomAttributeDefinitionOwnedUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace MerchantCustomAttributeDefinitionOwnedUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/MerchantCustomAttributeDefinitionVisibleCreatedEvent.ts b/src/serialization/types/MerchantCustomAttributeDefinitionVisibleCreatedEvent.ts new file mode 100644 index 000000000..92780fedf --- /dev/null +++ b/src/serialization/types/MerchantCustomAttributeDefinitionVisibleCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const MerchantCustomAttributeDefinitionVisibleCreatedEvent: core.serialization.ObjectSchema< + serializers.MerchantCustomAttributeDefinitionVisibleCreatedEvent.Raw, + Square.MerchantCustomAttributeDefinitionVisibleCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace MerchantCustomAttributeDefinitionVisibleCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/MerchantCustomAttributeDefinitionVisibleDeletedEvent.ts b/src/serialization/types/MerchantCustomAttributeDefinitionVisibleDeletedEvent.ts new file mode 100644 index 000000000..55e90c8ef --- /dev/null +++ b/src/serialization/types/MerchantCustomAttributeDefinitionVisibleDeletedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const MerchantCustomAttributeDefinitionVisibleDeletedEvent: core.serialization.ObjectSchema< + serializers.MerchantCustomAttributeDefinitionVisibleDeletedEvent.Raw, + Square.MerchantCustomAttributeDefinitionVisibleDeletedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace MerchantCustomAttributeDefinitionVisibleDeletedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/MerchantCustomAttributeDefinitionVisibleUpdatedEvent.ts b/src/serialization/types/MerchantCustomAttributeDefinitionVisibleUpdatedEvent.ts new file mode 100644 index 000000000..d46c41f1f --- /dev/null +++ b/src/serialization/types/MerchantCustomAttributeDefinitionVisibleUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const MerchantCustomAttributeDefinitionVisibleUpdatedEvent: core.serialization.ObjectSchema< + serializers.MerchantCustomAttributeDefinitionVisibleUpdatedEvent.Raw, + Square.MerchantCustomAttributeDefinitionVisibleUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace MerchantCustomAttributeDefinitionVisibleUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/MerchantCustomAttributeOwnedDeletedEvent.ts b/src/serialization/types/MerchantCustomAttributeOwnedDeletedEvent.ts new file mode 100644 index 000000000..2f6b6d01a --- /dev/null +++ b/src/serialization/types/MerchantCustomAttributeOwnedDeletedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeEventData } from "./CustomAttributeEventData"; + +export const MerchantCustomAttributeOwnedDeletedEvent: core.serialization.ObjectSchema< + serializers.MerchantCustomAttributeOwnedDeletedEvent.Raw, + Square.MerchantCustomAttributeOwnedDeletedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeEventData.optional(), +}); + +export declare namespace MerchantCustomAttributeOwnedDeletedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeEventData.Raw | null; + } +} diff --git a/src/serialization/types/MerchantCustomAttributeOwnedUpdatedEvent.ts b/src/serialization/types/MerchantCustomAttributeOwnedUpdatedEvent.ts new file mode 100644 index 000000000..45b503737 --- /dev/null +++ b/src/serialization/types/MerchantCustomAttributeOwnedUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeEventData } from "./CustomAttributeEventData"; + +export const MerchantCustomAttributeOwnedUpdatedEvent: core.serialization.ObjectSchema< + serializers.MerchantCustomAttributeOwnedUpdatedEvent.Raw, + Square.MerchantCustomAttributeOwnedUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeEventData.optional(), +}); + +export declare namespace MerchantCustomAttributeOwnedUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeEventData.Raw | null; + } +} diff --git a/src/serialization/types/MerchantCustomAttributeVisibleDeletedEvent.ts b/src/serialization/types/MerchantCustomAttributeVisibleDeletedEvent.ts new file mode 100644 index 000000000..7b401cf29 --- /dev/null +++ b/src/serialization/types/MerchantCustomAttributeVisibleDeletedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeEventData } from "./CustomAttributeEventData"; + +export const MerchantCustomAttributeVisibleDeletedEvent: core.serialization.ObjectSchema< + serializers.MerchantCustomAttributeVisibleDeletedEvent.Raw, + Square.MerchantCustomAttributeVisibleDeletedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeEventData.optional(), +}); + +export declare namespace MerchantCustomAttributeVisibleDeletedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeEventData.Raw | null; + } +} diff --git a/src/serialization/types/MerchantCustomAttributeVisibleUpdatedEvent.ts b/src/serialization/types/MerchantCustomAttributeVisibleUpdatedEvent.ts new file mode 100644 index 000000000..bf7ba98a2 --- /dev/null +++ b/src/serialization/types/MerchantCustomAttributeVisibleUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeEventData } from "./CustomAttributeEventData"; + +export const MerchantCustomAttributeVisibleUpdatedEvent: core.serialization.ObjectSchema< + serializers.MerchantCustomAttributeVisibleUpdatedEvent.Raw, + Square.MerchantCustomAttributeVisibleUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeEventData.optional(), +}); + +export declare namespace MerchantCustomAttributeVisibleUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeEventData.Raw | null; + } +} diff --git a/src/serialization/types/MerchantSettingsUpdatedEvent.ts b/src/serialization/types/MerchantSettingsUpdatedEvent.ts new file mode 100644 index 000000000..ebb38a51a --- /dev/null +++ b/src/serialization/types/MerchantSettingsUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { MerchantSettingsUpdatedEventData } from "./MerchantSettingsUpdatedEventData"; + +export const MerchantSettingsUpdatedEvent: core.serialization.ObjectSchema< + serializers.MerchantSettingsUpdatedEvent.Raw, + Square.MerchantSettingsUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: MerchantSettingsUpdatedEventData.optional(), +}); + +export declare namespace MerchantSettingsUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: MerchantSettingsUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/MerchantSettingsUpdatedEventData.ts b/src/serialization/types/MerchantSettingsUpdatedEventData.ts new file mode 100644 index 000000000..5b6d16dfb --- /dev/null +++ b/src/serialization/types/MerchantSettingsUpdatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { MerchantSettingsUpdatedEventObject } from "./MerchantSettingsUpdatedEventObject"; + +export const MerchantSettingsUpdatedEventData: core.serialization.ObjectSchema< + serializers.MerchantSettingsUpdatedEventData.Raw, + Square.MerchantSettingsUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: MerchantSettingsUpdatedEventObject.optional(), +}); + +export declare namespace MerchantSettingsUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: MerchantSettingsUpdatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/MerchantSettingsUpdatedEventObject.ts b/src/serialization/types/MerchantSettingsUpdatedEventObject.ts new file mode 100644 index 000000000..a5c2bb4f2 --- /dev/null +++ b/src/serialization/types/MerchantSettingsUpdatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CheckoutMerchantSettings } from "./CheckoutMerchantSettings"; + +export const MerchantSettingsUpdatedEventObject: core.serialization.ObjectSchema< + serializers.MerchantSettingsUpdatedEventObject.Raw, + Square.MerchantSettingsUpdatedEventObject +> = core.serialization.object({ + merchantSettings: core.serialization.property("merchant_settings", CheckoutMerchantSettings.optional()), +}); + +export declare namespace MerchantSettingsUpdatedEventObject { + export interface Raw { + merchant_settings?: CheckoutMerchantSettings.Raw | null; + } +} diff --git a/src/serialization/types/OauthAuthorizationRevokedEvent.ts b/src/serialization/types/OauthAuthorizationRevokedEvent.ts new file mode 100644 index 000000000..5877443e3 --- /dev/null +++ b/src/serialization/types/OauthAuthorizationRevokedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { OauthAuthorizationRevokedEventData } from "./OauthAuthorizationRevokedEventData"; + +export const OauthAuthorizationRevokedEvent: core.serialization.ObjectSchema< + serializers.OauthAuthorizationRevokedEvent.Raw, + Square.OauthAuthorizationRevokedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: OauthAuthorizationRevokedEventData.optional(), +}); + +export declare namespace OauthAuthorizationRevokedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: OauthAuthorizationRevokedEventData.Raw | null; + } +} diff --git a/src/serialization/types/OauthAuthorizationRevokedEventData.ts b/src/serialization/types/OauthAuthorizationRevokedEventData.ts new file mode 100644 index 000000000..a209163ae --- /dev/null +++ b/src/serialization/types/OauthAuthorizationRevokedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { OauthAuthorizationRevokedEventObject } from "./OauthAuthorizationRevokedEventObject"; + +export const OauthAuthorizationRevokedEventData: core.serialization.ObjectSchema< + serializers.OauthAuthorizationRevokedEventData.Raw, + Square.OauthAuthorizationRevokedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: OauthAuthorizationRevokedEventObject.optional(), +}); + +export declare namespace OauthAuthorizationRevokedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: OauthAuthorizationRevokedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/OauthAuthorizationRevokedEventObject.ts b/src/serialization/types/OauthAuthorizationRevokedEventObject.ts new file mode 100644 index 000000000..a362c45ea --- /dev/null +++ b/src/serialization/types/OauthAuthorizationRevokedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { OauthAuthorizationRevokedEventRevocationObject } from "./OauthAuthorizationRevokedEventRevocationObject"; + +export const OauthAuthorizationRevokedEventObject: core.serialization.ObjectSchema< + serializers.OauthAuthorizationRevokedEventObject.Raw, + Square.OauthAuthorizationRevokedEventObject +> = core.serialization.object({ + revocation: OauthAuthorizationRevokedEventRevocationObject.optional(), +}); + +export declare namespace OauthAuthorizationRevokedEventObject { + export interface Raw { + revocation?: OauthAuthorizationRevokedEventRevocationObject.Raw | null; + } +} diff --git a/src/serialization/types/OauthAuthorizationRevokedEventRevocationObject.ts b/src/serialization/types/OauthAuthorizationRevokedEventRevocationObject.ts new file mode 100644 index 000000000..a2e073b93 --- /dev/null +++ b/src/serialization/types/OauthAuthorizationRevokedEventRevocationObject.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { OauthAuthorizationRevokedEventRevokerType } from "./OauthAuthorizationRevokedEventRevokerType"; + +export const OauthAuthorizationRevokedEventRevocationObject: core.serialization.ObjectSchema< + serializers.OauthAuthorizationRevokedEventRevocationObject.Raw, + Square.OauthAuthorizationRevokedEventRevocationObject +> = core.serialization.object({ + revokedAt: core.serialization.property("revoked_at", core.serialization.string().optionalNullable()), + revokerType: core.serialization.property("revoker_type", OauthAuthorizationRevokedEventRevokerType.optional()), +}); + +export declare namespace OauthAuthorizationRevokedEventRevocationObject { + export interface Raw { + revoked_at?: (string | null) | null; + revoker_type?: OauthAuthorizationRevokedEventRevokerType.Raw | null; + } +} diff --git a/src/serialization/types/OauthAuthorizationRevokedEventRevokerType.ts b/src/serialization/types/OauthAuthorizationRevokedEventRevokerType.ts new file mode 100644 index 000000000..63f07783e --- /dev/null +++ b/src/serialization/types/OauthAuthorizationRevokedEventRevokerType.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const OauthAuthorizationRevokedEventRevokerType: core.serialization.Schema< + serializers.OauthAuthorizationRevokedEventRevokerType.Raw, + Square.OauthAuthorizationRevokedEventRevokerType +> = core.serialization.enum_(["APPLICATION", "MERCHANT", "SQUARE"]); + +export declare namespace OauthAuthorizationRevokedEventRevokerType { + export type Raw = "APPLICATION" | "MERCHANT" | "SQUARE"; +} diff --git a/src/serialization/types/OrderCreated.ts b/src/serialization/types/OrderCreated.ts new file mode 100644 index 000000000..8123ff537 --- /dev/null +++ b/src/serialization/types/OrderCreated.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { OrderState } from "./OrderState"; + +export const OrderCreated: core.serialization.ObjectSchema = + core.serialization.object({ + orderId: core.serialization.property("order_id", core.serialization.string().optionalNullable()), + version: core.serialization.number().optional(), + locationId: core.serialization.property("location_id", core.serialization.string().optionalNullable()), + state: OrderState.optional(), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + }); + +export declare namespace OrderCreated { + export interface Raw { + order_id?: (string | null) | null; + version?: number | null; + location_id?: (string | null) | null; + state?: OrderState.Raw | null; + created_at?: string | null; + } +} diff --git a/src/serialization/types/OrderCreatedEvent.ts b/src/serialization/types/OrderCreatedEvent.ts new file mode 100644 index 000000000..d79d0ae52 --- /dev/null +++ b/src/serialization/types/OrderCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { OrderCreatedEventData } from "./OrderCreatedEventData"; + +export const OrderCreatedEvent: core.serialization.ObjectSchema< + serializers.OrderCreatedEvent.Raw, + Square.OrderCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: OrderCreatedEventData.optional(), +}); + +export declare namespace OrderCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: OrderCreatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/OrderCreatedEventData.ts b/src/serialization/types/OrderCreatedEventData.ts new file mode 100644 index 000000000..7e6fd99a8 --- /dev/null +++ b/src/serialization/types/OrderCreatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { OrderCreatedObject } from "./OrderCreatedObject"; + +export const OrderCreatedEventData: core.serialization.ObjectSchema< + serializers.OrderCreatedEventData.Raw, + Square.OrderCreatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: OrderCreatedObject.optional(), +}); + +export declare namespace OrderCreatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: OrderCreatedObject.Raw | null; + } +} diff --git a/src/serialization/types/OrderCreatedObject.ts b/src/serialization/types/OrderCreatedObject.ts new file mode 100644 index 000000000..29831d1d0 --- /dev/null +++ b/src/serialization/types/OrderCreatedObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { OrderCreated } from "./OrderCreated"; + +export const OrderCreatedObject: core.serialization.ObjectSchema< + serializers.OrderCreatedObject.Raw, + Square.OrderCreatedObject +> = core.serialization.object({ + orderCreated: core.serialization.property("order_created", OrderCreated.optional()), +}); + +export declare namespace OrderCreatedObject { + export interface Raw { + order_created?: OrderCreated.Raw | null; + } +} diff --git a/src/serialization/types/OrderCustomAttributeDefinitionOwnedCreatedEvent.ts b/src/serialization/types/OrderCustomAttributeDefinitionOwnedCreatedEvent.ts new file mode 100644 index 000000000..0fa972820 --- /dev/null +++ b/src/serialization/types/OrderCustomAttributeDefinitionOwnedCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const OrderCustomAttributeDefinitionOwnedCreatedEvent: core.serialization.ObjectSchema< + serializers.OrderCustomAttributeDefinitionOwnedCreatedEvent.Raw, + Square.OrderCustomAttributeDefinitionOwnedCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace OrderCustomAttributeDefinitionOwnedCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/OrderCustomAttributeDefinitionOwnedDeletedEvent.ts b/src/serialization/types/OrderCustomAttributeDefinitionOwnedDeletedEvent.ts new file mode 100644 index 000000000..264b11ef8 --- /dev/null +++ b/src/serialization/types/OrderCustomAttributeDefinitionOwnedDeletedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const OrderCustomAttributeDefinitionOwnedDeletedEvent: core.serialization.ObjectSchema< + serializers.OrderCustomAttributeDefinitionOwnedDeletedEvent.Raw, + Square.OrderCustomAttributeDefinitionOwnedDeletedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace OrderCustomAttributeDefinitionOwnedDeletedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/OrderCustomAttributeDefinitionOwnedUpdatedEvent.ts b/src/serialization/types/OrderCustomAttributeDefinitionOwnedUpdatedEvent.ts new file mode 100644 index 000000000..2ed0dd567 --- /dev/null +++ b/src/serialization/types/OrderCustomAttributeDefinitionOwnedUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const OrderCustomAttributeDefinitionOwnedUpdatedEvent: core.serialization.ObjectSchema< + serializers.OrderCustomAttributeDefinitionOwnedUpdatedEvent.Raw, + Square.OrderCustomAttributeDefinitionOwnedUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace OrderCustomAttributeDefinitionOwnedUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/OrderCustomAttributeDefinitionVisibleCreatedEvent.ts b/src/serialization/types/OrderCustomAttributeDefinitionVisibleCreatedEvent.ts new file mode 100644 index 000000000..55d4d8f1c --- /dev/null +++ b/src/serialization/types/OrderCustomAttributeDefinitionVisibleCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const OrderCustomAttributeDefinitionVisibleCreatedEvent: core.serialization.ObjectSchema< + serializers.OrderCustomAttributeDefinitionVisibleCreatedEvent.Raw, + Square.OrderCustomAttributeDefinitionVisibleCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace OrderCustomAttributeDefinitionVisibleCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/OrderCustomAttributeDefinitionVisibleDeletedEvent.ts b/src/serialization/types/OrderCustomAttributeDefinitionVisibleDeletedEvent.ts new file mode 100644 index 000000000..50cca2a43 --- /dev/null +++ b/src/serialization/types/OrderCustomAttributeDefinitionVisibleDeletedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const OrderCustomAttributeDefinitionVisibleDeletedEvent: core.serialization.ObjectSchema< + serializers.OrderCustomAttributeDefinitionVisibleDeletedEvent.Raw, + Square.OrderCustomAttributeDefinitionVisibleDeletedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace OrderCustomAttributeDefinitionVisibleDeletedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/OrderCustomAttributeDefinitionVisibleUpdatedEvent.ts b/src/serialization/types/OrderCustomAttributeDefinitionVisibleUpdatedEvent.ts new file mode 100644 index 000000000..f682dd992 --- /dev/null +++ b/src/serialization/types/OrderCustomAttributeDefinitionVisibleUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeDefinitionEventData } from "./CustomAttributeDefinitionEventData"; + +export const OrderCustomAttributeDefinitionVisibleUpdatedEvent: core.serialization.ObjectSchema< + serializers.OrderCustomAttributeDefinitionVisibleUpdatedEvent.Raw, + Square.OrderCustomAttributeDefinitionVisibleUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeDefinitionEventData.optional(), +}); + +export declare namespace OrderCustomAttributeDefinitionVisibleUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeDefinitionEventData.Raw | null; + } +} diff --git a/src/serialization/types/OrderCustomAttributeOwnedDeletedEvent.ts b/src/serialization/types/OrderCustomAttributeOwnedDeletedEvent.ts new file mode 100644 index 000000000..33f65a013 --- /dev/null +++ b/src/serialization/types/OrderCustomAttributeOwnedDeletedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeEventData } from "./CustomAttributeEventData"; + +export const OrderCustomAttributeOwnedDeletedEvent: core.serialization.ObjectSchema< + serializers.OrderCustomAttributeOwnedDeletedEvent.Raw, + Square.OrderCustomAttributeOwnedDeletedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeEventData.optional(), +}); + +export declare namespace OrderCustomAttributeOwnedDeletedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeEventData.Raw | null; + } +} diff --git a/src/serialization/types/OrderCustomAttributeOwnedUpdatedEvent.ts b/src/serialization/types/OrderCustomAttributeOwnedUpdatedEvent.ts new file mode 100644 index 000000000..1f85cd519 --- /dev/null +++ b/src/serialization/types/OrderCustomAttributeOwnedUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeEventData } from "./CustomAttributeEventData"; + +export const OrderCustomAttributeOwnedUpdatedEvent: core.serialization.ObjectSchema< + serializers.OrderCustomAttributeOwnedUpdatedEvent.Raw, + Square.OrderCustomAttributeOwnedUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeEventData.optional(), +}); + +export declare namespace OrderCustomAttributeOwnedUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeEventData.Raw | null; + } +} diff --git a/src/serialization/types/OrderCustomAttributeVisibleDeletedEvent.ts b/src/serialization/types/OrderCustomAttributeVisibleDeletedEvent.ts new file mode 100644 index 000000000..a0fc52244 --- /dev/null +++ b/src/serialization/types/OrderCustomAttributeVisibleDeletedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeEventData } from "./CustomAttributeEventData"; + +export const OrderCustomAttributeVisibleDeletedEvent: core.serialization.ObjectSchema< + serializers.OrderCustomAttributeVisibleDeletedEvent.Raw, + Square.OrderCustomAttributeVisibleDeletedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeEventData.optional(), +}); + +export declare namespace OrderCustomAttributeVisibleDeletedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeEventData.Raw | null; + } +} diff --git a/src/serialization/types/OrderCustomAttributeVisibleUpdatedEvent.ts b/src/serialization/types/OrderCustomAttributeVisibleUpdatedEvent.ts new file mode 100644 index 000000000..b1b3e167c --- /dev/null +++ b/src/serialization/types/OrderCustomAttributeVisibleUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { CustomAttributeEventData } from "./CustomAttributeEventData"; + +export const OrderCustomAttributeVisibleUpdatedEvent: core.serialization.ObjectSchema< + serializers.OrderCustomAttributeVisibleUpdatedEvent.Raw, + Square.OrderCustomAttributeVisibleUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: CustomAttributeEventData.optional(), +}); + +export declare namespace OrderCustomAttributeVisibleUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: CustomAttributeEventData.Raw | null; + } +} diff --git a/src/serialization/types/OrderFulfillmentDeliveryDetailsScheduleType.ts b/src/serialization/types/OrderFulfillmentDeliveryDetailsScheduleType.ts new file mode 100644 index 000000000..ada54aada --- /dev/null +++ b/src/serialization/types/OrderFulfillmentDeliveryDetailsScheduleType.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const OrderFulfillmentDeliveryDetailsScheduleType: core.serialization.Schema< + serializers.OrderFulfillmentDeliveryDetailsScheduleType.Raw, + Square.OrderFulfillmentDeliveryDetailsScheduleType +> = core.serialization.enum_(["SCHEDULED", "ASAP"]); + +export declare namespace OrderFulfillmentDeliveryDetailsScheduleType { + export type Raw = "SCHEDULED" | "ASAP"; +} diff --git a/src/serialization/types/OrderFulfillmentFulfillmentLineItemApplication.ts b/src/serialization/types/OrderFulfillmentFulfillmentLineItemApplication.ts new file mode 100644 index 000000000..a6f622424 --- /dev/null +++ b/src/serialization/types/OrderFulfillmentFulfillmentLineItemApplication.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const OrderFulfillmentFulfillmentLineItemApplication: core.serialization.Schema< + serializers.OrderFulfillmentFulfillmentLineItemApplication.Raw, + Square.OrderFulfillmentFulfillmentLineItemApplication +> = core.serialization.enum_(["ALL", "ENTRY_LIST"]); + +export declare namespace OrderFulfillmentFulfillmentLineItemApplication { + export type Raw = "ALL" | "ENTRY_LIST"; +} diff --git a/src/serialization/types/OrderFulfillmentPickupDetailsScheduleType.ts b/src/serialization/types/OrderFulfillmentPickupDetailsScheduleType.ts new file mode 100644 index 000000000..6c7508461 --- /dev/null +++ b/src/serialization/types/OrderFulfillmentPickupDetailsScheduleType.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const OrderFulfillmentPickupDetailsScheduleType: core.serialization.Schema< + serializers.OrderFulfillmentPickupDetailsScheduleType.Raw, + Square.OrderFulfillmentPickupDetailsScheduleType +> = core.serialization.enum_(["SCHEDULED", "ASAP"]); + +export declare namespace OrderFulfillmentPickupDetailsScheduleType { + export type Raw = "SCHEDULED" | "ASAP"; +} diff --git a/src/serialization/types/OrderFulfillmentState.ts b/src/serialization/types/OrderFulfillmentState.ts new file mode 100644 index 000000000..37f9f1bf2 --- /dev/null +++ b/src/serialization/types/OrderFulfillmentState.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const OrderFulfillmentState: core.serialization.Schema< + serializers.OrderFulfillmentState.Raw, + Square.OrderFulfillmentState +> = core.serialization.enum_(["PROPOSED", "RESERVED", "PREPARED", "COMPLETED", "CANCELED", "FAILED"]); + +export declare namespace OrderFulfillmentState { + export type Raw = "PROPOSED" | "RESERVED" | "PREPARED" | "COMPLETED" | "CANCELED" | "FAILED"; +} diff --git a/src/serialization/types/OrderFulfillmentType.ts b/src/serialization/types/OrderFulfillmentType.ts new file mode 100644 index 000000000..5a5b5dc0d --- /dev/null +++ b/src/serialization/types/OrderFulfillmentType.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const OrderFulfillmentType: core.serialization.Schema< + serializers.OrderFulfillmentType.Raw, + Square.OrderFulfillmentType +> = core.serialization.enum_(["PICKUP", "SHIPMENT", "DELIVERY"]); + +export declare namespace OrderFulfillmentType { + export type Raw = "PICKUP" | "SHIPMENT" | "DELIVERY"; +} diff --git a/src/serialization/types/OrderFulfillmentUpdated.ts b/src/serialization/types/OrderFulfillmentUpdated.ts new file mode 100644 index 000000000..40c4c0e52 --- /dev/null +++ b/src/serialization/types/OrderFulfillmentUpdated.ts @@ -0,0 +1,37 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { OrderState } from "./OrderState"; +import { OrderFulfillmentUpdatedUpdate } from "./OrderFulfillmentUpdatedUpdate"; + +export const OrderFulfillmentUpdated: core.serialization.ObjectSchema< + serializers.OrderFulfillmentUpdated.Raw, + Square.OrderFulfillmentUpdated +> = core.serialization.object({ + orderId: core.serialization.property("order_id", core.serialization.string().optionalNullable()), + version: core.serialization.number().optional(), + locationId: core.serialization.property("location_id", core.serialization.string().optionalNullable()), + state: OrderState.optional(), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + updatedAt: core.serialization.property("updated_at", core.serialization.string().optional()), + fulfillmentUpdate: core.serialization.property( + "fulfillment_update", + core.serialization.list(OrderFulfillmentUpdatedUpdate).optionalNullable(), + ), +}); + +export declare namespace OrderFulfillmentUpdated { + export interface Raw { + order_id?: (string | null) | null; + version?: number | null; + location_id?: (string | null) | null; + state?: OrderState.Raw | null; + created_at?: string | null; + updated_at?: string | null; + fulfillment_update?: (OrderFulfillmentUpdatedUpdate.Raw[] | null) | null; + } +} diff --git a/src/serialization/types/OrderFulfillmentUpdatedEvent.ts b/src/serialization/types/OrderFulfillmentUpdatedEvent.ts new file mode 100644 index 000000000..6d4626c2d --- /dev/null +++ b/src/serialization/types/OrderFulfillmentUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { OrderFulfillmentUpdatedEventData } from "./OrderFulfillmentUpdatedEventData"; + +export const OrderFulfillmentUpdatedEvent: core.serialization.ObjectSchema< + serializers.OrderFulfillmentUpdatedEvent.Raw, + Square.OrderFulfillmentUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: OrderFulfillmentUpdatedEventData.optional(), +}); + +export declare namespace OrderFulfillmentUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: OrderFulfillmentUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/OrderFulfillmentUpdatedEventData.ts b/src/serialization/types/OrderFulfillmentUpdatedEventData.ts new file mode 100644 index 000000000..b87a0e1da --- /dev/null +++ b/src/serialization/types/OrderFulfillmentUpdatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { OrderFulfillmentUpdatedObject } from "./OrderFulfillmentUpdatedObject"; + +export const OrderFulfillmentUpdatedEventData: core.serialization.ObjectSchema< + serializers.OrderFulfillmentUpdatedEventData.Raw, + Square.OrderFulfillmentUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: OrderFulfillmentUpdatedObject.optional(), +}); + +export declare namespace OrderFulfillmentUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: OrderFulfillmentUpdatedObject.Raw | null; + } +} diff --git a/src/serialization/types/OrderFulfillmentUpdatedObject.ts b/src/serialization/types/OrderFulfillmentUpdatedObject.ts new file mode 100644 index 000000000..937e85064 --- /dev/null +++ b/src/serialization/types/OrderFulfillmentUpdatedObject.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { OrderFulfillmentUpdated } from "./OrderFulfillmentUpdated"; + +export const OrderFulfillmentUpdatedObject: core.serialization.ObjectSchema< + serializers.OrderFulfillmentUpdatedObject.Raw, + Square.OrderFulfillmentUpdatedObject +> = core.serialization.object({ + orderFulfillmentUpdated: core.serialization.property( + "order_fulfillment_updated", + OrderFulfillmentUpdated.optional(), + ), +}); + +export declare namespace OrderFulfillmentUpdatedObject { + export interface Raw { + order_fulfillment_updated?: OrderFulfillmentUpdated.Raw | null; + } +} diff --git a/src/serialization/types/OrderFulfillmentUpdatedUpdate.ts b/src/serialization/types/OrderFulfillmentUpdatedUpdate.ts new file mode 100644 index 000000000..4f7d6ef8a --- /dev/null +++ b/src/serialization/types/OrderFulfillmentUpdatedUpdate.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { FulfillmentState } from "./FulfillmentState"; + +export const OrderFulfillmentUpdatedUpdate: core.serialization.ObjectSchema< + serializers.OrderFulfillmentUpdatedUpdate.Raw, + Square.OrderFulfillmentUpdatedUpdate +> = core.serialization.object({ + fulfillmentUid: core.serialization.property("fulfillment_uid", core.serialization.string().optionalNullable()), + oldState: core.serialization.property("old_state", FulfillmentState.optional()), + newState: core.serialization.property("new_state", FulfillmentState.optional()), +}); + +export declare namespace OrderFulfillmentUpdatedUpdate { + export interface Raw { + fulfillment_uid?: (string | null) | null; + old_state?: FulfillmentState.Raw | null; + new_state?: FulfillmentState.Raw | null; + } +} diff --git a/src/serialization/types/OrderUpdated.ts b/src/serialization/types/OrderUpdated.ts new file mode 100644 index 000000000..8d3ef5fb1 --- /dev/null +++ b/src/serialization/types/OrderUpdated.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { OrderState } from "./OrderState"; + +export const OrderUpdated: core.serialization.ObjectSchema = + core.serialization.object({ + orderId: core.serialization.property("order_id", core.serialization.string().optionalNullable()), + version: core.serialization.number().optional(), + locationId: core.serialization.property("location_id", core.serialization.string().optionalNullable()), + state: OrderState.optional(), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + updatedAt: core.serialization.property("updated_at", core.serialization.string().optional()), + }); + +export declare namespace OrderUpdated { + export interface Raw { + order_id?: (string | null) | null; + version?: number | null; + location_id?: (string | null) | null; + state?: OrderState.Raw | null; + created_at?: string | null; + updated_at?: string | null; + } +} diff --git a/src/serialization/types/OrderUpdatedEvent.ts b/src/serialization/types/OrderUpdatedEvent.ts new file mode 100644 index 000000000..c8b6722d9 --- /dev/null +++ b/src/serialization/types/OrderUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { OrderUpdatedEventData } from "./OrderUpdatedEventData"; + +export const OrderUpdatedEvent: core.serialization.ObjectSchema< + serializers.OrderUpdatedEvent.Raw, + Square.OrderUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: OrderUpdatedEventData.optional(), +}); + +export declare namespace OrderUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: OrderUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/OrderUpdatedEventData.ts b/src/serialization/types/OrderUpdatedEventData.ts new file mode 100644 index 000000000..09ead4e9f --- /dev/null +++ b/src/serialization/types/OrderUpdatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { OrderUpdatedObject } from "./OrderUpdatedObject"; + +export const OrderUpdatedEventData: core.serialization.ObjectSchema< + serializers.OrderUpdatedEventData.Raw, + Square.OrderUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: OrderUpdatedObject.optional(), +}); + +export declare namespace OrderUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: OrderUpdatedObject.Raw | null; + } +} diff --git a/src/serialization/types/OrderUpdatedObject.ts b/src/serialization/types/OrderUpdatedObject.ts new file mode 100644 index 000000000..cfb2efa2c --- /dev/null +++ b/src/serialization/types/OrderUpdatedObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { OrderUpdated } from "./OrderUpdated"; + +export const OrderUpdatedObject: core.serialization.ObjectSchema< + serializers.OrderUpdatedObject.Raw, + Square.OrderUpdatedObject +> = core.serialization.object({ + orderUpdated: core.serialization.property("order_updated", OrderUpdated.optional()), +}); + +export declare namespace OrderUpdatedObject { + export interface Raw { + order_updated?: OrderUpdated.Raw | null; + } +} diff --git a/src/serialization/types/PaymentCreatedEvent.ts b/src/serialization/types/PaymentCreatedEvent.ts new file mode 100644 index 000000000..b34bdd905 --- /dev/null +++ b/src/serialization/types/PaymentCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { PaymentCreatedEventData } from "./PaymentCreatedEventData"; + +export const PaymentCreatedEvent: core.serialization.ObjectSchema< + serializers.PaymentCreatedEvent.Raw, + Square.PaymentCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: PaymentCreatedEventData.optional(), +}); + +export declare namespace PaymentCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: PaymentCreatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/PaymentCreatedEventData.ts b/src/serialization/types/PaymentCreatedEventData.ts new file mode 100644 index 000000000..a09a44f6e --- /dev/null +++ b/src/serialization/types/PaymentCreatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { PaymentCreatedEventObject } from "./PaymentCreatedEventObject"; + +export const PaymentCreatedEventData: core.serialization.ObjectSchema< + serializers.PaymentCreatedEventData.Raw, + Square.PaymentCreatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: PaymentCreatedEventObject.optional(), +}); + +export declare namespace PaymentCreatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: PaymentCreatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/PaymentCreatedEventObject.ts b/src/serialization/types/PaymentCreatedEventObject.ts new file mode 100644 index 000000000..9dbe956b7 --- /dev/null +++ b/src/serialization/types/PaymentCreatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Payment } from "./Payment"; + +export const PaymentCreatedEventObject: core.serialization.ObjectSchema< + serializers.PaymentCreatedEventObject.Raw, + Square.PaymentCreatedEventObject +> = core.serialization.object({ + payment: Payment.optional(), +}); + +export declare namespace PaymentCreatedEventObject { + export interface Raw { + payment?: Payment.Raw | null; + } +} diff --git a/src/serialization/types/PaymentUpdatedEvent.ts b/src/serialization/types/PaymentUpdatedEvent.ts new file mode 100644 index 000000000..ab9a839bc --- /dev/null +++ b/src/serialization/types/PaymentUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { PaymentUpdatedEventData } from "./PaymentUpdatedEventData"; + +export const PaymentUpdatedEvent: core.serialization.ObjectSchema< + serializers.PaymentUpdatedEvent.Raw, + Square.PaymentUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: PaymentUpdatedEventData.optional(), +}); + +export declare namespace PaymentUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: PaymentUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/PaymentUpdatedEventData.ts b/src/serialization/types/PaymentUpdatedEventData.ts new file mode 100644 index 000000000..03fd0f3c0 --- /dev/null +++ b/src/serialization/types/PaymentUpdatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { PaymentUpdatedEventObject } from "./PaymentUpdatedEventObject"; + +export const PaymentUpdatedEventData: core.serialization.ObjectSchema< + serializers.PaymentUpdatedEventData.Raw, + Square.PaymentUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: PaymentUpdatedEventObject.optional(), +}); + +export declare namespace PaymentUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: PaymentUpdatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/PaymentUpdatedEventObject.ts b/src/serialization/types/PaymentUpdatedEventObject.ts new file mode 100644 index 000000000..5f4ddedfa --- /dev/null +++ b/src/serialization/types/PaymentUpdatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Payment } from "./Payment"; + +export const PaymentUpdatedEventObject: core.serialization.ObjectSchema< + serializers.PaymentUpdatedEventObject.Raw, + Square.PaymentUpdatedEventObject +> = core.serialization.object({ + payment: Payment.optional(), +}); + +export declare namespace PaymentUpdatedEventObject { + export interface Raw { + payment?: Payment.Raw | null; + } +} diff --git a/src/serialization/types/PayoutFailedEvent.ts b/src/serialization/types/PayoutFailedEvent.ts new file mode 100644 index 000000000..52458cb33 --- /dev/null +++ b/src/serialization/types/PayoutFailedEvent.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { PayoutFailedEventData } from "./PayoutFailedEventData"; + +export const PayoutFailedEvent: core.serialization.ObjectSchema< + serializers.PayoutFailedEvent.Raw, + Square.PayoutFailedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + locationId: core.serialization.property("location_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: PayoutFailedEventData.optional(), +}); + +export declare namespace PayoutFailedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + location_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: PayoutFailedEventData.Raw | null; + } +} diff --git a/src/serialization/types/PayoutFailedEventData.ts b/src/serialization/types/PayoutFailedEventData.ts new file mode 100644 index 000000000..d756875b8 --- /dev/null +++ b/src/serialization/types/PayoutFailedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { PayoutFailedEventObject } from "./PayoutFailedEventObject"; + +export const PayoutFailedEventData: core.serialization.ObjectSchema< + serializers.PayoutFailedEventData.Raw, + Square.PayoutFailedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: PayoutFailedEventObject.optional(), +}); + +export declare namespace PayoutFailedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: PayoutFailedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/PayoutFailedEventObject.ts b/src/serialization/types/PayoutFailedEventObject.ts new file mode 100644 index 000000000..f6793cbca --- /dev/null +++ b/src/serialization/types/PayoutFailedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Payout } from "./Payout"; + +export const PayoutFailedEventObject: core.serialization.ObjectSchema< + serializers.PayoutFailedEventObject.Raw, + Square.PayoutFailedEventObject +> = core.serialization.object({ + payout: Payout.optional(), +}); + +export declare namespace PayoutFailedEventObject { + export interface Raw { + payout?: Payout.Raw | null; + } +} diff --git a/src/serialization/types/PayoutPaidEvent.ts b/src/serialization/types/PayoutPaidEvent.ts new file mode 100644 index 000000000..77f175062 --- /dev/null +++ b/src/serialization/types/PayoutPaidEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { PayoutPaidEventData } from "./PayoutPaidEventData"; + +export const PayoutPaidEvent: core.serialization.ObjectSchema = + core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + locationId: core.serialization.property("location_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: PayoutPaidEventData.optional(), + }); + +export declare namespace PayoutPaidEvent { + export interface Raw { + merchant_id?: (string | null) | null; + location_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: PayoutPaidEventData.Raw | null; + } +} diff --git a/src/serialization/types/PayoutPaidEventData.ts b/src/serialization/types/PayoutPaidEventData.ts new file mode 100644 index 000000000..4206749ad --- /dev/null +++ b/src/serialization/types/PayoutPaidEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { PayoutPaidEventObject } from "./PayoutPaidEventObject"; + +export const PayoutPaidEventData: core.serialization.ObjectSchema< + serializers.PayoutPaidEventData.Raw, + Square.PayoutPaidEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: PayoutPaidEventObject.optional(), +}); + +export declare namespace PayoutPaidEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: PayoutPaidEventObject.Raw | null; + } +} diff --git a/src/serialization/types/PayoutPaidEventObject.ts b/src/serialization/types/PayoutPaidEventObject.ts new file mode 100644 index 000000000..fe07e5231 --- /dev/null +++ b/src/serialization/types/PayoutPaidEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Payout } from "./Payout"; + +export const PayoutPaidEventObject: core.serialization.ObjectSchema< + serializers.PayoutPaidEventObject.Raw, + Square.PayoutPaidEventObject +> = core.serialization.object({ + payout: Payout.optional(), +}); + +export declare namespace PayoutPaidEventObject { + export interface Raw { + payout?: Payout.Raw | null; + } +} diff --git a/src/serialization/types/PayoutSentEvent.ts b/src/serialization/types/PayoutSentEvent.ts new file mode 100644 index 000000000..fe68fd341 --- /dev/null +++ b/src/serialization/types/PayoutSentEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { PayoutSentEventData } from "./PayoutSentEventData"; + +export const PayoutSentEvent: core.serialization.ObjectSchema = + core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + locationId: core.serialization.property("location_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: PayoutSentEventData.optional(), + }); + +export declare namespace PayoutSentEvent { + export interface Raw { + merchant_id?: (string | null) | null; + location_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: PayoutSentEventData.Raw | null; + } +} diff --git a/src/serialization/types/PayoutSentEventData.ts b/src/serialization/types/PayoutSentEventData.ts new file mode 100644 index 000000000..6ff99f720 --- /dev/null +++ b/src/serialization/types/PayoutSentEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { PayoutSentEventObject } from "./PayoutSentEventObject"; + +export const PayoutSentEventData: core.serialization.ObjectSchema< + serializers.PayoutSentEventData.Raw, + Square.PayoutSentEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: PayoutSentEventObject.optional(), +}); + +export declare namespace PayoutSentEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: PayoutSentEventObject.Raw | null; + } +} diff --git a/src/serialization/types/PayoutSentEventObject.ts b/src/serialization/types/PayoutSentEventObject.ts new file mode 100644 index 000000000..e85b3187d --- /dev/null +++ b/src/serialization/types/PayoutSentEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Payout } from "./Payout"; + +export const PayoutSentEventObject: core.serialization.ObjectSchema< + serializers.PayoutSentEventObject.Raw, + Square.PayoutSentEventObject +> = core.serialization.object({ + payout: Payout.optional(), +}); + +export declare namespace PayoutSentEventObject { + export interface Raw { + payout?: Payout.Raw | null; + } +} diff --git a/src/serialization/types/Refund.ts b/src/serialization/types/Refund.ts index 616c4a302..2a1c441ae 100644 --- a/src/serialization/types/Refund.ts +++ b/src/serialization/types/Refund.ts @@ -14,7 +14,7 @@ export const Refund: core.serialization.ObjectSchema = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: RefundCreatedEventData.optional(), +}); + +export declare namespace RefundCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: RefundCreatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/RefundCreatedEventData.ts b/src/serialization/types/RefundCreatedEventData.ts new file mode 100644 index 000000000..5ee47cede --- /dev/null +++ b/src/serialization/types/RefundCreatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { RefundCreatedEventObject } from "./RefundCreatedEventObject"; + +export const RefundCreatedEventData: core.serialization.ObjectSchema< + serializers.RefundCreatedEventData.Raw, + Square.RefundCreatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: RefundCreatedEventObject.optional(), +}); + +export declare namespace RefundCreatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: RefundCreatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/RefundCreatedEventObject.ts b/src/serialization/types/RefundCreatedEventObject.ts new file mode 100644 index 000000000..1a182a238 --- /dev/null +++ b/src/serialization/types/RefundCreatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { PaymentRefund } from "./PaymentRefund"; + +export const RefundCreatedEventObject: core.serialization.ObjectSchema< + serializers.RefundCreatedEventObject.Raw, + Square.RefundCreatedEventObject +> = core.serialization.object({ + refund: PaymentRefund.optional(), +}); + +export declare namespace RefundCreatedEventObject { + export interface Raw { + refund?: PaymentRefund.Raw | null; + } +} diff --git a/src/serialization/types/RefundUpdatedEvent.ts b/src/serialization/types/RefundUpdatedEvent.ts new file mode 100644 index 000000000..9d62c27c5 --- /dev/null +++ b/src/serialization/types/RefundUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { RefundUpdatedEventData } from "./RefundUpdatedEventData"; + +export const RefundUpdatedEvent: core.serialization.ObjectSchema< + serializers.RefundUpdatedEvent.Raw, + Square.RefundUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: RefundUpdatedEventData.optional(), +}); + +export declare namespace RefundUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: RefundUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/RefundUpdatedEventData.ts b/src/serialization/types/RefundUpdatedEventData.ts new file mode 100644 index 000000000..3e394667b --- /dev/null +++ b/src/serialization/types/RefundUpdatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { RefundUpdatedEventObject } from "./RefundUpdatedEventObject"; + +export const RefundUpdatedEventData: core.serialization.ObjectSchema< + serializers.RefundUpdatedEventData.Raw, + Square.RefundUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: RefundUpdatedEventObject.optional(), +}); + +export declare namespace RefundUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: RefundUpdatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/RefundUpdatedEventObject.ts b/src/serialization/types/RefundUpdatedEventObject.ts new file mode 100644 index 000000000..297396ffd --- /dev/null +++ b/src/serialization/types/RefundUpdatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { PaymentRefund } from "./PaymentRefund"; + +export const RefundUpdatedEventObject: core.serialization.ObjectSchema< + serializers.RefundUpdatedEventObject.Raw, + Square.RefundUpdatedEventObject +> = core.serialization.object({ + refund: PaymentRefund.optional(), +}); + +export declare namespace RefundUpdatedEventObject { + export interface Raw { + refund?: PaymentRefund.Raw | null; + } +} diff --git a/src/serialization/types/SubscriptionCreatedEvent.ts b/src/serialization/types/SubscriptionCreatedEvent.ts new file mode 100644 index 000000000..2dac5674e --- /dev/null +++ b/src/serialization/types/SubscriptionCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { SubscriptionCreatedEventData } from "./SubscriptionCreatedEventData"; + +export const SubscriptionCreatedEvent: core.serialization.ObjectSchema< + serializers.SubscriptionCreatedEvent.Raw, + Square.SubscriptionCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: SubscriptionCreatedEventData.optional(), +}); + +export declare namespace SubscriptionCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: SubscriptionCreatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/SubscriptionCreatedEventData.ts b/src/serialization/types/SubscriptionCreatedEventData.ts new file mode 100644 index 000000000..c382b55f0 --- /dev/null +++ b/src/serialization/types/SubscriptionCreatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { SubscriptionCreatedEventObject } from "./SubscriptionCreatedEventObject"; + +export const SubscriptionCreatedEventData: core.serialization.ObjectSchema< + serializers.SubscriptionCreatedEventData.Raw, + Square.SubscriptionCreatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: SubscriptionCreatedEventObject.optional(), +}); + +export declare namespace SubscriptionCreatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: SubscriptionCreatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/SubscriptionCreatedEventObject.ts b/src/serialization/types/SubscriptionCreatedEventObject.ts new file mode 100644 index 000000000..a1e2eed63 --- /dev/null +++ b/src/serialization/types/SubscriptionCreatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Subscription } from "./Subscription"; + +export const SubscriptionCreatedEventObject: core.serialization.ObjectSchema< + serializers.SubscriptionCreatedEventObject.Raw, + Square.SubscriptionCreatedEventObject +> = core.serialization.object({ + subscription: Subscription.optional(), +}); + +export declare namespace SubscriptionCreatedEventObject { + export interface Raw { + subscription?: Subscription.Raw | null; + } +} diff --git a/src/serialization/types/SubscriptionUpdatedEvent.ts b/src/serialization/types/SubscriptionUpdatedEvent.ts new file mode 100644 index 000000000..2a83a0412 --- /dev/null +++ b/src/serialization/types/SubscriptionUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { SubscriptionUpdatedEventData } from "./SubscriptionUpdatedEventData"; + +export const SubscriptionUpdatedEvent: core.serialization.ObjectSchema< + serializers.SubscriptionUpdatedEvent.Raw, + Square.SubscriptionUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: SubscriptionUpdatedEventData.optional(), +}); + +export declare namespace SubscriptionUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: SubscriptionUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/SubscriptionUpdatedEventData.ts b/src/serialization/types/SubscriptionUpdatedEventData.ts new file mode 100644 index 000000000..cfef2da95 --- /dev/null +++ b/src/serialization/types/SubscriptionUpdatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { SubscriptionUpdatedEventObject } from "./SubscriptionUpdatedEventObject"; + +export const SubscriptionUpdatedEventData: core.serialization.ObjectSchema< + serializers.SubscriptionUpdatedEventData.Raw, + Square.SubscriptionUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: SubscriptionUpdatedEventObject.optional(), +}); + +export declare namespace SubscriptionUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: SubscriptionUpdatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/SubscriptionUpdatedEventObject.ts b/src/serialization/types/SubscriptionUpdatedEventObject.ts new file mode 100644 index 000000000..54055b67a --- /dev/null +++ b/src/serialization/types/SubscriptionUpdatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { Subscription } from "./Subscription"; + +export const SubscriptionUpdatedEventObject: core.serialization.ObjectSchema< + serializers.SubscriptionUpdatedEventObject.Raw, + Square.SubscriptionUpdatedEventObject +> = core.serialization.object({ + subscription: Subscription.optional(), +}); + +export declare namespace SubscriptionUpdatedEventObject { + export interface Raw { + subscription?: Subscription.Raw | null; + } +} diff --git a/src/serialization/types/TeamMemberCreatedEvent.ts b/src/serialization/types/TeamMemberCreatedEvent.ts new file mode 100644 index 000000000..07c26512d --- /dev/null +++ b/src/serialization/types/TeamMemberCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { TeamMemberCreatedEventData } from "./TeamMemberCreatedEventData"; + +export const TeamMemberCreatedEvent: core.serialization.ObjectSchema< + serializers.TeamMemberCreatedEvent.Raw, + Square.TeamMemberCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: TeamMemberCreatedEventData.optional(), +}); + +export declare namespace TeamMemberCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: TeamMemberCreatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/TeamMemberCreatedEventData.ts b/src/serialization/types/TeamMemberCreatedEventData.ts new file mode 100644 index 000000000..2a37cc4b5 --- /dev/null +++ b/src/serialization/types/TeamMemberCreatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { TeamMemberCreatedEventObject } from "./TeamMemberCreatedEventObject"; + +export const TeamMemberCreatedEventData: core.serialization.ObjectSchema< + serializers.TeamMemberCreatedEventData.Raw, + Square.TeamMemberCreatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: TeamMemberCreatedEventObject.optional(), +}); + +export declare namespace TeamMemberCreatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: TeamMemberCreatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/TeamMemberCreatedEventObject.ts b/src/serialization/types/TeamMemberCreatedEventObject.ts new file mode 100644 index 000000000..a70f94441 --- /dev/null +++ b/src/serialization/types/TeamMemberCreatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { TeamMember } from "./TeamMember"; + +export const TeamMemberCreatedEventObject: core.serialization.ObjectSchema< + serializers.TeamMemberCreatedEventObject.Raw, + Square.TeamMemberCreatedEventObject +> = core.serialization.object({ + teamMember: core.serialization.property("team_member", TeamMember.optional()), +}); + +export declare namespace TeamMemberCreatedEventObject { + export interface Raw { + team_member?: TeamMember.Raw | null; + } +} diff --git a/src/serialization/types/TeamMemberInvitationStatus.ts b/src/serialization/types/TeamMemberInvitationStatus.ts new file mode 100644 index 000000000..4239af1bd --- /dev/null +++ b/src/serialization/types/TeamMemberInvitationStatus.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const TeamMemberInvitationStatus: core.serialization.Schema< + serializers.TeamMemberInvitationStatus.Raw, + Square.TeamMemberInvitationStatus +> = core.serialization.enum_(["UNINVITED", "PENDING", "ACCEPTED"]); + +export declare namespace TeamMemberInvitationStatus { + export type Raw = "UNINVITED" | "PENDING" | "ACCEPTED"; +} diff --git a/src/serialization/types/TeamMemberUpdatedEvent.ts b/src/serialization/types/TeamMemberUpdatedEvent.ts new file mode 100644 index 000000000..e3b71a51d --- /dev/null +++ b/src/serialization/types/TeamMemberUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { TeamMemberUpdatedEventData } from "./TeamMemberUpdatedEventData"; + +export const TeamMemberUpdatedEvent: core.serialization.ObjectSchema< + serializers.TeamMemberUpdatedEvent.Raw, + Square.TeamMemberUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: TeamMemberUpdatedEventData.optional(), +}); + +export declare namespace TeamMemberUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: TeamMemberUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/TeamMemberUpdatedEventData.ts b/src/serialization/types/TeamMemberUpdatedEventData.ts new file mode 100644 index 000000000..fa9441cbf --- /dev/null +++ b/src/serialization/types/TeamMemberUpdatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { TeamMemberUpdatedEventObject } from "./TeamMemberUpdatedEventObject"; + +export const TeamMemberUpdatedEventData: core.serialization.ObjectSchema< + serializers.TeamMemberUpdatedEventData.Raw, + Square.TeamMemberUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: TeamMemberUpdatedEventObject.optional(), +}); + +export declare namespace TeamMemberUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: TeamMemberUpdatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/TeamMemberUpdatedEventObject.ts b/src/serialization/types/TeamMemberUpdatedEventObject.ts new file mode 100644 index 000000000..3f32f568d --- /dev/null +++ b/src/serialization/types/TeamMemberUpdatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { TeamMember } from "./TeamMember"; + +export const TeamMemberUpdatedEventObject: core.serialization.ObjectSchema< + serializers.TeamMemberUpdatedEventObject.Raw, + Square.TeamMemberUpdatedEventObject +> = core.serialization.object({ + teamMember: core.serialization.property("team_member", TeamMember.optional()), +}); + +export declare namespace TeamMemberUpdatedEventObject { + export interface Raw { + team_member?: TeamMember.Raw | null; + } +} diff --git a/src/serialization/types/TeamMemberWageSettingUpdatedEvent.ts b/src/serialization/types/TeamMemberWageSettingUpdatedEvent.ts new file mode 100644 index 000000000..db5c5fffb --- /dev/null +++ b/src/serialization/types/TeamMemberWageSettingUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { TeamMemberWageSettingUpdatedEventData } from "./TeamMemberWageSettingUpdatedEventData"; + +export const TeamMemberWageSettingUpdatedEvent: core.serialization.ObjectSchema< + serializers.TeamMemberWageSettingUpdatedEvent.Raw, + Square.TeamMemberWageSettingUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: TeamMemberWageSettingUpdatedEventData.optional(), +}); + +export declare namespace TeamMemberWageSettingUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: TeamMemberWageSettingUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/TeamMemberWageSettingUpdatedEventData.ts b/src/serialization/types/TeamMemberWageSettingUpdatedEventData.ts new file mode 100644 index 000000000..1f53e9457 --- /dev/null +++ b/src/serialization/types/TeamMemberWageSettingUpdatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { TeamMemberWageSettingUpdatedEventObject } from "./TeamMemberWageSettingUpdatedEventObject"; + +export const TeamMemberWageSettingUpdatedEventData: core.serialization.ObjectSchema< + serializers.TeamMemberWageSettingUpdatedEventData.Raw, + Square.TeamMemberWageSettingUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: TeamMemberWageSettingUpdatedEventObject.optional(), +}); + +export declare namespace TeamMemberWageSettingUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: TeamMemberWageSettingUpdatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/TeamMemberWageSettingUpdatedEventObject.ts b/src/serialization/types/TeamMemberWageSettingUpdatedEventObject.ts new file mode 100644 index 000000000..64044a0f7 --- /dev/null +++ b/src/serialization/types/TeamMemberWageSettingUpdatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { WageSetting } from "./WageSetting"; + +export const TeamMemberWageSettingUpdatedEventObject: core.serialization.ObjectSchema< + serializers.TeamMemberWageSettingUpdatedEventObject.Raw, + Square.TeamMemberWageSettingUpdatedEventObject +> = core.serialization.object({ + wageSetting: core.serialization.property("wage_setting", WageSetting.optional()), +}); + +export declare namespace TeamMemberWageSettingUpdatedEventObject { + export interface Raw { + wage_setting?: WageSetting.Raw | null; + } +} diff --git a/src/serialization/types/TerminalActionCreatedEvent.ts b/src/serialization/types/TerminalActionCreatedEvent.ts new file mode 100644 index 000000000..87efdb7f1 --- /dev/null +++ b/src/serialization/types/TerminalActionCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { TerminalActionCreatedEventData } from "./TerminalActionCreatedEventData"; + +export const TerminalActionCreatedEvent: core.serialization.ObjectSchema< + serializers.TerminalActionCreatedEvent.Raw, + Square.TerminalActionCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: TerminalActionCreatedEventData.optional(), +}); + +export declare namespace TerminalActionCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: TerminalActionCreatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/TerminalActionCreatedEventData.ts b/src/serialization/types/TerminalActionCreatedEventData.ts new file mode 100644 index 000000000..54da6c3c3 --- /dev/null +++ b/src/serialization/types/TerminalActionCreatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { TerminalActionCreatedEventObject } from "./TerminalActionCreatedEventObject"; + +export const TerminalActionCreatedEventData: core.serialization.ObjectSchema< + serializers.TerminalActionCreatedEventData.Raw, + Square.TerminalActionCreatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: TerminalActionCreatedEventObject.optional(), +}); + +export declare namespace TerminalActionCreatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: TerminalActionCreatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/TerminalActionCreatedEventObject.ts b/src/serialization/types/TerminalActionCreatedEventObject.ts new file mode 100644 index 000000000..b3d30073c --- /dev/null +++ b/src/serialization/types/TerminalActionCreatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { TerminalAction } from "./TerminalAction"; + +export const TerminalActionCreatedEventObject: core.serialization.ObjectSchema< + serializers.TerminalActionCreatedEventObject.Raw, + Square.TerminalActionCreatedEventObject +> = core.serialization.object({ + action: TerminalAction.optional(), +}); + +export declare namespace TerminalActionCreatedEventObject { + export interface Raw { + action?: TerminalAction.Raw | null; + } +} diff --git a/src/serialization/types/TerminalActionUpdatedEvent.ts b/src/serialization/types/TerminalActionUpdatedEvent.ts new file mode 100644 index 000000000..639334382 --- /dev/null +++ b/src/serialization/types/TerminalActionUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { TerminalActionUpdatedEventData } from "./TerminalActionUpdatedEventData"; + +export const TerminalActionUpdatedEvent: core.serialization.ObjectSchema< + serializers.TerminalActionUpdatedEvent.Raw, + Square.TerminalActionUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: TerminalActionUpdatedEventData.optional(), +}); + +export declare namespace TerminalActionUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: TerminalActionUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/TerminalActionUpdatedEventData.ts b/src/serialization/types/TerminalActionUpdatedEventData.ts new file mode 100644 index 000000000..7df971d31 --- /dev/null +++ b/src/serialization/types/TerminalActionUpdatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { TerminalActionUpdatedEventObject } from "./TerminalActionUpdatedEventObject"; + +export const TerminalActionUpdatedEventData: core.serialization.ObjectSchema< + serializers.TerminalActionUpdatedEventData.Raw, + Square.TerminalActionUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: TerminalActionUpdatedEventObject.optional(), +}); + +export declare namespace TerminalActionUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: TerminalActionUpdatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/TerminalActionUpdatedEventObject.ts b/src/serialization/types/TerminalActionUpdatedEventObject.ts new file mode 100644 index 000000000..27a3f6e2d --- /dev/null +++ b/src/serialization/types/TerminalActionUpdatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { TerminalAction } from "./TerminalAction"; + +export const TerminalActionUpdatedEventObject: core.serialization.ObjectSchema< + serializers.TerminalActionUpdatedEventObject.Raw, + Square.TerminalActionUpdatedEventObject +> = core.serialization.object({ + action: TerminalAction.optional(), +}); + +export declare namespace TerminalActionUpdatedEventObject { + export interface Raw { + action?: TerminalAction.Raw | null; + } +} diff --git a/src/serialization/types/TerminalCheckoutCreatedEvent.ts b/src/serialization/types/TerminalCheckoutCreatedEvent.ts new file mode 100644 index 000000000..4917812d3 --- /dev/null +++ b/src/serialization/types/TerminalCheckoutCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { TerminalCheckoutCreatedEventData } from "./TerminalCheckoutCreatedEventData"; + +export const TerminalCheckoutCreatedEvent: core.serialization.ObjectSchema< + serializers.TerminalCheckoutCreatedEvent.Raw, + Square.TerminalCheckoutCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: TerminalCheckoutCreatedEventData.optional(), +}); + +export declare namespace TerminalCheckoutCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: TerminalCheckoutCreatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/TerminalCheckoutCreatedEventData.ts b/src/serialization/types/TerminalCheckoutCreatedEventData.ts new file mode 100644 index 000000000..5032927b1 --- /dev/null +++ b/src/serialization/types/TerminalCheckoutCreatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { TerminalCheckoutCreatedEventObject } from "./TerminalCheckoutCreatedEventObject"; + +export const TerminalCheckoutCreatedEventData: core.serialization.ObjectSchema< + serializers.TerminalCheckoutCreatedEventData.Raw, + Square.TerminalCheckoutCreatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: TerminalCheckoutCreatedEventObject.optional(), +}); + +export declare namespace TerminalCheckoutCreatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: TerminalCheckoutCreatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/TerminalCheckoutCreatedEventObject.ts b/src/serialization/types/TerminalCheckoutCreatedEventObject.ts new file mode 100644 index 000000000..0bb00b6e7 --- /dev/null +++ b/src/serialization/types/TerminalCheckoutCreatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { TerminalCheckout } from "./TerminalCheckout"; + +export const TerminalCheckoutCreatedEventObject: core.serialization.ObjectSchema< + serializers.TerminalCheckoutCreatedEventObject.Raw, + Square.TerminalCheckoutCreatedEventObject +> = core.serialization.object({ + checkout: TerminalCheckout.optional(), +}); + +export declare namespace TerminalCheckoutCreatedEventObject { + export interface Raw { + checkout?: TerminalCheckout.Raw | null; + } +} diff --git a/src/serialization/types/TerminalCheckoutUpdatedEvent.ts b/src/serialization/types/TerminalCheckoutUpdatedEvent.ts new file mode 100644 index 000000000..55aca6715 --- /dev/null +++ b/src/serialization/types/TerminalCheckoutUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { TerminalCheckoutUpdatedEventData } from "./TerminalCheckoutUpdatedEventData"; + +export const TerminalCheckoutUpdatedEvent: core.serialization.ObjectSchema< + serializers.TerminalCheckoutUpdatedEvent.Raw, + Square.TerminalCheckoutUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: TerminalCheckoutUpdatedEventData.optional(), +}); + +export declare namespace TerminalCheckoutUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: TerminalCheckoutUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/TerminalCheckoutUpdatedEventData.ts b/src/serialization/types/TerminalCheckoutUpdatedEventData.ts new file mode 100644 index 000000000..3481fd0a8 --- /dev/null +++ b/src/serialization/types/TerminalCheckoutUpdatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { TerminalCheckoutUpdatedEventObject } from "./TerminalCheckoutUpdatedEventObject"; + +export const TerminalCheckoutUpdatedEventData: core.serialization.ObjectSchema< + serializers.TerminalCheckoutUpdatedEventData.Raw, + Square.TerminalCheckoutUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: TerminalCheckoutUpdatedEventObject.optional(), +}); + +export declare namespace TerminalCheckoutUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: TerminalCheckoutUpdatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/TerminalCheckoutUpdatedEventObject.ts b/src/serialization/types/TerminalCheckoutUpdatedEventObject.ts new file mode 100644 index 000000000..776f45bf3 --- /dev/null +++ b/src/serialization/types/TerminalCheckoutUpdatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { TerminalCheckout } from "./TerminalCheckout"; + +export const TerminalCheckoutUpdatedEventObject: core.serialization.ObjectSchema< + serializers.TerminalCheckoutUpdatedEventObject.Raw, + Square.TerminalCheckoutUpdatedEventObject +> = core.serialization.object({ + checkout: TerminalCheckout.optional(), +}); + +export declare namespace TerminalCheckoutUpdatedEventObject { + export interface Raw { + checkout?: TerminalCheckout.Raw | null; + } +} diff --git a/src/serialization/types/TerminalRefundCreatedEvent.ts b/src/serialization/types/TerminalRefundCreatedEvent.ts new file mode 100644 index 000000000..ab2cd1d99 --- /dev/null +++ b/src/serialization/types/TerminalRefundCreatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { TerminalRefundCreatedEventData } from "./TerminalRefundCreatedEventData"; + +export const TerminalRefundCreatedEvent: core.serialization.ObjectSchema< + serializers.TerminalRefundCreatedEvent.Raw, + Square.TerminalRefundCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: TerminalRefundCreatedEventData.optional(), +}); + +export declare namespace TerminalRefundCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: TerminalRefundCreatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/TerminalRefundCreatedEventData.ts b/src/serialization/types/TerminalRefundCreatedEventData.ts new file mode 100644 index 000000000..be8fdfc75 --- /dev/null +++ b/src/serialization/types/TerminalRefundCreatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { TerminalRefundCreatedEventObject } from "./TerminalRefundCreatedEventObject"; + +export const TerminalRefundCreatedEventData: core.serialization.ObjectSchema< + serializers.TerminalRefundCreatedEventData.Raw, + Square.TerminalRefundCreatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: TerminalRefundCreatedEventObject.optional(), +}); + +export declare namespace TerminalRefundCreatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: TerminalRefundCreatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/TerminalRefundCreatedEventObject.ts b/src/serialization/types/TerminalRefundCreatedEventObject.ts new file mode 100644 index 000000000..02e35f1fa --- /dev/null +++ b/src/serialization/types/TerminalRefundCreatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { TerminalRefund } from "./TerminalRefund"; + +export const TerminalRefundCreatedEventObject: core.serialization.ObjectSchema< + serializers.TerminalRefundCreatedEventObject.Raw, + Square.TerminalRefundCreatedEventObject +> = core.serialization.object({ + refund: TerminalRefund.optional(), +}); + +export declare namespace TerminalRefundCreatedEventObject { + export interface Raw { + refund?: TerminalRefund.Raw | null; + } +} diff --git a/src/serialization/types/TerminalRefundUpdatedEvent.ts b/src/serialization/types/TerminalRefundUpdatedEvent.ts new file mode 100644 index 000000000..cc5994403 --- /dev/null +++ b/src/serialization/types/TerminalRefundUpdatedEvent.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { TerminalRefundUpdatedEventData } from "./TerminalRefundUpdatedEventData"; + +export const TerminalRefundUpdatedEvent: core.serialization.ObjectSchema< + serializers.TerminalRefundUpdatedEvent.Raw, + Square.TerminalRefundUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: TerminalRefundUpdatedEventData.optional(), +}); + +export declare namespace TerminalRefundUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: TerminalRefundUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/TerminalRefundUpdatedEventData.ts b/src/serialization/types/TerminalRefundUpdatedEventData.ts new file mode 100644 index 000000000..86349c240 --- /dev/null +++ b/src/serialization/types/TerminalRefundUpdatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { TerminalRefundUpdatedEventObject } from "./TerminalRefundUpdatedEventObject"; + +export const TerminalRefundUpdatedEventData: core.serialization.ObjectSchema< + serializers.TerminalRefundUpdatedEventData.Raw, + Square.TerminalRefundUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: TerminalRefundUpdatedEventObject.optional(), +}); + +export declare namespace TerminalRefundUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: TerminalRefundUpdatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/TerminalRefundUpdatedEventObject.ts b/src/serialization/types/TerminalRefundUpdatedEventObject.ts new file mode 100644 index 000000000..955dbdb16 --- /dev/null +++ b/src/serialization/types/TerminalRefundUpdatedEventObject.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { TerminalRefund } from "./TerminalRefund"; + +export const TerminalRefundUpdatedEventObject: core.serialization.ObjectSchema< + serializers.TerminalRefundUpdatedEventObject.Raw, + Square.TerminalRefundUpdatedEventObject +> = core.serialization.object({ + refund: TerminalRefund.optional(), +}); + +export declare namespace TerminalRefundUpdatedEventObject { + export interface Raw { + refund?: TerminalRefund.Raw | null; + } +} diff --git a/src/serialization/types/TransactionType.ts b/src/serialization/types/TransactionType.ts new file mode 100644 index 000000000..6c3917ad2 --- /dev/null +++ b/src/serialization/types/TransactionType.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const TransactionType: core.serialization.Schema = + core.serialization.enum_(["DEBIT", "CREDIT"]); + +export declare namespace TransactionType { + export type Raw = "DEBIT" | "CREDIT"; +} diff --git a/src/serialization/types/V1GetPaymentRequest.ts b/src/serialization/types/V1GetPaymentRequest.ts new file mode 100644 index 000000000..eb93bfcb7 --- /dev/null +++ b/src/serialization/types/V1GetPaymentRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const V1GetPaymentRequest: core.serialization.Schema< + serializers.V1GetPaymentRequest.Raw, + Square.V1GetPaymentRequest +> = core.serialization.unknown(); + +export declare namespace V1GetPaymentRequest { + export type Raw = unknown; +} diff --git a/src/serialization/types/V1GetSettlementRequest.ts b/src/serialization/types/V1GetSettlementRequest.ts new file mode 100644 index 000000000..1d2d826ba --- /dev/null +++ b/src/serialization/types/V1GetSettlementRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const V1GetSettlementRequest: core.serialization.Schema< + serializers.V1GetSettlementRequest.Raw, + Square.V1GetSettlementRequest +> = core.serialization.unknown(); + +export declare namespace V1GetSettlementRequest { + export type Raw = unknown; +} diff --git a/src/serialization/types/VendorCreatedEvent.ts b/src/serialization/types/VendorCreatedEvent.ts new file mode 100644 index 000000000..3ee66b617 --- /dev/null +++ b/src/serialization/types/VendorCreatedEvent.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { VendorCreatedEventData } from "./VendorCreatedEventData"; + +export const VendorCreatedEvent: core.serialization.ObjectSchema< + serializers.VendorCreatedEvent.Raw, + Square.VendorCreatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + locationId: core.serialization.property("location_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: VendorCreatedEventData.optional(), +}); + +export declare namespace VendorCreatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + location_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: VendorCreatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/VendorCreatedEventData.ts b/src/serialization/types/VendorCreatedEventData.ts new file mode 100644 index 000000000..1866c0e4a --- /dev/null +++ b/src/serialization/types/VendorCreatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { VendorCreatedEventObject } from "./VendorCreatedEventObject"; + +export const VendorCreatedEventData: core.serialization.ObjectSchema< + serializers.VendorCreatedEventData.Raw, + Square.VendorCreatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: VendorCreatedEventObject.optional(), +}); + +export declare namespace VendorCreatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: VendorCreatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/VendorCreatedEventObject.ts b/src/serialization/types/VendorCreatedEventObject.ts new file mode 100644 index 000000000..b0bd438a7 --- /dev/null +++ b/src/serialization/types/VendorCreatedEventObject.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { VendorCreatedEventObjectOperation } from "./VendorCreatedEventObjectOperation"; +import { Vendor } from "./Vendor"; + +export const VendorCreatedEventObject: core.serialization.ObjectSchema< + serializers.VendorCreatedEventObject.Raw, + Square.VendorCreatedEventObject +> = core.serialization.object({ + operation: VendorCreatedEventObjectOperation.optional(), + vendor: Vendor.optional(), +}); + +export declare namespace VendorCreatedEventObject { + export interface Raw { + operation?: VendorCreatedEventObjectOperation.Raw | null; + vendor?: Vendor.Raw | null; + } +} diff --git a/src/serialization/types/VendorCreatedEventObjectOperation.ts b/src/serialization/types/VendorCreatedEventObjectOperation.ts new file mode 100644 index 000000000..d42f7a6a0 --- /dev/null +++ b/src/serialization/types/VendorCreatedEventObjectOperation.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const VendorCreatedEventObjectOperation: core.serialization.Schema< + serializers.VendorCreatedEventObjectOperation.Raw, + Square.VendorCreatedEventObjectOperation +> = core.serialization.stringLiteral("CREATED"); + +export declare namespace VendorCreatedEventObjectOperation { + export type Raw = "CREATED"; +} diff --git a/src/serialization/types/VendorUpdatedEvent.ts b/src/serialization/types/VendorUpdatedEvent.ts new file mode 100644 index 000000000..ad39c7951 --- /dev/null +++ b/src/serialization/types/VendorUpdatedEvent.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { VendorUpdatedEventData } from "./VendorUpdatedEventData"; + +export const VendorUpdatedEvent: core.serialization.ObjectSchema< + serializers.VendorUpdatedEvent.Raw, + Square.VendorUpdatedEvent +> = core.serialization.object({ + merchantId: core.serialization.property("merchant_id", core.serialization.string().optionalNullable()), + locationId: core.serialization.property("location_id", core.serialization.string().optionalNullable()), + type: core.serialization.string().optionalNullable(), + eventId: core.serialization.property("event_id", core.serialization.string().optionalNullable()), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + data: VendorUpdatedEventData.optional(), +}); + +export declare namespace VendorUpdatedEvent { + export interface Raw { + merchant_id?: (string | null) | null; + location_id?: (string | null) | null; + type?: (string | null) | null; + event_id?: (string | null) | null; + created_at?: string | null; + data?: VendorUpdatedEventData.Raw | null; + } +} diff --git a/src/serialization/types/VendorUpdatedEventData.ts b/src/serialization/types/VendorUpdatedEventData.ts new file mode 100644 index 000000000..708e7f3eb --- /dev/null +++ b/src/serialization/types/VendorUpdatedEventData.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { VendorUpdatedEventObject } from "./VendorUpdatedEventObject"; + +export const VendorUpdatedEventData: core.serialization.ObjectSchema< + serializers.VendorUpdatedEventData.Raw, + Square.VendorUpdatedEventData +> = core.serialization.object({ + type: core.serialization.string().optionalNullable(), + id: core.serialization.string().optional(), + object: VendorUpdatedEventObject.optional(), +}); + +export declare namespace VendorUpdatedEventData { + export interface Raw { + type?: (string | null) | null; + id?: string | null; + object?: VendorUpdatedEventObject.Raw | null; + } +} diff --git a/src/serialization/types/VendorUpdatedEventObject.ts b/src/serialization/types/VendorUpdatedEventObject.ts new file mode 100644 index 000000000..f3df0ba59 --- /dev/null +++ b/src/serialization/types/VendorUpdatedEventObject.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; +import { VendorUpdatedEventObjectOperation } from "./VendorUpdatedEventObjectOperation"; +import { Vendor } from "./Vendor"; + +export const VendorUpdatedEventObject: core.serialization.ObjectSchema< + serializers.VendorUpdatedEventObject.Raw, + Square.VendorUpdatedEventObject +> = core.serialization.object({ + operation: VendorUpdatedEventObjectOperation.optional(), + vendor: Vendor.optional(), +}); + +export declare namespace VendorUpdatedEventObject { + export interface Raw { + operation?: VendorUpdatedEventObjectOperation.Raw | null; + vendor?: Vendor.Raw | null; + } +} diff --git a/src/serialization/types/VendorUpdatedEventObjectOperation.ts b/src/serialization/types/VendorUpdatedEventObjectOperation.ts new file mode 100644 index 000000000..cbe3a8cae --- /dev/null +++ b/src/serialization/types/VendorUpdatedEventObjectOperation.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Square from "../../api/index"; +import * as core from "../../core"; + +export const VendorUpdatedEventObjectOperation: core.serialization.Schema< + serializers.VendorUpdatedEventObjectOperation.Raw, + Square.VendorUpdatedEventObjectOperation +> = core.serialization.stringLiteral("UPDATED"); + +export declare namespace VendorUpdatedEventObjectOperation { + export type Raw = "UPDATED"; +} diff --git a/src/serialization/types/index.ts b/src/serialization/types/index.ts index c395ef6c8..58eb9f815 100644 --- a/src/serialization/types/index.ts +++ b/src/serialization/types/index.ts @@ -16,9 +16,18 @@ export * from "./AppointmentSegment"; export * from "./ArchivedState"; export * from "./Availability"; export * from "./BankAccount"; +export * from "./BankAccountCreatedEvent"; +export * from "./BankAccountCreatedEventData"; +export * from "./BankAccountCreatedEventObject"; +export * from "./BankAccountDisabledEvent"; +export * from "./BankAccountDisabledEventData"; +export * from "./BankAccountDisabledEventObject"; export * from "./BankAccountPaymentDetails"; export * from "./BankAccountStatus"; export * from "./BankAccountType"; +export * from "./BankAccountVerifiedEvent"; +export * from "./BankAccountVerifiedEventData"; +export * from "./BankAccountVerifiedEventObject"; export * from "./BatchChangeInventoryRequest"; export * from "./BatchChangeInventoryResponse"; export * from "./BatchDeleteCatalogObjectsResponse"; @@ -31,13 +40,29 @@ export * from "./BatchGetOrdersResponse"; export * from "./BatchUpsertCatalogObjectsResponse"; export * from "./Booking"; export * from "./BookingBookingSource"; +export * from "./BookingCreatedEvent"; +export * from "./BookingCreatedEventData"; +export * from "./BookingCreatedEventObject"; export * from "./BookingCreatorDetails"; export * from "./BookingCreatorDetailsCreatorType"; +export * from "./BookingCustomAttributeDefinitionOwnedCreatedEvent"; +export * from "./BookingCustomAttributeDefinitionOwnedDeletedEvent"; +export * from "./BookingCustomAttributeDefinitionOwnedUpdatedEvent"; +export * from "./BookingCustomAttributeDefinitionVisibleCreatedEvent"; +export * from "./BookingCustomAttributeDefinitionVisibleDeletedEvent"; +export * from "./BookingCustomAttributeDefinitionVisibleUpdatedEvent"; export * from "./BookingCustomAttributeDeleteRequest"; export * from "./BookingCustomAttributeDeleteResponse"; +export * from "./BookingCustomAttributeOwnedDeletedEvent"; +export * from "./BookingCustomAttributeOwnedUpdatedEvent"; export * from "./BookingCustomAttributeUpsertRequest"; export * from "./BookingCustomAttributeUpsertResponse"; +export * from "./BookingCustomAttributeVisibleDeletedEvent"; +export * from "./BookingCustomAttributeVisibleUpdatedEvent"; export * from "./BookingStatus"; +export * from "./BookingUpdatedEvent"; +export * from "./BookingUpdatedEventData"; +export * from "./BookingUpdatedEventObject"; export * from "./Break"; export * from "./BreakType"; export * from "./BulkCreateCustomerData"; @@ -101,13 +126,29 @@ export * from "./CancelTerminalCheckoutResponse"; export * from "./CancelTerminalRefundResponse"; export * from "./CaptureTransactionResponse"; export * from "./Card"; +export * from "./CardAutomaticallyUpdatedEvent"; +export * from "./CardAutomaticallyUpdatedEventData"; +export * from "./CardAutomaticallyUpdatedEventObject"; export * from "./CardBrand"; export * from "./CardCoBrand"; +export * from "./CardCreatedEvent"; +export * from "./CardCreatedEventData"; +export * from "./CardCreatedEventObject"; +export * from "./CardDisabledEvent"; +export * from "./CardDisabledEventData"; +export * from "./CardDisabledEventObject"; +export * from "./CardForgottenEvent"; +export * from "./CardForgottenEventCard"; +export * from "./CardForgottenEventData"; +export * from "./CardForgottenEventObject"; export * from "./CardIssuerAlert"; export * from "./CardPaymentDetails"; export * from "./CardPaymentTimeline"; export * from "./CardPrepaidType"; export * from "./CardType"; +export * from "./CardUpdatedEvent"; +export * from "./CardUpdatedEventData"; +export * from "./CardUpdatedEventObject"; export * from "./CashAppDetails"; export * from "./CashDrawerDevice"; export * from "./CashDrawerEventType"; @@ -186,6 +227,10 @@ export * from "./CatalogSubscriptionPlanVariation"; export * from "./CatalogTax"; export * from "./CatalogTimePeriod"; export * from "./CatalogV1Id"; +export * from "./CatalogVersionUpdatedEvent"; +export * from "./CatalogVersionUpdatedEventCatalogVersion"; +export * from "./CatalogVersionUpdatedEventData"; +export * from "./CatalogVersionUpdatedEventObject"; export * from "./CategoryPathToRootNode"; export * from "./ChangeBillingAnchorDateResponse"; export * from "./ChangeTiming"; @@ -262,16 +307,50 @@ export * from "./CreateWebhookSubscriptionResponse"; export * from "./Currency"; export * from "./CustomAttribute"; export * from "./CustomAttributeDefinition"; +export * from "./CustomAttributeDefinitionEventData"; +export * from "./CustomAttributeDefinitionEventDataObject"; export * from "./CustomAttributeDefinitionVisibility"; +export * from "./CustomAttributeEventData"; +export * from "./CustomAttributeEventDataObject"; export * from "./CustomAttributeFilter"; export * from "./CustomField"; export * from "./Customer"; export * from "./CustomerAddressFilter"; +export * from "./CustomerCreatedEvent"; +export * from "./CustomerCreatedEventData"; +export * from "./CustomerCreatedEventEventContext"; +export * from "./CustomerCreatedEventEventContextMerge"; +export * from "./CustomerCreatedEventObject"; export * from "./CustomerCreationSource"; export * from "./CustomerCreationSourceFilter"; +export * from "./CustomerCustomAttributeDefinitionCreatedEvent"; +export * from "./CustomerCustomAttributeDefinitionCreatedPublicEvent"; +export * from "./CustomerCustomAttributeDefinitionDeletedEvent"; +export * from "./CustomerCustomAttributeDefinitionDeletedPublicEvent"; +export * from "./CustomerCustomAttributeDefinitionOwnedCreatedEvent"; +export * from "./CustomerCustomAttributeDefinitionOwnedDeletedEvent"; +export * from "./CustomerCustomAttributeDefinitionOwnedUpdatedEvent"; +export * from "./CustomerCustomAttributeDefinitionUpdatedEvent"; +export * from "./CustomerCustomAttributeDefinitionUpdatedPublicEvent"; +export * from "./CustomerCustomAttributeDefinitionVisibleCreatedEvent"; +export * from "./CustomerCustomAttributeDefinitionVisibleDeletedEvent"; +export * from "./CustomerCustomAttributeDefinitionVisibleUpdatedEvent"; +export * from "./CustomerCustomAttributeDeletedEvent"; +export * from "./CustomerCustomAttributeDeletedPublicEvent"; export * from "./CustomerCustomAttributeFilter"; export * from "./CustomerCustomAttributeFilterValue"; export * from "./CustomerCustomAttributeFilters"; +export * from "./CustomerCustomAttributeOwnedDeletedEvent"; +export * from "./CustomerCustomAttributeOwnedUpdatedEvent"; +export * from "./CustomerCustomAttributeUpdatedEvent"; +export * from "./CustomerCustomAttributeUpdatedPublicEvent"; +export * from "./CustomerCustomAttributeVisibleDeletedEvent"; +export * from "./CustomerCustomAttributeVisibleUpdatedEvent"; +export * from "./CustomerDeletedEvent"; +export * from "./CustomerDeletedEventData"; +export * from "./CustomerDeletedEventEventContext"; +export * from "./CustomerDeletedEventEventContextMerge"; +export * from "./CustomerDeletedEventObject"; export * from "./CustomerDetails"; export * from "./CustomerFilter"; export * from "./CustomerGroup"; @@ -283,6 +362,9 @@ export * from "./CustomerSort"; export * from "./CustomerSortField"; export * from "./CustomerTaxIds"; export * from "./CustomerTextFilter"; +export * from "./CustomerUpdatedEvent"; +export * from "./CustomerUpdatedEventData"; +export * from "./CustomerUpdatedEventObject"; export * from "./DataCollectionOptions"; export * from "./DataCollectionOptionsInputType"; export * from "./DateRange"; @@ -323,6 +405,9 @@ export * from "./DeviceAttributes"; export * from "./DeviceAttributesDeviceType"; export * from "./DeviceCheckoutOptions"; export * from "./DeviceCode"; +export * from "./DeviceCodePairedEvent"; +export * from "./DeviceCodePairedEventData"; +export * from "./DeviceCodePairedEventObject"; export * from "./DeviceCodeStatus"; export * from "./DeviceComponentDetailsApplicationDetails"; export * from "./DeviceComponentDetailsBatteryDetails"; @@ -331,6 +416,9 @@ export * from "./DeviceComponentDetailsEthernetDetails"; export * from "./DeviceComponentDetailsExternalPower"; export * from "./DeviceComponentDetailsMeasurement"; export * from "./DeviceComponentDetailsWiFiDetails"; +export * from "./DeviceCreatedEvent"; +export * from "./DeviceCreatedEventData"; +export * from "./DeviceCreatedEventObject"; export * from "./DeviceDetails"; export * from "./DeviceMetadata"; export * from "./DeviceStatus"; @@ -342,12 +430,34 @@ export * from "./DismissTerminalActionResponse"; export * from "./DismissTerminalCheckoutResponse"; export * from "./DismissTerminalRefundResponse"; export * from "./Dispute"; +export * from "./DisputeCreatedEvent"; +export * from "./DisputeCreatedEventData"; +export * from "./DisputeCreatedEventObject"; export * from "./DisputeEvidence"; +export * from "./DisputeEvidenceAddedEvent"; +export * from "./DisputeEvidenceAddedEventData"; +export * from "./DisputeEvidenceAddedEventObject"; +export * from "./DisputeEvidenceCreatedEvent"; +export * from "./DisputeEvidenceCreatedEventData"; +export * from "./DisputeEvidenceCreatedEventObject"; +export * from "./DisputeEvidenceDeletedEvent"; +export * from "./DisputeEvidenceDeletedEventData"; +export * from "./DisputeEvidenceDeletedEventObject"; export * from "./DisputeEvidenceFile"; +export * from "./DisputeEvidenceRemovedEvent"; +export * from "./DisputeEvidenceRemovedEventData"; +export * from "./DisputeEvidenceRemovedEventObject"; export * from "./DisputeEvidenceType"; export * from "./DisputeReason"; export * from "./DisputeState"; +export * from "./DisputeStateChangedEvent"; +export * from "./DisputeStateChangedEventData"; +export * from "./DisputeStateChangedEventObject"; +export * from "./DisputeStateUpdatedEvent"; +export * from "./DisputeStateUpdatedEventData"; +export * from "./DisputeStateUpdatedEventObject"; export * from "./DisputedPayment"; +export * from "./EcomVisibility"; export * from "./Employee"; export * from "./EmployeeStatus"; export * from "./EmployeeWage"; @@ -401,6 +511,9 @@ export * from "./GiftCardActivityBlock"; export * from "./GiftCardActivityBlockReason"; export * from "./GiftCardActivityClearBalance"; export * from "./GiftCardActivityClearBalanceReason"; +export * from "./GiftCardActivityCreatedEvent"; +export * from "./GiftCardActivityCreatedEventData"; +export * from "./GiftCardActivityCreatedEventObject"; export * from "./GiftCardActivityDeactivate"; export * from "./GiftCardActivityDeactivateReason"; export * from "./GiftCardActivityImport"; @@ -415,15 +528,33 @@ export * from "./GiftCardActivityType"; export * from "./GiftCardActivityUnblock"; export * from "./GiftCardActivityUnblockReason"; export * from "./GiftCardActivityUnlinkedActivityRefund"; +export * from "./GiftCardActivityUpdatedEvent"; +export * from "./GiftCardActivityUpdatedEventData"; +export * from "./GiftCardActivityUpdatedEventObject"; +export * from "./GiftCardCreatedEvent"; +export * from "./GiftCardCreatedEventData"; +export * from "./GiftCardCreatedEventObject"; +export * from "./GiftCardCustomerLinkedEvent"; +export * from "./GiftCardCustomerLinkedEventData"; +export * from "./GiftCardCustomerLinkedEventObject"; +export * from "./GiftCardCustomerUnlinkedEvent"; +export * from "./GiftCardCustomerUnlinkedEventData"; +export * from "./GiftCardCustomerUnlinkedEventObject"; export * from "./GiftCardGanSource"; export * from "./GiftCardStatus"; export * from "./GiftCardType"; +export * from "./GiftCardUpdatedEvent"; +export * from "./GiftCardUpdatedEventData"; +export * from "./GiftCardUpdatedEventObject"; export * from "./InventoryAdjustment"; export * from "./InventoryAdjustmentGroup"; export * from "./InventoryAlertType"; export * from "./InventoryChange"; export * from "./InventoryChangeType"; export * from "./InventoryCount"; +export * from "./InventoryCountUpdatedEvent"; +export * from "./InventoryCountUpdatedEventData"; +export * from "./InventoryCountUpdatedEventObject"; export * from "./InventoryPhysicalCount"; export * from "./InventoryState"; export * from "./InventoryTransfer"; @@ -431,25 +562,81 @@ export * from "./Invoice"; export * from "./InvoiceAcceptedPaymentMethods"; export * from "./InvoiceAttachment"; export * from "./InvoiceAutomaticPaymentSource"; +export * from "./InvoiceCanceledEvent"; +export * from "./InvoiceCanceledEventData"; +export * from "./InvoiceCanceledEventObject"; +export * from "./InvoiceCreatedEvent"; +export * from "./InvoiceCreatedEventData"; +export * from "./InvoiceCreatedEventObject"; export * from "./InvoiceCustomField"; export * from "./InvoiceCustomFieldPlacement"; +export * from "./InvoiceDeletedEvent"; +export * from "./InvoiceDeletedEventData"; export * from "./InvoiceDeliveryMethod"; export * from "./InvoiceFilter"; +export * from "./InvoicePaymentMadeEvent"; +export * from "./InvoicePaymentMadeEventData"; +export * from "./InvoicePaymentMadeEventObject"; export * from "./InvoicePaymentReminder"; export * from "./InvoicePaymentReminderStatus"; export * from "./InvoicePaymentRequest"; +export * from "./InvoicePublishedEvent"; +export * from "./InvoicePublishedEventData"; +export * from "./InvoicePublishedEventObject"; export * from "./InvoiceQuery"; export * from "./InvoiceRecipient"; export * from "./InvoiceRecipientTaxIds"; +export * from "./InvoiceRefundedEvent"; +export * from "./InvoiceRefundedEventData"; +export * from "./InvoiceRefundedEventObject"; export * from "./InvoiceRequestMethod"; export * from "./InvoiceRequestType"; +export * from "./InvoiceScheduledChargeFailedEvent"; +export * from "./InvoiceScheduledChargeFailedEventData"; +export * from "./InvoiceScheduledChargeFailedEventObject"; export * from "./InvoiceSort"; export * from "./InvoiceSortField"; export * from "./InvoiceStatus"; +export * from "./InvoiceUpdatedEvent"; +export * from "./InvoiceUpdatedEventData"; +export * from "./InvoiceUpdatedEventObject"; export * from "./ItemVariationLocationOverrides"; export * from "./Job"; export * from "./JobAssignment"; export * from "./JobAssignmentPayType"; +export * from "./JobCreatedEvent"; +export * from "./JobCreatedEventData"; +export * from "./JobCreatedEventObject"; +export * from "./JobUpdatedEvent"; +export * from "./JobUpdatedEventData"; +export * from "./JobUpdatedEventObject"; +export * from "./LaborScheduledShiftCreatedEvent"; +export * from "./LaborScheduledShiftCreatedEventData"; +export * from "./LaborScheduledShiftCreatedEventObject"; +export * from "./LaborScheduledShiftDeletedEvent"; +export * from "./LaborScheduledShiftDeletedEventData"; +export * from "./LaborScheduledShiftPublishedEvent"; +export * from "./LaborScheduledShiftPublishedEventData"; +export * from "./LaborScheduledShiftPublishedEventObject"; +export * from "./LaborScheduledShiftUpdatedEvent"; +export * from "./LaborScheduledShiftUpdatedEventData"; +export * from "./LaborScheduledShiftUpdatedEventObject"; +export * from "./LaborShiftCreatedEvent"; +export * from "./LaborShiftCreatedEventData"; +export * from "./LaborShiftCreatedEventObject"; +export * from "./LaborShiftDeletedEvent"; +export * from "./LaborShiftDeletedEventData"; +export * from "./LaborShiftUpdatedEvent"; +export * from "./LaborShiftUpdatedEventData"; +export * from "./LaborShiftUpdatedEventObject"; +export * from "./LaborTimecardCreatedEvent"; +export * from "./LaborTimecardCreatedEventData"; +export * from "./LaborTimecardCreatedEventObject"; +export * from "./LaborTimecardDeletedEvent"; +export * from "./LaborTimecardDeletedEventData"; +export * from "./LaborTimecardUpdatedEvent"; +export * from "./LaborTimecardUpdatedEventData"; +export * from "./LaborTimecardUpdatedEventObject"; export * from "./LinkCustomerToGiftCardResponse"; export * from "./ListBankAccountsResponse"; export * from "./ListBookingCustomAttributeDefinitionsResponse"; @@ -505,16 +692,46 @@ export * from "./ListWorkweekConfigsResponse"; export * from "./Location"; export * from "./LocationBookingProfile"; export * from "./LocationCapability"; +export * from "./LocationCreatedEvent"; +export * from "./LocationCreatedEventData"; +export * from "./LocationCustomAttributeDefinitionOwnedCreatedEvent"; +export * from "./LocationCustomAttributeDefinitionOwnedDeletedEvent"; +export * from "./LocationCustomAttributeDefinitionOwnedUpdatedEvent"; +export * from "./LocationCustomAttributeDefinitionVisibleCreatedEvent"; +export * from "./LocationCustomAttributeDefinitionVisibleDeletedEvent"; +export * from "./LocationCustomAttributeDefinitionVisibleUpdatedEvent"; +export * from "./LocationCustomAttributeOwnedDeletedEvent"; +export * from "./LocationCustomAttributeOwnedUpdatedEvent"; +export * from "./LocationCustomAttributeVisibleDeletedEvent"; +export * from "./LocationCustomAttributeVisibleUpdatedEvent"; +export * from "./LocationSettingsUpdatedEvent"; +export * from "./LocationSettingsUpdatedEventData"; +export * from "./LocationSettingsUpdatedEventObject"; export * from "./LocationStatus"; export * from "./LocationType"; +export * from "./LocationUpdatedEvent"; +export * from "./LocationUpdatedEventData"; export * from "./LoyaltyAccount"; +export * from "./LoyaltyAccountCreatedEvent"; +export * from "./LoyaltyAccountCreatedEventData"; +export * from "./LoyaltyAccountCreatedEventObject"; +export * from "./LoyaltyAccountDeletedEvent"; +export * from "./LoyaltyAccountDeletedEventData"; +export * from "./LoyaltyAccountDeletedEventObject"; export * from "./LoyaltyAccountExpiringPointDeadline"; export * from "./LoyaltyAccountMapping"; +export * from "./LoyaltyAccountMappingType"; +export * from "./LoyaltyAccountUpdatedEvent"; +export * from "./LoyaltyAccountUpdatedEventData"; +export * from "./LoyaltyAccountUpdatedEventObject"; export * from "./LoyaltyEvent"; export * from "./LoyaltyEventAccumulatePoints"; export * from "./LoyaltyEventAccumulatePromotionPoints"; export * from "./LoyaltyEventAdjustPoints"; export * from "./LoyaltyEventCreateReward"; +export * from "./LoyaltyEventCreatedEvent"; +export * from "./LoyaltyEventCreatedEventData"; +export * from "./LoyaltyEventCreatedEventObject"; export * from "./LoyaltyEventDateTimeFilter"; export * from "./LoyaltyEventDeleteReward"; export * from "./LoyaltyEventExpirePoints"; @@ -536,15 +753,21 @@ export * from "./LoyaltyProgramAccrualRuleSpendData"; export * from "./LoyaltyProgramAccrualRuleTaxMode"; export * from "./LoyaltyProgramAccrualRuleType"; export * from "./LoyaltyProgramAccrualRuleVisitData"; +export * from "./LoyaltyProgramCreatedEvent"; +export * from "./LoyaltyProgramCreatedEventData"; +export * from "./LoyaltyProgramCreatedEventObject"; export * from "./LoyaltyProgramExpirationPolicy"; -export * from "./LoyaltyProgramRewardDefinition"; -export * from "./LoyaltyProgramRewardDefinitionScope"; -export * from "./LoyaltyProgramRewardDefinitionType"; export * from "./LoyaltyProgramRewardTier"; export * from "./LoyaltyProgramStatus"; export * from "./LoyaltyProgramTerminology"; +export * from "./LoyaltyProgramUpdatedEvent"; +export * from "./LoyaltyProgramUpdatedEventData"; +export * from "./LoyaltyProgramUpdatedEventObject"; export * from "./LoyaltyPromotion"; export * from "./LoyaltyPromotionAvailableTimeData"; +export * from "./LoyaltyPromotionCreatedEvent"; +export * from "./LoyaltyPromotionCreatedEventData"; +export * from "./LoyaltyPromotionCreatedEventObject"; export * from "./LoyaltyPromotionIncentive"; export * from "./LoyaltyPromotionIncentivePointsAdditionData"; export * from "./LoyaltyPromotionIncentivePointsMultiplierData"; @@ -552,6 +775,9 @@ export * from "./LoyaltyPromotionIncentiveType"; export * from "./LoyaltyPromotionStatus"; export * from "./LoyaltyPromotionTriggerLimit"; export * from "./LoyaltyPromotionTriggerLimitInterval"; +export * from "./LoyaltyPromotionUpdatedEvent"; +export * from "./LoyaltyPromotionUpdatedEventData"; +export * from "./LoyaltyPromotionUpdatedEventObject"; export * from "./LoyaltyReward"; export * from "./LoyaltyRewardStatus"; export * from "./MeasurementUnit"; @@ -564,13 +790,55 @@ export * from "./MeasurementUnitUnitType"; export * from "./MeasurementUnitVolume"; export * from "./MeasurementUnitWeight"; export * from "./Merchant"; +export * from "./MerchantCustomAttributeDefinitionOwnedCreatedEvent"; +export * from "./MerchantCustomAttributeDefinitionOwnedDeletedEvent"; +export * from "./MerchantCustomAttributeDefinitionOwnedUpdatedEvent"; +export * from "./MerchantCustomAttributeDefinitionVisibleCreatedEvent"; +export * from "./MerchantCustomAttributeDefinitionVisibleDeletedEvent"; +export * from "./MerchantCustomAttributeDefinitionVisibleUpdatedEvent"; +export * from "./MerchantCustomAttributeOwnedDeletedEvent"; +export * from "./MerchantCustomAttributeOwnedUpdatedEvent"; +export * from "./MerchantCustomAttributeVisibleDeletedEvent"; +export * from "./MerchantCustomAttributeVisibleUpdatedEvent"; +export * from "./MerchantSettingsUpdatedEvent"; +export * from "./MerchantSettingsUpdatedEventData"; +export * from "./MerchantSettingsUpdatedEventObject"; export * from "./MerchantStatus"; export * from "./ModifierLocationOverrides"; export * from "./Money"; +export * from "./OauthAuthorizationRevokedEvent"; +export * from "./OauthAuthorizationRevokedEventData"; +export * from "./OauthAuthorizationRevokedEventObject"; +export * from "./OauthAuthorizationRevokedEventRevocationObject"; +export * from "./OauthAuthorizationRevokedEventRevokerType"; export * from "./ObtainTokenResponse"; export * from "./OfflinePaymentDetails"; export * from "./Order"; +export * from "./OrderCreated"; +export * from "./OrderCreatedEvent"; +export * from "./OrderCreatedEventData"; +export * from "./OrderCreatedObject"; +export * from "./OrderCustomAttributeDefinitionOwnedCreatedEvent"; +export * from "./OrderCustomAttributeDefinitionOwnedDeletedEvent"; +export * from "./OrderCustomAttributeDefinitionOwnedUpdatedEvent"; +export * from "./OrderCustomAttributeDefinitionVisibleCreatedEvent"; +export * from "./OrderCustomAttributeDefinitionVisibleDeletedEvent"; +export * from "./OrderCustomAttributeDefinitionVisibleUpdatedEvent"; +export * from "./OrderCustomAttributeOwnedDeletedEvent"; +export * from "./OrderCustomAttributeOwnedUpdatedEvent"; +export * from "./OrderCustomAttributeVisibleDeletedEvent"; +export * from "./OrderCustomAttributeVisibleUpdatedEvent"; export * from "./OrderEntry"; +export * from "./OrderFulfillmentDeliveryDetailsScheduleType"; +export * from "./OrderFulfillmentFulfillmentLineItemApplication"; +export * from "./OrderFulfillmentPickupDetailsScheduleType"; +export * from "./OrderFulfillmentState"; +export * from "./OrderFulfillmentType"; +export * from "./OrderFulfillmentUpdated"; +export * from "./OrderFulfillmentUpdatedEvent"; +export * from "./OrderFulfillmentUpdatedEventData"; +export * from "./OrderFulfillmentUpdatedObject"; +export * from "./OrderFulfillmentUpdatedUpdate"; export * from "./OrderLineItem"; export * from "./OrderLineItemAppliedDiscount"; export * from "./OrderLineItemAppliedServiceCharge"; @@ -605,6 +873,10 @@ export * from "./OrderServiceChargeTreatmentType"; export * from "./OrderServiceChargeType"; export * from "./OrderSource"; export * from "./OrderState"; +export * from "./OrderUpdated"; +export * from "./OrderUpdatedEvent"; +export * from "./OrderUpdatedEventData"; +export * from "./OrderUpdatedObject"; export * from "./PauseSubscriptionResponse"; export * from "./PayOrderResponse"; export * from "./Payment"; @@ -633,15 +905,30 @@ export * from "./PaymentBalanceActivitySquarePayrollTransferReversedDetail"; export * from "./PaymentBalanceActivityTaxOnFeeDetail"; export * from "./PaymentBalanceActivityThirdPartyFeeDetail"; export * from "./PaymentBalanceActivityThirdPartyFeeRefundDetail"; +export * from "./PaymentCreatedEvent"; +export * from "./PaymentCreatedEventData"; +export * from "./PaymentCreatedEventObject"; export * from "./PaymentLink"; export * from "./PaymentLinkRelatedResources"; export * from "./PaymentOptions"; export * from "./PaymentOptionsDelayAction"; export * from "./PaymentRefund"; +export * from "./PaymentUpdatedEvent"; +export * from "./PaymentUpdatedEventData"; +export * from "./PaymentUpdatedEventObject"; export * from "./Payout"; export * from "./PayoutEntry"; +export * from "./PayoutFailedEvent"; +export * from "./PayoutFailedEventData"; +export * from "./PayoutFailedEventObject"; export * from "./PayoutFee"; export * from "./PayoutFeeType"; +export * from "./PayoutPaidEvent"; +export * from "./PayoutPaidEventData"; +export * from "./PayoutPaidEventObject"; +export * from "./PayoutSentEvent"; +export * from "./PayoutSentEventData"; +export * from "./PayoutSentEventObject"; export * from "./PayoutStatus"; export * from "./PayoutType"; export * from "./Phase"; @@ -658,8 +945,14 @@ export * from "./Range"; export * from "./ReceiptOptions"; export * from "./RedeemLoyaltyRewardResponse"; export * from "./Refund"; +export * from "./RefundCreatedEvent"; +export * from "./RefundCreatedEventData"; +export * from "./RefundCreatedEventObject"; export * from "./RefundPaymentResponse"; export * from "./RefundStatus"; +export * from "./RefundUpdatedEvent"; +export * from "./RefundUpdatedEventData"; +export * from "./RefundUpdatedEventObject"; export * from "./RegisterDomainResponse"; export * from "./RegisterDomainResponseStatus"; export * from "./RemoveGroupFromCustomerResponse"; @@ -803,6 +1096,9 @@ export * from "./Subscription"; export * from "./SubscriptionAction"; export * from "./SubscriptionActionType"; export * from "./SubscriptionCadence"; +export * from "./SubscriptionCreatedEvent"; +export * from "./SubscriptionCreatedEventData"; +export * from "./SubscriptionCreatedEventObject"; export * from "./SubscriptionEvent"; export * from "./SubscriptionEventInfo"; export * from "./SubscriptionEventInfoCode"; @@ -813,6 +1109,9 @@ export * from "./SubscriptionPricingType"; export * from "./SubscriptionSource"; export * from "./SubscriptionStatus"; export * from "./SubscriptionTestResult"; +export * from "./SubscriptionUpdatedEvent"; +export * from "./SubscriptionUpdatedEventData"; +export * from "./SubscriptionUpdatedEventObject"; export * from "./SwapPlanResponse"; export * from "./TaxCalculationPhase"; export * from "./TaxIds"; @@ -821,8 +1120,18 @@ export * from "./TeamMember"; export * from "./TeamMemberAssignedLocations"; export * from "./TeamMemberAssignedLocationsAssignmentType"; export * from "./TeamMemberBookingProfile"; +export * from "./TeamMemberCreatedEvent"; +export * from "./TeamMemberCreatedEventData"; +export * from "./TeamMemberCreatedEventObject"; +export * from "./TeamMemberInvitationStatus"; export * from "./TeamMemberStatus"; +export * from "./TeamMemberUpdatedEvent"; +export * from "./TeamMemberUpdatedEventData"; +export * from "./TeamMemberUpdatedEventObject"; export * from "./TeamMemberWage"; +export * from "./TeamMemberWageSettingUpdatedEvent"; +export * from "./TeamMemberWageSettingUpdatedEventData"; +export * from "./TeamMemberWageSettingUpdatedEventObject"; export * from "./Tender"; export * from "./TenderBankAccountDetails"; export * from "./TenderBankAccountDetailsStatus"; @@ -838,17 +1147,35 @@ export * from "./TenderSquareAccountDetailsStatus"; export * from "./TenderType"; export * from "./TerminalAction"; export * from "./TerminalActionActionType"; +export * from "./TerminalActionCreatedEvent"; +export * from "./TerminalActionCreatedEventData"; +export * from "./TerminalActionCreatedEventObject"; export * from "./TerminalActionQuery"; export * from "./TerminalActionQueryFilter"; export * from "./TerminalActionQuerySort"; +export * from "./TerminalActionUpdatedEvent"; +export * from "./TerminalActionUpdatedEventData"; +export * from "./TerminalActionUpdatedEventObject"; export * from "./TerminalCheckout"; +export * from "./TerminalCheckoutCreatedEvent"; +export * from "./TerminalCheckoutCreatedEventData"; +export * from "./TerminalCheckoutCreatedEventObject"; export * from "./TerminalCheckoutQuery"; export * from "./TerminalCheckoutQueryFilter"; export * from "./TerminalCheckoutQuerySort"; +export * from "./TerminalCheckoutUpdatedEvent"; +export * from "./TerminalCheckoutUpdatedEventData"; +export * from "./TerminalCheckoutUpdatedEventObject"; export * from "./TerminalRefund"; +export * from "./TerminalRefundCreatedEvent"; +export * from "./TerminalRefundCreatedEventData"; +export * from "./TerminalRefundCreatedEventObject"; export * from "./TerminalRefundQuery"; export * from "./TerminalRefundQueryFilter"; export * from "./TerminalRefundQuerySort"; +export * from "./TerminalRefundUpdatedEvent"; +export * from "./TerminalRefundUpdatedEventData"; +export * from "./TerminalRefundUpdatedEventObject"; export * from "./TestWebhookSubscriptionResponse"; export * from "./TimeRange"; export * from "./Timecard"; @@ -864,6 +1191,7 @@ export * from "./TimecardWorkdayMatcher"; export * from "./TipSettings"; export * from "./Transaction"; export * from "./TransactionProduct"; +export * from "./TransactionType"; export * from "./UnlinkCustomerFromGiftCardResponse"; export * from "./UpdateBookingCustomAttributeDefinitionResponse"; export * from "./UpdateBookingResponse"; @@ -917,7 +1245,15 @@ export * from "./V1TenderType"; export * from "./V1UpdateOrderRequestAction"; export * from "./Vendor"; export * from "./VendorContact"; +export * from "./VendorCreatedEvent"; +export * from "./VendorCreatedEventData"; +export * from "./VendorCreatedEventObject"; +export * from "./VendorCreatedEventObjectOperation"; export * from "./VendorStatus"; +export * from "./VendorUpdatedEvent"; +export * from "./VendorUpdatedEventData"; +export * from "./VendorUpdatedEventObject"; +export * from "./VendorUpdatedEventObjectOperation"; export * from "./VisibilityFilter"; export * from "./VoidTransactionResponse"; export * from "./WageSetting"; @@ -942,3 +1278,33 @@ export * from "./CatalogObjectCustomAttributeDefinition"; export * from "./CatalogObjectQuickAmountsSettings"; export * from "./CatalogObjectSubscriptionPlan"; export * from "./CatalogObjectAvailabilityPeriod"; +export * from "./GetLoyaltyAccountRequest"; +export * from "./GetLoyaltyProgramRequest"; +export * from "./GetLoyaltyPromotionRequest"; +export * from "./GetLoyaltyRewardRequest"; +export * from "./GetCardRequest"; +export * from "./GetDisputeEvidenceRequest"; +export * from "./GetDisputeRequest"; +export * from "./V1GetPaymentRequest"; +export * from "./V1GetSettlementRequest"; +export * from "./GetCustomerGroupRequest"; +export * from "./GetCustomerRequest"; +export * from "./GetCustomerSegmentRequest"; +export * from "./GetTransactionRequest"; +export * from "./GetBookingRequest"; +export * from "./GetBusinessBookingProfileRequest"; +export * from "./GetTeamMemberBookingProfileRequest"; +export * from "./GetSnippetRequest"; +export * from "./GetInventoryAdjustmentRequest"; +export * from "./GetInventoryPhysicalCountRequest"; +export * from "./GetInventoryTransferRequest"; +export * from "./GetVendorRequest"; +export * from "./GetPaymentLinkRequest"; +export * from "./GetGiftCardRequest"; +export * from "./GetOrderRequest"; +export * from "./GetEmployeeRequest"; +export * from "./GetLocationRequest"; +export * from "./GetMerchantRequest"; +export * from "./GetTeamMemberRequest"; +export * from "./GetWageSettingRequest"; +export * from "./GetWebhookSubscriptionRequest"; diff --git a/src/version.ts b/src/version.ts index 830530106..2f924503d 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const SDK_VERSION = "42.3.0"; +export const SDK_VERSION = "43.0.0"; diff --git a/yarn.lock b/yarn.lock index a1b85f846..81a8a0685 100644 --- a/yarn.lock +++ b/yarn.lock @@ -125,43 +125,43 @@ picocolors "^1.1.1" "@babel/compat-data@^7.27.2": - version "7.27.2" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.27.2.tgz#4183f9e642fd84e74e3eea7ffa93a412e3b102c9" - integrity sha512-TUtMJYRPyUb/9aU8f3K0mjmjf6M9N5Woshn2CS6nqJSeJtTtQcpLUXjGt9vbF8ZGff0El99sWkLgzwW3VXnxZQ== + version "7.27.5" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.27.5.tgz#7d0658ec1a8420fc866d1df1b03bea0e79934c82" + integrity sha512-KiRAp/VoJaWkkte84TvUd9qjdbZAdiqyvMxrGl1N6vzFogKmaLgoM3L1kgtLicp2HP5fBJS8JrZKLVIZGVJAVg== "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.27.1.tgz#89de51e86bd12246003e3524704c49541b16c3e6" - integrity sha512-IaaGWsQqfsQWVLqMn9OB92MNN7zukfVA4s7KKAI0KfrrDsZ0yhi5uV4baBuLuN7n3vsZpwP8asPPcVwApxvjBQ== + version "7.27.4" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.27.4.tgz#cc1fc55d0ce140a1828d1dd2a2eba285adbfb3ce" + integrity sha512-bXYxrXFubeYdvB0NhD/NBB3Qi6aZeV20GOWVI47t2dkecCEoneR4NPVcb7abpXDEvejgrUfFtG6vG/zxAKmg+g== dependencies: "@ampproject/remapping" "^2.2.0" "@babel/code-frame" "^7.27.1" - "@babel/generator" "^7.27.1" - "@babel/helper-compilation-targets" "^7.27.1" - "@babel/helper-module-transforms" "^7.27.1" - "@babel/helpers" "^7.27.1" - "@babel/parser" "^7.27.1" - "@babel/template" "^7.27.1" - "@babel/traverse" "^7.27.1" - "@babel/types" "^7.27.1" + "@babel/generator" "^7.27.3" + "@babel/helper-compilation-targets" "^7.27.2" + "@babel/helper-module-transforms" "^7.27.3" + "@babel/helpers" "^7.27.4" + "@babel/parser" "^7.27.4" + "@babel/template" "^7.27.2" + "@babel/traverse" "^7.27.4" + "@babel/types" "^7.27.3" convert-source-map "^2.0.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.27.1", "@babel/generator@^7.7.2": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.27.1.tgz#862d4fad858f7208edd487c28b58144036b76230" - integrity sha512-UnJfnIpc/+JO0/+KRVQNGU+y5taA5vCbwN8+azkX6beii/ZF+enZJSOKo11ZSzGJjlNfJHfQtmQT8H+9TXPG2w== +"@babel/generator@^7.27.3", "@babel/generator@^7.7.2": + version "7.27.5" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.27.5.tgz#3eb01866b345ba261b04911020cbe22dd4be8c8c" + integrity sha512-ZGhA37l0e/g2s1Cnzdix0O3aLYm66eF8aufiVteOgnwxgnRP8GoyMj7VWsgWnQbVKXyge7hqrFh2K2TQM6t1Hw== dependencies: - "@babel/parser" "^7.27.1" - "@babel/types" "^7.27.1" + "@babel/parser" "^7.27.5" + "@babel/types" "^7.27.3" "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.25" jsesc "^3.0.2" -"@babel/helper-compilation-targets@^7.27.1": +"@babel/helper-compilation-targets@^7.27.2": version "7.27.2" resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz#46a0f6efab808d51d29ce96858dd10ce8732733d" integrity sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ== @@ -180,14 +180,14 @@ "@babel/traverse" "^7.27.1" "@babel/types" "^7.27.1" -"@babel/helper-module-transforms@^7.27.1": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.27.1.tgz#e1663b8b71d2de948da5c4fb2a20ca4f3ec27a6f" - integrity sha512-9yHn519/8KvTU5BjTVEEeIM3w9/2yXNKoD82JifINImhpKkARMJKPP59kLo+BafpdN5zgNeIcS4jsGDmd3l58g== +"@babel/helper-module-transforms@^7.27.3": + version "7.27.3" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.27.3.tgz#db0bbcfba5802f9ef7870705a7ef8788508ede02" + integrity sha512-dSOvYwvyLsWBeIRyOeHXp5vPj5l1I011r52FM1+r1jCERv+aFXYk4whgQccYEGYxK2H3ZAIA8nuPkQ0HaUo3qg== dependencies: "@babel/helper-module-imports" "^7.27.1" "@babel/helper-validator-identifier" "^7.27.1" - "@babel/traverse" "^7.27.1" + "@babel/traverse" "^7.27.3" "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.27.1", "@babel/helper-plugin-utils@^7.8.0": version "7.27.1" @@ -209,20 +209,20 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz#fa52f5b1e7db1ab049445b421c4471303897702f" integrity sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg== -"@babel/helpers@^7.27.1": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.27.1.tgz#ffc27013038607cdba3288e692c3611c06a18aa4" - integrity sha512-FCvFTm0sWV8Fxhpp2McP5/W53GPllQ9QeQ7SiqGWjMf/LVG07lFa5+pgK05IRhVwtvafT22KF+ZSnM9I545CvQ== +"@babel/helpers@^7.27.4": + version "7.27.6" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.27.6.tgz#6456fed15b2cb669d2d1fabe84b66b34991d812c" + integrity sha512-muE8Tt8M22638HU31A3CgfSUciwz1fhATfoVai05aPXGor//CdWDCbnlY1yvBPo07njuVOCNGCSp/GTt12lIug== dependencies: - "@babel/template" "^7.27.1" - "@babel/types" "^7.27.1" + "@babel/template" "^7.27.2" + "@babel/types" "^7.27.6" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.27.1", "@babel/parser@^7.27.2": - version "7.27.2" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.27.2.tgz#577518bedb17a2ce4212afd052e01f7df0941127" - integrity sha512-QYLs8299NA7WM/bZAdp+CviYYkVoYXlDW2rzliy3chxd1PQjej7JORuMJDJXJUb9g0TT+B99EwaVLKmX+sPXWw== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.27.2", "@babel/parser@^7.27.4", "@babel/parser@^7.27.5": + version "7.27.5" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.27.5.tgz#ed22f871f110aa285a6fd934a0efed621d118826" + integrity sha512-OsQd175SxWkGlzbny8J3K8TnnDD0N3lrIUtB92xwyRpzaenGZhxDvxN/JgU00U3CDZNj9tPuDJ5H0WS4Nt3vKg== dependencies: - "@babel/types" "^7.27.1" + "@babel/types" "^7.27.3" "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -343,7 +343,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.27.1" -"@babel/template@^7.27.1", "@babel/template@^7.3.3": +"@babel/template@^7.27.2", "@babel/template@^7.3.3": version "7.27.2" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.27.2.tgz#fa78ceed3c4e7b63ebf6cb39e5852fca45f6809d" integrity sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw== @@ -352,23 +352,23 @@ "@babel/parser" "^7.27.2" "@babel/types" "^7.27.1" -"@babel/traverse@^7.27.1": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.27.1.tgz#4db772902b133bbddd1c4f7a7ee47761c1b9f291" - integrity sha512-ZCYtZciz1IWJB4U61UPu4KEaqyfj+r5T1Q5mqPo+IBpcG9kHv30Z0aD8LXPgC1trYa6rK0orRyAhqUgk4MjmEg== +"@babel/traverse@^7.27.1", "@babel/traverse@^7.27.3", "@babel/traverse@^7.27.4": + version "7.27.4" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.27.4.tgz#b0045ac7023c8472c3d35effd7cc9ebd638da6ea" + integrity sha512-oNcu2QbHqts9BtOWJosOVJapWjBDSxGCpFvikNR5TGDYDQf3JwpIoMzIKrvfoti93cLfPJEG4tH9SPVeyCGgdA== dependencies: "@babel/code-frame" "^7.27.1" - "@babel/generator" "^7.27.1" - "@babel/parser" "^7.27.1" - "@babel/template" "^7.27.1" - "@babel/types" "^7.27.1" + "@babel/generator" "^7.27.3" + "@babel/parser" "^7.27.4" + "@babel/template" "^7.27.2" + "@babel/types" "^7.27.3" debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.27.1", "@babel/types@^7.3.3": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.27.1.tgz#9defc53c16fc899e46941fc6901a9eea1c9d8560" - integrity sha512-+EzkxvLNfiUeKMgy/3luqfsCWFRXLb7U6wNQTk60tovuckwB15B191tJWvpp4HjiQWdJkCxO3Wbvc6jlk3Xb2Q== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.27.1", "@babel/types@^7.27.3", "@babel/types@^7.27.6", "@babel/types@^7.3.3": + version "7.27.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.27.6.tgz#a434ca7add514d4e646c80f7375c0aa2befc5535" + integrity sha512-ETyHEk2VHHvl9b9jZP5IHPavHYk57EhanlRRuae9XCpb/j5bDCbPPMOBfCWhnl/7EDJz0jEMCi/RhccCE8r1+Q== dependencies: "@babel/helper-string-parser" "^7.27.1" "@babel/helper-validator-identifier" "^7.27.1" @@ -700,9 +700,9 @@ "@types/json-schema" "*" "@types/estree@*", "@types/estree@^1.0.6": - version "1.0.7" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.7.tgz#4158d3105276773d5b7695cd4834b1722e4f37a8" - integrity sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ== + version "1.0.8" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.8.tgz#958b91c991b1867ced318bedea0e215ee050726e" + integrity sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w== "@types/graceful-fs@^4.1.3": version "4.1.9" @@ -761,11 +761,11 @@ form-data "^4.0.0" "@types/node@*": - version "22.15.21" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.15.21.tgz#196ef14fe20d87f7caf1e7b39832767f9a995b77" - integrity sha512-EV/37Td6c+MgKAbkcLG6vqZ2zEYHD7bvSrzqqs2RIhbA6w3x+Dqz8MZM3sP6kGTeLrdoOgKZe+Xja7tUB2DNkQ== + version "24.0.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-24.0.3.tgz#f935910f3eece3a3a2f8be86b96ba833dc286cab" + integrity sha512-R4I/kzCYAdRLzfiCabn9hxWfbuHS573x+r0dJMkkzThEa7pbrcDWK+9zu3e7aBOouf+rQAciqPFMnxwr0aWgKg== dependencies: - undici-types "~6.21.0" + undici-types "~7.8.0" "@types/node@^14.14.30": version "14.18.63" @@ -773,9 +773,9 @@ integrity sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ== "@types/node@^18.19.70": - version "18.19.103" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.103.tgz#9bbd31a54e240fc469cca409d7507ebc77536458" - integrity sha512-hHTHp+sEz6SxFsp+SA+Tqrua3AbmlAw+Y//aEwdHrdZkYVRWdvWD3y5uPZ0flYOkgskaFWqZ/YGFm3FaFQ0pRw== + version "18.19.112" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.112.tgz#cd2aee9c075402e0e1942a44101428881dbeb110" + integrity sha512-i+Vukt9POdS/MBI7YrrkkI5fMfwFtOjphSmt4WXYLfwqsfr6z/HdCx7LqT9M7JktGob8WNgj8nFB4TbGNE4Cog== dependencies: undici-types "~5.26.4" @@ -785,9 +785,9 @@ integrity sha512-eOunJqu0K1923aExK6y8p6fsihYEn/BYuQ4g0CxAAgFc4b/ZLN4CrsRZ55srTdqoiLzU2B2evC+apEIxprEzkQ== "@types/readable-stream@^4.0.18": - version "4.0.19" - resolved "https://registry.yarnpkg.com/@types/readable-stream/-/readable-stream-4.0.19.tgz#e2392f17a9e11aca6e6b21b537aa13bc96a57e46" - integrity sha512-6Tgd3lMocKwOul/kwAAgSebkhdMCLhRvcJ6CKHA6wdql2qNIwK6hw3Y4PZQxn9HcJogoC/1ZOmkFM7OZKH/VrA== + version "4.0.21" + resolved "https://registry.yarnpkg.com/@types/readable-stream/-/readable-stream-4.0.21.tgz#716558454a5e0c3c0651520f8154efc3288f59cb" + integrity sha512-19eKVv9tugr03IgfXlA9UVUVRbW6IuqRO5B92Dl4a6pT7K8uaGrNS0GkxiZD0BOk6PLuXl5FhWl//eX/pzYdTQ== dependencies: "@types/node" "*" @@ -977,9 +977,9 @@ acorn-walk@^8.0.2: acorn "^8.11.0" acorn@^8.1.0, acorn@^8.11.0, acorn@^8.14.0, acorn@^8.8.1: - version "8.14.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.1.tgz#721d5dc10f7d5b5609a891773d47731796935dfb" - integrity sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg== + version "8.15.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.15.0.tgz#a360898bc415edaac46c8241f6383975b930b816" + integrity sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg== agent-base@6: version "6.0.2" @@ -1062,9 +1062,9 @@ asynckit@^0.4.0: integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== axios@^1.8.4: - version "1.9.0" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.9.0.tgz#25534e3b72b54540077d33046f77e3b8d7081901" - integrity sha512-re4CqKTJaURpzbLHtIi6XpDv20/CnpXOtjRY5/CU32L8gU8ek9UIivcfvSWvmKEngmVbrUtPpdDwWDWL7DNHvg== + version "1.10.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.10.0.tgz#af320aee8632eaf2a400b6a1979fa75856f38d54" + integrity sha512-/1xYAC4MP/HEG+3duIhFr4ZQXR4sQXOIe+o6sdqzeykGLx6Upp/1p8MHqhINOvGeP7xyNHe7tsiJByc4SSVUxw== dependencies: follow-redirects "^1.15.6" form-data "^4.0.0" @@ -1144,17 +1144,17 @@ base64-js@^1.3.1: integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + version "1.1.12" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.12.tgz#ab9b454466e5a8cc3a187beaad580412a9c5b843" + integrity sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg== dependencies: balanced-match "^1.0.0" concat-map "0.0.1" brace-expansion@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" - integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + version "2.0.2" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.2.tgz#54fc53237a613d854c7bd37463aad17df87214e7" + integrity sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ== dependencies: balanced-match "^1.0.0" @@ -1166,12 +1166,12 @@ braces@^3.0.3: fill-range "^7.1.1" browserslist@^4.24.0: - version "4.24.5" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.24.5.tgz#aa0f5b8560fe81fde84c6dcb38f759bafba0e11b" - integrity sha512-FDToo4Wo82hIdgc1CQ+NQD0hEhmpPjrZ3hiUgwgOG6IuTdlpr8jdjyG24P6cNP1yJpTLzS5OcGgSw0xmDU1/Tw== + version "4.25.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.25.0.tgz#986aa9c6d87916885da2b50d8eb577ac8d133b2c" + integrity sha512-PJ8gYKeS5e/whHBh8xrwYK+dAvEj7JXtz6uTucnMRB8OiGTsKccFekoRrjajPBHV8oOY+2tI4uxeceSimKwMFA== dependencies: - caniuse-lite "^1.0.30001716" - electron-to-chromium "^1.5.149" + caniuse-lite "^1.0.30001718" + electron-to-chromium "^1.5.160" node-releases "^2.0.19" update-browserslist-db "^1.1.3" @@ -1233,10 +1233,10 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001716: - version "1.0.30001718" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001718.tgz#dae13a9c80d517c30c6197515a96131c194d8f82" - integrity sha512-AflseV1ahcSunK53NfEs9gFWgOEmzr0f+kaMFA4xiLZlr9Hzt7HxcSpIFcnNCUkz6R6dWKa54rUz3HUmI3nVcw== +caniuse-lite@^1.0.30001718: + version "1.0.30001723" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001723.tgz#c4f3174f02089720736e1887eab345e09bb10944" + integrity sha512-1R/elMjtehrFejxwmexeXAtae5UO9iSyFn6G/I806CYC/BLyyBk1EPhrKBkWhy6wM6Xnm47dSJQec+tLJ39WHw== chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0: version "4.1.2" @@ -1437,10 +1437,10 @@ ejs@^3.1.10: dependencies: jake "^10.8.5" -electron-to-chromium@^1.5.149: - version "1.5.155" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.155.tgz#809dd0ae9ae1db87c358e0c0c17c09a2ffc432d1" - integrity sha512-ps5KcGGmwL8VaeJlvlDlu4fORQpv3+GIcF5I3f9tUKUlJ/wsysh6HU8P5L1XWRYeXfA0oJd4PyM8ds8zTFf6Ng== +electron-to-chromium@^1.5.160: + version "1.5.169" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.169.tgz#6afdfd8e701b7ab744e2bb0cfdec3cefc1072cbe" + integrity sha512-q7SQx6mkLy0GTJK9K9OiWeaBMV4XQtBSdf6MJUzDB/H/5tFXfIiX38Lci1Kl6SsgiEhz1SQI1ejEOU5asWEhwQ== emittery@^0.13.1: version "0.13.1" @@ -1461,9 +1461,9 @@ enhanced-resolve@^5.0.0, enhanced-resolve@^5.17.1: tapable "^2.2.0" entities@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-6.0.0.tgz#09c9e29cb79b0a6459a9b9db9efb418ac5bb8e51" - integrity sha512-aKstq2TDOndCn4diEyp9Uq/Flu2i1GlLkc6XIDQSDMuaFE3OPW5OphLCyQ5SpSJZTb4reN+kTcYru5yIfXoRPw== + version "6.0.1" + resolved "https://registry.yarnpkg.com/entities/-/entities-6.0.1.tgz#c28c34a43379ca7f61d074130b2f5f7020a30694" + integrity sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g== error-ex@^1.3.1: version "1.3.2" @@ -1651,18 +1651,19 @@ follow-redirects@^1.15.6: integrity sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ== form-data-encoder@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/form-data-encoder/-/form-data-encoder-4.0.2.tgz#dd286fd5f9049e8ded1d44ce427f5e29185c7c12" - integrity sha512-KQVhvhK8ZkWzxKxOr56CPulAhH3dobtuQ4+hNQ+HekH/Wp5gSOafqRAeTphQUJAIk0GBvHZgJ2ZGRWd5kphMuw== + version "4.1.0" + resolved "https://registry.yarnpkg.com/form-data-encoder/-/form-data-encoder-4.1.0.tgz#497cedc94810bd5d53b99b5d4f6c152d5cbc9db2" + integrity sha512-G6NsmEW15s0Uw9XnCg+33H3ViYRyiM0hMrMhhqQOR8NFc5GhYrI+6I3u7OTw7b91J2g8rtvMBZJDbcGb2YUniw== form-data@^4.0.0, form-data@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.2.tgz#35cabbdd30c3ce73deb2c42d3c8d3ed9ca51794c" - integrity sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w== + version "4.0.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.3.tgz#608b1b3f3e28be0fccf5901fc85fb3641e5cf0ae" + integrity sha512-qsITQPfmvMOSAdeyZ+12I1c+CKSstAFAwu+97zrnWAbIr5u8wfsExUzCesVLC8NgHuRUqNN4Zy6UPWUTRGslcA== dependencies: asynckit "^0.4.0" combined-stream "^1.0.8" es-set-tostringtag "^2.1.0" + hasown "^2.0.2" mime-types "^2.1.12" formdata-node@^6.0.3: @@ -2276,7 +2277,7 @@ jest-snapshot@^29.7.0: pretty-format "^29.7.0" semver "^7.5.3" -jest-util@^29.0.0, jest-util@^29.7.0: +jest-util@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc" integrity sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA== @@ -3061,9 +3062,9 @@ terser-webpack-plugin@^5.3.11: terser "^5.31.1" terser@^5.31.1: - version "5.39.2" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.39.2.tgz#5a1626030724a672e2e5b5c9cd9070308c20e8f9" - integrity sha512-yEPUmWve+VA78bI71BW70Dh0TuV4HHd+I5SHOAfS1+QBOmvmCiiffgjR8ryyEd3KIfvPGFqoADt8LdQ6XpXIvg== + version "5.43.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.43.0.tgz#f9cac3cc347020d6ffafdbaa3698a5257b7cb690" + integrity sha512-CqNNxKSGKSZCunSvwKLTs8u8sGGlp27sxNZ4quGh0QeNuyHM0JSEM/clM9Mf4zUp6J+tO2gUXhgXT2YMMkwfKQ== dependencies: "@jridgewell/source-map" "^0.3.3" acorn "^8.14.0" @@ -3119,14 +3120,13 @@ tr46@~0.0.3: integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== ts-jest@^29.1.1: - version "29.3.4" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.3.4.tgz#9354472aceae1d3867a80e8e02014ea5901aee41" - integrity sha512-Iqbrm8IXOmV+ggWHOTEbjwyCf2xZlUMv5npExksXohL+tk8va4Fjhb+X2+Rt9NBmgO7bJ8WpnMLOwih/DnMlFA== + version "29.4.0" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.4.0.tgz#bef0ee98d94c83670af7462a1617bf2367a83740" + integrity sha512-d423TJMnJGu80/eSgfQ5w/R+0zFJvdtTxwtF9KzFFunOpSeD+79lHJQIiAhluJoyGRbvj9NZJsl9WjCUo0ND7Q== dependencies: bs-logger "^0.2.6" ejs "^3.1.10" fast-json-stable-stringify "^2.1.0" - jest-util "^29.0.0" json5 "^2.2.3" lodash.memoize "^4.1.2" make-error "^1.3.6" @@ -3175,10 +3175,10 @@ undici-types@~5.26.4: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== -undici-types@~6.21.0: - version "6.21.0" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb" - integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ== +undici-types@~7.8.0: + version "7.8.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.8.0.tgz#de00b85b710c54122e44fbfd911f8d70174cd294" + integrity sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw== universalify@^0.2.0: version "0.2.0" @@ -3248,9 +3248,9 @@ webidl-conversions@^7.0.0: integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g== webpack-sources@^3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" - integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== + version "3.3.2" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.3.2.tgz#0ab55ab0b380ce53c45ca40cb7b33bab3149ea85" + integrity sha512-ykKKus8lqlgXX/1WjudpIEjqsafjOTcOJqxnAbMLAu/KCsDCJ6GBtvscewvTkrn24HsnvFwrSCbenFrhtcCsAA== webpack@^5.97.1: version "5.99.9"