diff --git a/.mock/definition/__package__.yml b/.mock/definition/__package__.yml index 919577d3..73458f1c 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 @@ -5223,8 +6119,7 @@ types: source: openapi: openapi/openapi.json CatalogObject: - discriminant: type - base-properties: {} + discriminated: false docs: >- The wrapper object for the catalog entries of a given object type. @@ -5251,25 +6146,25 @@ types: Catalog](https://developer.squareup.com/docs/catalog-api/design-a-catalog) guide. union: - ITEM: CatalogObjectItem - IMAGE: CatalogObjectImage - CATEGORY: CatalogObjectCategory - ITEM_VARIATION: CatalogObjectItemVariation - TAX: CatalogObjectTax - DISCOUNT: CatalogObjectDiscount - MODIFIER_LIST: CatalogObjectModifierList - MODIFIER: CatalogObjectModifier - PRICING_RULE: CatalogObjectPricingRule - PRODUCT_SET: CatalogObjectProductSet - TIME_PERIOD: CatalogObjectTimePeriod - MEASUREMENT_UNIT: CatalogObjectMeasurementUnit - SUBSCRIPTION_PLAN_VARIATION: CatalogObjectSubscriptionPlanVariation - ITEM_OPTION: CatalogObjectItemOption - ITEM_OPTION_VAL: CatalogObjectItemOptionValue - CUSTOM_ATTRIBUTE_DEFINITION: CatalogObjectCustomAttributeDefinition - QUICK_AMOUNTS_SETTINGS: CatalogObjectQuickAmountsSettings - SUBSCRIPTION_PLAN: CatalogObjectSubscriptionPlan - AVAILABILITY_PERIOD: CatalogObjectAvailabilityPeriod + - CatalogObjectItem + - CatalogObjectImage + - CatalogObjectCategory + - CatalogObjectItemVariation + - CatalogObjectTax + - CatalogObjectDiscount + - CatalogObjectModifierList + - CatalogObjectModifier + - CatalogObjectPricingRule + - CatalogObjectProductSet + - CatalogObjectTimePeriod + - CatalogObjectMeasurementUnit + - CatalogObjectSubscriptionPlanVariation + - CatalogObjectItemOption + - CatalogObjectItemOptionValue + - CatalogObjectCustomAttributeDefinition + - CatalogObjectQuickAmountsSettings + - CatalogObjectSubscriptionPlan + - CatalogObjectAvailabilityPeriod source: openapi: openapi/openapi.json CatalogObjectBatch: @@ -5296,6 +6191,7 @@ types: ordinal: type: optional> docs: The order of the object within the context of the category. + type: literal<"CATEGORY"> category_data: type: optional docs: >- @@ -5410,145 +6306,12 @@ types: docs: Identifies the `CatalogImage` attached to this `CatalogObject`. source: openapi: openapi/openapi.json - CatalogObjectBase: - properties: - id: - type: string - docs: >- - An identifier to reference this object in the catalog. When a new - `CatalogObject` - - is inserted, the client should set the id to a temporary identifier - starting with - - a "`#`" character. Other objects being inserted or updated within the - same request - - may use this identifier to refer to the new object. - - - When the server receives the new object, it will supply a unique - identifier that - - replaces the temporary identifier for all future references. - validation: - minLength: 1 - updated_at: - type: optional - docs: >- - Last modification - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - in RFC 3339 format, e.g., `"2016-08-15T23:59:33.123Z"` + CatalogObjectReference: + docs: >- + A reference to a Catalog object at a specific version. In general this is - would indicate the UTC time (denoted by `Z`) of August 15, 2016 at - 23:59:33 and 123 milliseconds. - access: read-only - version: - type: optional - docs: >- - The version of the object. When updating an object, the version - supplied - - must match the version in the database, otherwise the write will be - rejected as conflicting. - is_deleted: - type: optional - docs: >- - If `true`, the object has been deleted from the database. Must be - `false` for new objects - - being inserted. When deleted, the `updated_at` field will equal the - deletion time. - custom_attribute_values: - type: optional> - docs: >- - A map (key-value pairs) of application-defined custom attribute - values. The value of a key-value pair - - is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) - object. The key is the `key` attribute - - value defined in the associated - [CatalogCustomAttributeDefinition](entity:CatalogCustomAttributeDefinition) - - object defined by the application making the request. - - - If the `CatalogCustomAttributeDefinition` object is - - defined by another application, the - `CatalogCustomAttributeDefinition`'s key attribute value is prefixed - by - - the defining application ID. For example, if the - `CatalogCustomAttributeDefinition` has a `key` attribute of - - `"cocoa_brand"` and the defining application ID is `"abcd1234"`, the - key in the map is `"abcd1234:cocoa_brand"` - - if the application making the request is different from the - application defining the custom attribute definition. - - Otherwise, the key used in the map is simply `"cocoa_brand"`. - - - Application-defined custom attributes are set at a global - (location-independent) level. - - Custom attribute values are intended to store additional information - about a catalog object - - or associations with an entity in another system. Do not use custom - attributes - - to store any sensitive information (personally identifiable - information, card details, etc.). - catalog_v1_ids: - type: optional> - docs: >- - The Connect v1 IDs for this object at each location where it is - present, where they - - differ from the object's Connect V2 ID. The field will only be present - for objects that - - have been created or modified by legacy APIs. - present_at_all_locations: - type: optional - docs: >- - If `true`, this object is present at all locations (including future - locations), except where specified in - - the `absent_at_location_ids` field. If `false`, this object is not - present at any locations (including future locations), - - except where specified in the `present_at_location_ids` field. If not - specified, defaults to `true`. - present_at_location_ids: - type: optional> - docs: >- - A list of locations where the object is present, even if - `present_at_all_locations` is `false`. - - This can include locations that are deactivated. - absent_at_location_ids: - type: optional> - docs: >- - A list of locations where the object is not present, even if - `present_at_all_locations` is `true`. - - This can include locations that are deactivated. - image_id: - type: optional - docs: Identifies the `CatalogImage` attached to this `CatalogObject`. - source: - openapi: openapi/openapi.json - CatalogObjectReference: - docs: >- - A reference to a Catalog object at a specific version. In general this is - - used as an entry point into a graph of catalog objects, where the objects - exist + used as an entry point into a graph of catalog objects, where the objects + exist at a specific version. properties: @@ -6437,6 +7200,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,6 +9271,35 @@ types: access: read-only source: openapi: openapi/openapi.json + CustomAttributeDefinitionEventData: + docs: |- + Represents an object in the CustomAttributeDefinition event notification + payload that contains the affected custom attribute definition. + properties: + type: + type: optional> + docs: >- + The type of the event data object. The value is + `"custom_attribute_definition"`. + validation: + maxLength: 50 + id: + type: optional + docs: The ID of the event data object. + validation: + maxLength: 192 + object: + type: optional + docs: An object containing the custom attribute definition. + source: + openapi: openapi/openapi.json + CustomAttributeDefinitionEventDataObject: + properties: + custom_attribute_definition: + type: optional + docs: The custom attribute definition. + source: + openapi: openapi/openapi.json CustomAttributeDefinitionVisibility: enum: - VISIBILITY_HIDDEN @@ -8476,6 +9316,30 @@ types: 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 +9551,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,2262 +9693,2140 @@ 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). + is created by the subscribing application. + + + This event is replaced by + + [customer.custom_attribute_definition.owned.created](webhook:customer.custom_attribute_definition.owned.created). properties: - key: - type: string + merchant_id: + type: optional> 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 + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> docs: >- - A filter that corresponds to the data type of the target custom - attribute. For example, provide the `phone` filter to + 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 + CustomerCustomAttributeDefinitionCreatedPublicEvent: + docs: >- + Published when a customer [custom attribute + definition](entity:CustomAttributeDefinition) - search based on the value of a `PhoneNumber`-type custom attribute. - The data type is specified by the schema field of the custom attribute - definition, - - which can be retrieved using the [Customer Custom Attributes - API](api:CustomerCustomAttributes). + 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`. - You must provide this `filter` field, the `updated_at` field, or both. - updated_at: - type: optional - docs: >- - The date range for when the custom attribute was last updated. The - date range can include `start_at`, `end_at`, or - both. Range boundaries are inclusive. Dates are specified as RFC 3339 - timestamps. + This event is replaced by + [customer.custom_attribute_definition.visible.created](webhook:customer.custom_attribute_definition.visible.created), - You must provide this `updated_at` field, the `filter` field, or both. + which applies to custom attribute definitions that are visible to the + subscribing application. + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"customer.custom_attribute_definition.public.created"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. source: openapi: openapi/openapi.json - CustomerCustomAttributeFilterValue: + CustomerCustomAttributeDefinitionDeletedEvent: docs: >- - A type-specific filter used in a [custom attribute - filter](entity:CustomerCustomAttributeFilter) to search based on the - value - - of a customer-related [custom attribute](entity:CustomAttribute). - properties: - email: - type: optional - docs: >- - A filter for a query based on the value of an `Email`-type custom - attribute. This filter is case-insensitive and can - - include `exact` or `fuzzy`, but not both. - - - For an `exact` match, provide the complete email address. + 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 - For a `fuzzy` match, provide a query expression containing one or more - query tokens to match against the email address. Square removes + the application that created it. - any punctuation (including periods (.), underscores (_), and the @ - symbol) and tokenizes the email addresses on spaces. A match is found - if a tokenized email address contains all the tokens in the search - query, irrespective of the token order. For example, `Steven gmail` + This event is replaced by - matches steven.jones@gmail.com and mygmail@stevensbakery.com. - phone: - 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 `PhoneNumber`-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 phone number. This is - always an E.164-compliant phone number that starts + attribute definition whose `visibility` is `VISIBILITY_READ_ONLY` or + `VISIBILITY_READ_WRITE_VALUES`. - with the + sign followed by the country code and subscriber number. - For example, the format for a US phone number is +12061112222. + This event is replaced by - For a `fuzzy` match, provide a query expression containing one or more - query tokens to match against the phone number. + [customer.custom_attribute_definition.visible.deleted](webhook:customer.custom_attribute_definition.visible.deleted), - Square removes any punctuation and tokenizes the expression on spaces. - A match is found if a tokenized phone number contains + which applies to custom attribute definitions that are visible to the + subscribing application. + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"customer.custom_attribute_definition.public.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + CustomerCustomAttributeDefinitionOwnedCreatedEvent: + docs: >- + Published when a customer [custom attribute + definition](entity:CustomAttributeDefinition) - all the tokens in the search query, irrespective of the token order. - For example, `415 123 45` is tokenized to `415`, `123`, and `45`, + is created by the subscribing application. + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"customer.custom_attribute_definition.owned.created"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + CustomerCustomAttributeDefinitionOwnedDeletedEvent: + docs: >- + Published when a customer [custom attribute + definition](entity:CustomAttributeDefinition) - which matches +14151234567 and +12345674158, but does not match - +1234156780. Similarly, the expression `415` matches + created by the subscribing application is deleted. A custom attribute + definition can only be deleted by - +14151234567, +12345674158, and +1234156780. - text: - type: optional + the application that created it. + 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 + 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 + CustomerCustomAttributeDefinitionOwnedUpdatedEvent: + docs: >- + Published when a customer [custom attribute + definition](entity:CustomAttributeDefinition) - can include `exact` or `fuzzy`, but not both. + created by the subscribing application is updated. A custom attribute + definition can only be updated by + the application that created it. + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"customer.custom_attribute_definition.owned.updated"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + CustomerCustomAttributeDefinitionUpdatedEvent: + docs: >- + Published when a customer [custom attribute + definition](entity:CustomAttributeDefinition) - For an `exact` match, provide the complete string. + created by the subscribing application is updated. A custom attribute + definition can only be updated by + the application that created it. - For a `fuzzy` match, provide a query expression containing one or more - query tokens in any order that contain complete words - to match against the string. Square tokenizes the expression using a - grammar-based tokenizer. For example, the expressions `quick brown`, + This event is replaced by - `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 + [customer.custom_attribute_definition.owned.updated](webhook:customer.custom_attribute_definition.owned.updated). + 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 + 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) - and can contain `any`, `all`, or both. The `none` condition is not - supported. + 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`. - 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 + This event is replaced by - and then check the `schema.items.names` field. For more information, - see + [customer.custom_attribute_definition.visible.updated](webhook:customer.custom_attribute_definition.visible.updated), - [Search based on - selection](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#custom-attribute-value-filter-selection). + 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) + that is visible to the subscribing application is created. A notification + is sent when your application - Note that when a `Selection`-type custom attribute is assigned to a - customer profile, the custom attribute value is a list of one + creates a custom attribute definition or another application creates a + custom attribute definition whose - 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 + `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. + properties: + merchant_id: + type: optional> docs: >- - A filter for a query based on the value of a `Date`-type custom - attribute. + 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) + that is visible to the subscribing application is deleted. A custom + attribute definition can only be deleted - Provide a date range for this filter using `start_at`, `end_at`, or - both. Range boundaries are inclusive. Dates can be specified + by the application that created it. A notification is sent when your + application deletes a custom attribute - in `YYYY-MM-DD` format or as RFC 3339 timestamps. - 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 for a query based on the value of a `Number`-type custom - attribute, which can be an integer or a decimal with up to + 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) - 5 digits of precision. + 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 - Provide a numerical range for this filter using `start_at`, `end_at`, - or both. Range boundaries are inclusive. Numbers are specified + attribute definition or when another application updates a custom + attribute definition whose `visibility` is - as decimals or integers. The absolute value of range boundaries must - not exceed `(2^63-1)/10^5`, or 92233720368547. - boolean: - type: optional> + `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. + properties: + merchant_id: + type: optional> docs: >- - A filter for a query based on the value of a `Boolean`-type custom - attribute. - address: - 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 an `Address`-type custom - attribute. The filter can include `postal_code`, `country`, or both. + 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 - CustomerCustomAttributeFilters: + CustomerCustomAttributeDeletedEvent: docs: >- - The custom attribute filters in a set of [customer - filters](entity:CustomerFilter) used in a search query. Use this filter + Published when a customer [custom attribute](entity:CustomAttribute) owned + by the - to search based on [custom attributes](entity:CustomAttribute) that are - assigned to customer profiles. For more information, see + subscribing application is deleted. Custom attributes are owned by the + application that created the - [Search by custom - attribute](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-custom-attribute). + corresponding [custom attribute + definition](entity:CustomAttributeDefinition). Custom attributes whose + + `visibility` is `VISIBILITY_READ_WRITE_VALUES` can be deleted by any + application. + + + This event is replaced by + + [customer.custom_attribute.owned.deleted](webhook:customer.custom_attribute.owned.deleted). properties: - 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.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 - CustomerDetails: - docs: Details about the customer making the payment. + CustomerCustomAttributeDeletedPublicEvent: + docs: >- + Published when a customer [custom attribute](entity:CustomAttribute) that + is visible + + to all applications is deleted. A notification is sent when any + application deletes a custom attribute + + whose `visibility` is `VISIBILITY_READ_ONLY` or + `VISIBILITY_READ_WRITE_VALUES`. + + + This event is replaced by + + [customer.custom_attribute.visible.deleted](webhook:customer.custom_attribute.visible.deleted), + + which applies to custom attributes that are visible to the subscribing + application. properties: - 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.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 - CustomerFilter: + CustomerCustomAttributeFilter: docs: >- - Represents the filtering criteria in a [search - query](entity:CustomerQuery) that defines how to filter + The custom attribute filter. Use this filter in a set of [custom attribute + filters](entity:CustomerCustomAttributeFilters) to search - customer profiles returned in - [SearchCustomers](api-endpoint:Customers-SearchCustomers) results. + based on the value or last updated date of a customer-related [custom + attribute](entity:CustomAttribute). 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 + key: + type: string 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 `key` of the [custom attribute](entity:CustomAttribute) to filter + by. The key is the identifier of the custom attribute - visible to the seller. + (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 - This filter is case-insensitive. + search based on the value of a `PhoneNumber`-type custom attribute. + The data type is specified by the schema field of the custom attribute + definition, + which can be retrieved using the [Customer Custom Attributes + API](api:CustomerCustomAttributes). - 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 + 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 - whose `email_address` field value are identical to the email address - provided + both. Range boundaries are inclusive. Dates are specified as RFC 3339 + timestamps. - in the query. + 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 - For [fuzzy - matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#fuzzy-search-by-email-address), + 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 - this filter causes the search to return customer profiles + include `exact` or `fuzzy`, but not both. - 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 + For an `exact` match, provide the complete email address. - query, the search returns customers whose email address is - `steven.johnson@gmail.com` - or `mygmail@stevensbakery.com`. Square removes any punctuation - (including periods (.), + For a `fuzzy` match, provide a query expression containing one or more + query tokens to match against the email address. Square removes - underscores (_), and the @ symbol) and tokenizes the email addresses - on spaces. A match is + any punctuation (including periods (.), underscores (_), and the @ + symbol) and tokenizes the email addresses on spaces. A match is found - found if a tokenized email address contains all the tokens in the - search query, + if a tokenized email address contains all the tokens in the search + query, irrespective of the token order. For example, `Steven gmail` - irrespective of the token order. - phone_number: + matches steven.jones@gmail.com and mygmail@stevensbakery.com. + phone: 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) + A filter for a query based on the value of a `PhoneNumber`-type custom + attribute. This filter is case-insensitive and - visible to the seller. + can include `exact` or `fuzzy`, but not both. - For [exact - matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#exact-search-by-phone-number), + For an `exact` match, provide the complete phone number. This is + always an E.164-compliant phone number that starts - this filter returns customers whose phone number matches the specified - query expression. The number in the query must be of an + with the + sign followed by the country code and subscriber number. + For example, the format for a US phone number is +12061112222. - 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`. + For a `fuzzy` match, provide a query expression containing one or more + query tokens to match against the phone number. - To match the query expression, stored customer phone numbers are - converted to the standard E.164 form. + 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`, - For [fuzzy - matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#fuzzy-search-by-phone-number), + which matches +14151234567 and +12345674158, but does not match + +1234156780. Similarly, the expression `415` matches - this filter returns customers whose phone number matches the token or - tokens provided in the query expression. For example, with `415` + +14151234567, +12345674158, and +1234156780. + text: + type: optional + docs: >- + A filter for a query based on the value of a `String`-type custom + attribute. This filter is case-insensitive and - 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`. + can include `exact` or `fuzzy`, but not both. - 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). + For an `exact` match, provide the complete string. - This filter is case-insensitive. + For a `fuzzy` match, provide a query expression containing one or more + query tokens in any order that contain complete words - [Exact - matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#exact-search-by-reference-id) + to match against the string. Square tokenizes the expression using a + grammar-based tokenizer. For example, the expressions `quick brown`, - of a customer's reference ID against a query's reference ID is - evaluated as an + `brown quick`, and `quick fox` match "The quick brown fox jumps over + the lazy dog". However, `quick foxes` and `qui` do not match. + selection: + type: optional + docs: >- + A filter for a query based on the display name for a `Selection`-type + custom attribute value. This filter is case-sensitive - exact match between two strings, character by character in the given - order. + and can contain `any`, `all`, or both. The `none` condition is not + supported. - [Fuzzy - matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#fuzzy-search-by-reference-id) + Provide the display name of each item that you want to search for. To + find the display names for the selection, use the - of stored reference IDs against queried reference IDs works + [Customer Custom Attributes API](api:CustomerCustomAttributes) to + retrieve the corresponding custom attribute definition - exactly the same as fuzzy matching on email addresses. - Non-alphanumeric characters + and then check the `schema.items.names` field. For more information, + see - are replaced by spaces to tokenize stored and queried reference IDs. A - match is found + [Search based on + selection](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#custom-attribute-value-filter-selection). - 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` + Note that when a `Selection`-type custom attribute is assigned to a + customer profile, the custom attribute value is a list of one - and `NYC_27_MURRAY`. - group_ids: - type: optional + 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 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": { + A filter for a query based on the value of a `Date`-type custom + attribute. - "any": ["{group_a_id}", "{group_b_id}", ...], - "all": ["{group_1_id}", "{group_2_id}", ...], + Provide a date range for this filter using `start_at`, `end_at`, or + both. Range boundaries are inclusive. Dates can be specified - "none": ["{group_i_id}", "{group_ii_id}", ...] + in `YYYY-MM-DD` format or as RFC 3339 timestamps. + number: + type: optional + docs: >- + A filter for a query based on the value of a `Number`-type custom + attribute, which can be an integer or a decimal with up to - } + 5 digits of precision. - ``` + Provide a numerical range for this filter using `start_at`, `end_at`, + or both. Range boundaries are inclusive. Numbers are specified - You can use any combination of the `any`, `all`, and `none` fields in - the filter. + as decimals or integers. The absolute value of range boundaries must + not exceed `(2^63-1)/10^5`, or 92233720368547. + boolean: + type: optional> + docs: >- + A filter for a query based on the value of a `Boolean`-type custom + attribute. + address: + type: optional + docs: >- + A filter for a query based on the value of an `Address`-type custom + attribute. The filter can include `postal_code`, `country`, or both. + source: + openapi: openapi/openapi.json + CustomerCustomAttributeFilters: + docs: >- + The custom attribute filters in a set of [customer + filters](entity:CustomerFilter) used in a search query. Use this filter - With `any`, the search returns customers in groups `a` or `b` or any - other group specified in the list. + to search based on [custom attributes](entity:CustomAttribute) that are + assigned to customer profiles. For more information, see - With `all`, the search returns customers in groups `1` and `2` and all - other groups specified in the list. + [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, - With `none`, the search returns customers not in groups `i` or `ii` or - any other group specified in the list. + the `updated_at` field, or both. The provided keys must be unique + within the list of custom attribute filters. + source: + openapi: openapi/openapi.json + CustomerCustomAttributeOwnedDeletedEvent: + docs: >- + Published when a customer [custom attribute](entity:CustomAttribute) owned + by the + subscribing application is deleted. Custom attributes are owned by the + application that created the - If any of the search conditions are not met, including when an invalid - or non-existent group ID is provided, + corresponding [custom attribute + definition](entity:CustomAttributeDefinition). Custom attributes whose - the result is an empty object (`{}`). - custom_attribute: - type: optional + `visibility` is `VISIBILITY_READ_WRITE_VALUES` can be deleted by any + application. + properties: + merchant_id: + 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. + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"customer.custom_attribute.owned.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + CustomerCustomAttributeOwnedUpdatedEvent: + docs: >- + Published when a customer [custom attribute](entity:CustomAttribute) owned + by the + subscribing application is created or updated. Custom attributes are owned + by the application that created - To be valid for a search, the custom attributes must be visible to the - requesting application. For more information, including example - queries, + the corresponding [custom attribute + definition](entity:CustomAttributeDefinition). Custom attributes whose - see [Search by custom - attribute](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-custom-attribute). + `visibility` is `VISIBILITY_READ_WRITE_VALUES` can be created or updated + by any application. + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"customer.custom_attribute.owned.updated"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + CustomerCustomAttributeUpdatedEvent: + docs: >- + Published when a customer [custom attribute](entity:CustomAttribute) owned + by the + subscribing application is created or updated. Custom attributes are owned + by the application that created - Square returns matching customer profiles, which do not contain custom - attributes. To retrieve customer-related custom attributes, + the corresponding [custom attribute + definition](entity:CustomAttributeDefinition). Custom attributes whose - use the [Customer Custom Attributes - API](api:CustomerCustomAttributes). For example, you can call + `visibility` is `VISIBILITY_READ_WRITE_VALUES` can be created or updated + by any application. - [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. + This event is replaced by - You can provide up to three segment IDs in the filter, using any - combination of the `all`, `any`, and `none` fields. + [customer.custom_attribute.owned.updated](webhook:customer.custom_attribute.owned.updated). + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"customer.custom_attribute.updated"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + CustomerCustomAttributeUpdatedPublicEvent: + docs: >- + Published when a customer [custom attribute](entity:CustomAttribute) that + is visible - For the following example, the results include customers who belong to - both segment A and segment B but do not belong to segment C. + 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`. - ``` - "segment_ids": { + This event is replaced by - "all": ["{segment_A_id}", "{segment_B_id}"], + [customer.custom_attribute.visible.updated](webhook:customer.custom_attribute.visible.updated), - "none": ["{segment_C_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.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 + CustomerCustomAttributeVisibleDeletedEvent: + docs: >- + Published when a customer [custom attribute](entity:CustomAttribute) that + is visible to the - } + subscribing application is deleted. A notification is sent when: - ``` + - Your application deletes a custom attribute owned by your application, + regardless of the `visibility` setting. + - Any application deletes a custom attribute whose `visibility` is + `VISIBILITY_READ_ONLY` - If an invalid or non-existent segment ID is provided in the filter, - Square stops processing the request + or `VISIBILITY_READ_WRITE_VALUES`. - 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. + Custom attributes set to `VISIBILITY_READ_WRITE_VALUES` can be deleted by + any application, but those set to - Customer groups can be created, be modified, and have their membership - defined using + `VISIBILITY_READ_ONLY` or `VISIBILITY_HIDDEN` can only be deleted by the + owner. Custom attributes are owned - the Customers API or within the Customer Directory in the Square Seller - Dashboard or Point of Sale. + by the application that created the corresponding [custom attribute + definition](entity:CustomAttributeDefinition). 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. + 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 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. + The timestamp that indicates when the event notification was created, + 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> + data: + 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. + The data associated with the event that triggered the event + notification. source: openapi: openapi/openapi.json - CustomerQuery: + CustomerCustomAttributeVisibleUpdatedEvent: 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. + Published when a customer [custom attribute](entity:CustomAttribute) that + is visible to the - Multiple filters are combined as `AND` statements. + 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. - __Note:__ Combining multiple filters as `OR` statements is not - supported. Instead, send multiple single-filter + - Any application creates or updates a custom attribute whose `visibility` + is `VISIBILITY_READ_ONLY` - 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. + or `VISIBILITY_READ_WRITE_VALUES`. - Segments (also known as Smart Groups) are defined and created within the - Customer Directory in the + Custom attributes set to `VISIBILITY_READ_WRITE_VALUES` can be created or + updated by any application, but those set to - Square Seller Dashboard or Point of Sale. + `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: - 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.visible.updated"`. + 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: + CustomerDeletedEvent: 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](entity:Customer) is deleted. For more + information, see [Use Customer + Webhooks](https://developer.squareup.com/docs/customers-api/use-the-api/customer-webhooks). - The default value is `DEFAULT`. - - See [CustomerSortField](#type-customersortfield) for possible values - order: - type: optional + The `customer` object in the event notification does not include the + following fields: `group_ids` and `segment_ids`. + properties: + merchant_id: + type: optional> + docs: The ID of the seller associated with the event. + type: + type: optional> + docs: The type of event. For this object, the value is `customer.deleted`. + event_id: + type: optional> docs: >- - 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. + 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 - 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). + CustomerDeletedEventData: + docs: The data associated with the event. properties: - eu_vat: + type: type: optional> docs: >- - The EU VAT identification number for the customer. For example, - `IE3426675K`. The ID can contain alphanumeric characters only. + The type of object affected by the event. For this event, the value is + `customer`. validation: - maxLength: 20 + 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 - CustomerTextFilter: + CustomerDeletedEventEventContext: + docs: Information about the change that triggered the event. + properties: + merge: + type: optional + docs: Information about the merge operation associated with the event. + source: + openapi: openapi/openapi.json + CustomerDeletedEventEventContextMerge: 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. + Information about a merge operation, which creates a new customer using + aggregated properties from two or more existing customers. properties: - exact: - type: optional> - docs: >- - Use the exact filter to select customers whose attributes match - exactly the specified query. - fuzzy: + from_customer_ids: + type: optional>> + docs: The IDs of the existing customers that were merged and then deleted. + to_customer_id: 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. + docs: The ID of the new customer created by the merge. source: openapi: openapi/openapi.json - DataCollectionOptions: + CustomerDeletedEventObject: + docs: An object that contains the customer associated with the event. 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 + customer: + type: optional + docs: The deleted customer. + event_context: + 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. + 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 - DateRange: - docs: |- - A range defined by two dates. Used for filtering a query for Connect v2 - objects that have date properties. + CustomerDetails: + docs: Details about the customer making the payment. properties: - start_date: - type: optional> + customer_initiated: + type: optional> + docs: Indicates whether the customer initiated the payment. + seller_keyed_in: + type: optional> docs: >- - A string in `YYYY-MM-DD` format, such as `2017-10-31`, per the ISO - 8601 - - extended format for calendar dates. + Indicates that the seller keyed in payment details on behalf of the + customer. - 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. + This is used to flag a payment as Mail Order / Telephone Order (MOTO). source: openapi: openapi/openapi.json - DeleteBookingCustomAttributeDefinitionResponse: + CustomerFilter: docs: >- - Represents a - [DeleteBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-DeleteBookingCustomAttributeDefinition) - response + Represents the filtering criteria in a [search + query](entity:CustomerQuery) that defines how to filter - containing error messages when errors occurred during the request. The - successful response does not contain any payload. + customer profiles returned in + [SearchCustomers](api-endpoint:Customers-SearchCustomers) results. 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. + 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) - 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 + visible to the seller. - 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. + This filter is case-insensitive. - 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) + For [exact + matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#exact-search-by-email-address), + this - 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) + filter causes the search to return customer profiles - 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. + whose `email_address` field value are identical to the email address + provided - 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 + in the query. - 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. + For [fuzzy + matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#fuzzy-search-by-email-address), - 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 + this filter causes the search to return customer profiles - 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 + whose `email_address` field value has a token-wise partial match + against the filtering - `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) + expression in the query. For example, with `Steven gmail` provided in + a search - 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 + query, the search returns customers whose email address is + `steven.johnson@gmail.com` - `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 + or `mygmail@stevensbakery.com`. Square removes any punctuation + (including periods (.), - 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 + underscores (_), and the @ symbol) and tokenizes the email addresses + on spaces. A match is - `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 + found if a tokenized email address contains all the tokens in the + search query, + + irrespective of the token order. + phone_number: + type: optional docs: >- - The type of external refund the seller paid to the buyer. It can be - one of the + 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) - following: + visible to the seller. - - CHECK - Refunded using a physical check. - - BANK_TRANSFER - Refunded using external bank transfer. + For [exact + matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#exact-search-by-phone-number), - - OTHER\_GIFT\_CARD - Refunded using a non-Square gift card. + this filter returns customers whose phone number matches the specified + query expression. The number in the query must be of an - - CRYPTO - Refunded using a crypto currency. + E.164-compliant form. In particular, it must include the leading `+` + sign followed by a country code and then a subscriber number. - - SQUARE_CASH - Refunded using Square Cash App. + 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`. - - SOCIAL - Refunded using peer-to-peer payment applications. + To match the query expression, stored customer phone numbers are + converted to the standard E.164 form. - - EXTERNAL - A third-party application gathered this refund outside of - Square. - - EMONEY - Refunded using an E-money provider. + For [fuzzy + matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#fuzzy-search-by-phone-number), - - CARD - A credit or debit card that Square does not support. + this filter returns customers whose phone number matches the token or + tokens provided in the query expression. For example, with `415` - - STORED_BALANCE - Use for house accounts, store credit, and so forth. + 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`. - - FOOD_VOUCHER - Restaurant voucher provided by employers to employees - to pay for meals + Similarly, a search query of `415 123` returns customers with the + phone numbers `+1-212-415-1234` and `+1 (551) 234-1567` but not - - 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 + `+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 synthetic identifier for the device. The identifier includes a - standardized prefix and + 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). - 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 filter is case-insensitive. - 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`. + [Exact + matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#exact-search-by-reference-id) - A list of `DeviceCode` objects can be retrieved from the - /v2/devices/codes endpoint. + of a customer's reference ID against a query's reference ID is + evaluated as an - 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> + 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: >- - Indicates that signature collection is desired during checkout. - Defaults to false. - tip_settings: - type: optional - docs: Tip-specific settings. - show_itemized_cart: - type: optional> + 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: >- - Show the itemization screen prior to taking a payment. This field is - only meaningful when the + A filter to select customers based on one or more custom attributes. - checkout includes an order ID. Defaults to true. + 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 - DeviceCode: + 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: 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. + docs: A unique Square-generated ID for the customer group. 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. + maxLength: 255 access: read-only + name: + type: string + docs: The name of the customer group. created_at: type: optional - docs: When this DeviceCode was created. Timestamp in RFC 3339 format. + docs: The timestamp when the customer group was created, in RFC 3339 format. access: read-only - status_changed_at: + updated_at: type: optional docs: >- - When this DeviceCode's status was last changed. Timestamp in RFC 3339 + The timestamp when the customer group was last updated, 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 - DeviceCodeStatus: + CustomerInclusionExclusion: enum: - - UNKNOWN - - UNPAIRED - - PAIRED - - EXPIRED - docs: DeviceCode.Status 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 - DeviceComponentDetailsApplicationDetails: + CustomerPreferences: + docs: Represents communication preferences for the customer profile. 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. + 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 - DeviceComponentDetailsBatteryDetails: + CustomerQuery: + docs: >- + Represents filtering and sorting criteria for a + [SearchCustomers](api-endpoint:Customers-SearchCustomers) request. properties: - visible_percent: - type: optional> - docs: The battery charge percentage as displayed on the device. - external_power: - type: optional + 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: |- - The status of external_power. - See [ExternalPower](#type-externalpower) for possible values + Sorting criteria for query results. The default behavior is to sort + customers alphabetically by `given_name` and `family_name`. source: openapi: openapi/openapi.json - DeviceComponentDetailsCardReaderDetails: + 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: - version: + id: type: optional - docs: The version of the card reader. + 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 - DeviceComponentDetailsEthernetDetails: + 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: - active: - type: optional> + field: + 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. + 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 - DeviceComponentDetailsExternalPower: + CustomerSortField: enum: - - AVAILABLE_CHARGING - - AVAILABLE_NOT_IN_USE - - UNAVAILABLE - - AVAILABLE_INSUFFICIENT - docs: An enum for ExternalPower. + - DEFAULT + - CREATED_AT + docs: >- + Specifies customer attributes as the sort key to customer profiles + returned from a search. source: openapi: openapi/openapi.json - DeviceComponentDetailsMeasurement: - docs: A value qualified by unit of measure. + 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: - value: optional> + 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 - DeviceComponentDetailsWiFiDetails: + 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: - 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: + exact: type: optional> - docs: The string representation of the device’s IPv4 address. - secure_connection: + docs: >- + Use the exact filter to select customers whose attributes match + exactly the specified query. + fuzzy: type: optional> docs: >- - The security protocol for a secure connection (e.g. WPA2). None - provided if the connection + Use the fuzzy filter to select customers whose attributes match the + specified query - is unsecured. - signal_strength: - type: optional - docs: A representation of signal strength of the WIFI network connection. + 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 - DeviceDetails: - docs: Details about the device that took the payment. + 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: - device_id: + merchant_id: type: optional> - docs: The Square-issued ID of the device. - validation: - maxLength: 255 - device_installation_id: + docs: The ID of the seller associated with the event. + type: type: optional> - docs: The Square-issued installation ID for the device. - validation: - maxLength: 255 - device_name: + docs: The type of event. For this object, the value is `customer.updated`. + event_id: type: optional> - docs: The name of the device set by the seller. - validation: - maxLength: 255 + 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 - DeviceMetadata: + CustomerUpdatedEventData: + docs: The data associated with the event. 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: 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. + 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 - DeviceStatus: + CustomerUpdatedEventObject: + docs: An object that contains the customer associated with the event. properties: - category: - type: optional - docs: |- + 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 - See [Category](#type-category) for possible values + 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 - DeviceStatusCategory: + DataCollectionOptionsInputType: enum: - - AVAILABLE - - NEEDS_ATTENTION - - OFFLINE + - EMAIL + - PHONE_NUMBER + docs: Describes the input type of the data. source: openapi: openapi/openapi.json - DigitalWalletDetails: - docs: >- - Additional details about `WALLET` type payments. Contains only - non-confidential information. + DateRange: + docs: |- + A range defined by two dates. Used for filtering a query for Connect v2 + objects that have date properties. properties: - status: + start_date: type: optional> docs: >- - The status of the `WALLET` payment. The status can be `AUTHORIZED`, - `CAPTURED`, `VOIDED`, or + A string in `YYYY-MM-DD` format, such as `2017-10-31`, per the ISO + 8601 - `FAILED`. - validation: - maxLength: 50 - brand: + extended format for calendar dates. + + The beginning of a date range (inclusive). + end_date: type: optional> docs: >- - The brand used for the `WALLET` payment. The brand can be `CASH_APP`, - `PAYPAY`, `ALIPAY`, + A string in `YYYY-MM-DD` format, such as `2017-10-31`, per the ISO + 8601 - `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`. + extended format for calendar dates. + + The end of a date range (inclusive). source: openapi: openapi/openapi.json - DisableCardResponse: + DayOfWeek: + enum: + - SUN + - MON + - TUE + - WED + - THU + - FRI + - SAT + docs: Indicates the specific day of the week. + source: + openapi: openapi/openapi.json + DeleteBookingCustomAttributeDefinitionResponse: docs: >- - Defines the fields that are included in the response body of - - a request to the [DisableCard](api-endpoint:Cards-DisableCard) endpoint. - + Represents a + [DeleteBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-DeleteBookingCustomAttributeDefinition) + response - Note: if there are errors processing the request, the card field will not - be + 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. - present. + Either an empty object `{}` (for a successful deletion) or `errors` is + present in the response. properties: errors: type: optional> - docs: Information on errors encountered during the request. - card: - type: optional - docs: The retrieved card. + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - DisableEventsResponse: + DeleteBreakTypeResponse: docs: >- - Defines the fields that are included in the response body of + The response to a request to delete a `BreakType`. The response might + contain a set - a request to the [DisableEvents](api-endpoint:Events-DisableEvents) - endpoint. + 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 - Note: if there are errors processing the request, the events field will - not be + a catalog item variation will be deleted (and its ID included in this + field) - present. + 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: Information on errors encountered during the request. + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - DismissTerminalActionResponse: + DeleteCustomerCustomAttributeDefinitionResponse: + docs: >- + Represents a response from a delete request containing error messages if + there are any. properties: errors: type: optional> - docs: Information on errors encountered during the request. - action: - type: optional - docs: Current state of the action to be dismissed. + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - DismissTerminalCheckoutResponse: + 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: Information on errors encountered during the request. - checkout: - type: optional - docs: Current state of the checkout to be dismissed. + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - DismissTerminalRefundResponse: + 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: Information on errors encountered during the request. - refund: - type: optional - docs: Current state of the refund to be dismissed. + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - Dispute: + 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 - [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 - DisputeEvidence: + [DeleteInvoiceAttachment](api-endpoint:Invoices-DeleteInvoiceAttachment) + response. 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 + errors: + type: optional> + docs: Information about errors encountered during the request. source: openapi: openapi/openapi.json - DisputeEvidenceFile: - docs: A file to be uploaded as dispute evidence. + DeleteInvoiceResponse: + docs: Describes a `DeleteInvoice` response. 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 + errors: + type: optional> + docs: Information about errors encountered during the request. 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. + 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 - 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. + 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 - DisputeState: - enum: - - INQUIRY_EVIDENCE_REQUIRED - - INQUIRY_PROCESSING - - INQUIRY_CLOSED - - EVIDENCE_REQUIRED - - PROCESSING - - WON - - LOST - - ACCEPTED - docs: The list of possible dispute states. + 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 - DisputedPayment: - docs: The payment the cardholder disputed. + DeleteMerchantCustomAttributeDefinitionResponse: + docs: >- + Represents a response from a delete request containing error messages if + there are any. properties: - payment_id: - type: optional> - docs: Square-generated unique ID of the payment being disputed. - validation: - minLength: 1 - maxLength: 192 + errors: + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - Employee: + DeleteMerchantCustomAttributeResponse: docs: >- - An employee object that is used by the external API. - + Represents a + [DeleteMerchantCustomAttribute](api-endpoint:MerchantCustomAttributes-DeleteMerchantCustomAttribute) + response. - DEPRECATED at version 2020-08-26. Replaced by - [TeamMember](entity:TeamMember). + 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: 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: + docs: The ID of the link that is deleted. + cancelled_order_id: type: optional - docs: A read-only timestamp in RFC 3339 format. - access: read-only + 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 - EmployeeStatus: - enum: - - ACTIVE - - INACTIVE + DeleteShiftResponse: docs: >- - The status of the Employee being retrieved. + 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) - DEPRECATED at version 2020-08-26. Replaced by - [TeamMemberStatus](entity:TeamMemberStatus). + 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 - EmployeeWage: + DeleteTimecardResponse: 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). + 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: - 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. + errors: + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - EnableEventsResponse: + DeleteWebhookSubscriptionResponse: docs: >- Defines the fields that are included in the response body of - a request to the [EnableEvents](api-endpoint:Events-EnableEvents) + a request to the + [DeleteWebhookSubscription](api-endpoint:WebhookSubscriptions-DeleteWebhookSubscription) 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 - 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. + Destination: + docs: Information about the destination against which the payout was made. properties: - category: - type: ErrorCategory - docs: |- - The high-level category for the error. - See [ErrorCategory](#type-errorcategory) for possible values - code: - type: ErrorCode + type: + type: optional 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 of the destination such as a bank account or debit card. + See [DestinationType](#type-destinationtype) for possible values + id: type: optional - docs: |- - The name of the field provided in the original request (if any) that - the error pertains to. + docs: >- + Square issued unique ID (also known as the instrument ID) associated + with this destination. 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. + 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 - 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 - Event: - properties: - merchant_id: - type: optional> - docs: The ID of the target merchant associated with the event. - location_id: - type: optional> - docs: The ID of the target location associated with the event. - type: - type: optional> - docs: The type of event this represents. - event_id: - type: optional> - docs: A unique ID for the event. - created_at: - type: optional - docs: Timestamp of when the event was created, in RFC 3339 format. - access: read-only - data: - type: optional - docs: The data associated with the event. - source: - openapi: openapi/openapi.json - EventData: + DestinationDetailsCardRefundDetails: properties: - type: + card: + type: optional + docs: The card's non-confidential details. + entry_method: type: optional> - docs: The name of the affected object’s type. - id: - type: optional - docs: The ID of the affected object. - deleted: - type: optional> - docs: >- - This is true if the affected object has been deleted; otherwise, it's - absent. - object: - type: optional>> docs: >- - An object containing fields and values relevant to the event. It is - absent if the affected object has been deleted. - source: - openapi: openapi/openapi.json - EventMetadata: - docs: Contains metadata about a particular [Event](entity:Event). - properties: - event_id: - type: optional> - docs: A unique ID for the event. - api_version: + 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 API version of the event. This corresponds to the default API - version of the developer application at the time when the event was - created. + The authorization code provided by the issuer when a refund is + approved. + validation: + maxLength: 10 source: openapi: openapi/openapi.json - EventTypeMetadata: - docs: Contains the metadata of a webhook event type. + DestinationDetailsCashRefundDetails: + docs: >- + Stores details about a cash refund. Contains only non-confidential + information. properties: - event_type: - type: optional - docs: The event type. - access: read-only - api_version_introduced: - type: optional - docs: The API version at which the event type was introduced. - access: read-only - release_status: - type: optional - docs: The release status of the event type. - access: read-only - source: - openapi: 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. + 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 - ExternalPaymentDetails: + DestinationDetailsExternalRefundDetails: docs: >- - Stores details about an external payment. Contains only non-confidential + Stores details about an external refund. Contains only non-confidential information. - - For more information, see - - [Take External - Payments](https://developer.squareup.com/docs/payments-api/take-payments/external-payments). properties: type: type: string docs: >- - The type of external payment the seller received. It can be one of the + The type of external refund the seller paid to the buyer. It can be + one of the + following: - - CHECK - Paid using a physical check. + - CHECK - Refunded using a physical check. - - BANK_TRANSFER - Paid using external bank transfer. + - BANK_TRANSFER - Refunded using external bank transfer. - - OTHER\_GIFT\_CARD - Paid using a non-Square gift card. + - OTHER\_GIFT\_CARD - Refunded using a non-Square gift card. - - CRYPTO - Paid using a crypto currency. + - CRYPTO - Refunded using a crypto currency. - - SQUARE_CASH - Paid using Square Cash App. + - SQUARE_CASH - Refunded using Square Cash App. - - SOCIAL - Paid using peer-to-peer payment applications. + - SOCIAL - Refunded using peer-to-peer payment applications. - - EXTERNAL - A third-party application gathered this payment outside - of Square. + - EXTERNAL - A third-party application gathered this refund outside of + Square. - - EMONEY - Paid using an E-money provider. + - EMONEY - Refunded using an E-money provider. - CARD - A credit or debit card that Square does not support. @@ -11013,7111 +11841,13695 @@ types: source: type: string docs: |- - A description of the external payment source. For example, + 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 payment to its originating source. + docs: An ID to associate the refund to its originating source. validation: maxLength: 255 - source_fee_money: - type: optional - docs: |- - The fees paid to the source. The `amount_money` minus this field is - the net amount seller receives. source: openapi: openapi/openapi.json - FilterValue: - docs: >- - A filter to select resources based on an exact field value. For any given - - value, the value can only be in one property. Depending on the field, - either - - all properties can be set or only a subset will be available. - - - Refer to the documentation of the field. - properties: - all: - type: optional>> - docs: A list of terms that must be present on the field of the resource. - any: - type: optional>> - docs: |- - A list of terms where at least one of them must be present on the - field of the resource. - none: - type: optional>> - docs: A list of terms that must not be present on the field the resource + 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 - FloatNumberRange: - docs: Specifies a decimal number range. + Device: 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. + 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 - 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. + DeviceAttributes: properties: - uid: - type: optional> - docs: A unique ID that identifies the fulfillment only within this order. - validation: - maxLength: 60 type: - type: optional - docs: |- - The type of the fulfillment. - See [FulfillmentType](#type-fulfillmenttype) for possible values - state: - type: optional + type: DeviceAttributesDeviceType docs: |- - The state of the fulfillment. - See [FulfillmentState](#type-fulfillmentstate) for possible values - line_item_application: - type: optional + 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: >- - Describes what order line items this fulfillment applies to. - - It can be `ALL` or `ENTRY_LIST` with a supplied list of fulfillment - entries. + The manufacturer-supplied identifier for the device (where available). + In many cases, - See - [FulfillmentFulfillmentLineItemApplication](#type-fulfillmentfulfillmentlineitemapplication) - for possible values - entries: - type: optional> + this identifier will be a serial number. + updated_at: + type: optional docs: >- - A list of entries pertaining to the fulfillment of an order. Each - entry must reference - - a valid `uid` for an order line item in the `line_item_uid` field, as - well as a `quantity` to - - fulfill. - - - Multiple entries can reference the same line item `uid`, as long as - the total quantity among - - all fulfillment entries referencing a single line item does not exceed - the quantity of the - - order's line item itself. - - - An order cannot be marked as `COMPLETED` before all fulfillments are - `COMPLETED`, - - `CANCELED`, or `FAILED`. Fulfillments can be created and completed - independently + The RFC 3339-formatted value of the most recent update to the device + information. - before order completion. - access: read-only - metadata: - type: optional>>>> + (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: >- - 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 unique ID of the device intended for this `TerminalCheckout`. + A list of `DeviceCode` objects can be retrieved from the + /v2/devices/codes endpoint. - For more information, see - [Metadata](https://developer.squareup.com/docs/build-basics/metadata). - pickup_details: - type: optional + 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: >- - Contains details for a pickup fulfillment. These details are required - when the fulfillment - - type is `PICKUP`. - shipment_details: - type: optional + 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: >- - 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. + Show the itemization screen prior to taking a payment. This field is + only meaningful when the - `FAILED`: Shipment has failed. - delivery_details: - type: optional - docs: Describes delivery details of an order fulfillment. + checkout includes an order ID. Defaults to true. source: openapi: openapi/openapi.json - FulfillmentDeliveryDetails: - docs: Describes delivery details of an order fulfillment. + DeviceCode: properties: - recipient: - type: optional - docs: The contact information for the person to receive the fulfillment. - schedule_type: - type: >- - optional - docs: >- - Indicates the fulfillment delivery schedule type. If `SCHEDULED`, then - - `deliver_at` is required. If `ASAP`, then `prep_time_duration` is - required. The default is `SCHEDULED`. - - See - [OrderFulfillmentDeliveryDetailsScheduleType](#type-orderfulfillmentdeliverydetailsscheduletype) - for possible values - placed_at: + id: type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the fulfillment was placed. - - The timestamp must be in RFC 3339 format (for example, - "2016-09-04T23:59:33.123Z"). - - - Must be in RFC 3339 timestamp format, e.g., - "2016-09-04T23:59:33.123Z". + docs: The unique id for this device code. access: read-only - deliver_at: - type: optional> - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - that represents the start of the delivery period. - - When the fulfillment `schedule_type` is `ASAP`, the field is - automatically - - set to the current time plus the `prep_time_duration`. - - Otherwise, the application can set this field while the fulfillment - `state` is - - `PROPOSED`, `RESERVED`, or `PREPARED` (any time before the - - terminal state such as `COMPLETED`, `CANCELED`, and `FAILED`). - - - The timestamp must be in RFC 3339 format - - (for example, "2016-09-04T23:59:33.123Z"). - prep_time_duration: - type: optional> - docs: |- - The duration of time it takes to prepare and deliver this fulfillment. - The duration must be in RFC 3339 format (for example, "P1W3D"). - delivery_window_duration: - type: optional> - docs: >- - The time period after `deliver_at` in which to deliver the order. - - Applications can set this field when the fulfillment `state` is - - `PROPOSED`, `RESERVED`, or `PREPARED` (any time before the terminal - state - - such as `COMPLETED`, `CANCELED`, and `FAILED`). - - - The duration must be in RFC 3339 format (for example, "P1W3D"). - note: + name: type: optional> - docs: >- - Provides additional instructions about the delivery fulfillment. - - It is displayed in the Square Point of Sale application and set by the - API. + docs: An optional user-defined name for the device code. validation: - maxLength: 550 - completed_at: - type: optional> - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicates when the seller completed the fulfillment. - - This field is automatically set when fulfillment `state` changes to - `COMPLETED`. - - The timestamp must be in RFC 3339 format (for example, - "2016-09-04T23:59:33.123Z"). - in_progress_at: + maxLength: 128 + code: type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicates when the seller started processing the fulfillment. - - This field is automatically set when the fulfillment `state` changes - to `RESERVED`. - - The timestamp must be in RFC 3339 format (for example, - "2016-09-04T23:59:33.123Z"). + docs: The unique code that can be used to login. access: read-only - rejected_at: + device_id: type: optional docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the fulfillment was rejected. This field is - - automatically set when the fulfillment `state` changes to `FAILED`. - - The timestamp must be in RFC 3339 format (for example, - "2016-09-04T23:59:33.123Z"). + The unique id of the device that used this code. Populated when the + device is paired up. access: read-only - ready_at: + 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: >- - 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"). + When this DeviceCode will expire and no longer login. Timestamp in RFC + 3339 format. access: read-only - delivered_at: + created_at: type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the fulfillment was delivered to the recipient. - - The timestamp must be in RFC 3339 format (for example, - "2016-09-04T23:59:33.123Z"). + docs: When this DeviceCode was created. Timestamp in RFC 3339 format. access: read-only - canceled_at: + status_changed_at: type: optional docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the fulfillment was canceled. This field is - automatically - - set when the fulfillment `state` changes to `CANCELED`. - - - The timestamp must be in RFC 3339 format (for example, - "2016-09-04T23:59:33.123Z"). + When this DeviceCode's status was last changed. Timestamp in RFC 3339 + format. access: read-only - cancel_reason: - type: optional> - docs: 'The delivery cancellation reason. Max length: 100 characters.' - validation: - maxLength: 100 - courier_pickup_at: - type: optional> - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when an order can be picked up by the courier for delivery. - - The timestamp must be in RFC 3339 format (for example, - "2016-09-04T23:59:33.123Z"). - courier_pickup_window_duration: - type: optional> - docs: >- - The time period after `courier_pickup_at` in which the courier should - pick up the order. - - The duration must be in RFC 3339 format (for example, "P1W3D"). - is_no_contact_delivery: - type: optional> - docs: Whether the delivery is preferred to be no contact. - dropoff_notes: - type: optional> - docs: >- - A note to provide additional instructions about how to deliver the - order. - validation: - maxLength: 550 - courier_provider_name: + 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 name of the courier provider. - validation: - maxLength: 255 - courier_support_phone_number: + docs: The ID of the target merchant associated with the event. + location_id: type: optional> - docs: The support phone number of the courier. - validation: - maxLength: 17 - square_delivery_id: + docs: The ID of the target location associated with the event. + type: type: optional> - docs: The identifier for the delivery created by Square. - validation: - maxLength: 50 - external_delivery_id: + docs: The type of event this represents, `"device.code.paired"`. + event_id: type: optional> - docs: >- - The identifier for the delivery created by the third-party courier - service. - validation: - maxLength: 50 - managed_delivery: - type: optional> - docs: >- - The flag to indicate the delivery is managed by a third party (ie - DoorDash), which means - - we may not receive all recipient information for PII purposes. + 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 - FulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleType: - enum: - - SCHEDULED - - ASAP - docs: The schedule type of the delivery fulfillment. + 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 - FulfillmentFulfillmentEntry: - docs: >- - Links an order line item to a fulfillment. Each entry must reference - - a valid `uid` for an order line item in the `line_item_uid` field, as well - as a `quantity` to - - fulfill. + DeviceCodePairedEventObject: properties: - uid: + 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 unique ID that identifies the fulfillment entry only within this - order. - validation: - maxLength: 60 - line_item_uid: - type: string - docs: The `uid` from the order line item. - validation: - minLength: 1 - quantity: - type: string - docs: >- - The quantity of the line item being fulfilled, formatted as a decimal - number. - - For example, `"3"`. - - - Fulfillments for line items with a `quantity_unit` can have - non-integer quantities. - - For example, `"1.70000"`. - validation: - minLength: 1 - maxLength: 12 - metadata: - type: optional>>>> - docs: >- - Application-defined data attached to this fulfillment entry. Metadata - fields are intended - - to store descriptive references or associations with an entity in - another system or store brief - - information about the object. Square does not process this field; it - only stores and returns it - - in relevant API calls. Do not use metadata to store any sensitive - information (such as personally - - identifiable information or card details). - - - Keys written by applications must be 60 characters or less and must be - in the character set - - `[a-zA-Z0-9_-]`. Entries can also include metadata generated by - Square. These keys are prefixed - - with a namespace, separated from the key with a ':' character. - - - Values have a maximum length of 255 characters. - - - An application can have up to 10 entries per metadata field. - - - Entries written by applications are private and can only be read or - modified by the same - - application. - - - For more information, see - [Metadata](https://developer.squareup.com/docs/build-basics/metadata). + 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 - FulfillmentFulfillmentLineItemApplication: + DeviceComponentDetailsExternalPower: 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. + - AVAILABLE_CHARGING + - AVAILABLE_NOT_IN_USE + - UNAVAILABLE + - AVAILABLE_INSUFFICIENT + docs: An enum for ExternalPower. source: openapi: openapi/openapi.json - FulfillmentPickupDetails: - docs: Contains details necessary to fulfill a pickup order. + DeviceComponentDetailsMeasurement: + docs: A value qualified by unit of measure. properties: - recipient: - type: optional - docs: >- - Information about the person to pick up this fulfillment from a - physical - - location. - expires_at: + 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 - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when this fulfillment expires if it is not marked in - progress. The timestamp must be - - in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). The - expiration time can only be set - - up to 7 days in the future. If `expires_at` is not set, any new - payments attached to the order - - are automatically completed. - auto_complete_duration: + docs: The name of the connected WIFI network. + ip_address_v4: 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: + docs: The string representation of the device’s IPv4 address. + secure_connection: 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 + The security protocol for a secure connection (e.g. WPA2). None + provided if the connection - to the current time plus the expected duration to prepare the - fulfillment. - pickup_window_duration: + 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 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 merchant the newly created device belongs to. + 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 this represents. The value is `"device.created"`. + event_id: type: optional> - docs: >- - A note to provide additional instructions about the pickup - - fulfillment displayed in the Square Point of Sale application and set - by the API. - validation: - maxLength: 500 - placed_at: + docs: A UUID that uniquely identifies this device creation event. + 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"). + The time when the device creation event was first created, in RFC 3339 + format. access: read-only - accepted_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the fulfillment was marked in progress. The timestamp - must be in RFC 3339 format - - (for example, "2016-09-04T23:59:33.123Z"). - access: read-only - rejected_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the fulfillment was rejected. The timestamp must be in - RFC 3339 format - - (for example, "2016-09-04T23:59:33.123Z"). - access: read-only - ready_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the fulfillment is marked as ready for pickup. The - timestamp must be in RFC 3339 format - - (for example, "2016-09-04T23:59:33.123Z"). - access: read-only - expired_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the fulfillment expired. The timestamp must be in RFC - 3339 format - - (for example, "2016-09-04T23:59:33.123Z"). - access: read-only - picked_up_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the fulfillment was picked up by the recipient. The - timestamp must be in RFC 3339 format - - (for example, "2016-09-04T23:59:33.123Z"). - access: read-only - canceled_at: + 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 - [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: + 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: >- - A description of why the pickup was canceled. The maximum length: 100 - characters. + docs: The Square-issued ID of the device. validation: - maxLength: 100 - is_curbside_pickup: - type: optional> - docs: >- - If set to `true`, indicates that this pickup order is for curbside - pickup, not in-store pickup. - curbside_pickup_details: - type: optional - docs: >- - Specific details for curbside pickup. These details can only be - populated if `is_curbside_pickup` is set to `true`. + 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 - FulfillmentPickupDetailsCurbsidePickupDetails: - docs: Specific details for curbside pickup. + DeviceMetadata: properties: - curbside_details: + 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: >- - Specific details for curbside pickup, such as parking number and - vehicle model. - validation: - maxLength: 250 - buyer_arrived_at: + The ID of the Square seller business location associated with the + Terminal. + merchant_id: type: optional> docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + 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 - indicating when the buyer arrived and is waiting for pickup. The - timestamp must be in RFC 3339 format + 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: |- - (for example, "2016-09-04T23:59:33.123Z"). + See [Category](#type-category) for possible values source: openapi: openapi/openapi.json - FulfillmentPickupDetailsScheduleType: + DeviceStatusCategory: enum: - - SCHEDULED - - ASAP - docs: The schedule type of the pickup fulfillment. + - AVAILABLE + - NEEDS_ATTENTION + - OFFLINE source: openapi: openapi/openapi.json - FulfillmentRecipient: - docs: Information about the fulfillment recipient. + DigitalWalletDetails: + docs: >- + Additional details about `WALLET` type payments. Contains only + non-confidential information. properties: - customer_id: + status: 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 + The status of the `WALLET` payment. The status can be `AUTHORIZED`, + `CAPTURED`, `VOIDED`, or - these fields are left unset, the request results in an error. + `FAILED`. validation: - maxLength: 191 - display_name: + maxLength: 50 + brand: 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 + The brand used for the `WALLET` payment. The brand can be `CASH_APP`, + `PAYPAY`, `ALIPAY`, - indicated by `customer_id`. + `RAKUTEN_PAY`, `AU_PAY`, `D_BARAI`, `MERPAY`, `WECHAT_PAY` or + `UNKNOWN`. validation: - maxLength: 255 - email_address: - type: optional> - docs: >- - The email address of the fulfillment recipient. - - - If provided, the email address overrides the corresponding customer - profile value + 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 - indicated by `customer_id`. - validation: - maxLength: 255 - phone_number: - type: optional> - docs: >- - The phone number of the fulfillment recipient. This field is required. + a request to the [DisableCard](api-endpoint:Cards-DisableCard) endpoint. - If provided, the phone number overrides the corresponding customer - profile value + Note: if there are errors processing the request, the card field will not + be - indicated by `customer_id`. - validation: - maxLength: 17 - address: - type: optional
- docs: >- - The address of the fulfillment recipient. This field is required. - - - If provided, the address overrides the corresponding customer profile - value - - indicated by `customer_id`. - source: - openapi: openapi/openapi.json - FulfillmentShipmentDetails: - docs: Contains the details necessary to fulfill a shipment order. - properties: - recipient: - type: optional - docs: Information about the person to receive this shipment fulfillment. - carrier: - type: optional> - docs: >- - The shipping carrier being used to ship this fulfillment (such as UPS, - FedEx, or USPS). - validation: - maxLength: 50 - shipping_note: - type: optional> - docs: A note with additional information for the shipping carrier. - validation: - maxLength: 500 - shipping_type: - type: optional> - docs: >- - A description of the type of shipping product purchased from the - carrier - - (such as First Class, Priority, or Express). - validation: - maxLength: 50 - tracking_number: - type: optional> - docs: >- - The reference number provided by the carrier to track the shipment's - progress. - validation: - maxLength: 100 - tracking_url: - type: optional> - docs: A link to the tracking webpage on the carrier's website. - validation: - maxLength: 2000 - placed_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the shipment was requested. The timestamp must be in - RFC 3339 format - - (for example, "2016-09-04T23:59:33.123Z"). - access: read-only - in_progress_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when this fulfillment was moved to the `RESERVED` state, - which indicates that preparation - - of this shipment has begun. The timestamp must be in RFC 3339 format - (for example, "2016-09-04T23:59:33.123Z"). - access: read-only - packaged_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when this fulfillment was moved to the `PREPARED` state, - which indicates that the - - fulfillment is packaged. The timestamp must be in RFC 3339 format (for - example, "2016-09-04T23:59:33.123Z"). - access: read-only - expected_shipped_at: - type: optional> - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the shipment is expected to be delivered to the - shipping carrier. - - The timestamp must be in RFC 3339 format (for example, - "2016-09-04T23:59:33.123Z"). - shipped_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when this fulfillment was moved to the `COMPLETED` state, - which indicates that - - the fulfillment has been given to the shipping carrier. The timestamp - must be in RFC 3339 format - - (for example, "2016-09-04T23:59:33.123Z"). - access: read-only - canceled_at: - type: optional> - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating the shipment was canceled. - - The timestamp must be in RFC 3339 format (for example, - "2016-09-04T23:59:33.123Z"). - cancel_reason: - type: optional> - docs: A description of why the shipment was canceled. - validation: - maxLength: 100 - failed_at: - type: optional - docs: >- - The - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - - indicating when the shipment failed to be completed. The timestamp - must be in RFC 3339 format - - (for example, "2016-09-04T23:59:33.123Z"). - access: read-only - failure_reason: - type: optional> - docs: A description of why the shipment failed to be completed. - validation: - maxLength: 100 - source: - openapi: 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`. + present. properties: errors: type: optional> docs: Information on errors encountered during the request. - bank_account: - type: optional - docs: The requested `BankAccount` object. + card: + type: optional + docs: The retrieved card. source: openapi: openapi/openapi.json - GetBreakTypeResponse: + DisableEventsResponse: docs: >- - The response to a request to get a `BreakType`. The response contains + Defines the fields that are included in the response body of - the requested `BreakType` objects and might contain a set of `Error` - objects if + a request to the [DisableEvents](api-endpoint:Events-DisableEvents) + endpoint. - 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: + + 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. - device_code: - type: optional - docs: The queried DeviceCode. + docs: Information on errors encountered during the request. source: openapi: openapi/openapi.json - GetDeviceResponse: + DismissTerminalActionResponse: properties: errors: type: optional> - docs: Information about errors encountered during the request. - device: - type: optional - docs: The requested `Device`. + 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 - 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. + DismissTerminalCheckoutResponse: properties: - employee_wage: - type: optional - docs: The requested `EmployeeWage` object. errors: type: optional> - docs: Any errors that occurred during the request. + 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 - GetInvoiceResponse: - docs: Describes a `GetInvoice` response. + DismissTerminalRefundResponse: properties: - invoice: - type: optional - docs: The invoice requested. errors: type: optional> - docs: Information about errors encountered during the request. + 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 - GetPaymentRefundResponse: + Dispute: docs: >- - Defines the response returned by - [GetRefund](api-endpoint:Refunds-GetPaymentRefund). - - - Note: If there are errors processing the request, the refund field might - not be + 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. - present or it might be present in a FAILED state. + 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: - errors: - type: optional> - docs: Information about errors encountered during the request. - refund: - type: optional - docs: The requested `PaymentRefund`. + 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 - GetPaymentResponse: - docs: >- - Defines the response returned by - [GetPayment](api-endpoint:Payments-GetPayment). + DisputeCreatedEventData: properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - payment: - type: optional - docs: The requested `Payment`. + 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 - GetPayoutResponse: + DisputeCreatedEventObject: properties: - payout: - type: optional - docs: The requested payout. - errors: - type: optional> - docs: Information about errors encountered during the request. + object: + type: optional + docs: The dispute object. 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. + DisputeEvidence: properties: - shift: - type: optional - docs: The requested `Shift`. - errors: - type: optional> - docs: Any errors that occurred during the request. + 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 - GetTeamMemberWageResponse: + DisputeEvidenceAddedEvent: docs: >- - A response to a request to get a `TeamMemberWage`. The response contains + Published when evidence is added to a [Dispute](entity:Dispute) - the requested `TeamMemberWage` objects and might contain a set of `Error` - objects if + from the Disputes Dashboard in the Seller Dashboard, the Square Point of + Sale app, - the request resulted in errors. + or by calling either + [CreateDisputeEvidenceFile](api-endpoint:Disputes-CreateDisputeEvidenceFile) + or + [CreateDisputeEvidenceText](api-endpoint:Disputes-CreateDisputeEvidenceText). properties: - team_member_wage: - type: optional - docs: The requested `TeamMemberWage` object. - 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 - GetTerminalActionResponse: + DisputeEvidenceAddedEventData: properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - action: - type: optional - docs: The requested `TerminalAction` + 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 - GetTerminalCheckoutResponse: + DisputeEvidenceAddedEventObject: properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - checkout: - type: optional - docs: The requested `TerminalCheckout`. + object: + type: optional + docs: The dispute object. 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`. + 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 - GiftCard: - docs: Represents a Square gift card. + DisputeEvidenceCreatedEventData: properties: + type: + type: optional> + docs: Name of the affected dispute's type. id: type: optional - docs: The Square-assigned ID of the gift card. - access: read-only - type: - type: GiftCardType - docs: |- - The gift card type. - See [Type](#type-type) for possible values - gan_source: - type: optional - docs: >- - The source that generated the gift card account number (GAN). The - default value is `SQUARE`. + 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) - See [GANSource](#type-gansource) for possible values - state: - type: optional - docs: |- - The current gift card state. - See [Status](#type-status) for possible values - balance_money: - type: optional - docs: >- - The current gift card balance. This balance is always greater than or - equal to zero. - gan: - type: optional> - docs: >- - The gift card account number (GAN). Buyers can use the GAN to make - purchases or check + from the Disputes Dashboard in the Seller Dashboard, the Square Point of + Sale app, - the gift card balance. + 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: >- - The timestamp when the gift card was created, in RFC 3339 format. - - In the case of a digital gift card, it is the time when you create a - card - - (using the Square Point of Sale application, Seller Dashboard, or Gift - Cards API). - - In the case of a plastic gift card, it is the time when Square - associates the card with the - - seller at the time of activation. + docs: Timestamp of when the event was created, in RFC 3339 format. access: read-only - customer_ids: - type: optional> + 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 IDs of the [customer profiles](entity:Customer) to whom this gift - card is linked. - access: read-only + 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 - GiftCardActivity: + DisputeEvidenceRemovedEvent: docs: >- - Represents an action performed on a [gift card](entity:GiftCard) that - affects its state or balance. + Published when evidence is removed from a [Dispute](entity:Dispute) - A gift card activity contains information about a specific activity type. - For example, a `REDEEM` activity + from the Disputes Dashboard in the Seller Dashboard, the Square Point of + Sale app, - includes a `redeem_activity_details` field that contains information about - the redemption. + or by calling + [DeleteDisputeEvidence](api-endpoint:Disputes-DeleteDisputeEvidence). properties: - id: + 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: The Square-assigned ID of the gift card activity. + 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: GiftCardActivityType - docs: |- - The type of gift card activity. - See [Type](#type-type) for possible values + 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: string - docs: >- - The ID of the [business location](entity:Location) where the activity - occurred. + 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: >- - The timestamp when the gift card activity was created, in RFC 3339 - format. + docs: Timestamp of when the event was created, in RFC 3339 format. access: read-only - gift_card_id: + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + DisputeStateChangedEventData: + properties: + type: type: optional> - docs: >- - The gift card ID. When creating a gift card activity, `gift_card_id` - is not required if - - `gift_card_gan` is specified. - gift_card_gan: - type: optional> - docs: >- - The gift card account number (GAN). When creating a gift card - activity, `gift_card_gan` - - is not required if `gift_card_id` is specified. - gift_card_balance_money: - type: optional - docs: The final balance on the gift card after the action is completed. - load_activity_details: - type: optional - docs: >- - Additional details about a `LOAD` activity, which is used to reload - money onto a gift card. - activate_activity_details: - type: optional - docs: >- - Additional details about an `ACTIVATE` activity, which is used to - activate a gift card with - - an initial balance. - redeem_activity_details: - type: optional - docs: >- - Additional details about a `REDEEM` activity, which is used to redeem - a gift card for a purchase. - - - For applications that process payments using the Square Payments API, - Square creates a `REDEEM` activity that - - updates the gift card balance after the corresponding - [CreatePayment](api-endpoint:Payments-CreatePayment) - - request is completed. Applications that use a custom payment - processing system must call - - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - to create the `REDEEM` activity. - clear_balance_activity_details: - type: optional - docs: >- - Additional details about a `CLEAR_BALANCE` activity, which is used to - set the balance of a gift card to zero. - deactivate_activity_details: - type: optional - docs: >- - Additional details about a `DEACTIVATE` activity, which is used to - deactivate a gift card. - adjust_increment_activity_details: - type: optional - docs: >- - Additional details about an `ADJUST_INCREMENT` activity, which is used - to add money to a gift card - - outside of a typical `ACTIVATE`, `LOAD`, or `REFUND` activity flow. - adjust_decrement_activity_details: - type: optional - docs: >- - Additional details about an `ADJUST_DECREMENT` activity, which is used - to deduct money from a gift - - card outside of a typical `REDEEM` activity flow. - refund_activity_details: - type: optional - docs: >- - Additional details about a `REFUND` activity, which is used to add - money to a gift card when - - refunding a payment. - - - For applications that refund payments to a gift card using the Square - Refunds API, Square automatically - - creates a `REFUND` activity that updates the gift card balance after a - [RefundPayment](api-endpoint:Refunds-RefundPayment) - - request is completed. Applications that use a custom processing system - must call - - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - to create the `REFUND` activity. - unlinked_activity_refund_activity_details: - type: optional - docs: >- - Additional details about an `UNLINKED_ACTIVITY_REFUND` activity. This - activity is used to add money - - to a gift card when refunding a payment that was processed using a - custom payment processing system - - and not linked to the gift card. - import_activity_details: - type: optional - docs: >- - Additional details about an `IMPORT` activity, which Square uses to - import a third-party - - gift card with a balance. - block_activity_details: - type: optional - docs: >- - Additional details about a `BLOCK` activity, which Square uses to - temporarily block a gift card. - unblock_activity_details: - type: optional - docs: >- - Additional details about an `UNBLOCK` activity, which Square uses to - unblock a gift card. - import_reversal_activity_details: - type: optional - docs: >- - Additional details about an `IMPORT_REVERSAL` activity, which Square - uses to reverse the - - import of a third-party gift card. - transfer_balance_to_activity_details: - type: optional - docs: >- - Additional details about a `TRANSFER_BALANCE_TO` activity, which - Square uses to add money to - - a gift card as the result of a transfer from another gift card. - transfer_balance_from_activity_details: - type: optional - docs: >- - Additional details about a `TRANSFER_BALANCE_FROM` activity, which - Square uses to deduct money from - - a gift as the result of a transfer to another gift card. + 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 - GiftCardActivityActivate: - docs: >- - Represents details about an `ACTIVATE` [gift card activity - type](entity:GiftCardActivityType). + DisputeStateChangedEventObject: properties: - amount_money: - type: optional - docs: >- - The amount added to the gift card. This value is a positive integer. - + object: + type: optional + docs: The dispute object. + source: + openapi: openapi/openapi.json + DisputeStateUpdatedEvent: + docs: >- + Published when the state of a [Dispute](entity:Dispute) changes. - Applications that use a custom order processing system must specify - this amount in the + This includes the dispute resolution (WON, LOST) reported by the bank. The + event - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - request. - order_id: + data includes details of what changed. + properties: + merchant_id: type: optional> - docs: >- - The ID of the [order](entity:Order) that contains the `GIFT_CARD` line - item. - - - Applications that use the Square Orders API to process orders must - specify the order ID - - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - request. - line_item_uid: + docs: The ID of the target merchant associated with the event. + 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 - - in the - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - request. - reference_id: + docs: The ID of the target location associated with the event. + type: type: optional> - docs: >- - A client-specified ID that associates the gift card activity with an - entity in another system. - - - Applications that use a custom order processing system can use this - field to track information - - related to an order or payment. - buyer_payment_instrument_ids: - type: optional>> - docs: >- - The payment instrument IDs used to process the gift card purchase, - such as a credit card ID - - or bank account ID. - - - Applications that use a custom order processing system must specify - payment instrument IDs in - - the - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - request. - - Square uses this information to perform compliance checks. - - - For applications that use the Square Orders API to process payments, - Square has the necessary - - instrument IDs to perform compliance checks. - - - Each buyer payment instrument ID can contain a maximum of 255 - characters. + 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 - GiftCardActivityAdjustDecrement: - docs: >- - Represents details about an `ADJUST_DECREMENT` [gift card activity - type](entity:GiftCardActivityType). + DisputeStateUpdatedEventData: 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 + 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 - 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). + DisputeStateUpdatedEventObject: + properties: + object: + type: optional + docs: The dispute object. source: openapi: openapi/openapi.json - GiftCardActivityAdjustIncrement: - docs: >- - Represents details about an `ADJUST_INCREMENT` [gift card activity - type](entity:GiftCardActivityType). + DisputedPayment: + docs: The payment the cardholder disputed. 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 + payment_id: + type: optional> + docs: Square-generated unique ID of the payment being disputed. + validation: + minLength: 1 + maxLength: 192 source: openapi: openapi/openapi.json - GiftCardActivityAdjustIncrementReason: + EcomVisibility: enum: - - COMPLIMENTARY - - SUPPORT_ISSUE - - TRANSACTION_VOIDED - docs: Indicates the reason for adding money to a [gift card](entity:GiftCard). + - UNINDEXED + - UNAVAILABLE + - HIDDEN + - VISIBLE + docs: Determines item visibility in Ecom (Online Store) and Online Checkout. source: openapi: openapi/openapi.json - GiftCardActivityBlock: + Employee: docs: >- - Represents details about a `BLOCK` [gift card activity - type](entity:GiftCardActivityType). + An employee object that is used by the external API. + + + DEPRECATED at version 2020-08-26. Replaced by + [TeamMember](entity:TeamMember). properties: - reason: - type: GiftCardActivityBlockReason + 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: |- - 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 + Specifies the status of the employees being fetched. + See [EmployeeStatus](#type-employeestatus) for possible values + is_owner: + type: optional> docs: |- - The reason the gift card balance was cleared. - See [Reason](#type-reason) for possible values + 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 - GiftCardActivityClearBalanceReason: + EmployeeStatus: enum: - - SUSPICIOUS_ACTIVITY - - REUSE_GIFTCARD - - UNKNOWN_REASON + - ACTIVE + - INACTIVE docs: >- - Indicates the reason for clearing the balance of a [gift - card](entity:GiftCard). + The status of the Employee being retrieved. + + + DEPRECATED at version 2020-08-26. Replaced by + [TeamMemberStatus](entity:TeamMemberStatus). source: openapi: openapi/openapi.json - GiftCardActivityDeactivate: + EmployeeWage: docs: >- - Represents details about a `DEACTIVATE` [gift card activity - type](entity:GiftCardActivityType). + 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: - reason: - type: GiftCardActivityDeactivateReason + 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: |- - 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). + 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 - GiftCardActivityImport: + EnableEventsResponse: docs: >- - Represents details about an `IMPORT` [gift card activity - type](entity:GiftCardActivityType). + Defines the fields that are included in the response body of - This activity type is used when Square imports a third-party gift card, in - which case the + a request to the [EnableEvents](api-endpoint:Events-EnableEvents) + endpoint. - `gan_source` of the gift card is set to `OTHER`. + + Note: if there are errors processing the request, the events field will + not be + + present. properties: - amount_money: - type: Money - docs: The balance amount on the imported gift card. + errors: + type: optional> + docs: Information on errors encountered during the request. source: openapi: openapi/openapi.json - GiftCardActivityImportReversal: + Error: docs: >- - Represents details about an `IMPORT_REVERSAL` [gift card activity - type](entity:GiftCardActivityType). + 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: - amount_money: - type: Money + category: + type: ErrorCategory docs: |- - The amount of money cleared from the third-party gift card when - the import was reversed. + 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 - GiftCardActivityLoad: - docs: >- - Represents details about a `LOAD` [gift card activity - type](entity:GiftCardActivityType). - properties: - amount_money: - type: optional - docs: >- - The amount added to the gift card. This value is a positive integer. - - - Applications that use a custom order processing system must specify - this amount in the - - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - request. - order_id: - type: optional> - docs: >- - The ID of the [order](entity:Order) that contains the `GIFT_CARD` line - item. - - - Applications that use the Square Orders API to process orders must - specify the order ID in the - - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - request. - line_item_uid: - type: optional> - docs: >- - The UID of the `GIFT_CARD` line item in the order that represents the - additional funds for the gift card. - - - Applications that use the Square Orders API to process orders must - specify the line item UID - - in the - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - request. - reference_id: - type: optional> - docs: >- - A client-specified ID that associates the gift card activity with an - entity in another system. - - - Applications that use a custom order processing system can use this - field to track information related to - - an order or payment. - buyer_payment_instrument_ids: - type: optional>> - docs: >- - The payment instrument IDs used to process the order for the - additional funds, such as a credit card ID - - or bank account ID. - - + 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 + Event: + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + location_id: + type: optional> + docs: The ID of the target location associated with the event. + type: + type: optional> + docs: The type of event this represents. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + EventData: + properties: + type: + type: optional> + docs: The name of the affected object’s type. + id: + type: optional + docs: The ID of the affected object. + deleted: + type: optional> + docs: >- + This is true if the affected object has been deleted; otherwise, it's + absent. + object: + type: optional>> + docs: >- + An object containing fields and values relevant to the event. It is + absent if the affected object has been deleted. + source: + openapi: openapi/openapi.json + EventMetadata: + docs: Contains metadata about a particular [Event](entity:Event). + properties: + event_id: + type: optional> + docs: A unique ID for the event. + api_version: + type: optional> + docs: >- + The API version of the event. This corresponds to the default API + version of the developer application at the time when the event was + created. + source: + openapi: openapi/openapi.json + EventTypeMetadata: + docs: Contains the metadata of a webhook event type. + properties: + event_type: + type: optional + docs: The event type. + access: read-only + api_version_introduced: + type: optional + docs: The API version at which the event type was introduced. + access: read-only + release_status: + type: optional + docs: The release status of the event type. + access: read-only + source: + openapi: openapi/openapi.json + ExcludeStrategy: + enum: + - LEAST_EXPENSIVE + - MOST_EXPENSIVE + docs: |- + Indicates which products matched by a CatalogPricingRule + will be excluded if the pricing rule uses an exclude set. + source: + openapi: openapi/openapi.json + ExternalPaymentDetails: + docs: >- + Stores details about an external payment. Contains only non-confidential + information. + + For more information, see + + [Take External + Payments](https://developer.squareup.com/docs/payments-api/take-payments/external-payments). + properties: + type: + type: string + docs: >- + The type of external payment the seller received. It can be one of the + following: + + - CHECK - Paid using a physical check. + + - BANK_TRANSFER - Paid using external bank transfer. + + - OTHER\_GIFT\_CARD - Paid using a non-Square gift card. + + - CRYPTO - Paid using a crypto currency. + + - SQUARE_CASH - Paid using Square Cash App. + + - SOCIAL - Paid using peer-to-peer payment applications. + + - EXTERNAL - A third-party application gathered this payment outside + of Square. + + - EMONEY - Paid using an E-money provider. + + - CARD - A credit or debit card that Square does not support. + + - STORED_BALANCE - Use for house accounts, store credit, and so forth. + + - FOOD_VOUCHER - Restaurant voucher provided by employers to employees + to pay for meals + + - OTHER - A type not listed here. + validation: + maxLength: 50 + source: + type: string + docs: |- + A description of the external payment source. For example, + "Food Delivery Service". + validation: + maxLength: 255 + source_id: + type: optional> + docs: An ID to associate the payment to its originating source. + validation: + maxLength: 255 + source_fee_money: + type: optional + docs: |- + The fees paid to the source. The `amount_money` minus this field is + the net amount seller receives. + source: + openapi: openapi/openapi.json + FilterValue: + docs: >- + A filter to select resources based on an exact field value. For any given + + value, the value can only be in one property. Depending on the field, + either + + all properties can be set or only a subset will be available. + + + Refer to the documentation of the field. + properties: + all: + type: optional>> + docs: A list of terms that must be present on the field of the resource. + any: + type: optional>> + docs: |- + A list of terms where at least one of them must be present on the + field of the resource. + none: + type: optional>> + docs: A list of terms that must not be present on the field the resource + source: + openapi: openapi/openapi.json + FloatNumberRange: + docs: Specifies a decimal number range. + properties: + start_at: + type: optional> + docs: A decimal value indicating where the range starts. + end_at: + type: optional> + docs: A decimal value indicating where the range ends. + source: + openapi: openapi/openapi.json + Fulfillment: + docs: >- + Contains details about how to fulfill this order. + + Orders can only be created with at most one fulfillment using the API. + + However, orders returned by the Orders API might contain multiple + fulfillments because sellers can create multiple fulfillments using Square + products such as Square Online. + properties: + uid: + type: optional> + docs: A unique ID that identifies the fulfillment only within this order. + validation: + maxLength: 60 + type: + type: optional + docs: |- + The type of the fulfillment. + See [FulfillmentType](#type-fulfillmenttype) for possible values + state: + type: optional + docs: |- + The state of the fulfillment. + See [FulfillmentState](#type-fulfillmentstate) for possible values + line_item_application: + type: optional + docs: >- + Describes what order line items this fulfillment applies to. + + It can be `ALL` or `ENTRY_LIST` with a supplied list of fulfillment + entries. + + See + [FulfillmentFulfillmentLineItemApplication](#type-fulfillmentfulfillmentlineitemapplication) + for possible values + entries: + type: optional> + docs: >- + A list of entries pertaining to the fulfillment of an order. Each + entry must reference + + a valid `uid` for an order line item in the `line_item_uid` field, as + well as a `quantity` to + + fulfill. + + + Multiple entries can reference the same line item `uid`, as long as + the total quantity among + + all fulfillment entries referencing a single line item does not exceed + the quantity of the + + order's line item itself. + + + An order cannot be marked as `COMPLETED` before all fulfillments are + `COMPLETED`, + + `CANCELED`, or `FAILED`. Fulfillments can be created and completed + independently + + before order completion. + access: read-only + metadata: + type: optional>>>> + docs: >- + Application-defined data attached to this fulfillment. Metadata fields + are intended + + to store descriptive references or associations with an entity in + another system or store brief + + information about the object. Square does not process this field; it + only stores and returns it + + in relevant API calls. Do not use metadata to store any sensitive + information (such as personally + + identifiable information or card details). + + + Keys written by applications must be 60 characters or less and must be + in the character set + + `[a-zA-Z0-9_-]`. Entries can also include metadata generated by + Square. These keys are prefixed + + with a namespace, separated from the key with a ':' character. + + + Values have a maximum length of 255 characters. + + + An application can have up to 10 entries per metadata field. + + + Entries written by applications are private and can only be read or + modified by the same + + application. + + + For more information, see + [Metadata](https://developer.squareup.com/docs/build-basics/metadata). + pickup_details: + type: optional + docs: >- + Contains details for a pickup fulfillment. These details are required + when the fulfillment + + type is `PICKUP`. + shipment_details: + type: optional + docs: >- + Contains details for a shipment fulfillment. These details are + required when the fulfillment type + + is `SHIPMENT`. + + + A shipment fulfillment's relationship to fulfillment `state`: + + `PROPOSED`: A shipment is requested. + + `RESERVED`: Fulfillment in progress. Shipment processing. + + `PREPARED`: Shipment packaged. Shipping label created. + + `COMPLETED`: Package has been shipped. + + `CANCELED`: Shipment has been canceled. + + `FAILED`: Shipment has failed. + delivery_details: + type: optional + docs: Describes delivery details of an order fulfillment. + source: + openapi: openapi/openapi.json + FulfillmentDeliveryDetails: + docs: Describes delivery details of an order fulfillment. + properties: + recipient: + type: optional + docs: The contact information for the person to receive the fulfillment. + schedule_type: + type: >- + optional + docs: >- + Indicates the fulfillment delivery schedule type. If `SCHEDULED`, then + + `deliver_at` is required. If `ASAP`, then `prep_time_duration` is + required. The default is `SCHEDULED`. + + See + [OrderFulfillmentDeliveryDetailsScheduleType](#type-orderfulfillmentdeliverydetailsscheduletype) + for possible values + placed_at: + type: optional + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when the fulfillment was placed. + + The timestamp must be in RFC 3339 format (for example, + "2016-09-04T23:59:33.123Z"). + + + Must be in RFC 3339 timestamp format, e.g., + "2016-09-04T23:59:33.123Z". + access: read-only + deliver_at: + type: optional> + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + that represents the start of the delivery period. + + When the fulfillment `schedule_type` is `ASAP`, the field is + automatically + + set to the current time plus the `prep_time_duration`. + + Otherwise, the application can set this field while the fulfillment + `state` is + + `PROPOSED`, `RESERVED`, or `PREPARED` (any time before the + + terminal state such as `COMPLETED`, `CANCELED`, and `FAILED`). + + + The timestamp must be in RFC 3339 format + + (for example, "2016-09-04T23:59:33.123Z"). + prep_time_duration: + type: optional> + docs: |- + The duration of time it takes to prepare and deliver this fulfillment. + The duration must be in RFC 3339 format (for example, "P1W3D"). + delivery_window_duration: + type: optional> + docs: >- + The time period after `deliver_at` in which to deliver the order. + + Applications can set this field when the fulfillment `state` is + + `PROPOSED`, `RESERVED`, or `PREPARED` (any time before the terminal + state + + such as `COMPLETED`, `CANCELED`, and `FAILED`). + + + The duration must be in RFC 3339 format (for example, "P1W3D"). + note: + type: optional> + docs: >- + Provides additional instructions about the delivery fulfillment. + + It is displayed in the Square Point of Sale application and set by the + API. + validation: + maxLength: 550 + completed_at: + type: optional> + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicates when the seller completed the fulfillment. + + This field is automatically set when fulfillment `state` changes to + `COMPLETED`. + + The timestamp must be in RFC 3339 format (for example, + "2016-09-04T23:59:33.123Z"). + in_progress_at: + type: optional + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicates when the seller started processing the fulfillment. + + This field is automatically set when the fulfillment `state` changes + to `RESERVED`. + + The timestamp must be in RFC 3339 format (for example, + "2016-09-04T23:59:33.123Z"). + access: read-only + rejected_at: + type: optional + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when the fulfillment was rejected. This field is + + automatically set when the fulfillment `state` changes to `FAILED`. + + The timestamp must be in RFC 3339 format (for example, + "2016-09-04T23:59:33.123Z"). + access: read-only + ready_at: + type: optional + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when the seller marked the fulfillment as ready for + + courier pickup. This field is automatically set when the fulfillment + `state` changes + + to PREPARED. + + The timestamp must be in RFC 3339 format (for example, + "2016-09-04T23:59:33.123Z"). + access: read-only + delivered_at: + type: optional + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when the fulfillment was delivered to the recipient. + + The timestamp must be in RFC 3339 format (for example, + "2016-09-04T23:59:33.123Z"). + access: read-only + canceled_at: + type: optional + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when the fulfillment was canceled. This field is + automatically + + set when the fulfillment `state` changes to `CANCELED`. + + + The timestamp must be in RFC 3339 format (for example, + "2016-09-04T23:59:33.123Z"). + access: read-only + cancel_reason: + type: optional> + docs: 'The delivery cancellation reason. Max length: 100 characters.' + validation: + maxLength: 100 + courier_pickup_at: + type: optional> + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when an order can be picked up by the courier for delivery. + + The timestamp must be in RFC 3339 format (for example, + "2016-09-04T23:59:33.123Z"). + courier_pickup_window_duration: + type: optional> + docs: >- + The time period after `courier_pickup_at` in which the courier should + pick up the order. + + The duration must be in RFC 3339 format (for example, "P1W3D"). + is_no_contact_delivery: + type: optional> + docs: Whether the delivery is preferred to be no contact. + dropoff_notes: + type: optional> + docs: >- + A note to provide additional instructions about how to deliver the + order. + validation: + maxLength: 550 + courier_provider_name: + type: optional> + docs: The name of the courier provider. + validation: + maxLength: 255 + courier_support_phone_number: + type: optional> + docs: The support phone number of the courier. + validation: + maxLength: 17 + square_delivery_id: + type: optional> + docs: The identifier for the delivery created by Square. + validation: + maxLength: 50 + external_delivery_id: + type: optional> + docs: >- + The identifier for the delivery created by the third-party courier + service. + validation: + maxLength: 50 + managed_delivery: + type: optional> + docs: >- + The flag to indicate the delivery is managed by a third party (ie + DoorDash), which means + + we may not receive all recipient information for PII purposes. + source: + openapi: openapi/openapi.json + FulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleType: + enum: + - SCHEDULED + - ASAP + docs: The schedule type of the delivery fulfillment. + source: + openapi: openapi/openapi.json + FulfillmentFulfillmentEntry: + docs: >- + Links an order line item to a fulfillment. Each entry must reference + + a valid `uid` for an order line item in the `line_item_uid` field, as well + as a `quantity` to + + fulfill. + properties: + uid: + type: optional> + docs: >- + A unique ID that identifies the fulfillment entry only within this + order. + validation: + maxLength: 60 + line_item_uid: + type: string + docs: The `uid` from the order line item. + validation: + minLength: 1 + quantity: + type: string + docs: >- + The quantity of the line item being fulfilled, formatted as a decimal + number. + + For example, `"3"`. + + + Fulfillments for line items with a `quantity_unit` can have + non-integer quantities. + + For example, `"1.70000"`. + validation: + minLength: 1 + maxLength: 12 + metadata: + type: optional>>>> + docs: >- + Application-defined data attached to this fulfillment entry. Metadata + fields are intended + + to store descriptive references or associations with an entity in + another system or store brief + + information about the object. Square does not process this field; it + only stores and returns it + + in relevant API calls. Do not use metadata to store any sensitive + information (such as personally + + identifiable information or card details). + + + Keys written by applications must be 60 characters or less and must be + in the character set + + `[a-zA-Z0-9_-]`. Entries can also include metadata generated by + Square. These keys are prefixed + + with a namespace, separated from the key with a ':' character. + + + Values have a maximum length of 255 characters. + + + An application can have up to 10 entries per metadata field. + + + Entries written by applications are private and can only be read or + modified by the same + + application. + + + For more information, see + [Metadata](https://developer.squareup.com/docs/build-basics/metadata). + source: + openapi: openapi/openapi.json + FulfillmentFulfillmentLineItemApplication: + enum: + - ALL + - ENTRY_LIST + docs: >- + The `line_item_application` describes what order line items this + fulfillment applies + + to. It can be `ALL` or `ENTRY_LIST` with a supplied list of fulfillment + entries. + source: + openapi: openapi/openapi.json + FulfillmentPickupDetails: + docs: Contains details necessary to fulfill a pickup order. + properties: + recipient: + type: optional + docs: >- + Information about the person to pick up this fulfillment from a + physical + + location. + expires_at: + type: optional> + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when this fulfillment expires if it is not marked in + progress. The timestamp must be + + in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). The + expiration time can only be set + + up to 7 days in the future. If `expires_at` is not set, any new + payments attached to the order + + are automatically completed. + auto_complete_duration: + type: optional> + docs: >- + The duration of time after which an in progress pickup fulfillment is + automatically moved + + to the `COMPLETED` state. The duration must be in RFC 3339 format (for + example, "P1W3D"). + + + If not set, this pickup fulfillment remains in progress until it is + canceled or completed. + schedule_type: + type: optional + docs: >- + The schedule type of the pickup fulfillment. Defaults to `SCHEDULED`. + + See + [FulfillmentPickupDetailsScheduleType](#type-fulfillmentpickupdetailsscheduletype) + for possible values + pickup_at: + type: optional> + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + that represents the start of the pickup window. Must be in RFC 3339 + timestamp format, e.g., + + "2016-09-04T23:59:33.123Z". + + + For fulfillments with the schedule type `ASAP`, this is automatically + set + + to the current time plus the expected duration to prepare the + fulfillment. + pickup_window_duration: + type: optional> + docs: >- + The window of time in which the order should be picked up after the + `pickup_at` timestamp. + + Must be in RFC 3339 duration format, e.g., "P1W3D". Can be used as an + + informational guideline for merchants. + prep_time_duration: + type: optional> + docs: |- + The duration of time it takes to prepare this fulfillment. + The duration must be in RFC 3339 format (for example, "P1W3D"). + note: + type: optional> + docs: >- + A note to provide additional instructions about the pickup + + fulfillment displayed in the Square Point of Sale application and set + by the API. + validation: + maxLength: 500 + placed_at: + type: optional + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when the fulfillment was placed. The timestamp must be in + RFC 3339 format + + (for example, "2016-09-04T23:59:33.123Z"). + access: read-only + accepted_at: + type: optional + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when the fulfillment was marked in progress. The timestamp + must be in RFC 3339 format + + (for example, "2016-09-04T23:59:33.123Z"). + access: read-only + rejected_at: + type: optional + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when the fulfillment was rejected. The timestamp must be in + RFC 3339 format + + (for example, "2016-09-04T23:59:33.123Z"). + access: read-only + ready_at: + type: optional + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when the fulfillment is marked as ready for pickup. The + timestamp must be in RFC 3339 format + + (for example, "2016-09-04T23:59:33.123Z"). + access: read-only + expired_at: + type: optional + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when the fulfillment expired. The timestamp must be in RFC + 3339 format + + (for example, "2016-09-04T23:59:33.123Z"). + access: read-only + picked_up_at: + type: optional + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when the fulfillment was picked up by the recipient. The + timestamp must be in RFC 3339 format + + (for example, "2016-09-04T23:59:33.123Z"). + access: read-only + canceled_at: + type: optional + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when the fulfillment was canceled. The timestamp must be in + RFC 3339 format + + (for example, "2016-09-04T23:59:33.123Z"). + access: read-only + cancel_reason: + type: optional> + docs: >- + A description of why the pickup was canceled. The maximum length: 100 + characters. + validation: + maxLength: 100 + is_curbside_pickup: + type: optional> + docs: >- + If set to `true`, indicates that this pickup order is for curbside + pickup, not in-store pickup. + curbside_pickup_details: + type: optional + docs: >- + Specific details for curbside pickup. These details can only be + populated if `is_curbside_pickup` is set to `true`. + source: + openapi: openapi/openapi.json + FulfillmentPickupDetailsCurbsidePickupDetails: + docs: Specific details for curbside pickup. + properties: + curbside_details: + type: optional> + docs: >- + Specific details for curbside pickup, such as parking number and + vehicle model. + validation: + maxLength: 250 + buyer_arrived_at: + type: optional> + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when the buyer arrived and is waiting for pickup. The + timestamp must be in RFC 3339 format + + (for example, "2016-09-04T23:59:33.123Z"). + source: + openapi: openapi/openapi.json + 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: + customer_id: + type: optional> + docs: >- + The ID of the customer associated with the fulfillment. + + + If `customer_id` is provided, the fulfillment recipient's + `display_name`, + + `email_address`, and `phone_number` are automatically populated from + the + + targeted customer profile. If these fields are set in the request, the + request + + values override the information from the customer profile. If the + + targeted customer profile does not contain the necessary information + and + + these fields are left unset, the request results in an error. + validation: + maxLength: 191 + display_name: + type: optional> + docs: >- + The display name of the fulfillment recipient. This field is required. + + + If provided, the display name overrides the corresponding customer + profile value + + indicated by `customer_id`. + validation: + maxLength: 255 + email_address: + type: optional> + docs: >- + The email address of the fulfillment recipient. + + + If provided, the email address overrides the corresponding customer + profile value + + indicated by `customer_id`. + validation: + maxLength: 255 + phone_number: + type: optional> + docs: >- + The phone number of the fulfillment recipient. This field is required. + + + If provided, the phone number overrides the corresponding customer + profile value + + indicated by `customer_id`. + validation: + maxLength: 17 + address: + type: optional
+ docs: >- + The address of the fulfillment recipient. This field is required. + + + If provided, the address overrides the corresponding customer profile + value + + indicated by `customer_id`. + source: + openapi: openapi/openapi.json + FulfillmentShipmentDetails: + docs: Contains the details necessary to fulfill a shipment order. + properties: + recipient: + type: optional + docs: Information about the person to receive this shipment fulfillment. + carrier: + type: optional> + docs: >- + The shipping carrier being used to ship this fulfillment (such as UPS, + FedEx, or USPS). + validation: + maxLength: 50 + shipping_note: + type: optional> + docs: A note with additional information for the shipping carrier. + validation: + maxLength: 500 + shipping_type: + type: optional> + docs: >- + A description of the type of shipping product purchased from the + carrier + + (such as First Class, Priority, or Express). + validation: + maxLength: 50 + tracking_number: + type: optional> + docs: >- + The reference number provided by the carrier to track the shipment's + progress. + validation: + maxLength: 100 + tracking_url: + type: optional> + docs: A link to the tracking webpage on the carrier's website. + validation: + maxLength: 2000 + placed_at: + type: optional + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when the shipment was requested. The timestamp must be in + RFC 3339 format + + (for example, "2016-09-04T23:59:33.123Z"). + access: read-only + in_progress_at: + type: optional + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when this fulfillment was moved to the `RESERVED` state, + which indicates that preparation + + of this shipment has begun. The timestamp must be in RFC 3339 format + (for example, "2016-09-04T23:59:33.123Z"). + access: read-only + packaged_at: + type: optional + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when this fulfillment was moved to the `PREPARED` state, + which indicates that the + + fulfillment is packaged. The timestamp must be in RFC 3339 format (for + example, "2016-09-04T23:59:33.123Z"). + access: read-only + expected_shipped_at: + type: optional> + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when the shipment is expected to be delivered to the + shipping carrier. + + The timestamp must be in RFC 3339 format (for example, + "2016-09-04T23:59:33.123Z"). + shipped_at: + type: optional + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when this fulfillment was moved to the `COMPLETED` state, + which indicates that + + the fulfillment has been given to the shipping carrier. The timestamp + must be in RFC 3339 format + + (for example, "2016-09-04T23:59:33.123Z"). + access: read-only + canceled_at: + type: optional> + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating the shipment was canceled. + + The timestamp must be in RFC 3339 format (for example, + "2016-09-04T23:59:33.123Z"). + cancel_reason: + type: optional> + docs: A description of why the shipment was canceled. + validation: + maxLength: 100 + failed_at: + type: optional + docs: >- + The + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + + indicating when the shipment failed to be completed. The timestamp + must be in RFC 3339 format + + (for example, "2016-09-04T23:59:33.123Z"). + access: read-only + failure_reason: + type: optional> + docs: A description of why the shipment failed to be completed. + validation: + maxLength: 100 + source: + openapi: 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). + + + Note: If there are errors processing the request, the refund field might + not be + + present or it might be present in a FAILED state. + properties: + errors: + type: optional> + docs: Information about errors encountered during the request. + refund: + type: optional + docs: The requested `PaymentRefund`. + source: + openapi: 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. + 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 + + the request resulted in errors. + properties: + team_member_wage: + type: optional + docs: The requested `TeamMemberWage` object. + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: 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 + GetTerminalCheckoutResponse: + properties: + errors: + type: optional> + docs: Information about errors encountered during the request. + checkout: + type: optional + docs: The requested `TerminalCheckout`. + 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`. + 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: GiftCardType + docs: |- + The gift card type. + See [Type](#type-type) for possible values + gan_source: + type: optional + docs: >- + The source that generated the gift card account number (GAN). The + default value is `SQUARE`. + + See [GANSource](#type-gansource) for possible values + state: + type: optional + docs: |- + The current gift card state. + See [Status](#type-status) for possible values + balance_money: + type: optional + docs: >- + The current gift card balance. This balance is always greater than or + equal to zero. + gan: + type: optional> + docs: >- + The gift card account number (GAN). Buyers can use the GAN to make + purchases or check + + the gift card balance. + created_at: + type: optional + docs: >- + The timestamp when the gift card was created, in RFC 3339 format. + + In the case of a digital gift card, it is the time when you create a + card + + (using the Square Point of Sale application, Seller Dashboard, or Gift + Cards API). + + In the case of a plastic gift card, it is the time when Square + associates the card with the + + seller at the time of activation. + access: read-only + customer_ids: + type: optional> + docs: >- + The IDs of the [customer profiles](entity:Customer) to whom this gift + card is linked. + access: read-only + source: + openapi: openapi/openapi.json + GiftCardActivity: + docs: >- + Represents an action performed on a [gift card](entity:GiftCard) that + affects its state or balance. + + A gift card activity contains information about a specific activity type. + For example, a `REDEEM` activity + + includes a `redeem_activity_details` field that contains information about + the redemption. + properties: + id: + type: optional + docs: The Square-assigned ID of the gift card activity. + access: read-only + type: + type: GiftCardActivityType + docs: |- + The type of gift card activity. + See [Type](#type-type) for possible values + location_id: + type: string + docs: >- + The ID of the [business location](entity:Location) where the activity + occurred. + created_at: + type: optional + docs: >- + The timestamp when the gift card activity was created, in RFC 3339 + format. + access: read-only + gift_card_id: + type: optional> + docs: >- + The gift card ID. When creating a gift card activity, `gift_card_id` + is not required if + + `gift_card_gan` is specified. + gift_card_gan: + type: optional> + docs: >- + The gift card account number (GAN). When creating a gift card + activity, `gift_card_gan` + + is not required if `gift_card_id` is specified. + gift_card_balance_money: + type: optional + docs: The final balance on the gift card after the action is completed. + load_activity_details: + type: optional + docs: >- + Additional details about a `LOAD` activity, which is used to reload + money onto a gift card. + activate_activity_details: + type: optional + docs: >- + Additional details about an `ACTIVATE` activity, which is used to + activate a gift card with + + an initial balance. + redeem_activity_details: + type: optional + docs: >- + Additional details about a `REDEEM` activity, which is used to redeem + a gift card for a purchase. + + + For applications that process payments using the Square Payments API, + Square creates a `REDEEM` activity that + + updates the gift card balance after the corresponding + [CreatePayment](api-endpoint:Payments-CreatePayment) + + request is completed. Applications that use a custom payment + processing system must call + + [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) + to create the `REDEEM` activity. + clear_balance_activity_details: + type: optional + docs: >- + Additional details about a `CLEAR_BALANCE` activity, which is used to + set the balance of a gift card to zero. + deactivate_activity_details: + type: optional + docs: >- + Additional details about a `DEACTIVATE` activity, which is used to + deactivate a gift card. + adjust_increment_activity_details: + type: optional + docs: >- + Additional details about an `ADJUST_INCREMENT` activity, which is used + to add money to a gift card + + outside of a typical `ACTIVATE`, `LOAD`, or `REFUND` activity flow. + adjust_decrement_activity_details: + type: optional + docs: >- + Additional details about an `ADJUST_DECREMENT` activity, which is used + to deduct money from a gift + + card outside of a typical `REDEEM` activity flow. + refund_activity_details: + type: optional + docs: >- + Additional details about a `REFUND` activity, which is used to add + money to a gift card when + + refunding a payment. + + + For applications that refund payments to a gift card using the Square + Refunds API, Square automatically + + creates a `REFUND` activity that updates the gift card balance after a + [RefundPayment](api-endpoint:Refunds-RefundPayment) + + request is completed. Applications that use a custom processing system + must call + + [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) + to create the `REFUND` activity. + unlinked_activity_refund_activity_details: + type: optional + docs: >- + Additional details about an `UNLINKED_ACTIVITY_REFUND` activity. This + activity is used to add money + + to a gift card when refunding a payment that was processed using a + custom payment processing system + + and not linked to the gift card. + import_activity_details: + type: optional + docs: >- + Additional details about an `IMPORT` activity, which Square uses to + import a third-party + + gift card with a balance. + block_activity_details: + type: optional + docs: >- + Additional details about a `BLOCK` activity, which Square uses to + temporarily block a gift card. + unblock_activity_details: + type: optional + docs: >- + Additional details about an `UNBLOCK` activity, which Square uses to + unblock a gift card. + import_reversal_activity_details: + type: optional + docs: >- + Additional details about an `IMPORT_REVERSAL` activity, which Square + uses to reverse the + + import of a third-party gift card. + transfer_balance_to_activity_details: + type: optional + docs: >- + Additional details about a `TRANSFER_BALANCE_TO` activity, which + Square uses to add money to + + a gift card as the result of a transfer from another gift card. + transfer_balance_from_activity_details: + type: optional + docs: >- + Additional details about a `TRANSFER_BALANCE_FROM` activity, which + Square uses to deduct money from + + a gift as the result of a transfer to another gift card. + source: + openapi: openapi/openapi.json + GiftCardActivityActivate: + docs: >- + Represents details about an `ACTIVATE` [gift card activity + type](entity:GiftCardActivityType). + properties: + amount_money: + type: optional + docs: >- + The amount added to the gift card. This value is a positive integer. + + + Applications that use a custom order processing system must specify + this amount in the + + [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) + request. + order_id: + type: optional> + docs: >- + The ID of the [order](entity:Order) that contains the `GIFT_CARD` line + item. + + + Applications that use the Square Orders API to process orders must + specify the order ID + + [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) + request. + line_item_uid: + type: optional> + docs: >- + The UID of the `GIFT_CARD` line item in the order that represents the + gift card purchase. + + + Applications that use the Square Orders API to process orders must + specify the line item UID + + in the + [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) + request. + reference_id: + type: optional> + docs: >- + A client-specified ID that associates the gift card activity with an + entity in another system. + + + Applications that use a custom order processing system can use this + field to track information + + related to an order or payment. + buyer_payment_instrument_ids: + type: optional>> + docs: >- + The payment instrument IDs used to process the gift card purchase, + such as a credit card ID + + or bank account ID. + + + Applications that use a custom order processing system must specify + payment instrument IDs in + + the + [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) + request. + + Square uses this information to perform compliance checks. + + + For applications that use the Square Orders API to process payments, + Square has the necessary + + instrument IDs to perform compliance checks. + + + Each buyer payment instrument ID can contain a maximum of 255 + characters. + source: + openapi: 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 + 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 ID of the Square seller associated with the event. + type: + type: optional> + docs: >- + The type of event. For this event, the value is + `gift_card.activity.created`. + event_id: + type: optional> + docs: >- + The unique ID of the event, which is used for + + [idempotency + support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + GiftCardActivityCreatedEventData: + docs: Represents the data associated with a `gift_card.activity.created` event. + properties: + type: + type: optional> + docs: >- + The type of object affected by the event. For this event, the value is + `gift_card_activity`. + id: + type: optional + docs: The ID of the new gift card activity. + object: + type: optional + docs: An object that contains the new gift card activity. + source: + openapi: 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: + - 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). + + This activity type is used when Square imports a third-party gift card, in + which case the + + `gan_source` of the gift card is set to `OTHER`. + properties: + amount_money: + type: Money + docs: The balance amount on the imported gift card. + source: + openapi: 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: >- + The ID of the [order](entity:Order) that contains the `GIFT_CARD` line + item. + + + Applications that use the Square Orders API to process orders must + specify the order ID in the + + [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) + request. + line_item_uid: + type: optional> + docs: >- + The UID of the `GIFT_CARD` line item in the order that represents the + additional funds for the gift card. + + + Applications that use the Square Orders API to process orders must + specify the line item UID + + in the + [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) + request. + reference_id: + type: optional> + docs: >- + A client-specified ID that associates the gift card activity with an + entity in another system. + + + Applications that use a custom order processing system can use this + field to track information related to + + an order or payment. + buyer_payment_instrument_ids: + type: optional>> + docs: >- + The payment instrument IDs used to process the order for the + additional funds, such as a credit card ID + + or bank account ID. + + Applications that use a custom order processing system must specify payment instrument IDs in - the - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - request. + 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 + GiftCardActivityRedeem: + docs: >- + Represents details about a `REDEEM` [gift card activity + type](entity:GiftCardActivityType). + properties: + amount_money: + type: Money + docs: >- + The amount deducted from the gift card for the redemption. This value + is a positive integer. + + + Applications that use a custom payment processing system must specify + this amount in the + + [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) + request. + payment_id: + type: optional + docs: >- + The ID of the payment that represents the gift card redemption. Square + populates this field + + if the payment was processed by Square. + access: read-only + reference_id: + type: optional> + docs: >- + A client-specified ID that associates the gift card activity with an + entity in another system. + + + Applications that use a custom payment processing system can use this + field to track information + + related to an order or payment. + status: + type: optional + docs: >- + The status of the gift card redemption. Gift cards redeemed from + Square Point of Sale or the + + Square Seller Dashboard use a two-state process: `PENDING` + + to `COMPLETED` or `PENDING` to `CANCELED`. Gift cards redeemed using + the Gift Card Activities API + + always have a `COMPLETED` status. + + See [Status](#type-status) for possible values + source: + openapi: openapi/openapi.json + GiftCardActivityRedeemStatus: + enum: + - PENDING + - COMPLETED + - CANCELED + docs: >- + Indicates the status of a [gift card](entity:GiftCard) redemption. This + status is relevant only for + + redemptions made from Square products (such as Square Point of Sale) + because Square products use a + + two-state process. Gift cards redeemed using the Gift Card Activities API + always have a `COMPLETED` status. + source: + openapi: openapi/openapi.json + GiftCardActivityRefund: + docs: >- + Represents details about a `REFUND` [gift card activity + type](entity:GiftCardActivityType). + properties: + redeem_activity_id: + type: optional> + docs: >- + The ID of the refunded `REDEEM` gift card activity. Square populates + this field if the + + `payment_id` in the corresponding + [RefundPayment](api-endpoint:Refunds-RefundPayment) request + + represents a gift card redemption. + + + For applications that use a custom payment processing system, this + field is required when creating + + a `REFUND` activity. The provided `REDEEM` activity ID must be linked + to the same gift card. + amount_money: + type: optional + docs: >- + The amount added to the gift card for the refund. This value is a + positive integer. + + + This field is required when creating a `REFUND` activity. The amount + can represent a full or partial refund. + reference_id: + type: optional> + docs: >- + A client-specified ID that associates the gift card activity with an + entity in another system. + payment_id: + type: optional + docs: >- + The ID of the refunded payment. Square populates this field if the + refund is for a + + payment processed by Square. This field matches the `payment_id` in + the corresponding + + [RefundPayment](api-endpoint:Refunds-RefundPayment) request. + access: read-only + source: + openapi: 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 + GiftCardActivityUpdatedEvent: + docs: >- + Published when a [gift card activity](entity:GiftCardActivity) is + updated. + + Subscribe to this event to be notified about the following changes: + + - An update to the `REDEEM` activity for a gift card redemption made from + a Square product (such as Square Point of Sale). + + These redemptions are initially assigned a `PENDING` state, but then + change to a `COMPLETED` or `CANCELED` state. + + - An update to the `IMPORT` activity for an imported gift card when the + balance is later adjusted by Square. + properties: + merchant_id: + type: optional> + docs: The ID of the Square seller associated with the event. + type: + type: optional> + docs: >- + The type of event. For this event, the value is + `gift_card.activity.updated`. + event_id: + type: optional> + docs: >- + The unique ID of the event, which is used for + + [idempotency + support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + GiftCardActivityUpdatedEventData: + docs: The data associated with a `gift_card.activity.updated` event. + properties: + type: + type: optional> + docs: >- + The type of object affected by the event. For this event, the value is + `gift_card_activity`. + id: + type: optional + docs: The ID of the updated gift card activity. + object: + type: optional + docs: An object that contains the updated gift card activity. + source: + openapi: 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 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 + GiftCardCreatedEventData: + docs: The data associated with a `gift_card.created` event. + properties: + type: + type: optional> + docs: >- + The type of object affected by the event. For this event, the value is + `gift_card`. + id: + type: optional + docs: The ID of the new gift card. + object: + type: optional + docs: An object that contains the new gift card. + source: + openapi: 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 type of event. For this event, the value is + `gift_card.customer_linked`. + event_id: + type: optional> + docs: >- + The unique ID of the event, which is used for + + [idempotency + support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + GiftCardCustomerLinkedEventData: + docs: The data associated with a `gift_card.customer_linked` event. + properties: + type: + type: optional> + docs: >- + The type of object affected by the event. For this event, the value is + `gift_card`. + id: + type: optional + docs: The ID of the updated gift card. + object: + type: optional + docs: >- + An object that contains the updated gift card and the ID of the linked + customer. + source: + openapi: openapi/openapi.json + GiftCardCustomerLinkedEventObject: + docs: |- + An object that contains the gift card and customer ID associated with a + `gift_card.customer_linked` event. + properties: + gift_card: + type: optional + docs: The gift card with the updated `customer_ids` field. + linked_customer_id: + type: optional> + docs: The ID of the linked [customer](entity:Customer). + source: + openapi: openapi/openapi.json + GiftCardCustomerUnlinkedEvent: + docs: >- + Published when a [customer](entity:Customer) is unlinked from a [gift + card](entity:GiftCard). + properties: + merchant_id: + type: optional> + docs: The ID of the Square seller associated with the event. + type: + type: optional> + docs: >- + The type of event. For this event, the value is + `gift_card.customer_unlinked`. + event_id: + type: optional> + docs: >- + The unique ID of the event, which is used for + + [idempotency + support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: 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 + + `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 + 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 + GiftCardUpdatedEvent: + docs: |- + Published when a [gift card](entity:GiftCard) is updated. This includes + changes to the state, balance, and customer association. + properties: + merchant_id: + type: optional> + docs: The ID of the Square seller associated with the event. + type: + type: optional> + docs: >- + The type of this event. For this event, the value is + `gift_card.updated`. + event_id: + type: optional> + docs: >- + The unique ID of the event, which is used for + + [idempotency + support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + GiftCardUpdatedEventData: + docs: The data associated with a `gift_card.updated` event. + properties: + type: + type: optional> + docs: >- + The type of object affected by the event. For this event, the value is + `gift_card`. + id: + type: optional + docs: The ID of the updated gift card. + object: + type: optional + docs: An object that contains the updated gift card. + source: + openapi: openapi/openapi.json + GiftCardUpdatedEventObject: + docs: >- + An object that contains the gift card associated with a + `gift_card.updated` event. + properties: + gift_card: + type: optional + docs: >- + The gift card with the updated `balance_money`, `state`, or + `customer_ids` field. + + Some events can affect both `balance_money` and `state`. + source: + openapi: openapi/openapi.json + InventoryAdjustment: + docs: |- + Represents a change in state or quantity of product inventory at a + particular time and location. + properties: + id: + type: optional + docs: |- + A unique ID generated by Square for the + `InventoryAdjustment`. + validation: + maxLength: 100 + reference_id: + type: optional> + docs: |- + An optional ID provided by the application to tie the + `InventoryAdjustment` to an external + system. + validation: + maxLength: 255 + from_state: + type: optional + docs: |- + The [inventory state](entity:InventoryState) of the related quantity + of items before the adjustment. + See [InventoryState](#type-inventorystate) for possible values + to_state: + type: optional + docs: |- + The [inventory state](entity:InventoryState) of the related quantity + of items after the adjustment. + See [InventoryState](#type-inventorystate) for possible values + location_id: + type: optional> + docs: >- + The Square-generated ID of the [Location](entity:Location) where the + related + + quantity of items is being tracked. + validation: + maxLength: 100 + catalog_object_id: + type: optional> + docs: |- + The Square-generated ID of the + [CatalogObject](entity:CatalogObject) being tracked. + validation: + maxLength: 100 + catalog_object_type: + type: optional> + docs: >- + The [type](entity:CatalogObjectType) of the + [CatalogObject](entity:CatalogObject) being tracked. + + + The Inventory API supports setting and reading the + `"catalog_object_type": "ITEM_VARIATION"` field value. + + In addition, it can also read the `"catalog_object_type": "ITEM"` + field value that is set by the Square Restaurants app. + validation: + maxLength: 14 + quantity: + type: optional> + docs: |- + The number of items affected by the adjustment as a decimal string. + Can support up to 5 digits after the decimal point. + validation: + maxLength: 26 + total_price_money: + type: optional + docs: |- + The total price paid for goods associated with the + adjustment. Present if and only if `to_state` is `SOLD`. Always + non-negative. + occurred_at: + type: optional> + docs: >- + A client-generated RFC 3339-formatted timestamp that indicates when + + the inventory adjustment took place. For inventory adjustment updates, + the `occurred_at` + + timestamp cannot be older than 24 hours or in the future relative to + the + + time of the request. + validation: + maxLength: 34 + created_at: + type: optional + docs: >- + An RFC 3339-formatted timestamp that indicates when the inventory + adjustment is received. + validation: + maxLength: 34 + access: read-only + source: + type: optional + docs: |- + Information about the application that caused the + inventory adjustment. + employee_id: + type: optional> + docs: >- + The Square-generated ID of the [Employee](entity:Employee) responsible + for the + + inventory adjustment. + validation: + maxLength: 100 + team_member_id: + type: optional> + docs: >- + The Square-generated ID of the [Team Member](entity:TeamMember) + responsible for the + + inventory adjustment. + validation: + maxLength: 100 + transaction_id: + type: optional + docs: |- + The Square-generated ID of the [Transaction](entity:Transaction) that + caused the adjustment. Only relevant for payment-related state + transitions. + validation: + maxLength: 255 + access: read-only + refund_id: + type: optional + docs: |- + The Square-generated ID of the [Refund](entity:Refund) that + caused the adjustment. Only relevant for refund-related state + transitions. + validation: + maxLength: 255 + access: read-only + purchase_order_id: + type: optional + docs: >- + The Square-generated ID of the purchase order that caused the + + adjustment. Only relevant for state transitions from the Square for + Retail + + app. + validation: + maxLength: 100 + access: read-only + goods_receipt_id: + type: optional + docs: >- + The Square-generated ID of the goods receipt that caused the + + adjustment. Only relevant for state transitions from the Square for + Retail + + app. + validation: + maxLength: 100 + access: read-only + adjustment_group: + type: optional + docs: >- + An adjustment group bundling the related adjustments of item + variations through stock conversions in a single inventory event. + source: + openapi: openapi/openapi.json + InventoryAdjustmentGroup: + properties: + id: + type: optional + docs: |- + A unique ID generated by Square for the + `InventoryAdjustmentGroup`. + validation: + maxLength: 100 + access: read-only + root_adjustment_id: + type: optional + docs: The inventory adjustment of the composed variation. + validation: + maxLength: 100 + access: read-only + from_state: + type: optional + docs: >- + Representative `from_state` for adjustments within the group. For + example, for a group adjustment from `IN_STOCK` to `SOLD`, + + there can be two component adjustments in the group: one from + `IN_STOCK`to `COMPOSED` and the other one from `COMPOSED` to `SOLD`. + + Here, the representative `from_state` for the + `InventoryAdjustmentGroup` is `IN_STOCK`. + + See [InventoryState](#type-inventorystate) for possible values + to_state: + type: optional + docs: >- + Representative `to_state` for adjustments within group. For example, + for a group adjustment from `IN_STOCK` to `SOLD`, + + the two component adjustments in the group can be from `IN_STOCK` to + `COMPOSED` and from `COMPOSED` to `SOLD`. + + Here, the representative `to_state` of the `InventoryAdjustmentGroup` + is `SOLD`. + + See [InventoryState](#type-inventorystate) for possible values + source: + openapi: openapi/openapi.json + InventoryAlertType: + enum: + - NONE + - LOW_QUANTITY + docs: >- + Indicates whether Square should alert the merchant when the inventory + quantity of a CatalogItemVariation is low. + source: + openapi: openapi/openapi.json + InventoryChange: + docs: |- + Represents a single physical count, inventory, adjustment, or transfer + that is part of the history of inventory changes for a particular + [CatalogObject](entity:CatalogObject) instance. + properties: + type: + type: optional + docs: >- + Indicates how the inventory change is applied. See + + [InventoryChangeType](entity:InventoryChangeType) for all possible + values. + + See [InventoryChangeType](#type-inventorychangetype) for possible + values + physical_count: + type: optional + docs: |- + Contains details about the physical count when `type` is + `PHYSICAL_COUNT`, and is unset for all other change types. + adjustment: + type: optional + docs: |- + Contains details about the inventory adjustment when `type` is + `ADJUSTMENT`, and is unset for all other change types. + transfer: + type: optional + docs: >- + Contains details about the inventory transfer when `type` is + + `TRANSFER`, and is unset for all other change types. + + + _Note:_ An [InventoryTransfer](entity:InventoryTransfer) object can + only be set in the input to the + + [BatchChangeInventory](api-endpoint:Inventory-BatchChangeInventory) + endpoint when the seller has an active Retail Plus subscription. + measurement_unit: + type: optional + docs: >- + The [CatalogMeasurementUnit](entity:CatalogMeasurementUnit) object + representing the catalog measurement unit associated with the + inventory change. + measurement_unit_id: + type: optional + docs: >- + The ID of the [CatalogMeasurementUnit](entity:CatalogMeasurementUnit) + object representing the catalog measurement unit associated with the + inventory change. + access: read-only + source: + openapi: openapi/openapi.json + InventoryChangeType: + enum: + - PHYSICAL_COUNT + - ADJUSTMENT + - TRANSFER + docs: >- + Indicates how the inventory change was applied to a tracked product + quantity. + source: + openapi: openapi/openapi.json + InventoryCount: + docs: >- + Represents Square-estimated quantity of items in a particular state at a + + particular seller location based on the known history of physical counts + and + + inventory adjustments. + properties: + catalog_object_id: + type: optional> + docs: |- + The Square-generated ID of the + [CatalogObject](entity:CatalogObject) being tracked. + validation: + maxLength: 100 + catalog_object_type: + type: optional> + docs: >- + The [type](entity:CatalogObjectType) of the + [CatalogObject](entity:CatalogObject) being tracked. + + + The Inventory API supports setting and reading the + `"catalog_object_type": "ITEM_VARIATION"` field value. + + In addition, it can also read the `"catalog_object_type": "ITEM"` + field value that is set by the Square Restaurants app. + validation: + maxLength: 14 + state: + type: optional + docs: |- + The current [inventory state](entity:InventoryState) for the related + quantity of items. + See [InventoryState](#type-inventorystate) for possible values + location_id: + type: optional> + docs: >- + The Square-generated ID of the [Location](entity:Location) where the + related + + quantity of items is being tracked. + validation: + maxLength: 100 + quantity: + type: optional> + docs: >- + The number of items affected by the estimated count as a decimal + string. + + Can support up to 5 digits after the decimal point. + validation: + maxLength: 26 + calculated_at: + type: optional + docs: >- + An RFC 3339-formatted timestamp that indicates when the most recent + physical count or adjustment affecting + + the estimated count is received. + validation: + maxLength: 34 + access: read-only + is_estimated: + type: optional + docs: >- + Whether the inventory count is for composed variation (TRUE) or not + (FALSE). If true, the inventory count will not be present in the + response of + + any of these endpoints: + [BatchChangeInventory](api-endpoint:Inventory-BatchChangeInventory), + + [BatchRetrieveInventoryChanges](api-endpoint:Inventory-BatchRetrieveInventoryChanges), + + [BatchRetrieveInventoryCounts](api-endpoint:Inventory-BatchRetrieveInventoryCounts), + and + + [RetrieveInventoryChanges](api-endpoint:Inventory-RetrieveInventoryChanges). + access: read-only + source: + openapi: 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 + 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 the quantity of an item variation that is physically present + + at a specific location, verified by a seller or a seller's employee. For + example, + + a physical count might come from an employee counting the item variations + on + + hand or from syncing with an external system. + properties: + id: + type: optional + docs: |- + A unique Square-generated ID for the + [InventoryPhysicalCount](entity:InventoryPhysicalCount). + validation: + maxLength: 100 + reference_id: + type: optional> + docs: |- + An optional ID provided by the application to tie the + [InventoryPhysicalCount](entity:InventoryPhysicalCount) to an external + system. + validation: + maxLength: 255 + catalog_object_id: + type: optional> + docs: |- + The Square-generated ID of the + [CatalogObject](entity:CatalogObject) being tracked. + validation: + maxLength: 100 + catalog_object_type: + type: optional> + docs: >- + The [type](entity:CatalogObjectType) of the + [CatalogObject](entity:CatalogObject) being tracked. + + + The Inventory API supports setting and reading the + `"catalog_object_type": "ITEM_VARIATION"` field value. + + In addition, it can also read the `"catalog_object_type": "ITEM"` + field value that is set by the Square Restaurants app. + validation: + maxLength: 14 + state: + type: optional + docs: |- + The current [inventory state](entity:InventoryState) for the related + quantity of items. + See [InventoryState](#type-inventorystate) for possible values + location_id: + type: optional> + docs: >- + The Square-generated ID of the [Location](entity:Location) where the + related + + quantity of items is being tracked. + validation: + maxLength: 100 + quantity: + type: optional> + docs: >- + The number of items affected by the physical count as a decimal + string. + + The number can support up to 5 digits after the decimal point. + validation: + maxLength: 26 + source: + type: optional + docs: |- + Information about the application with which the + physical count is submitted. + employee_id: + type: optional> + docs: >- + The Square-generated ID of the [Employee](entity:Employee) responsible + for the + + physical count. + validation: + maxLength: 100 + team_member_id: + type: optional> + docs: >- + The Square-generated ID of the [Team Member](entity:TeamMember) + responsible for the + + physical count. + validation: + maxLength: 100 + occurred_at: + type: optional> + docs: >- + A client-generated RFC 3339-formatted timestamp that indicates when + + the physical count was examined. For physical count updates, the + `occurred_at` + + timestamp cannot be older than 24 hours or in the future relative to + the + + time of the request. + validation: + maxLength: 34 + created_at: + type: optional + docs: >- + An RFC 3339-formatted timestamp that indicates when the physical count + is received. + validation: + maxLength: 34 + access: read-only + source: + openapi: 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. + properties: + id: + type: optional + docs: |- + A unique ID generated by Square for the + `InventoryTransfer`. + validation: + maxLength: 100 + reference_id: + type: optional> + docs: |- + An optional ID provided by the application to tie the + `InventoryTransfer` to an external system. + validation: + maxLength: 255 + state: + type: optional + docs: |- + The [inventory state](entity:InventoryState) for the quantity of + items being transferred. + See [InventoryState](#type-inventorystate) for possible values + from_location_id: + type: optional> + docs: >- + The Square-generated ID of the [Location](entity:Location) where the + related + + quantity of items was tracked before the transfer. + validation: + maxLength: 100 + to_location_id: + type: optional> + docs: >- + The Square-generated ID of the [Location](entity:Location) where the + related + + quantity of items was tracked after the transfer. + validation: + maxLength: 100 + catalog_object_id: + type: optional> + docs: |- + The Square-generated ID of the + [CatalogObject](entity:CatalogObject) being tracked. + validation: + maxLength: 100 + catalog_object_type: + type: optional> + docs: >- + The [type](entity:CatalogObjectType) of the + [CatalogObject](entity:CatalogObject) being tracked. + + + The Inventory API supports setting and reading the + `"catalog_object_type": "ITEM_VARIATION"` field value. + + In addition, it can also read the `"catalog_object_type": "ITEM"` + field value that is set by the Square Restaurants app. + validation: + maxLength: 14 + quantity: + type: optional> + docs: |- + The number of items affected by the transfer as a decimal string. + Can support up to 5 digits after the decimal point. + validation: + maxLength: 26 + occurred_at: + type: optional> + docs: >- + A client-generated RFC 3339-formatted timestamp that indicates when + + the transfer took place. For write actions, the `occurred_at` + timestamp + + cannot be older than 24 hours or in the future relative to the time of + the + + request. + validation: + maxLength: 34 + created_at: + type: optional + docs: |- + An RFC 3339-formatted timestamp that indicates when Square + received the transfer request. + validation: + maxLength: 34 + access: read-only + source: + type: optional + docs: |- + Information about the application that initiated the + inventory transfer. + employee_id: + type: optional> + docs: >- + The Square-generated ID of the [Employee](entity:Employee) responsible + for the + + inventory transfer. + validation: + maxLength: 100 + team_member_id: + type: optional> + docs: >- + The Square-generated ID of the [Team Member](entity:TeamMember) + responsible for the + + inventory transfer. + validation: + maxLength: 100 + source: + openapi: openapi/openapi.json + Invoice: + docs: >- + Stores information about an invoice. You use the Invoices API to create + and manage + + invoices. For more information, see [Invoices API + Overview](https://developer.squareup.com/docs/invoices-api/overview). + properties: + id: + type: optional + docs: The Square-assigned ID of the invoice. + access: read-only + version: + type: optional + docs: >- + The Square-assigned version number, which is incremented each time an + update is committed to the invoice. + location_id: + type: optional> + docs: >- + The ID of the location that this invoice is associated with. + + + If specified in a `CreateInvoice` request, the value must match the + `location_id` of the associated order. + validation: + minLength: 1 + maxLength: 255 + order_id: + type: optional> + docs: >- + The ID of the [order](entity:Order) for which the invoice is created. + + This field is required when creating an invoice, and the order must be + in the `OPEN` state. + + + To view the line items and other information for the associated order, + call the + + [RetrieveOrder](api-endpoint:Orders-RetrieveOrder) endpoint using the + order ID. + validation: + minLength: 1 + maxLength: 255 + primary_recipient: + type: optional + docs: >- + The customer who receives the invoice. This customer data is displayed + on the invoice and used by Square to deliver the invoice. + + + This field is required to publish an invoice, and it must specify the + `customer_id`. + payment_requests: + type: optional>> + docs: >- + The payment schedule for the invoice, represented by one or more + payment requests that + + define payment settings, such as amount due and due date. An invoice + supports the following payment request combinations: + + - One balance + + - One deposit with one balance + + - 2–12 installments + + - One deposit with 2–12 installments + + + This field is required when creating an invoice. It must contain at + least one payment request. + + All payment requests for the invoice must equal the total order + amount. For more information, see + + [Configuring payment + requests](https://developer.squareup.com/docs/invoices-api/create-publish-invoices#payment-requests). + + + Adding `INSTALLMENT` payment requests to an invoice requires an + + [Invoices Plus + subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription). + delivery_method: + type: optional + docs: >- + The delivery method that Square uses to send the invoice, reminders, + and receipts to + + the customer. After the invoice is published, Square processes the + invoice based on the delivery + + method and payment request settings, either immediately or on the + `scheduled_at` date, if specified. + + For example, Square might send the invoice or receipt for an automatic + payment. For invoices with + + automatic payments, this field must be set to `EMAIL`. + + + One of the following is required when creating an invoice: + + - (Recommended) This `delivery_method` field. To configure an + automatic payment, the + + `automatic_payment_source` field of the payment request is also + required. + + - The deprecated `request_method` field of the payment request. Note + that `invoice` + + objects returned in responses do not include `request_method`. + + See [InvoiceDeliveryMethod](#type-invoicedeliverymethod) for possible + values + invoice_number: + type: optional> + docs: >- + A user-friendly invoice number that is displayed on the invoice. The + value is unique within a location. + + If not provided when creating an invoice, Square assigns a value. + + It increments from 1 and is padded with zeros making it 7 characters + long + + (for example, 0000001 and 0000002). + validation: + minLength: 1 + maxLength: 191 + title: + type: optional> + docs: The title of the invoice, which is displayed on the invoice. + validation: + minLength: 1 + maxLength: 255 + description: + type: optional> + docs: The description of the invoice, which is displayed on the invoice. + validation: + minLength: 1 + maxLength: 65536 + scheduled_at: + type: optional> + docs: >- + The timestamp when the invoice is scheduled for processing, in RFC + 3339 format. + + After the invoice is published, Square processes the invoice on the + specified date, + + according to the delivery method and payment request settings. + + + If the field is not set, Square processes the invoice immediately + after it is published. + public_url: + type: optional + docs: >- + A temporary link to the Square-hosted payment page where the customer + can pay the + + invoice. If the link expires, customers can provide the email address + or phone number + + associated with the invoice and request a new link directly from the + expired payment page. + + + This field is added after the invoice is published and reaches the + scheduled date + + (if one is defined). + access: read-only + next_payment_amount_money: + type: optional + docs: >- + The current amount due for the invoice. In addition to the + + amount due on the next payment request, this includes any overdue + payment amounts. + status: + type: optional + docs: |- + The status of the invoice. + See [InvoiceStatus](#type-invoicestatus) for possible values + timezone: + type: optional + docs: >- + The time zone used to interpret calendar dates on the invoice, such as + `due_date`. + + When an invoice is created, this field is set to the `timezone` + specified for the seller + + location. The value cannot be changed. + + + For example, a payment `due_date` of 2021-03-09 with a `timezone` of + America/Los\_Angeles + + becomes overdue at midnight on March 9 in America/Los\_Angeles (which + equals a UTC timestamp + + of 2021-03-10T08:00:00Z). + access: read-only + created_at: + type: optional + docs: The timestamp when the invoice was created, in RFC 3339 format. + access: read-only + updated_at: + type: optional + docs: The timestamp when the invoice was last updated, in RFC 3339 format. + access: read-only + accepted_payment_methods: + type: optional + docs: >- + The payment methods that customers can use to pay the invoice on the + Square-hosted + + invoice page. This setting is independent of any automatic payment + requests for the invoice. + + + This field is required when creating an invoice and must set at least + one payment method to `true`. + custom_fields: + type: optional>> + docs: >- + Additional seller-defined fields that are displayed on the invoice. + For more information, see + + [Custom + fields](https://developer.squareup.com/docs/invoices-api/overview#custom-fields). + + + Adding custom fields to an invoice requires an + + [Invoices Plus + subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription). + + + Max: 2 custom fields + subscription_id: + type: optional + docs: >- + The ID of the [subscription](entity:Subscription) associated with the + invoice. + + This field is present only on subscription billing invoices. + access: read-only + sale_or_service_date: + type: optional> + docs: >- + The date of the sale or the date that the service is rendered, in + `YYYY-MM-DD` format. + + This field can be used to specify a past or future date which is + displayed on the invoice. + payment_conditions: + type: optional> + docs: >- + **France only.** The payment terms and conditions that are displayed + on the invoice. For more information, + + see [Payment + conditions](https://developer.squareup.com/docs/invoices-api/overview#payment-conditions). + + + For countries other than France, Square returns an + `INVALID_REQUEST_ERROR` with a `BAD_REQUEST` code and + + "Payment conditions are not supported for this location's country" + detail if this field is included in `CreateInvoice` or `UpdateInvoice` + requests. + validation: + minLength: 1 + maxLength: 2000 + store_payment_method_enabled: + type: optional> + docs: >- + Indicates whether to allow a customer to save a credit or debit card + as a card on file or a bank transfer as a + + bank account on file. If `true`, Square displays a __Save my card on + file__ or __Save my bank on file__ checkbox on the + + invoice payment page. Stored payment information can be used for + future automatic payments. The default value is `false`. + attachments: + type: optional> + docs: >- + Metadata about the attachments on the invoice. Invoice attachments are + managed using the + + [CreateInvoiceAttachment](api-endpoint:Invoices-CreateInvoiceAttachment) + and + [DeleteInvoiceAttachment](api-endpoint:Invoices-DeleteInvoiceAttachment) + endpoints. + access: read-only + creator_team_member_id: + type: optional + docs: >- + The ID of the [team member](entity:TeamMember) who created the + invoice. + + This field is present only on invoices created in the Square Dashboard + or Square Invoices app by a logged-in team member. + access: read-only + source: + openapi: openapi/openapi.json + InvoiceAcceptedPaymentMethods: + docs: >- + The payment methods that customers can use to pay an + [invoice](entity:Invoice) on the Square-hosted invoice payment page. + properties: + card: + type: optional> + docs: >- + Indicates whether credit card or debit card payments are accepted. The + default value is `false`. + square_gift_card: + type: optional> + docs: >- + Indicates whether Square gift card payments are accepted. The default + value is `false`. + bank_account: + type: optional> + docs: >- + Indicates whether ACH bank transfer payments are accepted. The default + value is `false`. + buy_now_pay_later: + type: optional> + docs: >- + Indicates whether Afterpay (also known as Clearpay) payments are + accepted. The default value is `false`. + + + This option is allowed only for invoices that have a single payment + request of the `BALANCE` type. This payment method is + + supported if the seller account accepts Afterpay payments and the + seller location is in a country where Afterpay + + invoice payments are supported. As a best practice, consider enabling + an additional payment method when allowing + + `buy_now_pay_later` payments. For more information, including detailed + requirements and processing limits, see + + [Buy Now Pay Later payments with + Afterpay](https://developer.squareup.com/docs/invoices-api/overview#buy-now-pay-later). + cash_app_pay: + type: optional> + docs: >- + Indicates whether Cash App payments are accepted. The default value is + `false`. + + + This payment method is supported only for seller + [locations](entity:Location) in the United States. + source: + openapi: openapi/openapi.json + InvoiceAttachment: + docs: Represents a file attached to an [invoice](entity:Invoice). + properties: + id: + type: optional + docs: The Square-assigned ID of the attachment. + access: read-only + filename: + type: optional + docs: The file name of the attachment, which is displayed on the invoice. + access: read-only + description: + type: optional + docs: |- + The description of the attachment, which is displayed on the invoice. + This field maps to the seller-defined **Message** field. + access: read-only + filesize: + type: optional + docs: The file size of the attachment in bytes. + access: read-only + hash: + type: optional + docs: The MD5 hash that was generated from the file contents. + access: read-only + mime_type: + type: optional + docs: >- + The mime type of the attachment. + + The following mime types are supported: + + image/gif, image/jpeg, image/png, image/tiff, image/bmp, + application/pdf. + access: read-only + uploaded_at: + type: optional + docs: The timestamp when the attachment was uploaded, in RFC 3339 format. + access: read-only + source: + openapi: 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: 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 + InvoiceCreatedEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"invoice"`. + id: + type: optional + docs: ID of the affected invoice. + object: + type: optional + docs: An object containing the created invoice. + source: + openapi: 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, + + see [Custom + fields](https://developer.squareup.com/docs/invoices-api/overview#custom-fields). + + + Adding custom fields to an invoice requires an + + [Invoices Plus + subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription). + properties: + label: + type: optional> + docs: >- + The label or title of the custom field. This field is required for a + custom field. + validation: + maxLength: 30 + value: + type: optional> + docs: The text of the custom field. If omitted, only the label is rendered. + validation: + maxLength: 2000 + placement: + type: optional + docs: >- + The location of the custom field on the invoice. This field is + required for a custom field. + + See [InvoiceCustomFieldPlacement](#type-invoicecustomfieldplacement) + for possible values + source: + openapi: openapi/openapi.json + InvoiceCustomFieldPlacement: + enum: + - ABOVE_LINE_ITEMS + - BELOW_LINE_ITEMS + docs: >- + Indicates where to render a custom field on the Square-hosted invoice page + and in emailed or PDF + + copies of the invoice. + source: + openapi: openapi/openapi.json + InvoiceDeletedEvent: + docs: Published when a draft [Invoice](entity:Invoice) is deleted. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"invoice.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + InvoiceDeletedEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"invoice"`. + id: + type: optional + docs: ID of the affected invoice. + deleted: + type: optional> + docs: Indicates that the invoice was deleted. + source: + openapi: 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: |- + Limits the search to the specified locations. A location is required. + In the current implementation, only one location can be specified. + type: list + customer_ids: + type: optional>> + docs: >- + Limits the search to the specified customers, within the specified + locations. + + Specifying a customer is optional. In the current implementation, + + a maximum of one customer can be specified. + source: + openapi: openapi/openapi.json + InvoicePaymentMadeEvent: + docs: >- + Published when a payment that is associated with an + [invoice](entity:Invoice) is completed. + + For more information about invoice payments, see [Pay an + invoice](https://developer.squareup.com/docs/invoices-api/pay-refund-invoices#pay-invoice). + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"invoice.payment_made"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + InvoicePaymentMadeEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"invoice"`. + id: + type: optional + docs: ID of the affected invoice. + object: + type: optional + docs: An object containing the invoice that was paid. + source: + openapi: 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 + + to the customer. You configure a reminder relative to the payment request + + `due_date`. + properties: + uid: + type: optional + docs: |- + A Square-assigned ID that uniquely identifies the reminder within the + `InvoicePaymentRequest`. + access: read-only + relative_scheduled_days: + type: optional> + docs: >- + The number of days before (a negative number) or after (a positive + number) + + the payment request `due_date` when the reminder is sent. For example, + -3 indicates that + + the reminder should be sent 3 days before the payment request + `due_date`. + validation: + min: -32767 + max: 32767 + message: + type: optional> + docs: The reminder message. + validation: + minLength: 1 + maxLength: 1000 + status: + type: optional + docs: >- + The status of the reminder. + + See [InvoicePaymentReminderStatus](#type-invoicepaymentreminderstatus) + for possible values + sent_at: + type: optional + docs: If sent, the timestamp when the reminder was sent, in RFC 3339 format. + access: read-only + source: + openapi: 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). + properties: + uid: + type: optional> + docs: >- + The Square-generated ID of the payment request in an + [invoice](entity:Invoice). + validation: + minLength: 1 + maxLength: 255 + request_method: + type: optional + docs: >- + Indicates how Square processes the payment request. DEPRECATED at + version 2021-01-21. Replaced by the + + `Invoice.delivery_method` and + `InvoicePaymentRequest.automatic_payment_source` fields. + + + One of the following is required when creating an invoice: + + - (Recommended) The `delivery_method` field of the invoice. To + configure an automatic payment, the + + `automatic_payment_source` field of the payment request is also + required. + + - This `request_method` field. Note that `invoice` objects returned in + responses do not include `request_method`. + + See [InvoiceRequestMethod](#type-invoicerequestmethod) for possible + values + request_type: + type: optional + docs: >- + Identifies the payment request type. This type defines how the payment + request amount is determined. + + This field is required to create a payment request. + + See [InvoiceRequestType](#type-invoicerequesttype) for possible values + due_date: + type: optional> + docs: >- + The due date (in the invoice's time zone) for the payment request, in + `YYYY-MM-DD` format. This field + + is required to create a payment request. If an + `automatic_payment_source` is defined for the request, Square + + charges the payment source on this date. + + + After this date, the invoice becomes overdue. For example, a payment + `due_date` of 2021-03-09 with a `timezone` + + of America/Los\_Angeles becomes overdue at midnight on March 9 in + America/Los\_Angeles (which equals a UTC + + timestamp of 2021-03-10T08:00:00Z). + fixed_amount_requested_money: + type: optional + docs: >- + If the payment request specifies `DEPOSIT` or `INSTALLMENT` as the + `request_type`, + + this indicates the request amount. + + You cannot specify this when `request_type` is `BALANCE` or when the + + payment request includes the `percentage_requested` field. + percentage_requested: + type: optional> + docs: >- + Specifies the amount for the payment request in percentage: + + + - When the payment `request_type` is `DEPOSIT`, it is the percentage + of the order's total amount. + + - When the payment `request_type` is `INSTALLMENT`, it is the + percentage of the order's total less + + the deposit, if requested. The sum of the `percentage_requested` in + all installment + + payment requests must be equal to 100. + + + You cannot specify this when the payment `request_type` is `BALANCE` + or when the + + payment request specifies the `fixed_amount_requested_money` field. + tipping_enabled: + type: optional> + docs: >- + If set to true, the Square-hosted invoice page (the `public_url` field + of the invoice) + + provides a place for the customer to pay a tip. + + + This field is allowed only on the final payment request + + and the payment `request_type` must be `BALANCE` or `INSTALLMENT`. + automatic_payment_source: + type: optional + docs: >- + The payment method for an automatic payment. + + + The default value is `NONE`. + + See + [InvoiceAutomaticPaymentSource](#type-invoiceautomaticpaymentsource) + for possible values + card_id: + type: optional> + docs: >- + The ID of the credit or debit card on file to charge for the payment + request. To get the cards on file for a customer, + + call [ListCards](api-endpoint:Cards-ListCards) and include the + `customer_id` of the invoice recipient. + validation: + minLength: 1 + maxLength: 255 + reminders: + type: optional>> + docs: A list of one or more reminders to send for the payment request. + computed_amount_money: + type: optional + docs: >- + The amount of the payment request, computed using the order amount and + information from the various payment + + request fields (`request_type`, `fixed_amount_requested_money`, and + `percentage_requested`). + total_completed_amount_money: + type: optional + docs: >- + The amount of money already paid for the specific payment request. + + This amount might include a rounding adjustment if the most recent + invoice payment + + was in cash in a currency that rounds cash payments (such as, `CAD` or + `AUD`). + rounding_adjustment_included_money: + type: optional + docs: >- + If the most recent payment was a cash payment + + in a currency that rounds cash payments (such as, `CAD` or `AUD`) and + the payment + + is rounded from `computed_amount_money` in the payment request, then + this + + field specifies the rounding adjustment applied. This amount + + might be negative. + source: + openapi: openapi/openapi.json + InvoicePublishedEvent: + docs: >- + Published when an [Invoice](entity:Invoice) transitions from a draft to a + non-draft status. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"invoice.published"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + InvoicePublishedEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"invoice"`. + id: + type: optional + docs: ID of the affected invoice. + object: + type: optional + docs: An object containing the published invoice. + source: + openapi: 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: >- + Query filters to apply in searching invoices. + + For more information, see [Search for + invoices](https://developer.squareup.com/docs/invoices-api/retrieve-list-search-invoices#search-invoices). + sort: + type: optional + docs: Describes the sort order for the search result. + source: + openapi: openapi/openapi.json + InvoiceRecipient: + docs: >- + Represents a snapshot of customer data. This object stores customer data + that is displayed on the invoice + + and that Square uses to deliver the invoice. + + + When you provide a customer ID for a draft invoice, Square retrieves the + associated customer profile and populates + + the remaining `InvoiceRecipient` fields. You cannot update these fields + after the invoice is published. + + Square updates the customer ID in response to a merge operation, but does + not update other fields. + properties: + customer_id: + type: optional> + docs: |- + The ID of the customer. This is the customer profile ID that + you provide when creating a draft invoice. + validation: + minLength: 1 + maxLength: 255 + given_name: + type: optional + docs: The recipient's given (that is, first) name. + access: read-only + family_name: + type: optional + docs: The recipient's family (that is, last) name. + access: read-only + email_address: + type: optional + docs: The recipient's email address. + access: read-only + address: + type: optional
+ docs: The recipient's physical address. + phone_number: + type: optional + docs: The recipient's phone number. + access: read-only + company_name: + type: optional + docs: The name of the recipient's company. + access: read-only + tax_ids: + type: optional + docs: >- + The recipient's tax IDs. The country of the seller account determines + whether this field + + is available for the customer. For more information, see [Invoice + recipient tax + IDs](https://developer.squareup.com/docs/invoices-api/overview#recipient-tax-ids). + source: + openapi: openapi/openapi.json + InvoiceRecipientTaxIds: + docs: >- + Represents the tax IDs for an invoice recipient. The country of the seller + account determines + + whether the corresponding `tax_ids` field is available for the customer. + For more information, + + see [Invoice recipient tax + IDs](https://developer.squareup.com/docs/invoices-api/overview#recipient-tax-ids). + properties: + eu_vat: + type: optional + docs: >- + The EU VAT identification number for the invoice recipient. For + example, `IE3426675K`. + access: read-only + source: + openapi: openapi/openapi.json + InvoiceRefundedEvent: + docs: >- + Published when a refund is applied toward a payment of an + [invoice](entity:Invoice). + + For more information about invoice refunds, see [Refund an + invoice](https://developer.squareup.com/docs/invoices-api/pay-refund-invoices#refund-invoice). + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"invoice.refunded"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: 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, + + email the invoice, charge a customer's card on file, or do nothing. + DEPRECATED at + + version 2021-01-21. The corresponding `request_method` field is replaced + by the + + `Invoice.delivery_method` and + `InvoicePaymentRequest.automatic_payment_source` fields. + source: + openapi: openapi/openapi.json + InvoiceRequestType: + enum: + - BALANCE + - DEPOSIT + - INSTALLMENT + docs: >- + Indicates the type of the payment request. For more information, see + + [Configuring payment + requests](https://developer.squareup.com/docs/invoices-api/create-publish-invoices#payment-requests). + source: + openapi: openapi/openapi.json + InvoiceScheduledChargeFailedEvent: + docs: >- + Published when an automatic scheduled payment for an + [Invoice](entity:Invoice) has failed. + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: >- + The type of event this represents, + `"invoice.scheduled_charge_failed"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + InvoiceScheduledChargeFailedEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"invoice"`. + id: + type: optional + docs: ID of the affected invoice. + object: + type: optional + docs: >- + An object containing the invoice that experienced the failed scheduled + charge. + source: + openapi: 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: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"invoice.updated"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + InvoiceUpdatedEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"invoice"`. + id: + type: optional + docs: ID of the affected invoice. + object: + type: optional + docs: An object containing the updated invoice. + source: + openapi: 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: >- + The ID of the `Location`. This can include locations that are + deactivated. + price_money: + type: optional + docs: >- + The price of the `CatalogItemVariation` at the given `Location`, or + blank for variable pricing. + pricing_type: + type: optional + docs: >- + The pricing type (fixed or variable) for the `CatalogItemVariation` at + the given `Location`. + + See [CatalogPricingType](#type-catalogpricingtype) for possible values + track_inventory: + type: optional> + docs: >- + If `true`, inventory tracking is active for the `CatalogItemVariation` + at this `Location`. + inventory_alert_type: + type: optional + docs: >- + Indicates whether the `CatalogItemVariation` displays an alert when + its inventory + + quantity is less than or equal to its `inventory_alert_threshold`. + + See [InventoryAlertType](#type-inventoryalerttype) for possible values + inventory_alert_threshold: + type: optional> + docs: >- + If the inventory quantity for the variation is less than or equal to + this value and `inventory_alert_type` + + is `LOW_QUANTITY`, the variation displays an alert in the merchant + dashboard. + + + This value is always an integer. + sold_out: + type: optional + docs: >- + Indicates whether the overridden item variation is sold out at the + specified location. + + + When inventory tracking is enabled on the item variation either + globally or at the specified location, + + the item variation is automatically marked as sold out when its + inventory count reaches zero. The seller + + can manually set the item variation as sold out even when the + inventory count is greater than zero. + + Attempts by an application to set this attribute are ignored. + Regardless how the sold-out status is set, + + applications should treat its inventory count as zero when this + attribute value is `true`. + access: read-only + sold_out_valid_until: + type: optional + docs: >- + The seller-assigned timestamp, of the RFC 3339 format, to indicate + when this sold-out variation + + becomes available again at the specified location. Attempts by an + application to set this attribute are ignored. + + When the current time is later than this attribute value, the affected + item variation is no longer sold out. + access: read-only + source: + openapi: openapi/openapi.json + Job: + docs: >- + Represents a job that can be assigned to [team + members](entity:TeamMember). This object defines the + + job's title and tip eligibility. Compensation is defined in a [job + assignment](entity:JobAssignment) + + in a team member's wage setting. + properties: + id: + type: optional + docs: >- + **Read only** The unique Square-assigned ID of the job. If you need a + job ID for an API request, + + call [ListJobs](api-endpoint:Team-ListJobs) or use the ID returned + when you created the job. + + You can also get job IDs from a team member's wage setting. + title: + type: optional> + docs: The title of the job. + validation: + maxLength: 150 + is_tip_eligible: + type: optional> + docs: Indicates whether team members can earn tips for the job. + created_at: + type: optional + docs: The timestamp when the job was created, in RFC 3339 format. + access: read-only + updated_at: + type: optional + docs: The timestamp when the job was last updated, in RFC 3339 format. + access: read-only + version: + type: optional + docs: >- + **Read only** The current version of the job. Include this field in + `UpdateJob` requests to enable + + [optimistic + concurrency](https://developer.squareup.com/docs/working-with-apis/optimistic-concurrency) + + control and avoid overwrites from concurrent requests. Requests fail + if the provided version doesn't + + match the server version at the time of the request. + source: + openapi: openapi/openapi.json + JobAssignment: + docs: >- + Represents a job assigned to a [team member](entity:TeamMember), including + the compensation the team + + member earns for the job. Job assignments are listed in the team member's + [wage setting](entity:WageSetting). + properties: + job_title: + type: optional> + docs: The title of the job. + pay_type: + type: JobAssignmentPayType + docs: >- + The current pay type for the job assignment used to + + calculate the pay amount in a pay period. + + See [JobAssignmentPayType](#type-jobassignmentpaytype) for possible + values + hourly_rate: + type: optional + docs: >- + The hourly pay rate of the job. For `SALARY` pay types, Square + calculates the hourly rate based on + + `annual_rate` and `weekly_hours`. + annual_rate: + type: optional + docs: >- + The total pay amount for a 12-month period on the job. Set if the job + `PayType` is `SALARY`. + weekly_hours: + type: optional> + docs: >- + The planned hours per week for the job. Set if the job `PayType` is + `SALARY`. + job_id: + type: optional> + docs: The ID of the [job](entity:Job). + source: + openapi: openapi/openapi.json + 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: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: The type of event this represents, `"job.created"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: Timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: Data associated with the event. + source: + openapi: openapi/openapi.json + JobCreatedEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"job"`. + id: + type: optional + docs: ID of the created job. + object: + type: optional + docs: An object containing the created job. + source: + openapi: 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: 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 + JobUpdatedEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"job"`. + id: + type: optional + docs: ID of the updated job. + object: + type: optional + docs: An object containing the updated job. + source: + openapi: openapi/openapi.json + JobUpdatedEventObject: + properties: + job: + type: optional + docs: The updated job. + source: + openapi: openapi/openapi.json + LaborScheduledShiftCreatedEvent: + docs: Published when a [ScheduledShift](entity:ScheduledShift) is created. + properties: + merchant_id: + type: optional> + docs: The ID of the merchant associated with the event. + location_id: + type: optional> + docs: The ID of the location associated with the event. + type: + type: optional> + docs: >- + The type of event. For this event, the value is + `labor.scheduled_shift.created`. + event_id: + type: optional> + docs: The unique ID for the event. + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + LaborScheduledShiftCreatedEventData: + properties: + type: + type: optional> + docs: >- + The type of object affected by the event. For this event, the value is + `scheduled_shift`. + validation: + maxLength: 50 + id: + type: optional + docs: The ID of the affected `ScheduledShift`. + validation: + maxLength: 255 + object: + type: optional + docs: An object containing the affected `ScheduledShift`. + source: + openapi: openapi/openapi.json + LaborScheduledShiftCreatedEventObject: + properties: + ScheduledShift: + type: optional + docs: The new `ScheduledShift`. + source: + openapi: openapi/openapi.json + LaborScheduledShiftDeletedEvent: + docs: Published when a [ScheduledShift](entity:ScheduledShift) is deleted. + properties: + merchant_id: + type: optional> + docs: The ID of the merchant associated with the event. + location_id: + type: optional> + docs: The ID of the location associated with the event. + type: + type: optional> + docs: >- + The type of event. For this event, the value is + `labor.scheduled_shift.deleted`. + event_id: + type: optional> + docs: The unique ID for the event. + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + LaborScheduledShiftDeletedEventData: + properties: + type: + type: optional> + docs: >- + The type of object affected by the event. For this event, the value is + `scheduled_shift`. + validation: + maxLength: 50 + id: + type: optional + docs: The ID of the affected `ScheduledShift`. + validation: + maxLength: 255 + deleted: + type: optional> + docs: Is true if the affected object was deleted. Otherwise absent. + source: + openapi: openapi/openapi.json + LaborScheduledShiftPublishedEvent: + docs: Published when a [ScheduledShift](entity:ScheduledShift) is published. + properties: + merchant_id: + type: optional> + docs: The ID of the merchant associated with the event. + location_id: + type: optional> + docs: The ID of the location associated with the event. + type: + type: optional> + docs: >- + The type of event. For this event, the value is + `labor.scheduled_shift.published`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + LaborScheduledShiftPublishedEventData: + properties: + type: + type: optional> + docs: >- + The type of object affected by the event. For this event, the value is + `scheduled_shift`. + validation: + maxLength: 50 + id: + type: optional + docs: The ID of the affected `ScheduledShift`. + validation: + maxLength: 255 + object: + type: optional + docs: An object containing the affected `ScheduledShift`. + source: + openapi: 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 ID of the merchant associated with the event. + location_id: + type: optional> + docs: The ID of the location associated with the event. + type: + type: optional> + docs: >- + The type of event. For this event, the value is + `labor.scheduled_shift.updated`. + event_id: + type: optional> + docs: The unique ID for the event. + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + LaborScheduledShiftUpdatedEventData: + properties: + type: + type: optional> + docs: >- + The type of object affected by the event. For this event, the value is + `scheduled_shift`. + validation: + maxLength: 50 + id: + type: optional + docs: The ID of the affected `ScheduledShift`. + validation: + maxLength: 255 + object: + type: optional + docs: An object containing the affected `ScheduledShift`. + source: + openapi: 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). + + + 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: >- + 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. + + + 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 + LaborShiftDeletedEventData: + properties: + type: + type: optional> + docs: >- + The type of object affected by the event. For this event, the value is + `shift`. + id: + type: optional + docs: The ID of the affected `Shift`. + deleted: + type: optional> + docs: Is true if the affected object was deleted. Otherwise absent. + source: + openapi: openapi/openapi.json + LaborShiftUpdatedEvent: + docs: >- + Published when a [Shift](entity:Shift) is updated. + + + Deprecated at Square API version 2025-05-21. Replaced by + `labor.timecard.updated`. + properties: + merchant_id: + type: optional> + docs: The ID of the merchant associated with the event. + type: + type: optional> + docs: The type of event. For this event, the value is `labor.shift.updated`. + event_id: + type: optional> + docs: The unique ID for the event. + created_at: + type: optional + docs: The timestamp of when the event was created, in RFC 3339 format. + access: read-only + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + LaborShiftUpdatedEventData: + properties: + type: + type: optional> + docs: >- + The type of object affected by the event. For this event, the value is + `shift`. + id: + type: optional + docs: ID of the affected `Shift`. + object: + type: optional + docs: An object containing the affected `Shift`. + source: + openapi: 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 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 + LaborTimecardCreatedEventData: + properties: + type: + type: optional> + docs: >- + The type of object affected by the event. For this event, the value is + `timecard`. + id: + type: optional + docs: The ID of the affected `Timecard`. + object: + type: optional + docs: An object containing the affected `Timecard`. + source: + openapi: 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 + 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 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 + data: + type: optional + docs: The data associated with the event. + source: + openapi: openapi/openapi.json + LaborTimecardUpdatedEventData: + properties: + type: + type: optional> + docs: >- + The type of object affected by the event. For this event, the value is + `timecard`. + id: + type: optional + docs: The ID of the affected `Timecard`. + object: + type: optional + docs: An object containing the affected `Timecard`. + source: + openapi: openapi/openapi.json + LaborTimecardUpdatedEventObject: + properties: + timecard: + type: optional + docs: The updated `Timecard`. + source: + openapi: openapi/openapi.json + LinkCustomerToGiftCardResponse: + docs: >- + A response that contains the linked `GiftCard` object. If the request + resulted in errors, + + the response contains a set of `Error` objects. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + gift_card: + type: optional + docs: >- + The gift card with the ID of the linked customer listed in the + `customer_ids` field. + source: + openapi: openapi/openapi.json + ListBankAccountsResponse: + docs: Response object returned by ListBankAccounts. + properties: + errors: + type: optional> + docs: Information on errors encountered during the request. + bank_accounts: + type: optional> + docs: List of BankAccounts associated with this account. + cursor: + type: optional + docs: >- + When a response is truncated, it includes a cursor that you can + + use in a subsequent request to fetch next set of bank accounts. + + If empty, this is the final response. + + + For more information, see + [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). + source: + openapi: openapi/openapi.json + ListBookingCustomAttributeDefinitionsResponse: + docs: >- + Represents a + [ListBookingCustomAttributeDefinitions](api-endpoint:BookingCustomAttributes-ListBookingCustomAttributeDefinitions) + response. + + Either `custom_attribute_definitions`, an empty object, or `errors` is + present in the response. + + If additional results are available, the `cursor` field is also present + along with `custom_attribute_definitions`. + properties: + custom_attribute_definitions: + type: optional> + docs: >- + The retrieved custom attribute definitions. If no custom attribute + definitions are found, + + Square returns an empty object (`{}`). + cursor: + type: optional + docs: >- + The cursor to provide in your next call to this endpoint to retrieve + the next page of + + results for your original request. This field is present only if the + request succeeded and + + additional results are available. For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + ListBookingCustomAttributesResponse: + docs: >- + Represents a + [ListBookingCustomAttributes](api-endpoint:BookingCustomAttributes-ListBookingCustomAttributes) + response. + + Either `custom_attributes`, an empty object, or `errors` is present in the + response. If additional + + results are available, the `cursor` field is also present along with + `custom_attributes`. + properties: + custom_attributes: + type: optional> + docs: >- + The retrieved custom attributes. If `with_definitions` was set to + `true` in the request, + + the custom attribute definition is returned in the `definition` field + of each custom attribute. + + + If no custom attributes are found, Square returns an empty object + (`{}`). + cursor: + type: optional + docs: >- + The cursor to use in your next call to this endpoint to retrieve the + next page of results + + for your original request. This field is present only if the request + succeeded and additional + + results are available. For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + ListBookingsResponse: + properties: + bookings: + type: optional> + docs: The list of targeted bookings. + cursor: + type: optional + docs: >- + The pagination cursor to be used in the subsequent request to get the + next page of the results. Stop retrieving the next page of the results + when the cursor is not set. + validation: + maxLength: 65536 + errors: + type: optional> + docs: Errors that occurred during the request. + source: + openapi: openapi/openapi.json + ListBreakTypesResponse: + docs: >- + The response to a request for a set of `BreakType` objects. The response + contains + + the requested `BreakType` objects and might contain a set of `Error` + objects if + + the request resulted in errors. + properties: + break_types: + type: optional> + docs: ' A page of `BreakType` results.' + cursor: + type: optional + docs: |- + The value supplied in the subsequent request to fetch the next page + of `BreakType` results. + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + ListCardsResponse: + docs: >- + Defines the fields that are included in the response body of + + a request to the [ListCards](api-endpoint:Cards-ListCards) endpoint. + + + Note: if there are errors processing the request, the card field will not + be + + present. + properties: + errors: + type: optional> + docs: Information on errors encountered during the request. + cards: + type: optional> + docs: The requested list of `Card`s. + cursor: + type: optional + docs: >- + The pagination cursor to be used in a subsequent request. If empty, + + this is the final response. + + + See + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) + for more information. + source: + openapi: 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 pagination cursor to be used in a subsequent request. If unset, + this is the final response. + + See + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) + for more information. + objects: + type: optional> + docs: The CatalogObjects returned. + source: + openapi: openapi/openapi.json + ListCustomerCustomAttributeDefinitionsResponse: + docs: >- + Represents a + [ListCustomerCustomAttributeDefinitions](api-endpoint:CustomerCustomAttributes-ListCustomerCustomAttributeDefinitions) + response. + + Either `custom_attribute_definitions`, an empty object, or `errors` is + present in the response. + + If additional results are available, the `cursor` field is also present + along with `custom_attribute_definitions`. + properties: + custom_attribute_definitions: + type: optional> + docs: >- + The retrieved custom attribute definitions. If no custom attribute + definitions are found, + + Square returns an empty object (`{}`). + cursor: + type: optional + docs: >- + The cursor to provide in your next call to this endpoint to retrieve + the next page of + + results for your original request. This field is present only if the + request succeeded and + + additional results are available. For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + ListCustomerCustomAttributesResponse: + docs: >- + Represents a + [ListCustomerCustomAttributes](api-endpoint:CustomerCustomAttributes-ListCustomerCustomAttributes) + response. + + Either `custom_attributes`, an empty object, or `errors` is present in the + response. If additional + + results are available, the `cursor` field is also present along with + `custom_attributes`. + properties: + custom_attributes: + type: optional> + docs: >- + The retrieved custom attributes. If `with_definitions` was set to + `true` in the request, + + the custom attribute definition is returned in the `definition` field + of each custom attribute. + + + If no custom attributes are found, Square returns an empty object + (`{}`). + cursor: + type: optional + docs: >- + The cursor to use in your next call to this endpoint to retrieve the + next page of results + + for your original request. This field is present only if the request + succeeded and additional + + results are available. For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + ListCustomerGroupsResponse: + docs: >- + Defines the fields that are included in the response body of + + a request to the + [ListCustomerGroups](api-endpoint:CustomerGroups-ListCustomerGroups) + endpoint. + + + Either `errors` or `groups` is present in a given response (never both). + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + groups: + type: optional> + docs: A list of customer groups belonging to the current seller. + cursor: + type: optional + docs: >- + A pagination cursor to retrieve the next set of results for your + + original query to the endpoint. This value is present only if the + request + + succeeded and additional results are available. + + + For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + source: + openapi: openapi/openapi.json + ListCustomerSegmentsResponse: + docs: >- + Defines the fields that are included in the response body for requests to + the `ListCustomerSegments` endpoint. + + + Either `errors` or `segments` is present in a given response (never both). + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + segments: + type: optional> + docs: >- + The list of customer segments belonging to the associated Square + account. + cursor: + type: optional + docs: >- + A pagination cursor to be used in subsequent calls to + `ListCustomerSegments` + + to retrieve the next set of query results. The cursor is only present + if the request succeeded and + + additional results are available. + + + For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + source: + openapi: openapi/openapi.json + ListCustomersResponse: + docs: >- + Defines the fields that are included in the response body of + + a request to the `ListCustomers` endpoint. + + + Either `errors` or `customers` is present in a given response (never + both). + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + customers: + type: optional> + docs: >- + The customer profiles associated with the Square account or an empty + object (`{}`) if none are found. + + Only customer profiles with public information (`given_name`, + `family_name`, `company_name`, `email_address`, or + + `phone_number`) are included in the response. + cursor: + type: optional + docs: >- + A pagination cursor to retrieve the next set of results for the + + original query. A cursor is only present if the request succeeded and + additional results + + are available. + + + For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + count: + type: optional + docs: >- + The total count of customers associated with the Square account. Only + customer profiles with public information + + (`given_name`, `family_name`, `company_name`, `email_address`, or + `phone_number`) are counted. This field is present + + only if `count` is set to `true` in the request. + source: + openapi: openapi/openapi.json + ListDeviceCodesResponse: + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + device_codes: + type: optional> + docs: The queried DeviceCode. + cursor: + type: optional + docs: >- + A pagination cursor to retrieve the next set of results for your + + original query to the endpoint. This value is present only if the + request + + succeeded and additional results are available. + + + See [Paginating + results](https://developer.squareup.com/docs/working-with-apis/pagination) + for more information. + source: + openapi: openapi/openapi.json + ListDevicesResponse: + properties: + errors: + type: optional> + docs: Information about errors that occurred during the request. + devices: + type: optional> + docs: The requested list of `Device` objects. + cursor: + type: optional + docs: >- + The pagination cursor to be used in a subsequent request. If empty, + + this is the final response. + + See + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) + for more information. + source: + openapi: openapi/openapi.json + ListDisputeEvidenceResponse: + docs: Defines the fields in a `ListDisputeEvidence` response. + properties: + evidence: + type: optional> + docs: The list of evidence previously uploaded to the specified dispute. + errors: + type: optional> + docs: Information about errors encountered during the request. + cursor: + type: optional + docs: >- + The pagination cursor to be used in a subsequent request. + + If unset, this is the final response. For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + source: + openapi: openapi/openapi.json + ListDisputesResponse: + docs: Defines fields in a `ListDisputes` response. + properties: + errors: + type: optional> + docs: Information about errors encountered during the request. + disputes: + type: optional> + docs: The list of disputes. + cursor: + type: optional + docs: >- + The pagination cursor to be used in a subsequent request. + + If unset, this is the final response. For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + source: + openapi: openapi/openapi.json + ListEmployeeWagesResponse: + docs: >- + The response to a request for a set of `EmployeeWage` objects. The + response contains + + a set of `EmployeeWage` objects. + properties: + employee_wages: + type: optional> + docs: A page of `EmployeeWage` results. + cursor: + type: optional + docs: |- + The value supplied in the subsequent request to fetch the next page + of `EmployeeWage` results. + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + ListEmployeesResponse: + properties: + employees: optional> + cursor: + type: optional + docs: The token to be used to retrieve the next page of results. + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + ListEventTypesResponse: + docs: >- + Defines the fields that are included in the response body of + + a request to the [ListEventTypes](api-endpoint:Events-ListEventTypes) + endpoint. + + + Note: if there are errors processing the request, the event types field + will not be + + present. + properties: + errors: + type: optional> + docs: Information on errors encountered during the request. + event_types: + type: optional> + docs: The list of event types. + metadata: + type: optional> + docs: >- + Contains the metadata of an event type. For more information, see + [EventTypeMetadata](entity:EventTypeMetadata). + source: + openapi: 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: >- + When a response is truncated, it includes a cursor that you can use in + a + + subsequent request to retrieve the next set of gift cards. If a cursor + is not present, this is + + the final response. + + For more information, see + [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). + source: + openapi: openapi/openapi.json + ListInvoicesResponse: + docs: Describes a `ListInvoice` response. + properties: + invoices: + type: optional> + docs: The invoices retrieved. + cursor: + type: optional + docs: >- + When a response is truncated, it includes a cursor that you can use in + a + + subsequent request to retrieve the next set of invoices. If empty, + this is the final + + response. + + For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + errors: + type: optional> + docs: Information about errors encountered during the request. + source: + openapi: openapi/openapi.json + ListJobsResponse: + docs: >- + Represents a [ListJobs](api-endpoint:Team-ListJobs) response. Either + `jobs` or `errors` + + is present in the response. If additional results are available, the + `cursor` field is also present. + properties: + jobs: + type: optional> + docs: The retrieved jobs. A single paged response contains up to 100 jobs. + cursor: + type: optional + docs: >- + An opaque cursor used to retrieve the next page of results. This field + is present only + + if the request succeeded and additional results are available. For + more information, see + + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + errors: + type: optional> + docs: The errors that occurred during the request. + source: + openapi: openapi/openapi.json + ListLocationBookingProfilesResponse: + properties: + location_booking_profiles: + type: optional> + docs: The list of a seller's location booking profiles. + cursor: + type: optional + docs: >- + The pagination cursor to be used in the subsequent request to get the + next page of the results. Stop retrieving the next page of the results + when the cursor is not set. + errors: + type: optional> + docs: Errors that occurred during the request. + source: + openapi: openapi/openapi.json + ListLocationCustomAttributeDefinitionsResponse: + docs: >- + Represents a + [ListLocationCustomAttributeDefinitions](api-endpoint:LocationCustomAttributes-ListLocationCustomAttributeDefinitions) + response. + + Either `custom_attribute_definitions`, an empty object, or `errors` is + present in the response. + + If additional results are available, the `cursor` field is also present + along with `custom_attribute_definitions`. + properties: + custom_attribute_definitions: + type: optional> + docs: >- + The retrieved custom attribute definitions. If no custom attribute + definitions are found, + + Square returns an empty object (`{}`). + cursor: + type: optional + docs: >- + The cursor to provide in your next call to this endpoint to retrieve + the next page of + + results for your original request. This field is present only if the + request succeeded and + + additional results are available. For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + ListLocationCustomAttributesResponse: + docs: >- + Represents a + [ListLocationCustomAttributes](api-endpoint:LocationCustomAttributes-ListLocationCustomAttributes) + response. + + Either `custom_attributes`, an empty object, or `errors` is present in the + response. If additional + + results are available, the `cursor` field is also present along with + `custom_attributes`. + properties: + custom_attributes: + type: optional> + docs: >- + The retrieved custom attributes. If `with_definitions` was set to + `true` in the request, + + the custom attribute definition is returned in the `definition` field + of each custom attribute. + + If no custom attributes are found, Square returns an empty object + (`{}`). + cursor: + type: optional + docs: >- + The cursor to use in your next call to this endpoint to retrieve the + next page of results + + for your original request. This field is present only if the request + succeeded and additional + + results are available. For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + ListLocationsResponse: + docs: >- + Defines the fields that are included in the response body of a request + + to the [ListLocations](api-endpoint:Locations-ListLocations) endpoint. + + + Either `errors` or `locations` is present in a given response (never + both). + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + locations: + type: optional> + docs: The business locations. + source: + openapi: openapi/openapi.json + ListLoyaltyProgramsResponse: + docs: A response that contains all loyalty programs. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + programs: + type: optional> + docs: A list of `LoyaltyProgram` for the merchant. + source: + openapi: openapi/openapi.json + ListLoyaltyPromotionsResponse: + docs: >- + Represents a + [ListLoyaltyPromotions](api-endpoint:Loyalty-ListLoyaltyPromotions) + response. + + One of `loyalty_promotions`, an empty object, or `errors` is present in + the response. + + If additional results are available, the `cursor` field is also present + along with `loyalty_promotions`. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + loyalty_promotions: + type: optional> + docs: The retrieved loyalty promotions. + cursor: + type: optional + docs: >- + The cursor to use in your next call to this endpoint to retrieve the + next page of results + + for your original request. This field is present only if the request + succeeded and additional + + results are available. For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + source: + openapi: openapi/openapi.json + ListMerchantCustomAttributeDefinitionsResponse: + docs: >- + Represents a + [ListMerchantCustomAttributeDefinitions](api-endpoint:MerchantCustomAttributes-ListMerchantCustomAttributeDefinitions) + response. + + Either `custom_attribute_definitions`, an empty object, or `errors` is + present in the response. + + If additional results are available, the `cursor` field is also present + along with `custom_attribute_definitions`. + properties: + custom_attribute_definitions: + type: optional> + docs: >- + The retrieved custom attribute definitions. If no custom attribute + definitions are found, + + Square returns an empty object (`{}`). + cursor: + type: optional + docs: >- + The cursor to provide in your next call to this endpoint to retrieve + the next page of + + results for your original request. This field is present only if the + request succeeded and + + additional results are available. For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + ListMerchantCustomAttributesResponse: + docs: >- + Represents a + [ListMerchantCustomAttributes](api-endpoint:MerchantCustomAttributes-ListMerchantCustomAttributes) + response. + + Either `custom_attributes`, an empty object, or `errors` is present in the + response. If additional + + results are available, the `cursor` field is also present along with + `custom_attributes`. + properties: + custom_attributes: + type: optional> + docs: >- + The retrieved custom attributes. If `with_definitions` was set to + `true` in the request, + + the custom attribute definition is returned in the `definition` field + of each custom attribute. + + If no custom attributes are found, Square returns an empty object + (`{}`). + cursor: + type: optional + docs: >- + The cursor to use in your next call to this endpoint to retrieve the + next page of results + + for your original request. This field is present only if the request + succeeded and additional + + results are available. For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + ListMerchantsResponse: + docs: >- + The response object returned by the + [ListMerchant](api-endpoint:Merchants-ListMerchants) endpoint. + properties: + errors: + type: optional> + docs: Information on errors encountered during the request. + merchant: + type: optional> + docs: The requested `Merchant` entities. + cursor: + type: optional + docs: >- + If the response is truncated, the cursor to use in next request to + fetch next set of objects. + source: + openapi: openapi/openapi.json + ListOrderCustomAttributeDefinitionsResponse: + docs: Represents a response from listing order custom attribute definitions. + properties: + custom_attribute_definitions: + docs: >- + The retrieved custom attribute definitions. If no custom attribute + definitions are found, Square returns an empty object (`{}`). + type: list + cursor: + type: optional + docs: >- + The cursor to provide in your next call to this endpoint to retrieve + the next page of results for your original request. + + This field is present only if the request succeeded and additional + results are available. + + For more information, see + [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). + validation: + minLength: 1 + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + ListOrderCustomAttributesResponse: + docs: Represents a response from listing order custom attributes. + properties: + custom_attributes: + type: optional> + docs: >- + The retrieved custom attributes. If no custom attribute are found, + Square returns an empty object (`{}`). + cursor: + type: optional + docs: >- + The cursor to provide in your next call to this endpoint to retrieve + the next page of results for your original request. + + This field is present only if the request succeeded and additional + results are available. + + For more information, see + [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). + validation: + minLength: 1 + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + ListPaymentLinksResponse: + properties: + errors: + type: optional> + docs: Errors that occurred during the request. + payment_links: + type: optional> + docs: The list of payment links. + cursor: + type: optional + docs: >2- + When a response is truncated, it includes a cursor that you can use in a subsequent request + to retrieve the next set of gift cards. If a cursor is not present, + this is the final response. + + For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + source: + openapi: openapi/openapi.json + ListPaymentRefundsRequestSortField: + enum: + - CREATED_AT + - UPDATED_AT + source: + openapi: openapi/openapi.json + ListPaymentRefundsResponse: + docs: >- + Defines the response returned by + [ListPaymentRefunds](api-endpoint:Refunds-ListPaymentRefunds). + + + Either `errors` or `refunds` is present in a given response (never both). + properties: + errors: + type: optional> + docs: Information about errors encountered during the request. + refunds: + type: optional> + docs: The list of requested refunds. + cursor: + type: optional + docs: >- + The pagination cursor to be used in a subsequent request. If empty, + + this is the final response. + + + For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + source: + openapi: openapi/openapi.json + ListPaymentsRequestSortField: + enum: + - CREATED_AT + - OFFLINE_CREATED_AT + - UPDATED_AT + source: + openapi: openapi/openapi.json + ListPaymentsResponse: + docs: >- + Defines the response returned by + [ListPayments](api-endpoint:Payments-ListPayments). + properties: + errors: + type: optional> + docs: Information about errors encountered during the request. + payments: + type: optional> + docs: The requested list of payments. + cursor: + type: optional + docs: >- + The pagination cursor to be used in a subsequent request. If empty, + + this is the final response. + + + For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + source: + openapi: openapi/openapi.json + ListPayoutEntriesResponse: + docs: The response to retrieve payout records entries. + properties: + payout_entries: + type: optional> + docs: >- + The requested list of payout entries, ordered with the given or + default sort order. + cursor: + type: optional + docs: >- + The pagination cursor to be used in a subsequent request. If empty, + this is the final response. + + For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + errors: + type: optional> + docs: Information about errors encountered during the request. + source: + openapi: openapi/openapi.json + ListPayoutsResponse: + docs: The response to retrieve payout records entries. + properties: + payouts: + type: optional> + docs: The requested list of payouts. + cursor: + type: optional + docs: >- + The pagination cursor to be used in a subsequent request. If empty, + this is the final response. + + For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + errors: + type: optional> + docs: Information about errors encountered during the request. + source: + openapi: openapi/openapi.json + ListSitesResponse: + docs: >- + Represents a `ListSites` response. The response can include either `sites` + or `errors`. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + sites: + type: optional> + docs: The sites that belong to the seller. + source: + openapi: openapi/openapi.json + ListSubscriptionEventsResponse: + docs: >- + Defines output parameters in a response from the + + [ListSubscriptionEvents](api-endpoint:Subscriptions-ListSubscriptionEvents). + properties: + errors: + type: optional> + docs: Errors encountered during the request. + subscription_events: + type: optional> + docs: The retrieved subscription events. + cursor: + type: optional + docs: >- + When the total number of resulting subscription events exceeds the + limit of a paged response, + + the response includes a cursor for you to use in a subsequent request + to fetch the next set of events. + + If the cursor is unset, the response contains the last page of the + results. + + + For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + source: + openapi: openapi/openapi.json + ListTeamMemberBookingProfilesResponse: + properties: + team_member_booking_profiles: + type: optional> + docs: >- + The list of team member booking profiles. The results are returned in + the ascending order of the time + + when the team member booking profiles were last updated. Multiple + booking profiles updated at the same time + + are further sorted in the ascending order of their IDs. + cursor: + type: optional + docs: >- + The pagination cursor to be used in the subsequent request to get the + next page of the results. Stop retrieving the next page of the results + when the cursor is not set. + validation: + maxLength: 65536 + errors: + type: optional> + docs: Errors that occurred during the request. + source: + openapi: openapi/openapi.json + ListTeamMemberWagesResponse: + docs: >- + The response to a request for a set of `TeamMemberWage` objects. The + response contains + + a set of `TeamMemberWage` objects. + properties: + team_member_wages: + type: optional> + docs: A page of `TeamMemberWage` results. + cursor: + type: optional + docs: |- + The value supplied in the subsequent request to fetch the next page + of `TeamMemberWage` results. + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + ListTransactionsResponse: + docs: >- + Defines the fields that are included in the response body of + + a request to the + [ListTransactions](api-endpoint:Transactions-ListTransactions) endpoint. + + + One of `errors` or `transactions` is present in a given response (never + both). + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + transactions: + type: optional> + docs: An array of transactions that match your query. + cursor: + type: optional + docs: >- + A pagination cursor for retrieving the next set of results, + + if any remain. Provide this value as the `cursor` parameter in a + subsequent - Square uses this information to perform compliance checks. + request to this endpoint. - For applications that use the Square Orders API to process payments, - Square has the necessary + See [Paginating + results](https://developer.squareup.com/docs/working-with-apis/pagination) + for more information. + source: + openapi: openapi/openapi.json + ListWebhookEventTypesResponse: + docs: >- + Defines the fields that are included in the response body of - instrument IDs to perform compliance checks. + a request to the + [ListWebhookEventTypes](api-endpoint:WebhookSubscriptions-ListWebhookEventTypes) + endpoint. - Each buyer payment instrument ID can contain a maximum of 255 - characters. + Note: if there are errors processing the request, the event types field + will not be + + present. + properties: + errors: + type: optional> + docs: Information on errors encountered during the request. + event_types: + type: optional> + docs: The list of event types. + metadata: + type: optional> + docs: >- + Contains the metadata of a webhook event type. For more information, + see [EventTypeMetadata](entity:EventTypeMetadata). source: openapi: openapi/openapi.json - GiftCardActivityRedeem: + ListWebhookSubscriptionsResponse: docs: >- - Represents details about a `REDEEM` [gift card activity - type](entity:GiftCardActivityType). + Defines the fields that are included in the response body of + + a request to the + [ListWebhookSubscriptions](api-endpoint:WebhookSubscriptions-ListWebhookSubscriptions) + endpoint. + + + Note: if there are errors processing the request, the subscriptions field + will not be + + present. properties: - amount_money: - type: Money + errors: + type: optional> + docs: Information on errors encountered during the request. + subscriptions: + type: optional> + docs: The requested list of [Subscription](entity:WebhookSubscription)s. + cursor: + type: optional + docs: >- + The pagination cursor to be used in a subsequent request. If empty, + + this is the final response. + + + For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + source: + openapi: openapi/openapi.json + ListWorkweekConfigsResponse: + docs: >- + The response to a request for a set of `WorkweekConfig` objects. The + response contains + + the requested `WorkweekConfig` objects and might contain a set of `Error` + objects if + + the request resulted in errors. + properties: + workweek_configs: + type: optional> + docs: A page of `WorkweekConfig` results. + cursor: + type: optional + docs: |- + The value supplied in the subsequent request to fetch the next page of + `WorkweekConfig` results. + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + Location: + docs: >- + Represents one of a business' + [locations](https://developer.squareup.com/docs/locations-api). + properties: + id: + type: optional + docs: >- + A short generated string of letters and numbers that uniquely + identifies this location instance. + validation: + maxLength: 32 + access: read-only + name: + type: optional> + docs: |- + The name of the location. + This information appears in the Seller Dashboard as the nickname. + A location name must be unique within a seller account. + validation: + maxLength: 255 + address: + type: optional
+ docs: The physical address of the location. + timezone: + type: optional> + docs: |- + The [IANA time zone](https://www.iana.org/time-zones) identifier for + the time zone of the location. For example, `America/Los_Angeles`. + validation: + maxLength: 30 + capabilities: + type: optional> + docs: >- + The Square features that are enabled for the location. + + See [LocationCapability](entity:LocationCapability) for possible + values. + + See [LocationCapability](#type-locationcapability) for possible values + access: read-only + status: + type: optional + docs: |- + The status of the location. + See [LocationStatus](#type-locationstatus) for possible values + created_at: + type: optional + docs: >- + The time when the location was created, in RFC 3339 format. + + For more information, see [Working with + Dates](https://developer.squareup.com/docs/build-basics/working-with-dates). + validation: + minLength: 20 + maxLength: 25 + access: read-only + merchant_id: + type: optional + docs: The ID of the merchant that owns the location. + validation: + maxLength: 32 + access: read-only + country: + type: optional + docs: >- + The country of the location, in the two-letter format of ISO 3166. For + example, `US` or `JP`. + + + See [Country](entity:Country) for possible values. + + See [Country](#type-country) for possible values + language_code: + type: optional> + docs: >- + The language associated with the location, in + + [BCP 47 format](https://tools.ietf.org/html/bcp47#appendix-A). + + For more information, see [Language + Preferences](https://developer.squareup.com/docs/build-basics/general-considerations/language-preferences). + validation: + minLength: 2 + maxLength: 5 + currency: + type: optional + docs: >- + The currency used for all transactions at this location, + + in ISO 4217 format. For example, the currency code for US dollars is + `USD`. + + See [Currency](entity:Currency) for possible values. + + See [Currency](#type-currency) for possible values + phone_number: + type: optional> + docs: The phone number of the location. For example, `+1 855-700-6000`. + validation: + maxLength: 17 + business_name: + type: optional> + docs: >- + The name of the location's overall business. This name is present on + receipts and other customer-facing branding, and can be changed no + more than three times in a twelve-month period. + validation: + maxLength: 255 + type: + type: optional + docs: |- + The type of the location. + See [LocationType](#type-locationtype) for possible values + website_url: + type: optional> + docs: The website URL of the location. For example, `https://squareup.com`. + validation: + maxLength: 255 + business_hours: + type: optional + docs: The hours of operation for the location. + business_email: + type: optional> + docs: >- + The email address of the location. This can be unique to the location + and is not always the email address for the business owner or + administrator. + validation: + maxLength: 255 + description: + type: optional> + docs: The description of the location. For example, `Main Street location`. + validation: + maxLength: 1024 + twitter_username: + type: optional> + docs: >- + The Twitter username of the location without the '@' symbol. For + example, `Square`. + validation: + minLength: 1 + maxLength: 15 + instagram_username: + type: optional> + docs: >- + The Instagram username of the location without the '@' symbol. For + example, `square`. + validation: + minLength: 1 + maxLength: 30 + facebook_url: + type: optional> docs: >- - The amount deducted from the gift card for the redemption. This value - is a positive integer. - - - Applications that use a custom payment processing system must specify - this amount in the - - [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) - request. - payment_id: + 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 ID of the payment that represents the gift card redemption. Square - populates this field + The URL of the logo image for the location. When configured in the + Seller - if the payment was processed by Square. + 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 - reference_id: + pos_background_url: + type: optional + docs: The URL of the Point of Sale background image for the location. + validation: + maxLength: 255 + access: read-only + mcc: type: optional> docs: >- - A client-specified ID that associates the gift card activity with an - entity in another system. - + A four-digit number that describes the kind of goods or services sold + at the location. - Applications that use a custom payment processing system can use this - field to track information + 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. - related to an order or payment. - status: - type: optional + For example, `5045`, for a location that sells computer goods and + software. + validation: + minLength: 4 + maxLength: 4 + full_format_logo_url: + type: optional docs: >- - The 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 + The URL of a full-format logo image for the location. When configured + in the Seller - always have a `COMPLETED` status. + Dashboard (Receipts section), the logo appears on transactions (such + as receipts and invoices) that Square generates on behalf of the + seller. - See [Status](#type-status) for possible values + 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 - GiftCardActivityRedeemStatus: - enum: - - PENDING - - COMPLETED - - CANCELED + LocationBookingProfile: docs: >- - Indicates the status of a [gift card](entity:GiftCard) redemption. This - status is relevant only for - - redemptions made from Square products (such as Square Point of Sale) - because Square products use a - - two-state process. Gift cards redeemed using the Gift Card Activities API - always have a `COMPLETED` status. + The booking profile of a seller's location, including the location's ID + and whether the location is enabled for online booking. + properties: + location_id: + type: optional> + docs: The ID of the [location](entity:Location). + booking_site_url: + type: optional> + docs: Url for the online booking site for this location. + online_booking_enabled: + type: optional> + docs: Indicates whether the location is enabled for online booking. source: openapi: openapi/openapi.json - GiftCardActivityRefund: - docs: >- - Represents details about a `REFUND` [gift card activity - type](entity:GiftCardActivityType). + LocationCapability: + enum: + - CREDIT_CARD_PROCESSING + - AUTOMATIC_TRANSFERS + - UNLINKED_REFUNDS + docs: The capabilities a location might have. + source: + openapi: openapi/openapi.json + LocationCreatedEvent: + docs: Published when a [Location](entity:Location) is created. properties: - redeem_activity_id: + merchant_id: type: optional> - docs: >- - The ID of the refunded `REDEEM` gift card activity. Square populates - this field if the - - `payment_id` in the corresponding - [RefundPayment](api-endpoint:Refunds-RefundPayment) request - - represents a gift card redemption. - - - For applications that use a custom payment processing system, this - field is required when creating - - a `REFUND` activity. The provided `REDEEM` activity ID must be linked - to the same gift card. - amount_money: - type: optional - docs: >- - The amount added to the gift card for the refund. This value is a - positive integer. - - - This field is required when creating a `REFUND` activity. The amount - can represent a full or partial refund. - reference_id: + docs: The ID of the target merchant associated with the event. + location_id: type: optional> - docs: >- - A client-specified ID that associates the gift card activity with an - entity in another system. - payment_id: + 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 ID of the refunded payment. Square populates this field if the - refund is for a - - payment processed by Square. This field matches the `payment_id` in - the corresponding - - [RefundPayment](api-endpoint:Refunds-RefundPayment) request. + 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 - GiftCardActivityTransferBalanceFrom: - docs: >- - Represents details about a `TRANSFER_BALANCE_FROM` [gift card activity - type](entity:GiftCardActivityType). + LocationCreatedEventData: 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. + 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 - GiftCardActivityTransferBalanceTo: + LocationCustomAttributeDefinitionOwnedCreatedEvent: docs: >- - Represents details about a `TRANSFER_BALANCE_TO` [gift card activity - type](entity:GiftCardActivityType). + Published when a location [custom attribute + definition](entity:CustomAttributeDefinition) + + is created by the subscribing application. properties: - transfer_from_gift_card_id: - type: string + merchant_id: + type: optional> docs: >- - The ID of the gift card from which the specified amount was - transferred. - amount_money: - type: Money + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> 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). + The type of this event. The value is + `"location.custom_attribute_definition.owned.created"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. source: openapi: openapi/openapi.json - GiftCardActivityUnblock: + LocationCustomAttributeDefinitionOwnedDeletedEvent: docs: >- - Represents details about an `UNBLOCK` [gift card activity - type](entity:GiftCardActivityType). + Published when a location [custom attribute + definition](entity:CustomAttributeDefinition) + + created by the subscribing application is deleted. A custom attribute + definition can only be deleted by + + the application that created it. properties: - reason: - type: GiftCardActivityUnblockReason - docs: |- - The reason the gift card was unblocked. - See [Reason](#type-reason) for possible values + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"location.custom_attribute_definition.owned.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. source: openapi: openapi/openapi.json - GiftCardActivityUnblockReason: - type: literal<"CHARGEBACK_UNBLOCK"> - docs: Indicates the reason for unblocking a [gift card](entity:GiftCard). - GiftCardActivityUnlinkedActivityRefund: + LocationCustomAttributeDefinitionOwnedUpdatedEvent: docs: >- - Represents details about an `UNLINKED_ACTIVITY_REFUND` [gift card activity - type](entity:GiftCardActivityType). + Published when a location [custom attribute + definition](entity:CustomAttributeDefinition) + + created by the subscribing application is updated. A custom attribute + definition can only be updated + + by the application that created it. properties: - amount_money: - type: Money + merchant_id: + type: optional> docs: >- - The amount added to the gift card for the refund. This value is a - positive integer. - reference_id: + The ID of the seller associated with the event that triggered the + event notification. + type: type: optional> docs: >- - A client-specified ID that associates the gift card activity with an - entity in another system. - payment_id: + 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 ID of the refunded payment. This field is not used starting in - Square version 2022-06-16. + 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 - 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. + LocationCustomAttributeDefinitionVisibleCreatedEvent: + docs: >- + Published when a location [custom attribute + definition](entity:CustomAttributeDefinition) + + that is visible to the subscribing application is created. A notification + is sent when your application + + creates a custom attribute definition or another application creates a + custom attribute definition whose + + `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. properties: - 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: + merchant_id: type: optional> docs: >- - The Square-generated ID of the [Location](entity:Location) where the - related - - quantity of items is being tracked. - validation: - maxLength: 100 - catalog_object_id: + The ID of the seller associated with the event that triggered the + event notification. + type: type: optional> - docs: |- - The Square-generated ID of the - [CatalogObject](entity:CatalogObject) being tracked. - validation: - maxLength: 100 - catalog_object_type: + docs: >- + The type of this event. The value is + `"location.custom_attribute_definition.visible.created"`. + event_id: type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional docs: >- - The [type](entity:CatalogObjectType) of the - [CatalogObject](entity:CatalogObject) being tracked. + 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 + LocationCustomAttributeDefinitionVisibleDeletedEvent: + docs: >- + Published when a location [custom attribute + definition](entity:CustomAttributeDefinition) + that is visible to the subscribing application is deleted. A custom + attribute definition can only - The Inventory API supports setting and reading the - `"catalog_object_type": "ITEM_VARIATION"` field value. + be deleted by the application that created it. A notification is sent when + your application deletes - 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: + a custom attribute definition or when another application deletes a custom + attribute definition whose + + `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. + properties: + merchant_id: type: optional> - docs: |- - The 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: + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: type: optional> docs: >- - A client-generated RFC 3339-formatted timestamp that indicates when - - the inventory adjustment took place. For inventory adjustment updates, - the `occurred_at` - - timestamp cannot be older than 24 hours or in the future relative to - the - - time of the request. - validation: - maxLength: 34 + 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: >- - An RFC 3339-formatted timestamp that indicates when the inventory - adjustment is received. - validation: - maxLength: 34 + The timestamp that indicates when the event notification was created, + in RFC 3339 format. access: read-only - source: - type: optional - docs: |- - Information about the application that caused the - inventory adjustment. - employee_id: - type: optional> + data: + type: optional docs: >- - The Square-generated ID of the [Employee](entity:Employee) responsible - for the + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + LocationCustomAttributeDefinitionVisibleUpdatedEvent: + docs: >- + Published when a location [custom attribute + definition](entity:CustomAttributeDefinition) - inventory adjustment. - validation: - maxLength: 100 - team_member_id: + that is visible to the subscribing application is updated. A custom + attribute definition can only be updated + + by the application that created it. A notification is sent when your + application updates a custom attribute + + definition or when another application updates a custom attribute + definition whose `visibility` is + + `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. + properties: + merchant_id: type: optional> docs: >- - The Square-generated ID of the [Team Member](entity:TeamMember) - responsible for the - - inventory adjustment. - validation: - maxLength: 100 - transaction_id: - type: optional - docs: |- - The Square-generated ID of the [Transaction](entity:Transaction) that - caused the adjustment. Only relevant for payment-related state - transitions. - validation: - maxLength: 255 - access: read-only - refund_id: + 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 Square-generated ID of the [Refund](entity:Refund) that - caused the adjustment. Only relevant for refund-related state - transitions. - validation: - maxLength: 255 + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. access: read-only - purchase_order_id: - type: optional + data: + type: optional docs: >- - The Square-generated ID of the purchase order that caused the + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + LocationCustomAttributeOwnedDeletedEvent: + docs: >- + Published when a location [custom attribute](entity:CustomAttribute) - adjustment. Only relevant for state transitions from the Square for - Retail + owned by the subscribing application is deleted. Custom attributes are + owned by the - app. - validation: - maxLength: 100 - access: read-only - goods_receipt_id: + application that created the corresponding [custom attribute + definition](entity:CustomAttributeDefinition). + + Custom attributes whose `visibility` is `VISIBILITY_READ_WRITE_VALUES` can + be deleted by any application. + properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"location.custom_attribute.owned.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: type: optional docs: >- - The Square-generated ID of the goods receipt that caused the - - adjustment. Only relevant for state transitions from the Square for - Retail - - app. - validation: - maxLength: 100 + The timestamp that indicates when the event notification was created, + in RFC 3339 format. access: read-only - adjustment_group: - type: optional + data: + type: optional docs: >- - An adjustment group bundling the related adjustments of item - variations through stock conversions in a single inventory event. + The data associated with the event that triggered the event + notification. source: openapi: openapi/openapi.json - InventoryAdjustmentGroup: + LocationCustomAttributeOwnedUpdatedEvent: + docs: >- + Published when a location [custom attribute](entity:CustomAttribute) owned + by the + + subscribing application is created or updated. Custom attributes are owned + by the application that created + + the corresponding [custom attribute + definition](entity:CustomAttributeDefinition). Custom attributes whose + + `visibility` is `VISIBILITY_READ_WRITE_VALUES` can be created or updated + by any application. properties: - id: - type: optional - docs: |- - A unique ID generated by Square for the - `InventoryAdjustmentGroup`. - validation: - maxLength: 100 - access: read-only - root_adjustment_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 + `"location.custom_attribute.owned.updated"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: type: optional - docs: The inventory adjustment of the composed variation. - validation: - maxLength: 100 + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. access: read-only - from_state: - type: optional + data: + type: optional docs: >- - Representative `from_state` for adjustments within the group. For - example, for a group adjustment from `IN_STOCK` to `SOLD`, + 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 - there can be two component adjustments in the group: one from - `IN_STOCK`to `COMPOSED` and the other one from `COMPOSED` to `SOLD`. + subscribing application is deleted. A notification is sent when: - Here, the representative `from_state` for the - `InventoryAdjustmentGroup` is `IN_STOCK`. + - Your application deletes a custom attribute owned by your application, + regardless of the `visibility` setting. - 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`, + - Any application deletes a custom attribute whose `visibility` is + `VISIBILITY_READ_ONLY` - the two component adjustments in the group can be from `IN_STOCK` to - `COMPOSED` and from `COMPOSED` to `SOLD`. + or `VISIBILITY_READ_WRITE_VALUES`. - Here, the representative `to_state` of the `InventoryAdjustmentGroup` - is `SOLD`. - See [InventoryState](#type-inventorystate) for possible values - source: - openapi: openapi/openapi.json - InventoryAlertType: - enum: - - NONE - - LOW_QUANTITY - docs: >- - Indicates whether Square should alert the merchant when the inventory - quantity of a CatalogItemVariation is low. - source: - openapi: 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. + Custom attributes set to `VISIBILITY_READ_WRITE_VALUES` can be deleted by + any application, but those set to + + `VISIBILITY_READ_ONLY` or `VISIBILITY_HIDDEN` can only be deleted by the + owner. Custom attributes are owned + + by the application that created the corresponding [custom attribute + definition](entity:CustomAttributeDefinition). properties: + merchant_id: + type: optional> + docs: >- + The ID of the seller associated with the event that triggered the + event notification. type: - type: optional + type: optional> docs: >- - Indicates how the inventory change is applied. See + The type of this event. The value is + `"location.custom_attribute.visible.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: + type: optional + docs: >- + The timestamp that indicates when the event notification was created, + in RFC 3339 format. + access: read-only + data: + type: optional + docs: >- + The data associated with the event that triggered the event + notification. + source: + openapi: openapi/openapi.json + LocationCustomAttributeVisibleUpdatedEvent: + docs: >- + Published when a location [custom attribute](entity:CustomAttribute) that + is visible - [InventoryChangeType](entity:InventoryChangeType) for all possible - values. + to the subscribing application is created or updated. A notification is + sent when: - 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 + - Your application creates or updates a custom attribute owned by your + application, regardless of the `visibility` setting. - `TRANSFER`, and is unset for all other change types. + - Any application creates or updates a custom attribute whose `visibility` + is `VISIBILITY_READ_ONLY` + or `VISIBILITY_READ_WRITE_VALUES`. - _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 + 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 [CatalogMeasurementUnit](entity:CatalogMeasurementUnit) object - representing the catalog measurement unit associated with the - inventory change. - measurement_unit_id: + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> + docs: >- + The type of this event. The value is + `"location.custom_attribute.visible.updated"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: type: optional docs: >- - The ID of the [CatalogMeasurementUnit](entity:CatalogMeasurementUnit) - object representing the catalog measurement unit associated with the - inventory change. + 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 + LocationSettingsUpdatedEvent: + docs: Published when online checkout location settings are updated + properties: + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> + docs: >- + The type of event this represents, + `"online_checkout.location_settings.updated"`. + event_id: + type: optional> + docs: A unique ID for the event. + created_at: + type: optional + docs: RFC 3339 timestamp of when the event was created. access: read-only + data: + type: optional + docs: Data associated with the event. source: openapi: openapi/openapi.json - InventoryChangeType: + LocationSettingsUpdatedEventData: + properties: + type: + type: optional> + docs: >- + Name of the updated object’s type, + `"online_checkout.location_settings"`. + id: + type: optional + docs: ID of the updated location settings. + object: + type: optional + docs: An object containing the updated location settings. + source: + openapi: openapi/openapi.json + LocationSettingsUpdatedEventObject: + properties: + location_settings: + type: optional + docs: The updated location settings. + source: + openapi: openapi/openapi.json + LocationStatus: enum: - - PHYSICAL_COUNT - - ADJUSTMENT - - TRANSFER - docs: >- - Indicates how the inventory change was applied to a tracked product - quantity. + - ACTIVE + - INACTIVE + docs: A location's status. source: openapi: openapi/openapi.json - InventoryCount: + LocationType: + enum: + - PHYSICAL + - MOBILE + 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: >- - Represents Square-estimated quantity of items in a particular state at a - - particular seller location based on the known history of physical counts - and + Describes a loyalty account in a [loyalty program](entity:LoyaltyProgram). + For more information, see - inventory adjustments. + [Create and Retrieve Loyalty + Accounts](https://developer.squareup.com/docs/loyalty-api/loyalty-accounts). properties: - catalog_object_id: - type: optional> - docs: |- - The Square-generated ID of the - [CatalogObject](entity:CatalogObject) being tracked. + id: + type: optional + docs: The Square-assigned ID of the loyalty account. validation: - maxLength: 100 - catalog_object_type: + maxLength: 36 + access: read-only + program_id: + type: string + docs: >- + The Square-assigned ID of the [loyalty program](entity:LoyaltyProgram) + to which the account belongs. + validation: + minLength: 1 + maxLength: 36 + balance: + type: optional + docs: >- + The available point balance in the loyalty account. If points are + scheduled to expire, they are listed in the `expiring_point_deadlines` + field. + + + Your application should be able to handle loyalty accounts that have a + negative point balance (`balance` is less than 0). This might occur if + a seller makes a manual adjustment or as a result of a refund or + exchange. + access: read-only + lifetime_points: + type: optional + docs: The total points accrued during the lifetime of the account. + access: read-only + customer_id: + type: optional> + docs: >- + The Square-assigned ID of the [customer](entity:Customer) that is + associated with the account. + enrolled_at: type: optional> docs: >- - The [type](entity:CatalogObjectType) of the - [CatalogObject](entity:CatalogObject) being tracked. + The timestamp when the buyer joined the loyalty program, in RFC 3339 + format. This field is used to display the **Enrolled On** or **Member + Since** date in first-party Square products. - The Inventory API supports setting and reading the - `"catalog_object_type": "ITEM_VARIATION"` field value. + If this field is not set in a `CreateLoyaltyAccount` request, Square + populates it after the buyer's first action on their account - In addition, it can also read the `"catalog_object_type": "ITEM"` - field value that is set by the Square Restaurants app. - validation: - maxLength: 14 - state: - type: optional - docs: |- - The current [inventory state](entity:InventoryState) for the related - quantity of items. - See [InventoryState](#type-inventorystate) for possible values - location_id: - type: optional> - docs: >- - The Square-generated ID of the [Location](entity:Location) where the - related + (when `AccumulateLoyaltyPoints` or `CreateLoyaltyReward` is called). + In first-party flows, Square populates the field when the buyer agrees + to the terms of service in Square Point of Sale. - quantity of items is being tracked. - validation: - maxLength: 100 - quantity: - type: optional> - docs: >- - The number of items affected by the estimated count as a decimal - string. - Can support up to 5 digits after the decimal point. - validation: - maxLength: 26 - calculated_at: + This field is typically specified in a `CreateLoyaltyAccount` request + when creating a loyalty account for a buyer who already interacted + with their account. + + For example, you would set this field when migrating accounts from an + external system. The timestamp in the request can represent a current + or previous date and time, but it cannot be set for the future. + created_at: type: optional docs: >- - An RFC 3339-formatted timestamp that indicates when the most recent - physical count or adjustment affecting - - the estimated count is received. - validation: - maxLength: 34 + The timestamp when the loyalty account was created, in RFC 3339 + format. access: read-only - is_estimated: - type: optional + updated_at: + 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 + The timestamp when the loyalty account was last updated, in RFC 3339 + format. + access: read-only + mapping: + type: optional + docs: >- + The mapping that associates the loyalty account with a buyer. + Currently, - any of these endpoints: - [BatchChangeInventory](api-endpoint:Inventory-BatchChangeInventory), + a loyalty account can only be mapped to a buyer by phone number. - [BatchRetrieveInventoryChanges](api-endpoint:Inventory-BatchRetrieveInventoryChanges), - [BatchRetrieveInventoryCounts](api-endpoint:Inventory-BatchRetrieveInventoryCounts), - and + To create a loyalty account, you must specify the `mapping` field, + with the buyer's phone number - [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 + in the `phone_number` field. + expiring_point_deadlines: + type: optional>> + docs: >- + The schedule for when points expire in the loyalty account balance. + This field is present only if the account has points that are + scheduled to expire. - at a specific location, verified by a seller or a seller's employee. For - example, - a physical count might come from an employee counting the item variations - on + The total number of points in this field equals the number of points + 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 - hand or from syncing with an external system. + [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: |- - 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: + 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 Square-generated ID of the - [CatalogObject](entity:CatalogObject) being tracked. - validation: - maxLength: 100 - catalog_object_type: + docs: The ID of the Square seller associated with the event. + type: type: optional> docs: >- - The [type](entity:CatalogObjectType) of the - [CatalogObject](entity:CatalogObject) being tracked. - - - The Inventory API supports setting and reading the - `"catalog_object_type": "ITEM_VARIATION"` field value. - - In addition, it can also read the `"catalog_object_type": "ITEM"` - field value that is set by the Square Restaurants app. - validation: - maxLength: 14 - state: - type: optional - docs: |- - The current [inventory state](entity:InventoryState) for the related - quantity of items. - See [InventoryState](#type-inventorystate) for possible values - location_id: + The type of event. For this event, the value is + `loyalty.account.deleted`. + event_id: type: optional> docs: >- - The Square-generated ID of the [Location](entity:Location) where the - related + The unique ID for the event, which is used for - quantity of items is being tracked. - validation: - maxLength: 100 - quantity: + [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 number of items affected by the physical count as a decimal - string. + 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 + expire on a specific date. + properties: + points: + type: integer + docs: >- + The number of points scheduled to expire at the `expires_at` + timestamp. + expires_at: + type: string + docs: >- + The timestamp of when the points are scheduled to expire, in RFC 3339 + format. + validation: + minLength: 1 + source: + openapi: openapi/openapi.json + LoyaltyAccountMapping: + docs: >- + Represents the mapping that associates a loyalty account with a buyer. - The number can support up to 5 digits after the decimal point. + + Currently, a loyalty account can only be mapped to a buyer by phone + number. For more information, see + + [Loyalty Overview](https://developer.squareup.com/docs/loyalty/overview). + properties: + id: + type: optional + docs: The Square-assigned ID of the mapping. validation: - maxLength: 26 - source: - type: optional - docs: |- - Information about the application with which the - physical count is submitted. - employee_id: + maxLength: 36 + access: read-only + created_at: + type: optional + docs: The timestamp when the mapping was created, in RFC 3339 format. + access: read-only + phone_number: type: optional> docs: >- - The Square-generated ID of the [Employee](entity:Employee) responsible - for the - - physical count. - validation: - maxLength: 100 - team_member_id: + The phone number of the buyer, in E.164 format. For example, + "+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 Square-generated ID of the [Team Member](entity:TeamMember) - responsible for the - - physical count. - validation: - maxLength: 100 - occurred_at: + The type of event. For this event, the value is + `loyalty.account.updated`. + event_id: type: optional> docs: >- - A client-generated RFC 3339-formatted timestamp that indicates when - - the physical count was examined. For physical count updates, the - `occurred_at` - - timestamp cannot be older than 24 hours or in the future relative to - the + The unique ID for the event, which is used for - time of the request. - validation: - maxLength: 34 + [idempotency + support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). created_at: type: optional - docs: >- - An RFC 3339-formatted timestamp that indicates when the physical count - is received. - validation: - maxLength: 34 + 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 - 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. + 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 - InventoryTransfer: - docs: |- - Represents the transfer of a quantity of product inventory at a - particular time from one location to another. + 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. + + For more information, see [Search for Balance-Changing Loyalty + Events](https://developer.squareup.com/docs/loyalty-api/loyalty-events). properties: id: - type: optional - docs: |- - A unique ID generated by Square for the - `InventoryTransfer`. + type: string + docs: The Square-assigned ID of the loyalty event. validation: - maxLength: 100 - reference_id: - type: optional> + minLength: 1 + access: read-only + type: + type: LoyaltyEventType docs: |- - An optional ID provided by the application to tie the - `InventoryTransfer` to an external system. + The type of the loyalty event. + See [LoyaltyEventType](#type-loyaltyeventtype) for possible values + created_at: + type: string + docs: The timestamp when the event was created, in RFC 3339 format. validation: - maxLength: 255 - state: - type: optional + minLength: 1 + access: read-only + accumulate_points: + type: optional + docs: Provides metadata when the event `type` is `ACCUMULATE_POINTS`. + create_reward: + type: optional + docs: Provides metadata when the event `type` is `CREATE_REWARD`. + redeem_reward: + type: optional + docs: Provides metadata when the event `type` is `REDEEM_REWARD`. + delete_reward: + type: optional + docs: Provides metadata when the event `type` is `DELETE_REWARD`. + adjust_points: + type: optional + docs: Provides metadata when the event `type` is `ADJUST_POINTS`. + loyalty_account_id: + type: string + docs: >- + The ID of the [loyalty account](entity:LoyaltyAccount) associated with + the event. + validation: + minLength: 1 + maxLength: 36 + access: read-only + location_id: + type: optional + docs: The ID of the [location](entity:Location) where the event occurred. + access: read-only + source: + type: LoyaltyEventSource docs: |- - The [inventory state](entity:InventoryState) for the quantity of - items being transferred. - See [InventoryState](#type-inventorystate) for possible values - from_location_id: - type: optional> + Defines whether the event was generated by the Square Point of Sale. + See [LoyaltyEventSource](#type-loyaltyeventsource) for possible values + expire_points: + type: optional + docs: Provides metadata when the event `type` is `EXPIRE_POINTS`. + other_event: + type: optional + docs: Provides metadata when the event `type` is `OTHER`. + accumulate_promotion_points: + type: optional docs: >- - The Square-generated ID of the [Location](entity:Location) where the - related - - quantity of items was tracked before the transfer. + Provides metadata when the event `type` is + `ACCUMULATE_PROMOTION_POINTS`. + source: + openapi: openapi/openapi.json + LoyaltyEventAccumulatePoints: + docs: Provides metadata when the event `type` is `ACCUMULATE_POINTS`. + properties: + loyalty_program_id: + type: optional + docs: The ID of the [loyalty program](entity:LoyaltyProgram). validation: - maxLength: 100 - to_location_id: + maxLength: 36 + access: read-only + points: + type: optional> + docs: The number of points accumulated by the event. + validation: + min: 1 + order_id: type: optional> docs: >- - The Square-generated ID of the [Location](entity:Location) where the - related + The ID of the [order](entity:Order) for which the buyer accumulated + the points. - quantity of items was tracked after the transfer. + This field is returned only if the Orders API is used to process + orders. + source: + openapi: openapi/openapi.json + LoyaltyEventAccumulatePromotionPoints: + docs: Provides metadata when the event `type` is `ACCUMULATE_PROMOTION_POINTS`. + properties: + loyalty_program_id: + type: optional + docs: >- + The Square-assigned ID of the [loyalty + program](entity:LoyaltyProgram). validation: - maxLength: 100 - catalog_object_id: - type: optional> - docs: |- - The Square-generated ID of the - [CatalogObject](entity:CatalogObject) being tracked. + maxLength: 36 + access: read-only + loyalty_promotion_id: + type: optional + docs: >- + The Square-assigned ID of the [loyalty + promotion](entity:LoyaltyPromotion). validation: - maxLength: 100 - catalog_object_type: - type: optional> + minLength: 1 + maxLength: 255 + access: read-only + points: + type: integer + docs: The number of points earned by the event. + access: read-only + order_id: + type: string docs: >- - The [type](entity:CatalogObjectType) of the - [CatalogObject](entity:CatalogObject) being tracked. - - - The Inventory API supports setting and reading the - `"catalog_object_type": "ITEM_VARIATION"` field value. + The ID of the [order](entity:Order) for which the buyer earned the + promotion points. - In addition, it can also read the `"catalog_object_type": "ITEM"` - field value that is set by the Square Restaurants app. + Only applications that use the Orders API to process orders can + trigger this event. 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. + minLength: 1 + access: read-only + source: + openapi: openapi/openapi.json + LoyaltyEventAdjustPoints: + docs: Provides metadata when the event `type` is `ADJUST_POINTS`. + properties: + loyalty_program_id: + type: optional + docs: >- + The Square-assigned ID of the [loyalty + program](entity:LoyaltyProgram). validation: - maxLength: 26 - occurred_at: + maxLength: 36 + access: read-only + points: + type: integer + docs: The number of points added or removed. + reason: 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. + docs: The reason for the adjustment of points. + validation: + maxLength: 3500 + source: + openapi: openapi/openapi.json + LoyaltyEventCreateReward: + docs: Provides metadata when the event `type` is `CREATE_REWARD`. + properties: + loyalty_program_id: + type: string + docs: The ID of the [loyalty program](entity:LoyaltyProgram). validation: - maxLength: 34 - created_at: + minLength: 1 + maxLength: 36 + access: read-only + reward_id: type: optional - docs: |- - An RFC 3339-formatted timestamp that indicates when Square - received the transfer request. + docs: >- + The Square-assigned ID of the created [loyalty + reward](entity:LoyaltyReward). + + This field is returned only if the event source is `LOYALTY_API`. validation: - maxLength: 34 + maxLength: 36 access: read-only - source: - type: optional - docs: |- - Information about the application that initiated the - inventory transfer. - employee_id: + points: + type: integer + docs: The loyalty points used to create the reward. + 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 Square-generated ID of the [Employee](entity:Employee) responsible - for the - - inventory transfer. - validation: - maxLength: 100 - team_member_id: + The type of event. For this event, the value is + `loyalty.event.created`. + event_id: type: optional> docs: >- - The Square-generated ID of the [Team Member](entity:TeamMember) - responsible for the + The unique ID for the event, which is used for - inventory transfer. - validation: - maxLength: 100 + [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 - Invoice: - docs: >- - Stores information about an invoice. You use the Invoices API to create - and manage - - invoices. For more information, see [Invoices API - Overview](https://developer.squareup.com/docs/invoices-api/overview). + LoyaltyEventCreatedEventData: + docs: The data associated with a `loyalty.event.created` event. properties: - id: - type: optional - docs: The Square-assigned ID of the invoice. - access: read-only - version: - type: optional - docs: >- - The Square-assigned version number, which is incremented each time an - update is committed to the invoice. - location_id: + type: type: optional> docs: >- - The ID of the location that this invoice is associated with. - - - If specified in a `CreateInvoice` request, the value must match the - `location_id` of the associated order. + 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: + created_at: + type: TimeRange + docs: The `created_at` date time range used to filter the result. + source: + openapi: openapi/openapi.json + LoyaltyEventDeleteReward: + docs: Provides metadata when the event `type` is `DELETE_REWARD`. + properties: + loyalty_program_id: + type: string + docs: The ID of the [loyalty program](entity:LoyaltyProgram). validation: minLength: 1 - maxLength: 255 - order_id: - type: optional> + maxLength: 36 + access: read-only + reward_id: + type: optional + docs: |- + The ID of the deleted [loyalty reward](entity:LoyaltyReward). + This field is returned only if the event source is `LOYALTY_API`. + validation: + maxLength: 36 + access: read-only + points: + type: integer + docs: The number of points returned to the loyalty account. + access: read-only + source: + openapi: openapi/openapi.json + LoyaltyEventExpirePoints: + docs: Provides metadata when the event `type` is `EXPIRE_POINTS`. + properties: + loyalty_program_id: + type: string docs: >- - The ID of the [order](entity:Order) for which the invoice is created. - - This field is required when creating an invoice, and the order must be - in the `OPEN` state. - - - To view the line items and other information for the associated order, - call the - - [RetrieveOrder](api-endpoint:Orders-RetrieveOrder) endpoint using the - order ID. + The Square-assigned ID of the [loyalty + program](entity:LoyaltyProgram). validation: minLength: 1 - maxLength: 255 - primary_recipient: - type: optional - docs: >- - The customer who receives the invoice. This customer data is displayed - on the invoice and used by Square to deliver the invoice. - - - This field is required to publish an invoice, and it must specify the - `customer_id`. - payment_requests: - type: optional>> - docs: >- - The payment schedule for the invoice, represented by one or more - payment requests that - - define payment settings, such as amount due and due date. An invoice - supports the following payment request combinations: - - - One balance - - - One deposit with one balance - - - 2–12 installments - - - One deposit with 2–12 installments - - - This field is required when creating an invoice. It must contain at - least one payment request. - - All payment requests for the invoice must equal the total order - amount. For more information, see - - [Configuring payment - requests](https://developer.squareup.com/docs/invoices-api/create-publish-invoices#payment-requests). - - - Adding `INSTALLMENT` payment requests to an invoice requires an - - [Invoices Plus - subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription). - delivery_method: - type: optional - docs: >- - The delivery method that Square uses to send the invoice, reminders, - and receipts to - - the customer. After the invoice is published, Square processes the - invoice based on the delivery - - method and payment request settings, either immediately or on the - `scheduled_at` date, if specified. - - For example, Square might send the invoice or receipt for an automatic - payment. For invoices with - - automatic payments, this field must be set to `EMAIL`. - - - One of the following is required when creating an invoice: - - - (Recommended) This `delivery_method` field. To configure an - automatic payment, the - - `automatic_payment_source` field of the payment request is also - required. - - - The deprecated `request_method` field of the payment request. Note - that `invoice` - - objects returned in responses do not include `request_method`. - - See [InvoiceDeliveryMethod](#type-invoicedeliverymethod) for possible - values - invoice_number: - type: optional> + maxLength: 36 + access: read-only + points: + type: integer + docs: The number of points expired. + source: + openapi: openapi/openapi.json + LoyaltyEventFilter: + docs: |- + The filtering criteria. If the request specifies multiple filters, + the endpoint uses a logical AND to evaluate them. + properties: + loyalty_account_filter: + type: optional + docs: Filter events by loyalty account. + type_filter: + type: optional + docs: Filter events by event type. + date_time_filter: + type: optional + docs: |- + Filter events by date time range. + For each range, the start time is inclusive and the end time + is exclusive. + location_filter: + type: optional + docs: Filter events by location. + order_filter: + type: optional + docs: Filter events by the order associated with the event. + source: + openapi: openapi/openapi.json + LoyaltyEventLocationFilter: + docs: Filter events by location. + properties: + location_ids: + docs: |- + The [location](entity:Location) IDs for loyalty events to query. + If multiple values are specified, the endpoint uses + a logical OR to combine them. + type: list + source: + openapi: openapi/openapi.json + LoyaltyEventLoyaltyAccountFilter: + docs: Filter events by loyalty account. + properties: + loyalty_account_id: + type: string 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). + The ID of the [loyalty account](entity:LoyaltyAccount) associated with + loyalty events. validation: minLength: 1 - maxLength: 191 - title: - type: optional> - docs: The title of the invoice, which is displayed on the invoice. + source: + openapi: openapi/openapi.json + LoyaltyEventOrderFilter: + docs: Filter events by the order associated with the event. + properties: + order_id: + type: string + docs: The ID of the [order](entity:Order) associated with the event. validation: minLength: 1 - maxLength: 255 - description: - type: optional> - docs: The description of the invoice, which is displayed on the invoice. + source: + openapi: openapi/openapi.json + LoyaltyEventOther: + docs: Provides metadata when the event `type` is `OTHER`. + properties: + loyalty_program_id: + type: string + docs: >- + The Square-assigned ID of the [loyalty + program](entity:LoyaltyProgram). validation: minLength: 1 - maxLength: 65536 - scheduled_at: - type: optional> - docs: >- - The timestamp when the invoice is scheduled for processing, in RFC - 3339 format. - - After the invoice is published, Square processes the invoice on the - specified date, - - according to the delivery method and payment request settings. - - - If the field is not set, Square processes the invoice immediately - after it is published. - public_url: - type: optional - docs: >- - A temporary link to the Square-hosted payment page where the customer - can pay the - - invoice. If the link expires, customers can provide the email address - or phone number - - associated with the invoice and request a new link directly from the - expired payment page. - - - This field is added after the invoice is published and reaches the - scheduled date - - (if one is defined). - access: read-only - next_payment_amount_money: - type: optional - docs: >- - The current amount due for the invoice. In addition to the - - amount due on the next payment request, this includes any overdue - payment amounts. - status: - type: optional - docs: |- - The status of the invoice. - See [InvoiceStatus](#type-invoicestatus) for possible values - timezone: - type: optional - docs: >- - The time zone used to interpret calendar dates on the invoice, such as - `due_date`. - - When an invoice is created, this field is set to the `timezone` - specified for the seller - - location. The value cannot be changed. - - - For example, a payment `due_date` of 2021-03-09 with a `timezone` of - America/Los\_Angeles - - becomes overdue at midnight on March 9 in America/Los\_Angeles (which - equals a UTC timestamp - - of 2021-03-10T08:00:00Z). + maxLength: 36 access: read-only - created_at: - type: optional - docs: The timestamp when the invoice was created, in RFC 3339 format. + points: + type: integer + docs: The number of points added or removed. + source: + openapi: openapi/openapi.json + LoyaltyEventQuery: + docs: Represents a query used to search for loyalty events. + properties: + filter: + type: optional + docs: The query filter criteria. + source: + openapi: openapi/openapi.json + LoyaltyEventRedeemReward: + docs: Provides metadata when the event `type` is `REDEEM_REWARD`. + properties: + loyalty_program_id: + type: string + docs: The ID of the [loyalty program](entity:LoyaltyProgram). + validation: + minLength: 1 + maxLength: 36 access: read-only - updated_at: + reward_id: type: optional - docs: The timestamp when the invoice was last updated, in RFC 3339 format. + docs: |- + The ID of the redeemed [loyalty reward](entity:LoyaltyReward). + This field is returned only if the event source is `LOYALTY_API`. + validation: + maxLength: 36 access: read-only - accepted_payment_methods: - type: optional - docs: >- - The payment methods that customers can use to pay the invoice on the - Square-hosted - - invoice page. This setting is independent of any automatic payment - requests for the invoice. - - - This field is required when creating an invoice and must set at least - one payment method to `true`. - custom_fields: - type: optional>> - docs: >- - Additional seller-defined fields that are displayed on the invoice. - For more information, see - - [Custom - fields](https://developer.squareup.com/docs/invoices-api/overview#custom-fields). - - - Adding custom fields to an invoice requires an - - [Invoices Plus - subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription). - - - Max: 2 custom fields - subscription_id: + order_id: type: optional docs: >- - The ID of the [subscription](entity:Subscription) associated with the - invoice. + The ID of the [order](entity:Order) that redeemed the reward. - This field is present only on subscription billing invoices. + This field is returned only if the Orders API is used to process + orders. access: read-only - sale_or_service_date: - type: optional> - docs: >- - The date of the sale or the date that the service is rendered, in - `YYYY-MM-DD` format. - - This field can be used to specify a past or future date which is - displayed on the invoice. - payment_conditions: - type: optional> - docs: >- - **France only.** The payment terms and conditions that are displayed - on the invoice. For more information, - - see [Payment - conditions](https://developer.squareup.com/docs/invoices-api/overview#payment-conditions). - - - For countries other than France, Square returns an - `INVALID_REQUEST_ERROR` with a `BAD_REQUEST` code and - - "Payment conditions are not supported for this location's country" - detail if this field is included in `CreateInvoice` or `UpdateInvoice` - requests. - validation: - minLength: 1 - maxLength: 2000 - store_payment_method_enabled: - type: optional> - docs: >- - Indicates whether to allow a customer to save a credit or debit card - as a card on file or a bank transfer as a + source: + openapi: openapi/openapi.json + LoyaltyEventSource: + enum: + - SQUARE + - LOYALTY_API + docs: Defines whether the event was generated by the Square Point of Sale. + source: + openapi: openapi/openapi.json + LoyaltyEventType: + enum: + - ACCUMULATE_POINTS + - CREATE_REWARD + - REDEEM_REWARD + - DELETE_REWARD + - ADJUST_POINTS + - EXPIRE_POINTS + - OTHER + - ACCUMULATE_PROMOTION_POINTS + docs: The type of the loyalty event. + source: + openapi: openapi/openapi.json + LoyaltyEventTypeFilter: + docs: Filter events by event type. + properties: + types: + docs: |- + The loyalty event types used to filter the result. + If multiple values are specified, the endpoint uses a + logical OR to combine them. + See [LoyaltyEventType](#type-loyaltyeventtype) for possible values + type: list + source: + openapi: openapi/openapi.json + LoyaltyProgram: + docs: >- + Represents a Square loyalty program. Loyalty programs define how buyers + can earn points and redeem points for rewards. - bank account on file. If `true`, Square displays a __Save my card on - file__ or __Save my bank on file__ checkbox on the + Square sellers can have only one loyalty program, which is created and + managed from the Seller Dashboard. - invoice payment page. Stored payment information can be used for - future automatic payments. The default value is `false`. - attachments: - type: optional> + For more information, see [Loyalty Program + Overview](https://developer.squareup.com/docs/loyalty/overview). + properties: + id: + type: optional + docs: |- + The Square-assigned ID of the loyalty program. Updates to + the loyalty program do not modify the identifier. + validation: + maxLength: 36 + access: read-only + status: + type: optional docs: >- - Metadata about the attachments on the invoice. Invoice attachments are - managed using the + Whether the program is currently active. - [CreateInvoiceAttachment](api-endpoint:Invoices-CreateInvoiceAttachment) - and - [DeleteInvoiceAttachment](api-endpoint:Invoices-DeleteInvoiceAttachment) - endpoints. + See [LoyaltyProgramStatus](#type-loyaltyprogramstatus) for possible + values + reward_tiers: + type: optional>> + docs: The list of rewards for buyers, sorted by ascending points. + expiration_policy: + type: optional + docs: If present, details for how points expire. + terminology: + type: optional + docs: A cosmetic name for the “points” currency. + location_ids: + type: optional>> + docs: The [locations](entity:Location) at which the program is active. + created_at: + type: optional + docs: The timestamp when the program was created, in RFC 3339 format. access: read-only - creator_team_member_id: + updated_at: type: optional + docs: The timestamp when the reward was last updated, in RFC 3339 format. + access: read-only + accrual_rules: + type: optional>> docs: >- - The ID of the [team member](entity:TeamMember) who created the - invoice. + Defines how buyers can earn loyalty points from the base loyalty + program. - 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 + To check for associated [loyalty promotions](entity:LoyaltyPromotion) + that enable + + buyers to earn extra points, call + [ListLoyaltyPromotions](api-endpoint:Loyalty-ListLoyaltyPromotions). source: openapi: openapi/openapi.json - InvoiceAcceptedPaymentMethods: + LoyaltyProgramAccrualRule: docs: >- - The payment methods that customers can use to pay an - [invoice](entity:Invoice) on the Square-hosted invoice payment page. + Represents an accrual rule, which defines how buyers can earn points from + the base [loyalty program](entity:LoyaltyProgram). properties: - card: - type: optional> + accrual_type: + type: LoyaltyProgramAccrualRuleType docs: >- - Indicates whether credit card or debit card payments are accepted. The - default value is `false`. - square_gift_card: - type: optional> + The type of the accrual rule that defines how buyers can earn points. + + See + [LoyaltyProgramAccrualRuleType](#type-loyaltyprogramaccrualruletype) + for possible values + points: + type: optional> + docs: |- + The number of points that + buyers earn based on the `accrual_type`. + validation: + min: 1 + visit_data: + type: optional + docs: Additional data for rules with the `VISIT` accrual type. + spend_data: + type: optional + docs: Additional data for rules with the `SPEND` accrual type. + item_variation_data: + type: optional + docs: Additional data for rules with the `ITEM_VARIATION` accrual type. + category_data: + type: optional + docs: Additional data for rules with the `CATEGORY` accrual type. + source: + openapi: openapi/openapi.json + LoyaltyProgramAccrualRuleCategoryData: + docs: Represents additional data for rules with the `CATEGORY` accrual type. + properties: + category_id: + type: string docs: >- - Indicates whether Square gift card payments are accepted. The default - value is `false`. - bank_account: - type: optional> + The ID of the `CATEGORY` [catalog object](entity:CatalogObject) that + buyers can purchase to earn + + points. + validation: + minLength: 1 + source: + openapi: openapi/openapi.json + LoyaltyProgramAccrualRuleItemVariationData: + docs: >- + Represents additional data for rules with the `ITEM_VARIATION` accrual + type. + properties: + item_variation_id: + type: string docs: >- - Indicates whether ACH bank transfer payments are accepted. The default - value is `false`. - buy_now_pay_later: - type: optional> + The ID of the `ITEM_VARIATION` [catalog object](entity:CatalogObject) + that buyers can purchase to earn + + points. + validation: + minLength: 1 + source: + openapi: openapi/openapi.json + LoyaltyProgramAccrualRuleSpendData: + docs: Represents additional data for rules with the `SPEND` accrual type. + properties: + amount_money: + type: Money docs: >- - Indicates whether Afterpay (also known as Clearpay) payments are - accepted. The default value is `false`. + The amount that buyers must spend to earn points. + For example, given an "Earn 1 point for every $10 spent" accrual rule, + a buyer who spends $105 earns 10 points. + excluded_category_ids: + type: optional>> + docs: >- + The IDs of any `CATEGORY` catalog objects that are excluded from + points accrual. - 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 + You can use the + [BatchRetrieveCatalogObjects](api-endpoint:Catalog-BatchRetrieveCatalogObjects) - invoice payments are supported. As a best practice, consider enabling - an additional payment method when allowing + endpoint to retrieve information about the excluded categories. + excluded_item_variation_ids: + type: optional>> + docs: >- + The IDs of any `ITEM_VARIATION` catalog objects that are excluded from + points accrual. - `buy_now_pay_later` payments. For more information, including detailed - requirements and processing limits, see - [Buy Now Pay Later payments with - Afterpay](https://developer.squareup.com/docs/invoices-api/overview#buy-now-pay-later). - cash_app_pay: - type: optional> - docs: >- - Indicates whether Cash App payments are accepted. The default value is - `false`. + You can use the + [BatchRetrieveCatalogObjects](api-endpoint:Catalog-BatchRetrieveCatalogObjects) + endpoint to retrieve information about the excluded item variations. + tax_mode: + type: LoyaltyProgramAccrualRuleTaxMode + docs: >- + Indicates how taxes should be treated when calculating the purchase + amount used for points accrual. - This payment method is supported only for seller - [locations](entity:Location) in the United States. + See + [LoyaltyProgramAccrualRuleTaxMode](#type-loyaltyprogramaccrualruletaxmode) + for possible values 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 description of the attachment, which is displayed on the invoice. - This field maps to the seller-defined **Message** field. - access: read-only - filesize: - type: optional - docs: The file size of the attachment in bytes. - access: read-only - hash: - type: optional - docs: The MD5 hash that was generated from the file contents. - access: read-only - mime_type: - type: optional - docs: >- - The mime type of the attachment. - - The following mime types are supported: + LoyaltyProgramAccrualRuleTaxMode: + enum: + - BEFORE_TAX + - AFTER_TAX + docs: >- + Indicates how taxes should be treated when calculating the purchase amount + used for loyalty points accrual. - 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 + This setting applies only to `SPEND` accrual rules or `VISIT` accrual + rules that have a minimum spend requirement. source: openapi: openapi/openapi.json - InvoiceAutomaticPaymentSource: + LoyaltyProgramAccrualRuleType: enum: - - NONE - - CARD_ON_FILE - - BANK_ON_FILE - docs: >- - Indicates the automatic payment method for an [invoice payment - request](entity:InvoicePaymentRequest). + - VISIT + - SPEND + - ITEM_VARIATION + - CATEGORY + docs: The type of the accrual rule that defines how buyers can earn points. 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). - + LoyaltyProgramAccrualRuleVisitData: + docs: Represents additional data for rules with the `VISIT` accrual type. + properties: + minimum_amount_money: + type: optional + docs: The minimum purchase required during the visit to quality for points. + tax_mode: + type: LoyaltyProgramAccrualRuleTaxMode + docs: >- + Indicates how taxes should be treated when calculating the purchase + amount to determine whether the visit qualifies for points. - Adding custom fields to an invoice requires an + This setting applies only if `minimum_amount_money` is specified. - [Invoices Plus - subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription). + See + [LoyaltyProgramAccrualRuleTaxMode](#type-loyaltyprogramaccrualruletaxmode) + for possible values + source: + openapi: openapi/openapi.json + LoyaltyProgramCreatedEvent: + docs: Published when a [loyalty program](entity:LoyaltyProgram) is created. properties: - label: + merchant_id: + type: optional> + docs: The ID of the Square seller associated with the event. + type: type: optional> docs: >- - The label or title of the custom field. This field is required for a - custom field. - validation: - maxLength: 30 - value: + The type of event. For this event, the value is + `loyalty.program.created`. + event_id: 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. + The unique ID for the event, which is used for - See [InvoiceCustomFieldPlacement](#type-invoicecustomfieldplacement) - for possible values + [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 - 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. + 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 - InvoiceDeliveryMethod: - enum: - - EMAIL - - SHARE_MANUALLY - - SMS + LoyaltyProgramCreatedEventObject: docs: >- - Indicates how Square delivers the [invoice](entity:Invoice) to the - customer. + 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 - InvoiceFilter: - docs: Describes query filters to apply. + LoyaltyProgramExpirationPolicy: + docs: Describes when the loyalty program expires. 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>> + expiration_duration: + type: string docs: >- - Limits the search to the specified customers, within the specified - locations. - - Specifying a customer is optional. In the current implementation, + 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. - a maximum of one customer can be specified. + Points are valid through the last day of the month in which they are + scheduled to expire. For example, with a `P12M` duration, points + earned on July 6, 2020 expire on August 1, 2021. + validation: + minLength: 1 source: openapi: openapi/openapi.json - InvoicePaymentReminder: + LoyaltyProgramRewardTier: 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`. + Represents a reward tier in a loyalty program. A reward tier defines how + buyers can redeem points for a reward, such as the number of points + required and the value and scope of the discount. A loyalty program can + offer multiple reward tiers. properties: - uid: + id: type: optional - docs: |- - A Square-assigned ID that uniquely identifies the reminder within the - `InvoicePaymentRequest`. + docs: The Square-assigned ID of the reward tier. + validation: + maxLength: 36 access: read-only - relative_scheduled_days: - type: optional> + points: + type: integer + docs: The points exchanged for the reward tier. + validation: + min: 1 + name: + type: optional + docs: The name of the reward tier. + access: read-only + created_at: + type: optional + docs: The timestamp when the reward tier was created, in RFC 3339 format. + access: read-only + pricing_rule_reference: + type: CatalogObjectReference docs: >- - The number of days before (a negative number) or after (a positive - number) + A reference to the specific version of a `PRICING_RULE` catalog object + that contains information about the reward tier discount. - 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`. + Use `object_id` and `catalog_version` with the + [RetrieveCatalogObject](api-endpoint:Catalog-RetrieveCatalogObject) + endpoint + + to get discount details. Make sure to set `include_related_objects` to + true in the request to retrieve all catalog objects + + that define the discount. For more information, see [Getting discount + details for a reward + tier](https://developer.squareup.com/docs/loyalty-api/loyalty-rewards#get-discount-details). + source: + openapi: openapi/openapi.json + LoyaltyProgramStatus: + enum: + - INACTIVE + - ACTIVE + docs: Indicates whether the program is currently active. + source: + openapi: openapi/openapi.json + LoyaltyProgramTerminology: + docs: Represents the naming used for loyalty points. + properties: + one: + type: string + docs: A singular unit for a point (for example, 1 point is called 1 star). validation: - min: -32767 - max: 32767 - message: - type: optional> - docs: The reminder message. + minLength: 1 + other: + type: string + docs: A plural unit for point (for example, 10 points is called 10 stars). validation: minLength: 1 - maxLength: 1000 - status: - type: optional + 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 status of the reminder. + 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 - See [InvoicePaymentReminderStatus](#type-invoicepaymentreminderstatus) - for possible values - sent_at: + [idempotency + support](https://developer.squareup.com/docs/webhooks/step4manage#webhooks-best-practices). + 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. + 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 - InvoicePaymentRequest: + LoyaltyProgramUpdatedEventObject: docs: >- - Represents a payment request for an [invoice](entity:Invoice). Invoices - can specify a maximum + 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). + Loyalty promotions enable buyers - of 13 payment requests, with up to 12 `INSTALLMENT` request types. For - more information, + to earn extra points on top of those earned from the base program. - see [Configuring payment - requests](https://developer.squareup.com/docs/invoices-api/create-publish-invoices#payment-requests). + A loyalty program can have a maximum of 10 loyalty promotions with an + `ACTIVE` or `SCHEDULED` status. + properties: + id: + type: optional + docs: The Square-assigned ID of the promotion. + validation: + minLength: 1 + maxLength: 255 + access: read-only + name: + type: string + docs: The name of the promotion. + validation: + minLength: 1 + maxLength: 70 + incentive: + type: LoyaltyPromotionIncentive + docs: >- + The points incentive for the promotion. This field defines whether + promotion points + + are earned by multiplying base program points or by adding a specified + number of points. + available_time: + type: LoyaltyPromotionAvailableTimeData + docs: >- + The scheduling information that defines when purchases can qualify to + earn points from an `ACTIVE` promotion. + trigger_limit: + type: optional + docs: >- + The number of times a buyer can earn promotion points during a + specified interval. - Adding `INSTALLMENT` payment requests to an invoice requires an + If not specified, buyers can trigger the promotion an unlimited number + of times. + status: + type: optional + docs: >- + The current status of the promotion. - [Invoices Plus - subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription). - properties: - uid: - type: optional> + See [LoyaltyPromotionStatus](#type-loyaltypromotionstatus) for + possible values + created_at: + type: optional + docs: The timestamp of when the promotion was created, in RFC 3339 format. + access: read-only + canceled_at: + type: optional + docs: The timestamp of when the promotion was canceled, in RFC 3339 format. + access: read-only + updated_at: + type: optional + docs: The timestamp when the promotion was last updated, in RFC 3339 format. + access: read-only + loyalty_program_id: + type: optional docs: >- - The Square-generated ID of the payment request in an - [invoice](entity:Invoice). - validation: - minLength: 1 - maxLength: 255 - request_method: - type: optional + The ID of the [loyalty program](entity:LoyaltyProgram) associated with + the promotion. + access: read-only + minimum_spend_amount_money: + 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. + The minimum purchase amount required to earn promotion points. If + specified, this amount is positive. + qualifying_item_variation_ids: + type: optional>> + docs: >- + The IDs of any qualifying `ITEM_VARIATION` [catalog + objects](entity:CatalogObject). If specified, + the purchase must include at least one of these items to qualify for + the promotion. - One of the following is required when creating an invoice: - - (Recommended) The `delivery_method` field of the invoice. To - configure an automatic payment, the + This option is valid only if the base loyalty program uses a `VISIT` + or `SPEND` accrual rule. - `automatic_payment_source` field of the payment request is also - required. + With `SPEND` accrual rules, make sure that qualifying promotional + items are not excluded. - - 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 + You can specify `qualifying_item_variation_ids` or + `qualifying_category_ids` for a given promotion, but not both. + qualifying_category_ids: + 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. + The IDs of any qualifying `CATEGORY` [catalog + objects](entity:CatalogObject). If specified, - See [InvoiceRequestType](#type-invoicerequesttype) for possible values - due_date: - type: optional> - docs: >- - The due date (in the invoice's time zone) for the payment request, in - `YYYY-MM-DD` format. This field + the purchase must include at least one item from one of these + categories to qualify for the promotion. - 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. + This option is valid only if the base loyalty program uses a `VISIT` + or `SPEND` accrual rule. + With `SPEND` accrual rules, make sure that qualifying promotional + items are not excluded. - 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 + You can specify `qualifying_category_ids` or + `qualifying_item_variation_ids` for a promotion, but not both. + source: + openapi: openapi/openapi.json + LoyaltyPromotionAvailableTimeData: + docs: >- + Represents scheduling information that determines when purchases can + qualify to earn points - timestamp of 2021-03-10T08:00:00Z). - fixed_amount_requested_money: - type: optional + from a [loyalty promotion](entity:LoyaltyPromotion). + properties: + start_date: + 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 + The date that the promotion starts, in `YYYY-MM-DD` format. Square + populates this field - payment request includes the `percentage_requested` field. - percentage_requested: - type: optional> + based on the provided `time_periods`. + access: read-only + end_date: + 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 date that the promotion ends, in `YYYY-MM-DD` format. Square + populates this field - the deposit, if requested. The sum of the `percentage_requested` in - all installment + based on the provided `time_periods`. If an end date is not specified, + an `ACTIVE` promotion - payment requests must be equal to 100. + remains available until it is canceled. + access: read-only + time_periods: + docs: >- + A list of [iCalendar (RFC 5545) + events](https://tools.ietf.org/html/rfc5545#section-3.6.1) + (`VEVENT`). Each event represents an available time period per day or + days of the week. - You cannot specify this when the payment `request_type` is `BALANCE` - or when the + A day can have a maximum of one available time period. - 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. + Only `DTSTART`, `DURATION`, and `RRULE` are supported. `DTSTART` and + `DURATION` are required and + timestamps must be in local (unzoned) time format. Include `RRULE` to + specify recurring promotions, - This field is allowed only on the final payment request + an end date (using the `UNTIL` keyword), or both. For more + information, see - and the payment `request_type` must be `BALANCE` or `INSTALLMENT`. - automatic_payment_source: - type: optional - docs: >- - The payment method for an automatic payment. + [Available + time](https://developer.squareup.com/docs/loyalty-api/loyalty-promotions#available-time). - The default value is `NONE`. + Note that `BEGIN:VEVENT` and `END:VEVENT` are optional in a + `CreateLoyaltyPromotion` request - See - [InvoiceAutomaticPaymentSource](#type-invoiceautomaticpaymentsource) - for possible values - card_id: + but are always included in the response. + 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 ID of the credit or debit card on file to charge for the payment - request. To get the cards on file for a customer, - - call [ListCards](api-endpoint:Cards-ListCards) and include the - `customer_id` of the invoice recipient. - validation: - minLength: 1 - maxLength: 255 - reminders: - type: optional>> - docs: A list of one or more reminders to send for the payment request. - computed_amount_money: - type: optional - docs: >- - The amount of the payment request, computed using the order amount and - information from the various payment - - request fields (`request_type`, `fixed_amount_requested_money`, and - `percentage_requested`). - total_completed_amount_money: - type: optional + The type of event. For this event, the value is + `loyalty.promotion.created`. + event_id: + type: optional> docs: >- - The amount of money already paid for the specific payment request. - - This amount might include a rounding adjustment if the most recent - invoice payment + The unique ID for the event, which is used for - was in cash in a currency that rounds cash payments (such as, `CAD` or - `AUD`). - rounding_adjustment_included_money: - type: optional + [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: >- - If the most recent payment was a cash payment - - in a currency that rounds cash payments (such as, `CAD` or `AUD`) and - the payment + 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) + are calculated, - is rounded from `computed_amount_money` in the payment request, then - this + either by multiplying the points earned from the base program or by adding + a specified number - field specifies the rounding adjustment applied. This amount + of points to the points earned from the base program. + properties: + type: + type: LoyaltyPromotionIncentiveType + docs: >- + The type of points incentive. - might be negative. + See + [LoyaltyPromotionIncentiveType](#type-loyaltypromotionincentivetype) + for possible values + points_multiplier_data: + type: optional + docs: Additional data for a `POINTS_MULTIPLIER` incentive type. + points_addition_data: + type: optional + docs: Additional data for a `POINTS_ADDITION` incentive type. source: openapi: openapi/openapi.json - InvoiceQuery: - docs: Describes query criteria for searching invoices. + LoyaltyPromotionIncentivePointsAdditionData: + docs: >- + Represents the metadata for a `POINTS_ADDITION` type of [loyalty promotion + incentive](entity:LoyaltyPromotionIncentive). properties: - filter: - type: InvoiceFilter + points_addition: + type: integer docs: >- - Query filters to apply in searching invoices. + The number of additional points to earn each time the promotion is + triggered. For example, - 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. + suppose a purchase qualifies for 5 points from the base loyalty + program. If the purchase also + + qualifies for a `POINTS_ADDITION` promotion incentive with a + `points_addition` of 3, the buyer + + earns a total of 8 points (5 program points + 3 promotion points = 8 + points). + validation: + min: 1 source: openapi: openapi/openapi.json - InvoiceRecipient: + LoyaltyPromotionIncentivePointsMultiplierData: docs: >- - Represents a snapshot of customer data. This object stores customer data - that is displayed on the invoice + Represents the metadata for a `POINTS_MULTIPLIER` type of [loyalty + promotion incentive](entity:LoyaltyPromotionIncentive). + properties: + points_multiplier: + type: optional> + docs: >- + The multiplier used to calculate the number of points earned each time + the promotion - and that Square uses to deliver the invoice. + is triggered. For example, suppose a purchase qualifies for 5 points + from the base loyalty program. + If the purchase also qualifies for a `POINTS_MULTIPLIER` promotion + incentive with a `points_multiplier` - When you provide a customer ID for a draft invoice, Square retrieves the - associated customer profile and populates + of 3, the buyer earns a total of 15 points (5 program points x 3 + promotion multiplier = 15 points). - the remaining `InvoiceRecipient` fields. You cannot update these fields - after the invoice is published. - Square updates the customer ID in response to a merge operation, but does - not update other fields. - properties: - customer_id: - type: optional> - docs: |- - The ID of the customer. This is the customer profile ID that - you provide when creating a draft invoice. + DEPRECATED at version 2023-08-16. Replaced by the `multiplier` field. + + + One of the following is required when specifying a points multiplier: + + - (Recommended) The `multiplier` field. + + - This deprecated `points_multiplier` field. If provided in the + request, Square also returns `multiplier` + + with the equivalent value. validation: - minLength: 1 - maxLength: 255 - given_name: - type: optional - docs: The recipient's given (that is, first) name. - access: read-only - family_name: - type: optional - docs: The recipient's family (that is, last) name. - access: read-only - email_address: - type: optional - docs: The recipient's email address. - access: read-only - address: - type: optional
- docs: The recipient's physical address. - phone_number: - type: optional - docs: The recipient's phone number. - access: read-only - company_name: - type: optional - docs: The name of the recipient's company. - access: read-only - tax_ids: - type: optional + min: 2 + max: 10 + multiplier: + type: optional> docs: >- - The recipient's tax IDs. The country of the seller account determines - whether this field + The multiplier used to calculate the number of points earned each time + the promotion is triggered, - 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 - InvoiceRecipientTaxIds: - docs: >- - Represents the tax IDs for an invoice recipient. The country of the seller - account determines + specified as a string representation of a decimal. Square supports + multipliers up to 10x, with three - whether the corresponding `tax_ids` field is available for the customer. - For more information, + point precision for decimal multipliers. For example, suppose a + purchase qualifies for 4 points from the - see [Invoice recipient tax - IDs](https://developer.squareup.com/docs/invoices-api/overview#recipient-tax-ids). - properties: - eu_vat: - type: optional - docs: >- - The EU VAT identification number for the invoice recipient. For - example, `IE3426675K`. - access: read-only - source: - openapi: 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, + base loyalty program. If the purchase also qualifies for a + `POINTS_MULTIPLIER` promotion incentive with a - email the invoice, charge a customer's card on file, or do nothing. - DEPRECATED at + `multiplier` of "1.5", the buyer earns a total of 6 points (4 program + points x 1.5 promotion multiplier = 6 points). - version 2021-01-21. The corresponding `request_method` field is replaced - by the + Fractional points are dropped. - `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 - [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. - 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 + One of the following is required when specifying a points multiplier: + + - (Recommended) This `multiplier` field. + + - The deprecated `points_multiplier` field. If provided in the + request, Square also returns `multiplier` + + with the equivalent value. + validation: + maxLength: 5 source: openapi: openapi/openapi.json - InvoiceSortField: - type: literal<"INVOICE_SORT_DATE"> - docs: The field to use for sorting. - InvoiceStatus: + LoyaltyPromotionIncentiveType: 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 - ItemVariationLocationOverrides: + - POINTS_MULTIPLIER + - POINTS_ADDITION docs: >- - Price and inventory alerting overrides for a `CatalogItemVariation` at a - specific `Location`. - properties: - location_id: - type: optional> - docs: >- - The ID of the `Location`. This can include locations that are - deactivated. - price_money: - type: optional - docs: >- - The price of the `CatalogItemVariation` at the given `Location`, or - blank for variable pricing. - pricing_type: - type: optional - docs: >- - The pricing type (fixed or variable) for the `CatalogItemVariation` at - the given `Location`. - - See [CatalogPricingType](#type-catalogpricingtype) for possible values - track_inventory: - type: optional> - docs: >- - If `true`, inventory tracking is active for the `CatalogItemVariation` - at this `Location`. - inventory_alert_type: - type: optional - docs: >- - Indicates whether the `CatalogItemVariation` displays an alert when - its inventory + Indicates the type of points incentive for a [loyalty + promotion](entity:LoyaltyPromotion), - quantity is less than or equal to its `inventory_alert_threshold`. + which is used to determine how buyers can earn points from the promotion. + source: + openapi: openapi/openapi.json + LoyaltyPromotionStatus: + enum: + - ACTIVE + - ENDED + - CANCELED + - SCHEDULED + docs: Indicates the status of a [loyalty promotion](entity:LoyaltyPromotion). + source: + openapi: openapi/openapi.json + LoyaltyPromotionTriggerLimit: + docs: >- + Represents the number of times a buyer can earn points during a [loyalty + promotion](entity:LoyaltyPromotion). - See [InventoryAlertType](#type-inventoryalerttype) for possible values - inventory_alert_threshold: - type: optional> - docs: >- - If the inventory quantity for the variation is less than or equal to - this value and `inventory_alert_type` + If this field is not set, buyers can trigger the promotion an unlimited + number of times to earn points during - is `LOW_QUANTITY`, the variation displays an alert in the merchant - dashboard. + the time that the promotion is available. - This value is always an integer. - sold_out: - type: optional + A purchase that is disqualified from earning points because of this limit + might qualify for another active promotion. + properties: + times: + type: integer docs: >- - Indicates whether the overridden item variation is sold out at the - specified location. - - - When inventory tracking is enabled on the item variation either - globally or at the specified location, - - the item variation is automatically marked as sold out when its - inventory count reaches zero. The seller + The maximum number of times a buyer can trigger the promotion during + the specified `interval`. + validation: + min: 1 + max: 30 + interval: + type: optional + docs: >- + The time period the limit applies to. - can manually set the item variation as sold out even when the - inventory count is greater than zero. + See + [LoyaltyPromotionTriggerLimitInterval](#type-loyaltypromotiontriggerlimitinterval) + for possible values + source: + openapi: openapi/openapi.json + LoyaltyPromotionTriggerLimitInterval: + enum: + - ALL_TIME + - DAY + docs: >- + Indicates the time period that the [trigger + limit](entity:LoyaltyPromotionTriggerLimit) applies to, - Attempts by an application to set this attribute are ignored. - Regardless how the sold-out status is set, + 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 - applications should treat its inventory count as zero when this - attribute value is `true`. - access: read-only - sold_out_valid_until: - type: optional + 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 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 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 - When the current time is later than this attribute value, the affected - item variation is no longer sold out. + [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 - Job: + 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: >- - Represents a job that can be assigned to [team - members](entity:TeamMember). This object defines the - - job's title and tip eligibility. Compensation is defined in a [job - assignment](entity:JobAssignment) + 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: + docs: >- + Represents a contract to redeem loyalty points for a [reward + tier](entity:LoyaltyProgramRewardTier) discount. Loyalty rewards can be in + an ISSUED, REDEEMED, or DELETED state. - in a team member's wage setting. + For more information, see [Manage loyalty + rewards](https://developer.squareup.com/docs/loyalty-api/loyalty-rewards). properties: id: type: optional + docs: The Square-assigned ID of the loyalty reward. + validation: + maxLength: 36 + access: read-only + status: + type: optional docs: >- - **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 status of a loyalty reward. - You can also get job IDs from a team member's wage setting. - title: - type: optional> - docs: The title of the job. + See [LoyaltyRewardStatus](#type-loyaltyrewardstatus) for possible + values + loyalty_account_id: + type: string + docs: >- + The Square-assigned ID of the [loyalty account](entity:LoyaltyAccount) + to which the reward belongs. validation: - maxLength: 150 - is_tip_eligible: - type: optional> - docs: Indicates whether team members can earn tips for the job. + minLength: 1 + maxLength: 36 + reward_tier_id: + type: string + docs: >- + The Square-assigned ID of the [reward + tier](entity:LoyaltyProgramRewardTier) used to create the reward. + validation: + minLength: 1 + maxLength: 36 + points: + type: optional + docs: The number of loyalty points used for the reward. + validation: + min: 1 + access: read-only + order_id: + type: optional> + docs: >- + The Square-assigned ID of the [order](entity:Order) to which the + reward is attached. created_at: type: optional - docs: The timestamp when the job was created, in RFC 3339 format. + docs: The timestamp when the reward was created, in RFC 3339 format. access: read-only updated_at: type: optional - docs: The timestamp when the job was last updated, in RFC 3339 format. + docs: The timestamp when the reward was last updated, in RFC 3339 format. + access: read-only + redeemed_at: + type: optional + docs: The timestamp when the reward was redeemed, in RFC 3339 format. access: read-only - version: - type: optional - docs: >- - **Read only** The current version of the job. Include this field in - `UpdateJob` requests to enable - - [optimistic - concurrency](https://developer.squareup.com/docs/working-with-apis/optimistic-concurrency) - - control and avoid overwrites from concurrent requests. Requests fail - if the provided version doesn't - - match the server version at the time of the request. source: openapi: openapi/openapi.json - JobAssignment: + LoyaltyRewardStatus: + enum: + - ISSUED + - REDEEMED + - DELETED + docs: The status of the loyalty reward. + source: + openapi: openapi/openapi.json + MeasurementUnit: docs: >- - Represents a job assigned to a [team member](entity:TeamMember), including - the compensation the team + Represents a unit of measurement to use with a quantity, such as ounces - member earns for the job. Job assignments are listed in the team member's - [wage setting](entity:WageSetting). + or inches. Exactly one of the following fields are required: + `custom_unit`, + + `area_unit`, `length_unit`, `volume_unit`, and `weight_unit`. properties: - job_title: - type: optional> - docs: The title of the job. - pay_type: - type: JobAssignmentPayType + custom_unit: + type: optional docs: >- - The current pay type for the job assignment used to + A custom unit of measurement defined by the seller using the Point of + Sale - calculate the pay amount in a pay period. + app or ad-hoc as an order line item. + area_unit: + type: optional + docs: >- + Represents a standard area unit. - See [JobAssignmentPayType](#type-jobassignmentpaytype) for possible + See [MeasurementUnitArea](#type-measurementunitarea) for possible + values + length_unit: + type: optional + docs: >- + Represents a standard length unit. + + See [MeasurementUnitLength](#type-measurementunitlength) for possible + values + volume_unit: + type: optional + docs: >- + Represents a standard volume unit. + + See [MeasurementUnitVolume](#type-measurementunitvolume) for possible + values + weight_unit: + type: optional + docs: >- + Represents a standard unit of weight or mass. + + See [MeasurementUnitWeight](#type-measurementunitweight) for possible values - hourly_rate: - type: optional + generic_unit: + type: optional docs: >- - The hourly pay rate of the job. For `SALARY` pay types, Square - calculates the hourly rate based on + Reserved for API integrations that lack the ability to specify a real + measurement unit - `annual_rate` and `weekly_hours`. - annual_rate: - type: optional + See [MeasurementUnitGeneric](#type-measurementunitgeneric) for + possible values + time_unit: + 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> + Represents a standard unit of time. + + See [MeasurementUnitTime](#type-measurementunittime) for possible + values + type: + 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). + Represents the type of the measurement unit. + + See [MeasurementUnitUnitType](#type-measurementunitunittype) for + possible values source: openapi: openapi/openapi.json - JobAssignmentPayType: + MeasurementUnitArea: enum: - - NONE - - HOURLY - - SALARY - docs: Enumerates the possible pay types that a job can be assigned. + - IMPERIAL_ACRE + - IMPERIAL_SQUARE_INCH + - IMPERIAL_SQUARE_FOOT + - IMPERIAL_SQUARE_YARD + - IMPERIAL_SQUARE_MILE + - METRIC_SQUARE_CENTIMETER + - METRIC_SQUARE_METER + - METRIC_SQUARE_KILOMETER + docs: Unit of area used to measure a quantity. source: openapi: openapi/openapi.json - LinkCustomerToGiftCardResponse: - docs: >- - A response that contains the linked `GiftCard` object. If the request - resulted in errors, - - the response contains a set of `Error` objects. + MeasurementUnitCustom: + docs: The information needed to define a custom unit, provided by the seller. properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - gift_card: - type: optional + name: + type: string + docs: The name of the custom unit, for example "bushel". + abbreviation: + type: string docs: >- - The gift card with the ID of the linked customer listed in the - `customer_ids` field. + The abbreviation of the custom unit, such as "bsh" (bushel). This + appears + + in the cart for the Point of Sale app, and in reports. source: openapi: openapi/openapi.json - ListBankAccountsResponse: - docs: Response object returned by ListBankAccounts. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - bank_accounts: - type: optional> - docs: List of BankAccounts associated with this account. - cursor: - type: optional - docs: >- - When a response is truncated, it includes a cursor that you can - - use in a subsequent request to fetch next set of bank accounts. - - If empty, this is the final response. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). + MeasurementUnitGeneric: literal<"UNIT"> + MeasurementUnitLength: + enum: + - IMPERIAL_INCH + - IMPERIAL_FOOT + - IMPERIAL_YARD + - IMPERIAL_MILE + - METRIC_MILLIMETER + - METRIC_CENTIMETER + - METRIC_METER + - METRIC_KILOMETER + docs: The unit of length used to measure a quantity. source: openapi: openapi/openapi.json - ListBookingCustomAttributeDefinitionsResponse: - docs: >- - Represents a - [ListBookingCustomAttributeDefinitions](api-endpoint:BookingCustomAttributes-ListBookingCustomAttributeDefinitions) - response. - - Either `custom_attribute_definitions`, an empty object, or `errors` is - present in the response. - - If additional results are available, the `cursor` field is also present - along with `custom_attribute_definitions`. - properties: - custom_attribute_definitions: - type: optional> - docs: >- - The retrieved custom attribute definitions. If no custom attribute - definitions are found, - - Square returns an empty object (`{}`). - cursor: - type: optional - docs: >- - The cursor to provide in your next call to this endpoint to retrieve - the next page of - - results for your original request. This field is present only if the - request succeeded and - - additional results are available. For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - errors: - type: optional> - docs: Any errors that occurred during the request. + MeasurementUnitTime: + enum: + - GENERIC_MILLISECOND + - GENERIC_SECOND + - GENERIC_MINUTE + - GENERIC_HOUR + - GENERIC_DAY + docs: Unit of time used to measure a quantity (a duration). source: openapi: openapi/openapi.json - ListBookingCustomAttributesResponse: + MeasurementUnitUnitType: + enum: + - TYPE_CUSTOM + - TYPE_AREA + - TYPE_LENGTH + - TYPE_VOLUME + - TYPE_WEIGHT + - TYPE_GENERIC docs: >- - Represents a - [ListBookingCustomAttributes](api-endpoint:BookingCustomAttributes-ListBookingCustomAttributes) - response. - - Either `custom_attributes`, an empty object, or `errors` is present in the - response. If additional - - results are available, the `cursor` field is also present along with - `custom_attributes`. + Describes the type of this unit and indicates which field contains the + unit information. This is an ‘open’ enum. + source: + openapi: openapi/openapi.json + MeasurementUnitVolume: + enum: + - GENERIC_FLUID_OUNCE + - GENERIC_SHOT + - GENERIC_CUP + - GENERIC_PINT + - GENERIC_QUART + - GENERIC_GALLON + - IMPERIAL_CUBIC_INCH + - IMPERIAL_CUBIC_FOOT + - IMPERIAL_CUBIC_YARD + - METRIC_MILLILITER + - METRIC_LITER + docs: The unit of volume used to measure a quantity. + source: + openapi: openapi/openapi.json + MeasurementUnitWeight: + enum: + - IMPERIAL_WEIGHT_OUNCE + - IMPERIAL_POUND + - IMPERIAL_STONE + - METRIC_MILLIGRAM + - METRIC_GRAM + - METRIC_KILOGRAM + docs: Unit of weight used to measure a quantity. + source: + openapi: openapi/openapi.json + Merchant: + docs: Represents a business that sells with Square. properties: - custom_attributes: - type: optional> - docs: >- - The retrieved custom attributes. If `with_definitions` was set to - `true` in the request, - - the custom attribute definition is returned in the `definition` field - of each custom attribute. - - - If no custom attributes are found, Square returns an empty object - (`{}`). - cursor: + id: type: optional + docs: The Square-issued ID of the merchant. + business_name: + type: optional> + docs: The name of the merchant's overall business. + country: + type: Country docs: >- - The cursor to use in your next call to this endpoint to retrieve the - next page of results + The country code associated with the merchant, in the two-letter + format of ISO 3166. For example, `US` or `JP`. - for your original request. This field is present only if the request - succeeded and additional + See [Country](#type-country) for possible values + language_code: + type: optional> + docs: >- + The code indicating the [language + preferences](https://developer.squareup.com/docs/build-basics/general-considerations/language-preferences) + of the merchant, in [BCP 47 + format](https://tools.ietf.org/html/bcp47#appendix-A). For example, + `en-US` or `fr-CA`. + currency: + type: optional + docs: >- + The currency associated with the merchant, in ISO 4217 format. For + example, the currency code for US dollars is `USD`. - 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 [Currency](#type-currency) for possible values + status: + type: optional + docs: |- + The merchant's status. + See [MerchantStatus](#type-merchantstatus) for possible values + main_location_id: + type: optional> + docs: >- + The ID of the [main + `Location`](https://developer.squareup.com/docs/locations-api#about-the-main-location) + for this merchant. + created_at: + type: optional + docs: |- + The time when the merchant was created, in RFC 3339 format. + For more information, see [Working with Dates](https://developer.squareup.com/docs/build-basics/working-with-dates). + access: read-only source: openapi: openapi/openapi.json - ListBookingsResponse: + 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: - bookings: - type: optional> - docs: The list of targeted bookings. - 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 + `"merchant.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 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 - ListBreakTypesResponse: + MerchantCustomAttributeDefinitionOwnedDeletedEvent: docs: >- - The response to a request for a set of `BreakType` objects. The response - contains + Published when a merchant [custom attribute + definition](entity:CustomAttributeDefinition) - the requested `BreakType` objects and might contain a set of `Error` - objects if + is deleted by the subscribing application. Subscribe to this event to be + notified - the request resulted in errors. + when your application deletes a merchant custom attribute definition. properties: - break_types: - type: optional> - docs: ' A page of `BreakType` 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 + `"merchant.custom_attribute_definition.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 `BreakType` 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 - ListCardsResponse: + MerchantCustomAttributeDefinitionOwnedUpdatedEvent: docs: >- - Defines the fields that are included in the response body of - - a request to the [ListCards](api-endpoint:Cards-ListCards) endpoint. + Published when a merchant [custom attribute + definition](entity:CustomAttributeDefinition) + is updated by the subscribing application. Subscribe to this event to be + notified - Note: if there are errors processing the request, the card field will not - be - - present. + when your application updates a merchant custom attribute definition. properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - cards: - type: optional> - docs: The requested list of `Card`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 + `"merchant.custom_attribute_definition.owned.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, + 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) - this is the final response. + 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 - 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: + `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. properties: - 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 + `"merchant.custom_attribute_definition.visible.created"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: 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. + 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 - ListCatalogResponse: + 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: - errors: - type: optional> - docs: Any errors that occurred during the request. - 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 + `"merchant.custom_attribute_definition.visible.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 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 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 - ListCustomerCustomAttributeDefinitionsResponse: + MerchantCustomAttributeDefinitionVisibleUpdatedEvent: docs: >- - Represents a - [ListCustomerCustomAttributeDefinitions](api-endpoint:CustomerCustomAttributes-ListCustomerCustomAttributeDefinitions) - response. + Published when a merchant [custom attribute + definition](entity:CustomAttributeDefinition) - Either `custom_attribute_definitions`, an empty object, or `errors` is - present in the response. + that is visible to the subscribing application is updated. A notification + is sent when your application - If additional results are available, the `cursor` field is also present - along with `custom_attribute_definitions`. + 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: - custom_attribute_definitions: - type: optional> + merchant_id: + type: optional> docs: >- - The retrieved custom attribute definitions. If no custom attribute - definitions are found, - - Square returns an empty object (`{}`). - 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 + `"merchant.custom_attribute_definition.visible.updated"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + 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. 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. + 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 - ListCustomerCustomAttributesResponse: + MerchantCustomAttributeOwnedDeletedEvent: docs: >- - Represents a - [ListCustomerCustomAttributes](api-endpoint:CustomerCustomAttributes-ListCustomerCustomAttributes) - response. + Published when a merchant [custom attribute](entity:CustomAttribute) - Either `custom_attributes`, an empty object, or `errors` is present in the - response. If additional + associated with a [custom attribute + definition](entity:CustomAttributeDefinition) that is - results are available, the `cursor` field is also present along with - `custom_attributes`. + owned by the subscribing application is deleted. Subscribe to this event + to be notified + + when your application deletes a merchant custom attribute. properties: - custom_attributes: - type: optional> + merchant_id: + 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 + The ID of the seller associated with the event that triggered the + event notification. + type: + type: optional> docs: >- - The cursor to use in your next call to this endpoint to retrieve the - next page of results - - for your original request. This field is present only if the request - succeeded and additional - - results are available. For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - errors: - type: optional> - docs: Any errors that occurred during the request. + 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 - ListCustomerGroupsResponse: + MerchantCustomAttributeOwnedUpdatedEvent: docs: >- - Defines the fields that are included in the response body of + Published when a merchant [custom attribute](entity:CustomAttribute) - a request to the - [ListCustomerGroups](api-endpoint:CustomerGroups-ListCustomerGroups) - endpoint. + associated with a [custom attribute + definition](entity:CustomAttributeDefinition) that is + owned by the subscribing application is updated. Subscribe to this event + to be notified - Either `errors` or `groups` is present in a given response (never both). + when your application updates a merchant custom attribute. 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: + 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: >- - 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). + 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 - ListCustomerSegmentsResponse: + MerchantCustomAttributeVisibleDeletedEvent: docs: >- - Defines the fields that are included in the response body for requests to - the `ListCustomerSegments` endpoint. + Published when a merchant [custom attribute](entity:CustomAttribute) with + the `visibility` field set to `VISIBILITY_READ_ONLY` or + `VISIBILITY_READ_WRITE_VALUES` is deleted. - Either `errors` or `segments` is present in a given response (never both). + 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: - errors: - type: optional> - docs: Any errors that occurred during the request. - segments: - type: optional> + merchant_id: + type: optional> docs: >- - The list of customer segments belonging to the associated Square - account. - 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 + `"merchant.custom_attribute.visible.deleted"`. + event_id: + type: optional> + docs: A unique ID for the event notification. + created_at: 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). + 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 - ListCustomersResponse: + MerchantCustomAttributeVisibleUpdatedEvent: docs: >- - Defines the fields that are included in the response body of + Published when a merchant [custom attribute](entity:CustomAttribute) with - a request to the `ListCustomers` endpoint. + 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 - Either `errors` or `customers` is present in a given response (never - both). + by any application for which the subscribing application has read access + to the merchant custom attribute. properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - customers: - type: optional> + merchant_id: + type: optional> docs: >- - The customer profiles associated with the Square account or an empty - object (`{}`) if none are found. - - Only customer profiles with public information (`given_name`, - `family_name`, `company_name`, `email_address`, or - - `phone_number`) are included in the response. - cursor: + 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: >- - A pagination cursor to retrieve the next set of results for the + 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 + - INACTIVE + source: + openapi: openapi/openapi.json + ModifierLocationOverrides: + docs: >- + Location-specific overrides for specified properties of a + `CatalogModifier` object. + properties: + location_id: + type: optional> + docs: >- + The ID of the `Location` object representing the location. This can + include a deactivated location. + price_money: + type: optional + docs: >- + The overridden price at the specified location. If this is + unspecified, the modifier price is not overridden. - original query. A cursor is only present if the request succeeded and - additional results + The modifier becomes free of charge at the specified location, when + this `price_money` field is set to 0. + sold_out: + type: optional + docs: >- + Indicates whether the modifier is sold out at the specified location + or not. As an example, for cheese (modifier) burger (item), when the + modifier is sold out, it is the cheese, but not the burger, that is + sold out. - are available. + The seller can manually set this sold out status. Attempts by an + application to set this attribute are ignored. + access: read-only + source: + openapi: openapi/openapi.json + Money: + docs: >- + Represents an amount of money. `Money` fields can be signed or unsigned. + Fields that do not explicitly define whether they are signed or unsigned + are - 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 + considered unsigned and can only hold positive amounts. For signed fields, + the - (`given_name`, `family_name`, `company_name`, `email_address`, or - `phone_number`) are counted. This field is present + sign of the value indicates the purpose of the money transfer. See - only if `count` is set to `true` in the request. - source: - openapi: openapi/openapi.json - ListDeviceCodesResponse: + [Working with Monetary + Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts) + + for more information. properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - device_codes: - type: optional> - docs: The queried DeviceCode. - cursor: - type: optional + amount: + type: optional> docs: >- - A pagination cursor to retrieve the next set of results for your + The amount of money, in the smallest denomination of the currency - original query to the endpoint. This value is present only if the - request + indicated by `currency`. For example, when `currency` is `USD`, + `amount` is - succeeded and additional results are available. + in cents. Monetary amounts can be positive or negative. See the + specific + field description to determine the meaning of the sign in a particular + case. + currency: + type: optional + docs: >- + The type of currency, in __ISO 4217 format__. For example, the + currency - See [Paginating - results](https://developer.squareup.com/docs/working-with-apis/pagination) - for more information. + code for US dollars is `USD`. + + + See [Currency](entity:Currency) for possible values. + + See [Currency](#type-currency) for possible values source: openapi: openapi/openapi.json - ListDevicesResponse: + OauthAuthorizationRevokedEvent: + docs: >- + Published when a merchant/application revokes all access tokens and + refresh tokens granted to an application. properties: - errors: - type: optional> - docs: Information about errors that occurred during the request. - devices: - type: optional> - docs: The requested list of `Device` objects. - cursor: + 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: >- - The pagination cursor to be used in a subsequent request. If empty, - - this is the final response. - - See - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) - for more information. + 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 - ListDisputeEvidenceResponse: - docs: Defines the fields in a `ListDisputeEvidence` response. + OauthAuthorizationRevokedEventData: properties: - evidence: - type: optional> - docs: The list of evidence previously uploaded to the specified dispute. - errors: - type: optional> - docs: Information about errors encountered during the request. - cursor: + type: + type: optional> + docs: Name of the affected object’s type, `"revocation"`. + id: 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). + docs: Not applicable, revocation is not an object + object: + type: optional + docs: An object containing information about revocation event. source: openapi: openapi/openapi.json - ListDisputesResponse: - docs: Defines fields in a `ListDisputes` response. + OauthAuthorizationRevokedEventObject: properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - disputes: - type: optional> - docs: The list of disputes. - cursor: - type: optional + 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: >- - The pagination cursor to be used in a subsequent request. + Type of client that performed the revocation, either APPLICATION, + MERCHANT, or SQUARE. - If unset, this is the final response. For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + See + [OauthAuthorizationRevokedEventRevokerType](#type-oauthauthorizationrevokedeventrevokertype) + for possible values 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. - properties: - employee_wages: - type: optional> - docs: A page of `EmployeeWage` results. - cursor: - type: optional - docs: |- - The value supplied in the subsequent request to fetch the next page - of `EmployeeWage` results. - errors: - type: optional> - docs: Any errors that occurred during the request. + OauthAuthorizationRevokedEventRevokerType: + enum: + - APPLICATION + - MERCHANT + - SQUARE + docs: Defines the possible types for the revoking client. source: openapi: openapi/openapi.json - ListEmployeesResponse: + ObtainTokenResponse: + docs: Represents an [ObtainToken](api-endpoint:OAuth-ObtainToken) response. properties: - employees: optional> - cursor: + access_token: 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 + docs: >- + An OAuth access token used to authorize Square API requests on behalf + of the seller. - a request to the [ListEventTypes](api-endpoint:Events-ListEventTypes) - endpoint. + Include this token as a bearer token in the `Authorization` header of + your API requests. - Note: if there are errors processing the request, the event types field - will not be + OAuth access tokens expire in 30 days (except `short_lived` access + tokens). You should call - present. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - event_types: - type: optional> - docs: The list of event types. - metadata: - type: optional> - docs: >- - Contains the metadata of an event type. For more information, see - [EventTypeMetadata](entity:EventTypeMetadata). - source: - openapi: openapi/openapi.json - ListGiftCardActivitiesResponse: - docs: >- - A response that contains a list of `GiftCardActivity` objects. If the - request resulted in errors, + `ObtainToken` and provide the returned `refresh_token` to get a new + access token well before - 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> + the current one expires. For more information, see [OAuth API: + Walkthrough](https://developer.squareup.com/docs/oauth-api/walkthrough). + validation: + minLength: 2 + maxLength: 1024 + token_type: + type: optional + docs: The type of access token. This value is always `bearer`. + validation: + minLength: 2 + maxLength: 10 + expires_at: + type: optional docs: >- - The requested gift card activities or an empty object if none are - found. - cursor: + The timestamp of when the `access_token` expires, in [ISO + 8601](http://www.iso.org/iso/home/standards/iso8601.htm) format. + validation: + minLength: 20 + maxLength: 48 + merchant_id: type: optional docs: >- - 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 ID of the authorizing [merchant](entity:Merchant) (seller), which + represents a business. + validation: + minLength: 8 + maxLength: 191 + subscription_id: + type: optional + docs: >- + __LEGACY__ The ID of merchant's subscription. - the final response. + The ID is only present if the merchant signed up for a subscription + plan during authorization. + plan_id: + type: optional + docs: >- + __LEGACY__ The ID of the subscription plan the merchant signed - 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, + up for. The ID is only present if the merchant signed up for a + subscription plan during - 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: + authorization. + id_token: type: optional docs: >- - When a response is truncated, it includes a cursor that you can use in - a + The OpenID token that belongs to this person. This token is only + present if the - subsequent request to retrieve the next set of gift cards. If a cursor - is not present, this is + `OPENID` scope is included in the authorization request. - the final response. - For more information, see - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). - source: - openapi: openapi/openapi.json - ListInvoicesResponse: - docs: Describes a `ListInvoice` response. - properties: - invoices: - type: optional> - docs: The invoices retrieved. - cursor: + Deprecated at version 2021-09-15. Square doesn't support OpenID or + other single sign-on (SSO) + + protocols on top of OAuth. + refresh_token: type: optional docs: >- - When a response is truncated, it includes a cursor that you can use in - a + A refresh token that can be used in an `ObtainToken` request to + generate a new access token. - subsequent request to retrieve the next set of invoices. If empty, - this is the final - response. + With the code flow: - 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 - ListJobsResponse: - docs: >- - Represents a [ListJobs](api-endpoint:Team-ListJobs) response. Either - `jobs` or `errors` + - For the `authorization_code` grant type, the refresh token is + multi-use and never expires. + + - For the `refresh_token` grant type, the response returns the same + refresh token. + + + With the PKCE flow: + + - For the `authorization_code` grant type, the refresh token is + single-use and expires in 90 days. + + - For the `refresh_token` grant type, the refresh token is a new + single-use refresh token that expires in 90 days. + + + For more information, see [Refresh, Revoke, and Limit the Scope of + OAuth + Tokens](https://developer.squareup.com/docs/oauth-api/refresh-revoke-limit-scope). + validation: + minLength: 2 + maxLength: 1024 + short_lived: + type: optional + docs: >- + Indicates whether the access_token is short lived. If `true`, the + access token expires - 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: + in 24 hours. If `false`, the access token expires in 30 days. + errors: + type: optional> + docs: Any errors that occurred during the request. + refresh_token_expires_at: type: optional docs: >- - An opaque cursor used to retrieve the next page of results. This field - is present only + The timestamp of when the `refresh_token` expires, in [ISO + 8601](http://www.iso.org/iso/home/standards/iso8601.htm) - if the request succeeded and additional results are available. For - more information, see + format. - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - errors: - type: optional> - docs: The errors that occurred during the request. + + This field is only returned for the PKCE flow. + validation: + minLength: 20 + maxLength: 48 source: openapi: openapi/openapi.json - ListLocationBookingProfilesResponse: + OfflinePaymentDetails: + docs: Details specific to offline payments. properties: - location_booking_profiles: - type: optional> - docs: The list of a seller's location booking profiles. - cursor: + client_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. - errors: - type: optional> - docs: Errors that occurred during the request. + The client-side timestamp of when the offline payment was created, in + RFC 3339 format. + validation: + maxLength: 32 + access: read-only source: openapi: openapi/openapi.json - ListLocationCustomAttributeDefinitionsResponse: + Order: docs: >- - Represents a - [ListLocationCustomAttributeDefinitions](api-endpoint:LocationCustomAttributes-ListLocationCustomAttributeDefinitions) - response. + Contains all information related to a single order to process with Square, - Either `custom_attribute_definitions`, an empty object, or `errors` is - present in the response. + including line items that specify the products to purchase. `Order` + objects also - If additional results are available, the `cursor` field is also present - along with `custom_attribute_definitions`. - properties: - custom_attribute_definitions: - type: optional> - docs: >- - The retrieved custom attribute definitions. If no custom attribute - definitions are found, + include information about any associated tenders, refunds, and returns. - Square returns an empty object (`{}`). - cursor: + + All Connect V2 Transactions have all been converted to Orders including + all associated + + itemization data. + properties: + id: type: optional + docs: The order's unique ID. + access: read-only + location_id: + type: string + docs: The ID of the seller location that this order is associated with. + validation: + minLength: 1 + reference_id: + type: optional> + docs: |- + A client-specified ID to associate an entity in another system + with this order. + validation: + maxLength: 40 + source: + type: optional + docs: The origination details of the order. + customer_id: + type: optional> docs: >- - The cursor to provide in your next call to this endpoint to retrieve - the next page of + The ID of the [customer](entity:Customer) associated with the order. - 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 - ListLocationCustomAttributesResponse: - docs: >- - Represents a - [ListLocationCustomAttributes](api-endpoint:LocationCustomAttributes-ListLocationCustomAttributes) - response. + You should specify a `customer_id` on the order (or the payment) to + ensure that transactions - Either `custom_attributes`, an empty object, or `errors` is present in the - response. If additional + are reliably linked to customers. Omitting this field might result in + the creation of new - results are available, the `cursor` field is also present along with - `custom_attributes`. - properties: - custom_attributes: - type: optional> + [instant + profiles](https://developer.squareup.com/docs/customers-api/what-it-does#instant-profiles). + validation: + maxLength: 191 + line_items: + type: optional>> + docs: The line items included in the order. + taxes: + type: optional>> docs: >- - The retrieved custom attributes. If `with_definitions` was set to - `true` in the request, + The list of all taxes associated with the order. - the custom attribute definition is returned in the `definition` field - of each custom attribute. - If no custom attributes are found, Square returns an empty object - (`{}`). - cursor: - type: optional - docs: >- - The cursor to use in your next call to this endpoint to retrieve the - next page of results + Taxes can be scoped to either `ORDER` or `LINE_ITEM`. For taxes with + `LINE_ITEM` scope, an - for your original request. This field is present only if the request - succeeded and additional + `OrderLineItemAppliedTax` must be added to each line item that the tax + applies to. For taxes - 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 - ListLocationsResponse: - docs: >- - Defines the fields that are included in the response body of a request + with `ORDER` scope, the server generates an `OrderLineItemAppliedTax` + for every line item. - to the [ListLocations](api-endpoint:Locations-ListLocations) endpoint. + On reads, each tax in the list includes the total amount of that tax + applied to the order. - 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. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - programs: - type: optional> - docs: A list of `LoyaltyProgram` for the merchant. - source: - openapi: openapi/openapi.json - ListLoyaltyPromotionsResponse: - docs: >- - Represents a - [ListLoyaltyPromotions](api-endpoint:Loyalty-ListLoyaltyPromotions) - response. - One of `loyalty_promotions`, an empty object, or `errors` is present in - the response. + __IMPORTANT__: If `LINE_ITEM` scope is set on any taxes in this field, + using the deprecated - If additional results are available, the `cursor` field is also present - along with `loyalty_promotions`. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - loyalty_promotions: - type: optional> - docs: The retrieved loyalty promotions. - cursor: - type: optional + `line_items.taxes` field results in an error. Use + `line_items.applied_taxes` + + instead. + discounts: + type: optional>> docs: >- - The cursor to use in your next call to this endpoint to retrieve the - next page of results + The list of all discounts associated with the order. - for your original request. This field is present only if the request - succeeded and additional - results are available. For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - source: - openapi: openapi/openapi.json - ListMerchantCustomAttributeDefinitionsResponse: - docs: >- - Represents a - [ListMerchantCustomAttributeDefinitions](api-endpoint:MerchantCustomAttributes-ListMerchantCustomAttributeDefinitions) - response. + Discounts can be scoped to either `ORDER` or `LINE_ITEM`. For + discounts scoped to `LINE_ITEM`, + + an `OrderLineItemAppliedDiscount` must be added to each line item that + the discount applies to. + + For discounts with `ORDER` scope, the server generates an + `OrderLineItemAppliedDiscount` + + for every line item. + + + __IMPORTANT__: If `LINE_ITEM` scope is set on any discounts in this + field, using the deprecated + + `line_items.discounts` field results in an error. Use + `line_items.applied_discounts` + + instead. + service_charges: + type: optional>> + docs: A list of service charges applied to the order. + fulfillments: + type: optional>> + docs: >- + Details about order fulfillment. + - Either `custom_attribute_definitions`, an empty object, or `errors` is - present in the response. + Orders can only be created with at most one fulfillment. However, + orders returned - If additional results are available, the `cursor` field is also present - along with `custom_attribute_definitions`. - properties: - custom_attribute_definitions: - type: optional> + by the API might contain multiple fulfillments. + returns: + type: optional> docs: >- - The retrieved custom attribute definitions. If no custom attribute - definitions are found, + A collection of items from sale orders being returned in this one. + Normally part of an - Square returns an empty object (`{}`). - cursor: - type: optional + itemized return or exchange. There is exactly one `Return` object per + sale `Order` being + + referenced. + access: read-only + return_amounts: + type: optional + docs: The rollup of the returned money amounts. + net_amounts: + type: optional + docs: The net money amounts (sale money - return money). + rounding_adjustment: + type: optional docs: >- - The cursor to provide in your next call to this endpoint to retrieve - the next page of + A positive rounding adjustment to the total of the order. This + adjustment is commonly - results for your original request. This field is present only if the - request succeeded and + used to apply cash rounding when the minimum unit of account is + smaller than the lowest physical - 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 - ListMerchantCustomAttributesResponse: - docs: >- - Represents a - [ListMerchantCustomAttributes](api-endpoint:MerchantCustomAttributes-ListMerchantCustomAttributes) - response. + denomination of the currency. + tenders: + type: optional> + docs: The tenders that were used to pay for the order. + access: read-only + refunds: + type: optional> + docs: The refunds that are part of this order. + access: read-only + metadata: + type: optional>>>> + docs: >- + Application-defined data attached to this order. Metadata fields are + intended - Either `custom_attributes`, an empty object, or `errors` is present in the - response. If additional + to store descriptive references or associations with an entity in + another system or store brief - results are available, the `cursor` field is also present along with - `custom_attributes`. - properties: - custom_attributes: - type: optional> - docs: >- - The retrieved custom attributes. If `with_definitions` was set to - `true` in the request, + information about the object. Square does not process this field; it + only stores and returns it - the custom attribute definition is returned in the `definition` field - of each custom attribute. + in relevant API calls. Do not use metadata to store any sensitive + information (such as personally - If no custom attributes are found, Square returns an empty object - (`{}`). - cursor: - type: optional - docs: >- - The cursor to use in your next call to this endpoint to retrieve the - next page of results + identifiable information or card details). - 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 - ListMerchantsResponse: - docs: >- - The response object returned by the - [ListMerchant](api-endpoint:Merchants-ListMerchants) endpoint. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - merchant: - type: optional> - docs: The requested `Merchant` entities. - cursor: - type: optional - docs: >- - If the response is truncated, the cursor to use in next request to - fetch next set of objects. - source: - openapi: openapi/openapi.json - ListOrderCustomAttributeDefinitionsResponse: - docs: Represents a response from listing order custom attribute definitions. - properties: - custom_attribute_definitions: - docs: >- - The retrieved custom attribute definitions. If no custom attribute - definitions are found, Square returns an empty object (`{}`). - type: list - cursor: - type: optional - docs: >- - The cursor to provide in your next call to this endpoint to retrieve - the next page of results for your original request. + Keys written by applications must be 60 characters or less and must be + in the character set - This field is present only if the request succeeded and additional - results are available. + `[a-zA-Z0-9_-]`. Entries can also include metadata generated by + Square. These keys are prefixed - 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 - ListOrderCustomAttributesResponse: - docs: Represents a response from listing order custom attributes. - properties: - custom_attributes: - type: optional> - docs: >- - The retrieved custom attributes. If no custom attribute are found, - Square returns an empty object (`{}`). - cursor: - type: optional - docs: >- - The cursor to provide in your next call to this endpoint to retrieve - the next page of results for your original request. + with a namespace, separated from the key with a ':' character. - 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 - ListPaymentLinksResponse: - properties: - errors: - type: optional> - docs: Errors that occurred during the request. - payment_links: - type: optional> - docs: The list of payment links. - cursor: - type: optional - docs: >2- - When a response is truncated, it includes a cursor that you can use in a subsequent request - to retrieve the next set of gift cards. If a cursor is not present, - this is the final response. + Values have a maximum length of 255 characters. - 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 - source: - openapi: openapi/openapi.json - ListPaymentRefundsResponse: - docs: >- - Defines the response returned by - [ListPaymentRefunds](api-endpoint:Refunds-ListPaymentRefunds). + An application can have up to 10 entries per metadata field. - Either `errors` or `refunds` is present in a given response (never both). - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - refunds: - type: optional> - docs: The list of requested refunds. - cursor: - type: optional - docs: >- - The pagination cursor to be used in a subsequent request. If empty, - this is the final response. + Entries written by applications are private and can only be read or + modified by the same + application. - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - source: - openapi: openapi/openapi.json - ListPaymentsRequestSortField: - enum: - - CREATED_AT - - OFFLINE_CREATED_AT - - UPDATED_AT - source: - openapi: openapi/openapi.json - ListPaymentsResponse: - docs: >- - Defines the response returned by - [ListPayments](api-endpoint:Payments-ListPayments). - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - payments: - type: optional> - docs: The requested list of payments. - cursor: + + For more information, see + [Metadata](https://developer.squareup.com/docs/build-basics/metadata). + created_at: + type: optional + docs: >- + The timestamp for when the order was created, at server side, in RFC + 3339 format (for example, "2016-09-04T23:59:33.123Z"). + access: read-only + updated_at: + type: optional + docs: >- + The timestamp for when the order was last updated, at server side, in + RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). + access: read-only + closed_at: type: optional docs: >- - The pagination cursor to be used in a subsequent request. If empty, + 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. - this is the final response. + Orders not created through the API do not include a version number and + therefore cannot be updated. - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - source: - openapi: openapi/openapi.json - ListPayoutEntriesResponse: - docs: The response to retrieve payout records entries. - properties: - payout_entries: - type: optional> - docs: >- - The requested list of payout entries, ordered with the given or - default sort order. - cursor: - type: optional - docs: >- - The pagination cursor to be used in a subsequent request. If empty, - this is the final response. - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - errors: - type: optional> - docs: Information about errors encountered during the request. - source: - openapi: openapi/openapi.json - ListPayoutsResponse: - docs: The response to retrieve payout records entries. - properties: - payouts: - type: optional> - docs: The requested list of payouts. - cursor: - type: optional + [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 pagination cursor to be used in a subsequent request. If empty, - this is the final response. + The total amount of money collected in service charges for the order. - 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. - source: - openapi: openapi/openapi.json - ListSubscriptionEventsResponse: - docs: >- - Defines output parameters in a response from the - [ListSubscriptionEvents](api-endpoint:Subscriptions-ListSubscriptionEvents). - properties: - errors: - type: optional> - docs: Errors encountered during the request. - subscription_events: - type: optional> - docs: The retrieved subscription events. - cursor: - type: optional - docs: >- - When the total number of resulting subscription events exceeds the - limit of a paged response, + Note: `total_service_charge_money` is the sum of `applied_money` + fields for each individual - the response includes a cursor for you to use in a subsequent request - to fetch the next set of events. + service charge. Therefore, `total_service_charge_money` only includes + inclusive tax amounts, - If the cursor is unset, the response contains the last page of the - results. + 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 - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + 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 - ListTeamMemberBookingProfilesResponse: + OrderCreated: properties: - team_member_booking_profiles: - type: optional> + order_id: + type: optional> + docs: The order's unique ID. + version: + type: optional docs: >- - The list of team member booking profiles. The results are returned in - the ascending order of the time + The version number, which is incremented each time an update is + committed to the order. - when the team member booking profiles were last updated. Multiple - booking profiles updated at the same time + Orders that were not created through the API do not include a version + number and - are further sorted in the ascending order of their IDs. - cursor: + 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 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. + docs: The timestamp for when the order was created, in RFC 3339 format. + access: read-only source: openapi: openapi/openapi.json - ListTeamMemberWagesResponse: - docs: >- - The response to a request for a set of `TeamMemberWage` objects. The - response contains - - a set of `TeamMemberWage` objects. + 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: - team_member_wages: - type: optional> - docs: A page of `TeamMemberWage` results. - cursor: + 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: |- - 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: 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 - ListTransactionsResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the - [ListTransactions](api-endpoint:Transactions-ListTransactions) endpoint. - - - One of `errors` or `transactions` is present in a given response (never - both). + OrderCreatedEventData: properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - transactions: - type: optional> - docs: An array of transactions that match your query. - cursor: + type: + type: optional> + docs: Name of the affected object’s type, `"order_created"`. + id: type: optional - docs: >- - A pagination cursor for retrieving the next set of results, - - if any remain. Provide this value as the `cursor` parameter in a - subsequent - - request to this endpoint. - - - See [Paginating - results](https://developer.squareup.com/docs/working-with-apis/pagination) - for more information. - source: - openapi: openapi/openapi.json - ListWebhookEventTypesResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the - [ListWebhookEventTypes](api-endpoint:WebhookSubscriptions-ListWebhookEventTypes) - endpoint. - - - Note: if there are errors processing the request, the event types field - will not be - - present. + 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: - errors: - type: optional> - docs: Information on errors encountered during the request. - event_types: - type: optional> - docs: The list of event types. - metadata: - type: optional> - docs: >- - Contains the metadata of a webhook event type. For more information, - see [EventTypeMetadata](entity:EventTypeMetadata). + order_created: + type: optional + docs: Information about the created order. source: openapi: openapi/openapi.json - ListWebhookSubscriptionsResponse: + OrderCustomAttributeDefinitionOwnedCreatedEvent: docs: >- - Defines the fields that are included in the response body of - - a request to the - [ListWebhookSubscriptions](api-endpoint:WebhookSubscriptions-ListWebhookSubscriptions) - endpoint. - - - Note: if there are errors processing the request, the subscriptions field - will not be - - present. + Published when an order [custom attribute + definition](entity:CustomAttributeDefinition) that is owned by the + subscribing app is created. 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 + merchant_id: + type: optional> + docs: The ID of the target seller associated with the event. + type: + 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 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 - ListWorkweekConfigsResponse: + OrderCustomAttributeDefinitionOwnedDeletedEvent: docs: >- - The response to a request for a set of `WorkweekConfig` objects. The - response contains - - the requested `WorkweekConfig` objects and might contain a set of `Error` - objects if - - the request resulted in errors. + Published when an order [custom attribute + definition](entity:CustomAttributeDefinition) that is owned by the + subscribing app is deleted. properties: - workweek_configs: - type: optional> - docs: A page of `WorkweekConfig` results. - cursor: + 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 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 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 - Location: + OrderCustomAttributeDefinitionOwnedUpdatedEvent: docs: >- - Represents one of a business' - [locations](https://developer.squareup.com/docs/locations-api). + Published when an order [custom attribute + definition](entity:CustomAttributeDefinition) that is owned by the + subscribing app is updated. properties: - id: - type: optional + merchant_id: + type: optional> + docs: The ID of the target seller associated with the event. + type: + type: optional> docs: >- - A short generated string of letters and numbers that uniquely - identifies this location instance. - validation: - maxLength: 32 + 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 - name: + 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 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 target seller associated with the event. + 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 + `"order.custom_attribute_definition.visible.created"`. + event_id: + type: optional> + docs: A unique ID for the event. 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 + 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 ID of the merchant that owns the location. - validation: - maxLength: 32 + docs: The timestamp of when the event was created, in RFC 3339 format. access: read-only - country: - type: optional - docs: >- - The country of the location, in the two-letter format of ISO 3166. For - example, `US` or `JP`. - - - See [Country](entity:Country) for possible values. - - See [Country](#type-country) for possible values - language_code: + 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 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: + The type of this event. The value is + `"order.custom_attribute_definition.visible.updated"`. + event_id: type: optional> - docs: The phone number of the location. For example, `+1 855-700-6000`. - validation: - maxLength: 17 - business_name: + 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 + 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 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 + docs: The ID of the target seller associated with the event. 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: + 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 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: + The type of this event. The value is + `"order.custom_attribute.owned.updated"`. + event_id: type: optional> - docs: The description of the location. For example, `Main Street location`. - validation: - maxLength: 1024 - twitter_username: + 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 + 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 Twitter username of the location without the '@' symbol. For - example, `Square`. - validation: - minLength: 1 - maxLength: 15 - instagram_username: + docs: The ID of the target seller associated with the event. + type: type: optional> docs: >- - The Instagram username of the location without the '@' symbol. For - example, `square`. - validation: - minLength: 1 - maxLength: 30 - facebook_url: + The type of this event. The value is + `"order.custom_attribute.visible.deleted"`. + event_id: 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: + docs: A unique ID for the event. + 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 + docs: The timestamp of when the event was created, in RFC 3339 format. access: read-only - pos_background_url: + 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 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 URL of the Point of Sale background image for the location. - validation: - maxLength: 255 + docs: The timestamp of when the event was created, in RFC 3339 format. access: read-only - mcc: + 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: >- - A four-digit number that describes the kind of goods or services sold - at the location. + The version number, which is incremented each time an update is + committed to the order. - 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. + Orders that were not created through the API do not include a version + number and - For example, `5045`, for a location that sells computer goods and - software. - validation: - minLength: 4 - maxLength: 4 - full_format_logo_url: - type: optional - docs: >- - The URL of a full-format logo image for the location. When configured - in the Seller + therefore cannot be updated. - 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. + [Read more about working with + versions.](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders) access: read-only - tax_ids: - type: optional - docs: The tax IDs for this location. + location_id: + type: optional> + docs: The location ID the order belongs to. source: openapi: openapi/openapi.json - LocationBookingProfile: + OrderFulfillmentDeliveryDetailsScheduleType: + enum: + - SCHEDULED + - ASAP + docs: The schedule type of the delivery fulfillment. + source: + openapi: openapi/openapi.json + OrderFulfillmentFulfillmentLineItemApplication: + enum: + - ALL + - ENTRY_LIST docs: >- - The booking profile of a seller's location, including the location's ID - and whether the location is enabled for online booking. - properties: - location_id: - type: optional> - docs: The ID of the [location](entity:Location). - booking_site_url: - type: optional> - docs: Url for the online booking site for this location. - online_booking_enabled: - type: optional> - docs: Indicates whether the location is enabled for online booking. + 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 - LocationCapability: + OrderFulfillmentPickupDetailsScheduleType: enum: - - CREDIT_CARD_PROCESSING - - AUTOMATIC_TRANSFERS - - UNLINKED_REFUNDS - docs: The capabilities a location might have. + - SCHEDULED + - ASAP + docs: The schedule type of the pickup fulfillment. source: openapi: openapi/openapi.json - LocationStatus: + OrderFulfillmentState: enum: - - ACTIVE - - INACTIVE - docs: A location's status. + - PROPOSED + - RESERVED + - PREPARED + - COMPLETED + - CANCELED + - FAILED + docs: The current state of this fulfillment. source: openapi: openapi/openapi.json - LocationType: + OrderFulfillmentType: enum: - - PHYSICAL - - MOBILE - docs: A location's type. + - PICKUP + - SHIPMENT + - DELIVERY + docs: The type of fulfillment. source: openapi: openapi/openapi.json - LoyaltyAccount: - docs: >- - Describes a loyalty account in a [loyalty program](entity:LoyaltyProgram). - For more information, see - - [Create and Retrieve Loyalty - Accounts](https://developer.squareup.com/docs/loyalty-api/loyalty-accounts). + OrderFulfillmentUpdated: properties: - id: - type: optional - docs: The Square-assigned ID of the loyalty account. - validation: - maxLength: 36 - access: read-only - program_id: - type: string - docs: >- - The Square-assigned ID of the [loyalty program](entity:LoyaltyProgram) - to which the account belongs. - validation: - minLength: 1 - maxLength: 36 - balance: - type: optional - docs: >- - The available point balance in the loyalty account. If points are - scheduled to expire, they are listed in the `expiring_point_deadlines` - field. - - - Your application should be able to handle loyalty accounts that have a - negative point balance (`balance` is less than 0). This might occur if - a seller makes a manual adjustment or as a result of a refund or - exchange. - access: read-only - lifetime_points: - type: optional - docs: The total points accrued during the lifetime of the account. - access: read-only - customer_id: - type: optional> - docs: >- - The Square-assigned ID of the [customer](entity:Customer) that is - associated with the account. - enrolled_at: + order_id: type: optional> + docs: The order's unique ID. + version: + type: optional docs: >- - The timestamp when the buyer joined the loyalty program, in RFC 3339 - format. This field is used to display the **Enrolled On** or **Member - Since** date in first-party Square products. - - - If this field is not set in a `CreateLoyaltyAccount` request, Square - populates it after the buyer's first action on their account + The version number, which is incremented each time an update is + committed to the order. - (when `AccumulateLoyaltyPoints` or `CreateLoyaltyReward` is called). - In first-party flows, Square populates the field when the buyer agrees - to the terms of service in Square Point of Sale. + Orders that were not created through the API do not include a version + number and + therefore cannot be updated. - This field is typically specified in a `CreateLoyaltyAccount` request - when creating a loyalty account for a buyer who already interacted - with their account. - For example, you would set this field when migrating accounts from an - external system. The timestamp in the request can represent a current - or previous date and time, but it cannot be set for the future. + [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 when the loyalty account was created, in RFC 3339 - format. + docs: The timestamp for when the order was created, in RFC 3339 format. access: read-only updated_at: type: optional - docs: >- - The timestamp when the loyalty account was last updated, in RFC 3339 - format. + docs: The timestamp for when the order was last updated, in RFC 3339 format. access: read-only - mapping: - type: optional - docs: >- - The mapping that associates the loyalty account with a buyer. - Currently, - - a loyalty account can only be mapped to a buyer by phone number. - - - To create a loyalty account, you must specify the `mapping` field, - with the buyer's phone number - - in the `phone_number` field. - expiring_point_deadlines: - type: optional>> - docs: >- - The schedule for when points expire in the loyalty account balance. - This field is present only if the account has points that are - scheduled to expire. - - - The total number of points in this field equals the number of points - in the `balance` field. + fulfillment_update: + type: optional>> + docs: The fulfillments that were updated with this version change. source: openapi: openapi/openapi.json - LoyaltyAccountExpiringPointDeadline: - docs: >- - Represents a set of points for a loyalty account that are scheduled to - expire on a specific date. + 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: - points: - type: integer - docs: >- - The number of points scheduled to expire at the `expires_at` - timestamp. - expires_at: - type: string - docs: >- - The timestamp of when the points are scheduled to expire, in RFC 3339 - format. - validation: - minLength: 1 + 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 - LoyaltyAccountMapping: - docs: >- - Represents the mapping that associates a loyalty account with a buyer. - - - Currently, a loyalty account can only be mapped to a buyer by phone - number. For more information, see - - [Loyalty Overview](https://developer.squareup.com/docs/loyalty/overview). + OrderFulfillmentUpdatedEventData: properties: + type: + type: optional> + docs: Name of the affected object’s type, `"order_fulfillment_updated"`. id: type: optional - docs: The Square-assigned ID of the mapping. - validation: - maxLength: 36 - access: read-only - created_at: - type: optional - docs: The timestamp when the mapping was created, in RFC 3339 format. - access: read-only - phone_number: + 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 + OrderFulfillmentUpdatedUpdate: + docs: Information about fulfillment updates. + properties: + fulfillment_uid: type: optional> + docs: A unique ID that identifies the fulfillment only within this order. + old_state: + type: optional docs: >- - The phone number of the buyer, in E.164 format. For example, - "+14155551111". + The state of the fulfillment before the change. + + The state is not populated if the fulfillment is created with this new + `Order` version. + new_state: + type: optional + docs: >- + The state of the fulfillment after the change. The state might be + equal to `old_state` if a non-state + + field was changed on the fulfillment (such as the tracking number). source: openapi: openapi/openapi.json - LoyaltyEvent: - docs: >- - Provides information about a loyalty event. - - For more information, see [Search for Balance-Changing Loyalty - Events](https://developer.squareup.com/docs/loyalty-api/loyalty-events). + OrderLineItem: + docs: |- + Represents a line item in an order. Each line item describes a different + product to purchase, with its own quantity and price details. properties: - id: - type: string - docs: The Square-assigned ID of the loyalty event. + uid: + type: optional> + docs: A unique ID that identifies the line item only within this order. validation: - minLength: 1 - access: read-only - type: - type: LoyaltyEventType - docs: |- - The type of the loyalty event. - See [LoyaltyEventType](#type-loyaltyeventtype) for possible values - created_at: - type: string - docs: The timestamp when the event was created, in RFC 3339 format. + maxLength: 60 + name: + type: optional> + docs: The name of the line item. validation: - minLength: 1 - access: read-only - accumulate_points: - type: optional - docs: Provides metadata when the event `type` is `ACCUMULATE_POINTS`. - create_reward: - type: optional - docs: Provides metadata when the event `type` is `CREATE_REWARD`. - redeem_reward: - type: optional - docs: Provides metadata when the event `type` is `REDEEM_REWARD`. - delete_reward: - type: optional - docs: Provides metadata when the event `type` is `DELETE_REWARD`. - adjust_points: - type: optional - docs: Provides metadata when the event `type` is `ADJUST_POINTS`. - loyalty_account_id: + maxLength: 512 + quantity: type: string docs: >- - The ID of the [loyalty account](entity:LoyaltyAccount) associated with - the event. + The count, or measurement, of a line item being purchased: + + + If `quantity` is a whole number, and `quantity_unit` is not specified, + then `quantity` denotes an item count. For example: `3` apples. + + + If `quantity` is a whole or decimal number, and `quantity_unit` is + also specified, then `quantity` denotes a measurement. For example: + `2.25` pounds of broccoli. + + + For more information, see [Specify item quantity and measurement + unit](https://developer.squareup.com/docs/orders-api/create-orders#specify-item-quantity-and-measurement-unit). + + + Line items with a quantity of `0` are automatically removed + + when paying for or otherwise completing the order. validation: minLength: 1 - maxLength: 36 - access: read-only - location_id: - type: optional - docs: The ID of the [location](entity:Location) where the event occurred. - access: read-only - source: - type: LoyaltyEventSource - docs: |- - Defines whether the event was generated by the Square Point of Sale. - See [LoyaltyEventSource](#type-loyaltyeventsource) for possible values - expire_points: - type: optional - docs: Provides metadata when the event `type` is `EXPIRE_POINTS`. - other_event: - type: optional - docs: Provides metadata when the event `type` is `OTHER`. - accumulate_promotion_points: - type: optional + maxLength: 12 + quantity_unit: + type: optional + docs: >- + The measurement unit and decimal precision that this line item's + quantity is measured in. + note: + type: optional> + docs: An optional note associated with the line item. + validation: + maxLength: 2000 + catalog_object_id: + type: optional> + docs: >- + The [CatalogItemVariation](entity:CatalogItemVariation) ID applied to + this line item. + validation: + maxLength: 192 + catalog_version: + type: optional> + docs: The version of the catalog object that this line item references. + variation_name: + type: optional> + docs: The name of the variation applied to this line item. + validation: + maxLength: 400 + item_type: + type: optional + docs: >- + The type of line item: an itemized sale, a non-itemized sale (custom + amount), or the + + activation or reloading of a gift card. + + See [OrderLineItemItemType](#type-orderlineitemitemtype) for possible + values + metadata: + type: optional>>>> + docs: >- + Application-defined data attached to this line item. Metadata fields + are intended + + to store descriptive references or associations with an entity in + another system or store brief + + information about the object. Square does not process this field; it + only stores and returns it + + in relevant API calls. Do not use metadata to store any sensitive + information (such as personally + + identifiable information or card details). + + + Keys written by applications must be 60 characters or less and must be + in the character set + + `[a-zA-Z0-9_-]`. Entries can also include metadata generated by + Square. These keys are prefixed + + with a namespace, separated from the key with a ':' character. + + + Values have a maximum length of 255 characters. + + + An application can have up to 10 entries per metadata field. + + + Entries written by applications are private and can only be read or + modified by the same + + application. + + + For more information, see + [Metadata](https://developer.squareup.com/docs/build-basics/metadata). + modifiers: + type: optional>> docs: >- - Provides metadata when the event `type` is - `ACCUMULATE_PROMOTION_POINTS`. - source: - openapi: openapi/openapi.json - LoyaltyEventAccumulatePoints: - docs: Provides metadata when the event `type` is `ACCUMULATE_POINTS`. - properties: - loyalty_program_id: - type: optional - docs: The ID of the [loyalty program](entity:LoyaltyProgram). - validation: - maxLength: 36 - access: read-only - points: - type: optional> - docs: The number of points accumulated by the event. - validation: - min: 1 - order_id: - type: optional> + The [CatalogModifier](entity:CatalogModifier)s applied to this line + item. + applied_taxes: + type: optional>> docs: >- - The ID of the [order](entity:Order) for which the buyer accumulated - the points. + The list of references to taxes applied to this line item. Each - This field is returned only if the Orders API is used to process - orders. - source: - openapi: openapi/openapi.json - LoyaltyEventAccumulatePromotionPoints: - docs: Provides metadata when the event `type` is `ACCUMULATE_PROMOTION_POINTS`. - properties: - loyalty_program_id: - type: optional + `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of + a + + top-level `OrderLineItemTax` applied to the line item. On reads, the + + amount applied is populated. + + + An `OrderLineItemAppliedTax` is automatically created on every line + + item for all `ORDER` scoped taxes added to the order. + `OrderLineItemAppliedTax` + + records for `LINE_ITEM` scoped taxes must be added in requests for the + tax + + to apply to any line items. + + + To change the amount of a tax, modify the referenced top-level tax. + applied_discounts: + type: optional>> docs: >- - The Square-assigned ID of the [loyalty - program](entity:LoyaltyProgram). - validation: - maxLength: 36 - access: read-only - loyalty_promotion_id: - type: optional + The list of references to discounts applied to this line item. Each + + `OrderLineItemAppliedDiscount` has a `discount_uid` that references + the `uid` of a top-level + + `OrderLineItemDiscounts` applied to the line item. On reads, the + amount + + applied is populated. + + + An `OrderLineItemAppliedDiscount` is automatically created on every + line item for all + + `ORDER` scoped discounts that are added to the order. + `OrderLineItemAppliedDiscount` records + + for `LINE_ITEM` scoped discounts must be added in requests for the + discount to apply to any + + line items. + + + To change the amount of a discount, modify the referenced top-level + discount. + applied_service_charges: + type: optional>> docs: >- - The Square-assigned ID of the [loyalty - promotion](entity:LoyaltyPromotion). - validation: - minLength: 1 - maxLength: 255 - access: read-only - points: - type: integer - docs: The number of points earned by the event. - access: read-only - order_id: - type: string + The list of references to service charges applied to this line item. + Each + + `OrderLineItemAppliedServiceCharge` has a `service_charge_id` that + references the `uid` of a + + top-level `OrderServiceCharge` applied to the line item. On reads, the + amount applied is + + populated. + + + To change the amount of a service charge, modify the referenced + top-level service charge. + base_price_money: + type: optional + docs: The base price for a single unit of the line item. + variation_total_price_money: + type: optional docs: >- - The ID of the [order](entity:Order) for which the buyer earned the - promotion points. + The total price of all item variations sold in this line item. - Only applications that use the Orders API to process orders can - trigger this event. - validation: - minLength: 1 - access: read-only - source: - openapi: openapi/openapi.json - LoyaltyEventAdjustPoints: - docs: Provides metadata when the event `type` is `ADJUST_POINTS`. - properties: - loyalty_program_id: - type: optional + The price is calculated as `base_price_money` multiplied by + `quantity`. + + It does not include modifiers. + gross_sales_money: + type: optional docs: >- - The Square-assigned ID of the [loyalty - program](entity:LoyaltyProgram). - validation: - maxLength: 36 - access: read-only - points: - type: integer - docs: The number of points added or removed. - reason: - type: optional> - docs: The reason for the adjustment of points. - validation: - maxLength: 3500 - source: - openapi: openapi/openapi.json - LoyaltyEventCreateReward: - docs: Provides metadata when the event `type` is `CREATE_REWARD`. - properties: - loyalty_program_id: - type: string - docs: The ID of the [loyalty program](entity:LoyaltyProgram). - validation: - minLength: 1 - maxLength: 36 - access: read-only - reward_id: - type: optional + The amount of money made in gross sales for this line item. + + The amount is calculated as the sum of the variation's total price and + each modifier's total price. + + For inclusive tax items in the US, Canada, and Japan, tax is deducted + from `gross_sales_money`. For Europe and + + Australia, inclusive tax remains as part of the gross sale + calculation. + total_tax_money: + type: optional + docs: The total amount of tax money to collect for the line item. + total_discount_money: + type: optional + docs: The total amount of discount money to collect for the line item. + total_money: + type: optional + docs: The total amount of money to collect for this line item. + pricing_blocklists: + type: optional docs: >- - The Square-assigned ID of the created [loyalty - reward](entity:LoyaltyReward). + Describes pricing adjustments that are blocked from automatic - This field is returned only if the event source is `LOYALTY_API`. - validation: - maxLength: 36 - access: read-only - points: - type: integer - docs: The loyalty points used to create the reward. - access: read-only - source: - openapi: openapi/openapi.json - LoyaltyEventDateTimeFilter: - docs: Filter events by date time range. - properties: - created_at: - type: TimeRange - docs: The `created_at` date time range used to filter the result. - source: - openapi: openapi/openapi.json - LoyaltyEventDeleteReward: - docs: Provides metadata when the event `type` is `DELETE_REWARD`. - properties: - loyalty_program_id: - type: string - docs: The ID of the [loyalty program](entity:LoyaltyProgram). - validation: - minLength: 1 - maxLength: 36 - access: read-only - reward_id: - type: optional - docs: |- - The ID of the deleted [loyalty reward](entity:LoyaltyReward). - This field is returned only if the event source is `LOYALTY_API`. - validation: - maxLength: 36 - access: read-only - points: - type: integer - docs: The number of points returned to the loyalty account. - access: read-only + application to a line item. For more information, see + + [Apply Taxes and + Discounts](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts). + total_service_charge_money: + type: optional + docs: >- + The total amount of apportioned service charge money to collect for + the line item. source: openapi: openapi/openapi.json - LoyaltyEventExpirePoints: - docs: Provides metadata when the event `type` is `EXPIRE_POINTS`. + OrderLineItemAppliedDiscount: + docs: >- + Represents an applied portion of a discount to a line item in an order. + + + Order scoped discounts have automatically applied discounts present for + each line item. + + Line-item scoped discounts must have applied discounts added manually for + any applicable line + + items. The corresponding applied money is automatically computed based on + participating + + line items. properties: - loyalty_program_id: - type: string + uid: + type: optional> docs: >- - The Square-assigned ID of the [loyalty - program](entity:LoyaltyProgram). + A unique ID that identifies the applied discount only within this + order. validation: - minLength: 1 - maxLength: 36 - access: read-only - points: - type: integer - docs: The number of points expired. - source: - openapi: openapi/openapi.json - LoyaltyEventFilter: - docs: |- - The filtering criteria. If the request specifies multiple filters, - the endpoint uses a logical AND to evaluate them. - properties: - loyalty_account_filter: - type: optional - docs: Filter events by loyalty account. - type_filter: - type: optional - docs: Filter events by event type. - date_time_filter: - type: optional - docs: |- - Filter events by date time range. - For each range, the start time is inclusive and the end time - is exclusive. - location_filter: - type: optional - docs: Filter events by location. - order_filter: - type: optional - docs: Filter events by the order associated with the event. - source: - openapi: openapi/openapi.json - LoyaltyEventLocationFilter: - docs: Filter events by location. - properties: - location_ids: - docs: |- - The [location](entity:Location) IDs for loyalty events to query. - If multiple values are specified, the endpoint uses - a logical OR to combine them. - type: list - source: - openapi: openapi/openapi.json - LoyaltyEventLoyaltyAccountFilter: - docs: Filter events by loyalty account. - properties: - loyalty_account_id: + maxLength: 60 + discount_uid: type: string docs: >- - The ID of the [loyalty account](entity:LoyaltyAccount) associated with - loyalty events. + The `uid` of the discount that the applied discount represents. It + must + + reference a discount present in the `order.discounts` field. + + + This field is immutable. To change which discounts apply to a line + item, + + you must delete the discount and re-add it as a new + `OrderLineItemAppliedDiscount`. validation: minLength: 1 + maxLength: 60 + applied_money: + type: optional + docs: The amount of money applied by the discount to the line item. source: openapi: openapi/openapi.json - LoyaltyEventOrderFilter: - docs: Filter events by the order associated with the event. + OrderLineItemAppliedServiceCharge: properties: - order_id: + uid: + type: optional> + docs: >- + A unique ID that identifies the applied service charge only within + this order. + validation: + maxLength: 60 + service_charge_uid: type: string - docs: The ID of the [order](entity:Order) associated with the event. + docs: >- + The `uid` of the service charge that the applied service charge + represents. It must + + reference a service charge present in the `order.service_charges` + field. + + + This field is immutable. To change which service charges apply to a + line item, + + delete and add a new `OrderLineItemAppliedServiceCharge`. validation: minLength: 1 + maxLength: 60 + applied_money: + type: optional + docs: The amount of money applied by the service charge to the line item. source: openapi: openapi/openapi.json - LoyaltyEventOther: - docs: Provides metadata when the event `type` is `OTHER`. + OrderLineItemAppliedTax: + docs: >- + Represents an applied portion of a tax to a line item in an order. + + + Order-scoped taxes automatically include the applied taxes in each line + item. + + Line item taxes must be referenced from any applicable line items. + + The corresponding applied money is automatically computed, based on the + + set of participating line items. properties: - loyalty_program_id: + uid: + type: optional> + docs: A unique ID that identifies the applied tax only within this order. + validation: + maxLength: 60 + tax_uid: type: string docs: >- - The Square-assigned ID of the [loyalty - program](entity:LoyaltyProgram). + The `uid` of the tax for which this applied tax represents. It must + reference + + a tax present in the `order.taxes` field. + + + This field is immutable. To change which taxes apply to a line item, + delete and add a new + + `OrderLineItemAppliedTax`. validation: minLength: 1 - maxLength: 36 - access: read-only - points: - type: integer - docs: The number of points added or removed. - source: - openapi: openapi/openapi.json - LoyaltyEventQuery: - docs: Represents a query used to search for loyalty events. - properties: - filter: - type: optional - docs: The query filter criteria. + maxLength: 60 + applied_money: + type: optional + docs: The amount of money applied by the tax to the line item. source: openapi: openapi/openapi.json - LoyaltyEventRedeemReward: - docs: Provides metadata when the event `type` is `REDEEM_REWARD`. + OrderLineItemDiscount: + docs: >- + Represents a discount that applies to one or more line items in an + + order. + + + Fixed-amount, order-scoped discounts are distributed across all non-zero + line item totals. + + The amount distributed to each line item is relative to the + + amount contributed by the item to the order subtotal. properties: - loyalty_program_id: - type: string - docs: The ID of the [loyalty program](entity:LoyaltyProgram). + uid: + type: optional> + docs: A unique ID that identifies the discount only within this order. validation: - minLength: 1 - maxLength: 36 - access: read-only - reward_id: - type: optional - docs: |- - The ID of the redeemed [loyalty reward](entity:LoyaltyReward). - This field is returned only if the event source is `LOYALTY_API`. + maxLength: 60 + catalog_object_id: + type: optional> + docs: >- + The catalog object ID referencing + [CatalogDiscount](entity:CatalogDiscount). validation: - maxLength: 36 - access: read-only - order_id: - type: optional + maxLength: 192 + catalog_version: + type: optional> + docs: The version of the catalog object that this discount references. + name: + type: optional> + docs: The discount's name. + validation: + maxLength: 255 + type: + type: optional + docs: >- + The type of the discount. + + + Discounts that do not reference a catalog object ID must have a type + of + + `FIXED_PERCENTAGE` or `FIXED_AMOUNT`. + + See [OrderLineItemDiscountType](#type-orderlineitemdiscounttype) for + possible values + percentage: + type: optional> + docs: >- + The percentage of the discount, as a string representation of a + decimal number. + + A value of `7.25` corresponds to a percentage of 7.25%. + + + `percentage` is not set for amount-based discounts. + validation: + maxLength: 10 + amount_money: + type: optional + docs: |- + The total declared monetary amount of the discount. + + `amount_money` is not set for percentage-based discounts. + applied_money: + type: optional + docs: >- + The amount of discount actually applied to the line item. + + + The amount represents the amount of money applied as a line-item + scoped discount. + + When an amount-based discount is scoped to the entire order, the value + + of `applied_money` is different than `amount_money` because the total + + amount of the discount is distributed across all line items. + metadata: + type: optional>>>> docs: >- - The ID of the [order](entity:Order) that redeemed the reward. + Application-defined data attached to this discount. Metadata fields + are intended - This field is returned only if the Orders API is used to process - orders. - access: read-only - source: - openapi: openapi/openapi.json - LoyaltyEventSource: - enum: - - SQUARE - - LOYALTY_API - docs: Defines whether the event was generated by the Square Point of Sale. - source: - openapi: openapi/openapi.json - LoyaltyEventType: - enum: - - ACCUMULATE_POINTS - - CREATE_REWARD - - REDEEM_REWARD - - DELETE_REWARD - - ADJUST_POINTS - - EXPIRE_POINTS - - OTHER - - ACCUMULATE_PROMOTION_POINTS - docs: The type of the loyalty event. - source: - openapi: openapi/openapi.json - LoyaltyEventTypeFilter: - docs: Filter events by event type. - properties: - types: - docs: |- - The loyalty event types used to filter the result. - If multiple values are specified, the endpoint uses a - logical OR to combine them. - See [LoyaltyEventType](#type-loyaltyeventtype) for possible values - type: list - source: - openapi: openapi/openapi.json - LoyaltyProgram: - docs: >- - Represents a Square loyalty program. Loyalty programs define how buyers - can earn points and redeem points for rewards. + to store descriptive references or associations with an entity in + another system or store brief - Square sellers can have only one loyalty program, which is created and - managed from the Seller Dashboard. + information about the object. Square does not process this field; it + only stores and returns it - For more information, see [Loyalty Program - Overview](https://developer.squareup.com/docs/loyalty/overview). - properties: - id: - type: optional - docs: |- - The Square-assigned ID of the loyalty program. Updates to - the loyalty program do not modify the identifier. - validation: - maxLength: 36 - access: read-only - status: - type: optional + in relevant API calls. Do not use metadata to store any sensitive + information (such as personally + + identifiable information or card details). + + + Keys written by applications must be 60 characters or less and must be + in the character set + + `[a-zA-Z0-9_-]`. Entries can also include metadata generated by + Square. These keys are prefixed + + with a namespace, separated from the key with a ':' character. + + + Values have a maximum length of 255 characters. + + + An application can have up to 10 entries per metadata field. + + + Entries written by applications are private and can only be read or + modified by the same + + application. + + + For more information, see + [Metadata](https://developer.squareup.com/docs/build-basics/metadata). + scope: + type: optional docs: >- - Whether the program is currently active. + Indicates the level at which the discount applies. For `ORDER` scoped + discounts, - See [LoyaltyProgramStatus](#type-loyaltyprogramstatus) for possible - values - reward_tiers: - type: optional>> - docs: The list of rewards for buyers, sorted by ascending points. - expiration_policy: - type: optional - docs: If present, details for how points expire. - terminology: - type: optional - docs: A cosmetic name for the “points” currency. - location_ids: - type: optional>> - docs: The [locations](entity:Location) at which the program is active. - created_at: - type: optional - docs: The timestamp when the program was created, in RFC 3339 format. + Square generates references in `applied_discounts` on all order line + items that do + + not have them. For `LINE_ITEM` scoped discounts, the discount only + applies to line items + + with a discount reference in their `applied_discounts` field. + + + This field is immutable. To change the scope of a discount, you must + delete + + the discount and re-add it as a new discount. + + See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for + possible values + reward_ids: + type: optional> + docs: >- + The reward IDs corresponding to this discount. The application and + + specification of discounts that have `reward_ids` are completely + controlled by the backing + + criteria corresponding to the reward tiers of the rewards that are + added to the order + + through the Loyalty API. To manually unapply discounts that are the + result of added rewards, + + the rewards must be removed from the order through the Loyalty API. access: read-only - updated_at: + pricing_rule_id: type: optional - docs: The timestamp when the reward was last updated, in RFC 3339 format. - access: read-only - accrual_rules: - type: optional>> docs: >- - Defines how buyers can earn loyalty points from the base loyalty - program. + The object ID of a [pricing rule](entity:CatalogPricingRule) to be + applied - To check for associated [loyalty promotions](entity:LoyaltyPromotion) - that enable + automatically to this discount. The specification and application of + the discounts, to - buyers to earn extra points, call - [ListLoyaltyPromotions](api-endpoint:Loyalty-ListLoyaltyPromotions). - source: - openapi: openapi/openapi.json - LoyaltyProgramAccrualRule: - docs: >- - Represents an accrual rule, which defines how buyers can earn points from - the base [loyalty program](entity:LoyaltyProgram). - properties: - accrual_type: - type: LoyaltyProgramAccrualRuleType - docs: >- - The type of the accrual rule that defines how buyers can earn points. + which a `pricing_rule_id` is assigned, are completely controlled by + the corresponding - See - [LoyaltyProgramAccrualRuleType](#type-loyaltyprogramaccrualruletype) - for possible values - points: - type: optional> - docs: |- - The number of points that - buyers earn based on the `accrual_type`. - validation: - min: 1 - visit_data: - type: optional - docs: Additional data for rules with the `VISIT` accrual type. - spend_data: - type: optional - docs: Additional data for rules with the `SPEND` accrual type. - item_variation_data: - type: optional - docs: Additional data for rules with the `ITEM_VARIATION` accrual type. - category_data: - type: optional - docs: Additional data for rules with the `CATEGORY` accrual type. + pricing rule. + access: read-only source: openapi: openapi/openapi.json - LoyaltyProgramAccrualRuleCategoryData: - docs: Represents additional data for rules with the `CATEGORY` accrual type. - properties: - category_id: - type: string - docs: >- - The ID of the `CATEGORY` [catalog object](entity:CatalogObject) that - buyers can purchase to earn - - points. - validation: - minLength: 1 + OrderLineItemDiscountScope: + enum: + - OTHER_DISCOUNT_SCOPE + - LINE_ITEM + - ORDER + docs: Indicates whether this is a line-item or order-level discount. source: openapi: openapi/openapi.json - LoyaltyProgramAccrualRuleItemVariationData: + OrderLineItemDiscountType: + enum: + - UNKNOWN_DISCOUNT + - FIXED_PERCENTAGE + - FIXED_AMOUNT + - VARIABLE_PERCENTAGE + - VARIABLE_AMOUNT docs: >- - Represents additional data for rules with the `ITEM_VARIATION` accrual - type. - properties: - item_variation_id: - type: string - docs: >- - The ID of the `ITEM_VARIATION` [catalog object](entity:CatalogObject) - that buyers can purchase to earn - - points. - validation: - minLength: 1 + Indicates how the discount is applied to the associated line item or + order. + source: + openapi: openapi/openapi.json + OrderLineItemItemType: + enum: + - ITEM + - CUSTOM_AMOUNT + - GIFT_CARD + docs: Represents the line item type. source: openapi: openapi/openapi.json - LoyaltyProgramAccrualRuleSpendData: - docs: Represents additional data for rules with the `SPEND` accrual type. + OrderLineItemModifier: + docs: A [CatalogModifier](entity:CatalogModifier). properties: - amount_money: - type: Money + uid: + type: optional> + docs: A unique ID that identifies the modifier only within this order. + validation: + maxLength: 60 + catalog_object_id: + type: optional> docs: >- - The amount that buyers must spend to earn points. - - For example, given an "Earn 1 point for every $10 spent" accrual rule, - a buyer who spends $105 earns 10 points. - excluded_category_ids: - type: optional>> + The catalog object ID referencing + [CatalogModifier](entity:CatalogModifier). + validation: + maxLength: 192 + catalog_version: + type: optional> + docs: The version of the catalog object that this modifier references. + name: + type: optional> + docs: The name of the item modifier. + validation: + maxLength: 255 + quantity: + type: optional> docs: >- - The IDs of any `CATEGORY` catalog objects that are excluded from - points accrual. + The quantity of the line item modifier. The modifier quantity can be 0 + or more. + For example, suppose a restaurant offers a cheeseburger on the menu. + When a buyer orders - You can use the - [BatchRetrieveCatalogObjects](api-endpoint:Catalog-BatchRetrieveCatalogObjects) + this item, the restaurant records the purchase by creating an `Order` + object with a line item - endpoint to retrieve information about the excluded categories. - excluded_item_variation_ids: - type: optional>> - docs: >- - The IDs of any `ITEM_VARIATION` catalog objects that are excluded from - points accrual. + for a burger. The line item includes a line item modifier: the name is + cheese and the quantity + is 1. The buyer has the option to order extra cheese (or no cheese). + If the buyer chooses - You can use the - [BatchRetrieveCatalogObjects](api-endpoint:Catalog-BatchRetrieveCatalogObjects) + the extra cheese option, the modifier quantity increases to 2. If the + buyer does not want - endpoint to retrieve information about the excluded item variations. - tax_mode: - type: LoyaltyProgramAccrualRuleTaxMode + any cheese, the modifier quantity is set to 0. + base_price_money: + type: optional docs: >- - Indicates how taxes should be treated when calculating the purchase - amount used for points accrual. + The base price for the modifier. - See - [LoyaltyProgramAccrualRuleTaxMode](#type-loyaltyprogramaccrualruletaxmode) - for possible values - source: - openapi: openapi/openapi.json - LoyaltyProgramAccrualRuleTaxMode: - enum: - - BEFORE_TAX - - AFTER_TAX - docs: >- - Indicates how taxes should be treated when calculating the purchase amount - used for loyalty points accrual. - This setting applies only to `SPEND` accrual rules or `VISIT` accrual - rules that have a minimum spend requirement. - source: - openapi: openapi/openapi.json - LoyaltyProgramAccrualRuleType: - enum: - - VISIT - - SPEND - - ITEM_VARIATION - - CATEGORY - docs: The type of the accrual rule that defines how buyers can earn points. - source: - openapi: openapi/openapi.json - LoyaltyProgramAccrualRuleVisitData: - docs: Represents additional data for rules with the `VISIT` accrual type. - properties: - minimum_amount_money: + `base_price_money` is required for ad hoc modifiers. + + If both `catalog_object_id` and `base_price_money` are set, + `base_price_money` will + + override the predefined [CatalogModifier](entity:CatalogModifier) + price. + total_price_money: type: optional - docs: The minimum purchase required during the visit to quality for points. - tax_mode: - type: LoyaltyProgramAccrualRuleTaxMode docs: >- - Indicates how taxes should be treated when calculating the purchase - amount to determine whether the visit qualifies for points. - - This setting applies only if `minimum_amount_money` is specified. + The total price of the item modifier for its line item. - See - [LoyaltyProgramAccrualRuleTaxMode](#type-loyaltyprogramaccrualruletaxmode) - for possible values - source: - openapi: openapi/openapi.json - LoyaltyProgramExpirationPolicy: - docs: Describes when the loyalty program expires. - properties: - expiration_duration: - type: string + This is the modifier's `base_price_money` multiplied by the line + item's quantity. + metadata: + type: optional>>>> docs: >- - The number of months before points expire, in `P[n]M` RFC 3339 - duration format. For example, a value of `P12M` represents a duration - of 12 months. + Application-defined data attached to this order. Metadata fields are + intended - Points are valid through the last day of the month in which they are - scheduled to expire. For example, with a `P12M` duration, points - earned on July 6, 2020 expire on August 1, 2021. - validation: - minLength: 1 - source: - openapi: openapi/openapi.json - LoyaltyProgramRewardDefinition: - docs: >- - Provides details about the reward tier discount. DEPRECATED at version - 2020-12-16. Discount details + to store descriptive references or associations with an entity in + another system or store brief - are now defined using a catalog pricing rule and other catalog objects. - For more information, see + information about the object. Square does not process this field; it + only stores and returns it - [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 + in relevant API calls. Do not use metadata to store any sensitive + information (such as personally - `product_set_data` field of the `PRODUCT_SET` catalog object - referenced by the pricing rule. For `ORDER` scopes, + identifiable information or card details). - `all_products` is true. For `ITEM_VARIATION` or `CATEGORY` scopes, - `product_ids_any` is a list of - catalog object IDs of the given type. + Keys written by applications must be 60 characters or less and must be + in the character set - 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 + `[a-zA-Z0-9_-]`. Entries can also include metadata generated by + Square. These keys are prefixed - in the `discount_data.discount_type` field of the `DISCOUNT` catalog - object referenced by the pricing rule. + with a namespace, separated from the key with a ':' character. - 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 + Values have a maximum length of 255 characters. - 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 + An application can have up to 10 entries per metadata 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 + Entries written by applications are private and can only be read or + modified by the same - `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. + application. - 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. + For more information, see + [Metadata](https://developer.squareup.com/docs/build-basics/metadata). source: openapi: openapi/openapi.json - LoyaltyProgramRewardDefinitionScope: - enum: - - ORDER - - ITEM_VARIATION - - CATEGORY + OrderLineItemPricingBlocklists: docs: >- - Indicates the scope of the reward tier. DEPRECATED at version 2020-12-16. - Discount details + Describes pricing adjustments that are blocked from automatic - are now defined using a catalog pricing rule and other catalog objects. - For more information, see + application to a line item. 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 + [Apply Taxes and + Discounts](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts). + properties: + blocked_discounts: + type: >- + optional>> + docs: >- + A list of discounts blocked from applying to the line item. - are now defined using a catalog pricing rule and other catalog objects. - For more information, see + Discounts can be blocked by the `discount_uid` (for ad hoc discounts) + or - [Getting discount details for a reward - tier](https://developer.squareup.com/docs/loyalty-api/loyalty-rewards#get-discount-details). + the `discount_catalog_object_id` (for catalog discounts). + blocked_taxes: + type: optional>> + docs: |- + A list of taxes blocked from applying to the line item. + Taxes can be blocked by the `tax_uid` (for ad hoc taxes) or + the `tax_catalog_object_id` (for catalog taxes). source: openapi: openapi/openapi.json - LoyaltyProgramRewardTier: + OrderLineItemPricingBlocklistsBlockedDiscount: docs: >- - Represents a reward tier in a loyalty program. A reward tier defines how - buyers can redeem points for a reward, such as the number of points - required and the value and scope of the discount. A loyalty program can - offer multiple reward tiers. + A discount to block from applying to a line item. The discount must be + + identified by either `discount_uid` or `discount_catalog_object_id`, but + not both. properties: - id: - type: optional - docs: The Square-assigned ID of the reward tier. - validation: - maxLength: 36 - access: read-only - points: - type: integer - docs: The points exchanged for the reward tier. + uid: + type: optional> + docs: A unique ID of the `BlockedDiscount` within the order. validation: - min: 1 - name: - 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. - access: read-only - pricing_rule_reference: - type: CatalogObjectReference + maxLength: 60 + discount_uid: + type: optional> docs: >- - A reference to the specific version of a `PRICING_RULE` catalog object - that contains information about the reward tier discount. - + The `uid` of the discount that should be blocked. Use this field to + block - Use `object_id` and `catalog_version` with the - [RetrieveCatalogObject](api-endpoint:Catalog-RetrieveCatalogObject) - endpoint + ad hoc discounts. For catalog discounts, use the + `discount_catalog_object_id` field. + validation: + maxLength: 60 + discount_catalog_object_id: + type: optional> + docs: >- + The `catalog_object_id` of the discount that should be blocked. - to get discount details. Make sure to set `include_related_objects` to - true in the request to retrieve all catalog objects + Use this field to block catalog discounts. For ad hoc discounts, use + the - that define the discount. For more information, see [Getting discount - details for a reward - tier](https://developer.squareup.com/docs/loyalty-api/loyalty-rewards#get-discount-details). - source: - openapi: openapi/openapi.json - LoyaltyProgramStatus: - enum: - - INACTIVE - - ACTIVE - docs: Indicates whether the program is currently active. + `discount_uid` field. + validation: + maxLength: 192 source: openapi: openapi/openapi.json - LoyaltyProgramTerminology: - docs: Represents the naming used for loyalty points. + OrderLineItemPricingBlocklistsBlockedTax: + docs: |- + A tax to block from applying to a line item. The tax must be + identified by either `tax_uid` or `tax_catalog_object_id`, but not both. properties: - one: - type: string - docs: A singular unit for a point (for example, 1 point is called 1 star). + uid: + type: optional> + docs: A unique ID of the `BlockedTax` within the order. validation: - minLength: 1 - other: - type: string - docs: A plural unit for point (for example, 10 points is called 10 stars). + maxLength: 60 + tax_uid: + type: optional> + docs: >- + The `uid` of the tax that should be blocked. Use this field to block + + ad hoc taxes. For catalog, taxes use the `tax_catalog_object_id` + field. validation: - minLength: 1 + maxLength: 60 + tax_catalog_object_id: + type: optional> + docs: |- + The `catalog_object_id` of the tax that should be blocked. + Use this field to block catalog taxes. For ad hoc taxes, use the + `tax_uid` field. + validation: + maxLength: 192 source: openapi: openapi/openapi.json - LoyaltyPromotion: + OrderLineItemTax: docs: >- - Represents a promotion for a [loyalty program](entity:LoyaltyProgram). - Loyalty promotions enable buyers + Represents a tax that applies to one or more line item in the order. - to earn extra points on top of those earned from the base program. + Fixed-amount, order-scoped taxes are distributed across all non-zero line + item totals. - A loyalty program can have a maximum of 10 loyalty promotions with an - `ACTIVE` or `SCHEDULED` status. + The amount distributed to each line item is relative to the amount the + item + + contributes to the order subtotal. properties: - id: - type: optional - docs: The Square-assigned ID of the promotion. + uid: + type: optional> + docs: A unique ID that identifies the tax only within this order. validation: - minLength: 1 - maxLength: 255 - access: read-only + maxLength: 60 + catalog_object_id: + type: optional> + docs: The catalog object ID referencing [CatalogTax](entity:CatalogTax). + validation: + maxLength: 192 + catalog_version: + type: optional> + docs: The version of the catalog object that this tax references. name: - type: string - docs: The name of the promotion. + type: optional> + docs: The tax's name. validation: - minLength: 1 - maxLength: 70 - incentive: - type: LoyaltyPromotionIncentive + maxLength: 255 + type: + type: optional docs: >- - The points incentive for the promotion. This field defines whether - promotion points + Indicates the calculation method used to apply the tax. - are earned by multiplying base program points or by adding a specified - number of points. - available_time: - type: LoyaltyPromotionAvailableTimeData - docs: >- - The scheduling information that defines when purchases can qualify to - earn points from an `ACTIVE` promotion. - trigger_limit: - type: optional + See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible + values + percentage: + type: optional> docs: >- - The number of times a buyer can earn promotion points during a - specified interval. + The percentage of the tax, as a string representation of a decimal - If not specified, buyers can trigger the promotion an unlimited number - of times. - status: - type: optional - docs: >- - The current status of the promotion. + number. For example, a value of `"7.25"` corresponds to a percentage + of - See [LoyaltyPromotionStatus](#type-loyaltypromotionstatus) for - possible values - created_at: - type: optional - docs: The timestamp of when the promotion was created, in RFC 3339 format. - access: read-only - canceled_at: - type: optional - docs: The timestamp of when the promotion was canceled, in RFC 3339 format. - access: read-only - updated_at: - type: optional - docs: The timestamp when the promotion was last updated, in RFC 3339 format. - access: read-only - loyalty_program_id: - type: optional - docs: >- - The ID of the [loyalty program](entity:LoyaltyProgram) associated with - the promotion. - access: read-only - minimum_spend_amount_money: - type: optional - docs: >- - The minimum purchase amount required to earn promotion points. If - specified, this amount is positive. - qualifying_item_variation_ids: - type: optional>> + 7.25%. + validation: + maxLength: 10 + metadata: + type: optional>>>> docs: >- - The IDs of any qualifying `ITEM_VARIATION` [catalog - objects](entity:CatalogObject). If specified, + Application-defined data attached to this tax. Metadata fields are + intended - the purchase must include at least one of these items to qualify for - the promotion. + 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 - This option is valid only if the base loyalty program uses a `VISIT` - or `SPEND` accrual rule. + in relevant API calls. Do not use metadata to store any sensitive + information (such as personally - With `SPEND` accrual rules, make sure that qualifying promotional - items are not excluded. + identifiable information or card details). - You can specify `qualifying_item_variation_ids` or - `qualifying_category_ids` for a given promotion, but not both. - qualifying_category_ids: - type: optional>> - docs: >- - The IDs of any qualifying `CATEGORY` [catalog - objects](entity:CatalogObject). If specified, + Keys written by applications must be 60 characters or less and must be + in the character set - the purchase must include at least one item from one of these - categories to qualify for the promotion. + `[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. - This option is valid only if the base loyalty program uses a `VISIT` - or `SPEND` accrual rule. - With `SPEND` accrual rules, make sure that qualifying promotional - items are not excluded. + Values have a maximum length of 255 characters. - You can specify `qualifying_category_ids` or - `qualifying_item_variation_ids` for a promotion, but not both. - source: - openapi: openapi/openapi.json - LoyaltyPromotionAvailableTimeData: - docs: >- - Represents scheduling information that determines when purchases can - qualify to earn points + An application can have up to 10 entries per metadata field. - from a [loyalty promotion](entity:LoyaltyPromotion). - properties: - start_date: - type: optional - docs: >- - The date that the promotion starts, in `YYYY-MM-DD` format. Square - populates this field - based on the provided `time_periods`. - access: read-only - end_date: - type: optional - docs: >- - The date that the promotion ends, in `YYYY-MM-DD` format. Square - populates this field + Entries written by applications are private and can only be read or + modified by the same - based on the provided `time_periods`. If an end date is not specified, - an `ACTIVE` promotion + application. - remains available until it is canceled. - access: read-only - time_periods: - docs: >- - A list of [iCalendar (RFC 5545) - events](https://tools.ietf.org/html/rfc5545#section-3.6.1) - (`VEVENT`). Each event represents an available time period per day or - days of the week. + For more information, see + [Metadata](https://developer.squareup.com/docs/build-basics/metadata). + applied_money: + type: optional + docs: |- + The amount of money applied to the order by the tax. - A day can have a maximum of one available time period. + - For percentage-based taxes, `applied_money` is the money + calculated using the percentage. + scope: + type: optional + docs: >- + Indicates the level at which the tax applies. For `ORDER` scoped + taxes, + Square generates references in `applied_taxes` on all order line items + that do - Only `DTSTART`, `DURATION`, and `RRULE` are supported. `DTSTART` and - `DURATION` are required and + not have them. For `LINE_ITEM` scoped taxes, the tax only applies to + line items - timestamps must be in local (unzoned) time format. Include `RRULE` to - specify recurring promotions, + with references in their `applied_taxes` field. - an end date (using the `UNTIL` keyword), or both. For more - information, see - [Available - time](https://developer.squareup.com/docs/loyalty-api/loyalty-promotions#available-time). + This field is immutable. To change the scope, you must delete the tax + and + re-add it as a new tax. - Note that `BEGIN:VEVENT` and `END:VEVENT` are optional in a - `CreateLoyaltyPromotion` request + See [OrderLineItemTaxScope](#type-orderlineitemtaxscope) for possible + values + auto_applied: + type: optional + docs: >- + Determines whether the tax was automatically applied to the order + based on - but are always included in the response. - type: list + the catalog configuration. For an example, see + + [Automatically Apply Taxes to an + Order](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts/auto-apply-taxes). + access: read-only source: openapi: openapi/openapi.json - LoyaltyPromotionIncentive: + OrderLineItemTaxScope: + enum: + - OTHER_TAX_SCOPE + - LINE_ITEM + - ORDER + docs: Indicates whether this is a line-item or order-level tax. + source: + openapi: openapi/openapi.json + OrderLineItemTaxType: + enum: + - UNKNOWN_TAX + - ADDITIVE + - INCLUSIVE + docs: Indicates how the tax is applied to the associated line item or order. + source: + openapi: openapi/openapi.json + OrderMoneyAmounts: + docs: A collection of various money amounts. + properties: + total_money: + type: optional + docs: The total money. + tax_money: + type: optional + docs: The money associated with taxes. + discount_money: + type: optional + docs: The money associated with discounts. + tip_money: + type: optional + docs: The money associated with tips. + service_charge_money: + type: optional + docs: The money associated with service charges. + source: + openapi: openapi/openapi.json + OrderPricingOptions: docs: >- - Represents how points for a [loyalty promotion](entity:LoyaltyPromotion) - are calculated, + Pricing options for an order. The options affect how the order's price is + calculated. - either by multiplying the points earned from the base program or by adding - a specified number + They can be used, for example, to apply automatic price adjustments that + are based on preconfigured - of points to the points earned from the base program. + [pricing rules](entity:CatalogPricingRule). properties: - type: - type: LoyaltyPromotionIncentiveType + auto_apply_discounts: + type: optional> + docs: |- + The option to determine whether pricing rule-based + discounts are automatically applied to an order. + auto_apply_taxes: + type: optional> docs: >- - The type of points incentive. + The option to determine whether rule-based taxes are automatically - See - [LoyaltyPromotionIncentiveType](#type-loyaltypromotionincentivetype) - for possible values - points_multiplier_data: - type: optional - docs: Additional data for a `POINTS_MULTIPLIER` incentive type. - points_addition_data: - type: optional - docs: Additional data for a `POINTS_ADDITION` incentive type. + applied to an order when the criteria of the corresponding rules are + met. source: openapi: openapi/openapi.json - LoyaltyPromotionIncentivePointsAdditionData: + OrderQuantityUnit: docs: >- - Represents the metadata for a `POINTS_ADDITION` type of [loyalty promotion - incentive](entity:LoyaltyPromotionIncentive). + Contains the measurement unit for a quantity and a precision that + + specifies the number of digits after the decimal point for decimal + quantities. properties: - points_addition: - type: integer + measurement_unit: + type: optional + docs: |- + A [MeasurementUnit](entity:MeasurementUnit) that represents the + unit of measure for the quantity. + precision: + type: optional> docs: >- - The number of additional points to earn each time the promotion is - triggered. For example, + For non-integer quantities, represents the number of digits after the + decimal point that are - suppose a purchase qualifies for 5 points from the base loyalty - program. If the purchase also + recorded for this quantity. - qualifies for a `POINTS_ADDITION` promotion incentive with a - `points_addition` of 3, the buyer - earns a total of 8 points (5 program points + 3 promotion points = 8 - points). - validation: - min: 1 + For example, a precision of 1 allows quantities such as `"1.0"` and + `"1.1"`, but not `"1.01"`. + + + Min: 0. Max: 5. + catalog_object_id: + type: optional> + docs: |- + The catalog object ID referencing the + [CatalogMeasurementUnit](entity:CatalogMeasurementUnit). + + This field is set when this is a catalog-backed measurement unit. + catalog_version: + type: optional> + docs: >- + The version of the catalog object that this measurement unit + references. + + + This field is set when this is a catalog-backed measurement unit. source: openapi: openapi/openapi.json - LoyaltyPromotionIncentivePointsMultiplierData: + OrderReturn: docs: >- - Represents the metadata for a `POINTS_MULTIPLIER` type of [loyalty - promotion incentive](entity:LoyaltyPromotionIncentive). + The set of line items, service charges, taxes, discounts, tips, and other + items being returned in an order. properties: - points_multiplier: - type: optional> + uid: + type: optional> + docs: A unique ID that identifies the return only within this order. + validation: + maxLength: 60 + source_order_id: + type: optional> docs: >- - The multiplier used to calculate the number of points earned each time - the promotion + An order that contains the original sale of these return line items. + This is unset - is triggered. For example, suppose a purchase qualifies for 5 points - from the base loyalty program. + for unlinked returns. + return_line_items: + type: optional>> + docs: A collection of line items that are being returned. + return_service_charges: + type: optional>> + docs: A collection of service charges that are being returned. + return_taxes: + type: optional> + docs: >- + A collection of references to taxes being returned for an order, + including the total - If the purchase also qualifies for a `POINTS_MULTIPLIER` promotion - incentive with a `points_multiplier` + applied tax amount to be returned. The taxes must reference a + top-level tax ID from the source - of 3, the buyer earns a total of 15 points (5 program points x 3 - promotion multiplier = 15 points). + order. + access: read-only + return_discounts: + type: optional> + docs: >- + A collection of references to discounts being returned for an order, + including the total + applied discount amount to be returned. The discounts must reference a + top-level discount ID - DEPRECATED at version 2023-08-16. Replaced by the `multiplier` field. + from the source order. + access: read-only + return_tips: + type: optional>> + docs: A collection of references to tips being returned for an order. + rounding_adjustment: + type: optional + docs: >- + A positive or negative rounding adjustment to the total value being + returned. Adjustments are commonly + used to apply cash rounding when the minimum unit of the account is + smaller than the lowest - One of the following is required when specifying a points multiplier: + physical denomination of the currency. + return_amounts: + type: optional + docs: An aggregate monetary value being returned by this return entry. + source: + openapi: openapi/openapi.json + OrderReturnDiscount: + docs: >- + Represents a discount being returned that applies to one or more return + line items in an - - (Recommended) The `multiplier` field. + order. - - This deprecated `points_multiplier` field. If provided in the - request, Square also returns `multiplier` - with the equivalent value. + Fixed-amount, order-scoped discounts are distributed across all non-zero + return line item totals. + + The amount distributed to each return line item is relative to that item’s + contribution to the + + order subtotal. + properties: + uid: + type: optional> + docs: >- + A unique ID that identifies the returned discount only within this + order. validation: - min: 2 - max: 10 - multiplier: + maxLength: 60 + source_discount_uid: + type: optional> + docs: >- + The discount `uid` from the order that contains the original + application of this discount. + validation: + maxLength: 60 + catalog_object_id: + type: optional> + docs: >- + The catalog object ID referencing + [CatalogDiscount](entity:CatalogDiscount). + validation: + maxLength: 192 + catalog_version: + type: optional> + docs: The version of the catalog object that this discount references. + name: type: optional> + docs: The discount's name. + validation: + maxLength: 255 + type: + type: optional docs: >- - The multiplier used to calculate the number of points earned each time - the promotion is triggered, - - specified as a string representation of a decimal. Square supports - multipliers up to 10x, with three - - point precision for decimal multipliers. For example, suppose a - purchase qualifies for 4 points from the - - base loyalty program. If the purchase also qualifies for a - `POINTS_MULTIPLIER` promotion incentive with a + The type of the discount. If it is created by the API, it is + `FIXED_PERCENTAGE` or `FIXED_AMOUNT`. - `multiplier` of "1.5", the buyer earns a total of 6 points (4 program - points x 1.5 promotion multiplier = 6 points). - Fractional points are dropped. + Discounts that do not reference a catalog object ID must have a type + of + `FIXED_PERCENTAGE` or `FIXED_AMOUNT`. - One of the following is required when specifying a points multiplier: + See [OrderLineItemDiscountType](#type-orderlineitemdiscounttype) for + possible values + percentage: + type: optional> + docs: >- + The percentage of the tax, as a string representation of a decimal + number. - - (Recommended) This `multiplier` field. + A value of `"7.25"` corresponds to a percentage of 7.25%. - - The deprecated `points_multiplier` field. If provided in the - request, Square also returns `multiplier` - with the equivalent value. + `percentage` is not set for amount-based discounts. validation: - maxLength: 5 - source: - openapi: openapi/openapi.json - LoyaltyPromotionIncentiveType: - enum: - - POINTS_MULTIPLIER - - POINTS_ADDITION - docs: >- - Indicates the type of points incentive for a [loyalty - promotion](entity:LoyaltyPromotion), + maxLength: 10 + amount_money: + type: optional + docs: |- + The total declared monetary amount of the discount. - which is used to determine how buyers can earn points from the promotion. - source: - openapi: openapi/openapi.json - LoyaltyPromotionStatus: - enum: - - ACTIVE - - ENDED - - CANCELED - - SCHEDULED - docs: Indicates the status of a [loyalty promotion](entity:LoyaltyPromotion). - source: - openapi: openapi/openapi.json - LoyaltyPromotionTriggerLimit: - docs: >- - Represents the number of times a buyer can earn points during a [loyalty - promotion](entity:LoyaltyPromotion). + `amount_money` is not set for percentage-based discounts. + applied_money: + type: optional + docs: >- + The amount of discount actually applied to this line item. When an + amount-based - If this field is not set, buyers can trigger the promotion an unlimited - number of times to earn points during + discount is at the order level, this value is different from + `amount_money` because the discount - the time that the promotion is available. + is distributed across the line items. + scope: + type: optional + docs: >- + Indicates the level at which the `OrderReturnDiscount` applies. For + `ORDER` scoped + discounts, the server generates references in `applied_discounts` on + all - A purchase that is disqualified from earning points because of this limit - might qualify for another active promotion. - properties: - times: - type: integer - docs: >- - The maximum number of times a buyer can trigger the promotion during - the specified `interval`. - validation: - min: 1 - max: 30 - interval: - type: optional - docs: >- - The time period the limit applies to. + `OrderReturnLineItem`s. For `LINE_ITEM` scoped discounts, the discount + is only applied to - See - [LoyaltyPromotionTriggerLimitInterval](#type-loyaltypromotiontriggerlimitinterval) - for possible values - source: - openapi: openapi/openapi.json - LoyaltyPromotionTriggerLimitInterval: - enum: - - ALL_TIME - - DAY - docs: >- - Indicates the time period that the [trigger - limit](entity:LoyaltyPromotionTriggerLimit) applies to, + `OrderReturnLineItem`s with references in their `applied_discounts` + field. - which is used to determine the number of times a buyer can earn points for - a [loyalty promotion](entity:LoyaltyPromotion). + See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for + possible values source: openapi: openapi/openapi.json - LoyaltyReward: - docs: >- - Represents a contract to redeem loyalty points for a [reward - tier](entity:LoyaltyProgramRewardTier) discount. Loyalty rewards can be in - an ISSUED, REDEEMED, or DELETED state. - - For more information, see [Manage loyalty - rewards](https://developer.squareup.com/docs/loyalty-api/loyalty-rewards). + OrderReturnLineItem: + docs: The line item being returned in an order. properties: - id: - type: optional - docs: The Square-assigned ID of the loyalty reward. + uid: + type: optional> + docs: A unique ID for this return line-item entry. validation: - maxLength: 36 - access: read-only - status: - type: optional - docs: >- - The status of a loyalty reward. - - See [LoyaltyRewardStatus](#type-loyaltyrewardstatus) for possible - values - loyalty_account_id: - type: string - docs: >- - The Square-assigned ID of the [loyalty account](entity:LoyaltyAccount) - to which the reward belongs. + maxLength: 60 + source_line_item_uid: + type: optional> + docs: The `uid` of the line item in the original sale order. validation: - minLength: 1 - maxLength: 36 - reward_tier_id: + maxLength: 60 + name: + type: optional> + docs: The name of the line item. + validation: + maxLength: 512 + quantity: type: string - docs: >- - The Square-assigned ID of the [reward - tier](entity:LoyaltyProgramRewardTier) used to create the reward. + docs: |- + The quantity returned, formatted as a decimal number. + For example, `"3"`. + + Line items with a `quantity_unit` can have non-integer quantities. + For example, `"1.70000"`. validation: minLength: 1 - maxLength: 36 - points: - type: optional - docs: The number of loyalty points used for the reward. + maxLength: 12 + quantity_unit: + type: optional + docs: >- + The unit and precision that this return line item's quantity is + measured in. + note: + type: optional> + docs: The note of the return line item. validation: - min: 1 - access: read-only - order_id: + maxLength: 2000 + catalog_object_id: type: optional> docs: >- - The Square-assigned ID of the [order](entity:Order) to which the - reward is attached. - created_at: - type: optional - docs: The timestamp when the reward was created, in RFC 3339 format. - access: read-only - updated_at: - type: optional - docs: The timestamp when the reward was last updated, in RFC 3339 format. - access: read-only - redeemed_at: - type: optional - docs: The timestamp when the reward was redeemed, in RFC 3339 format. - access: read-only - source: - openapi: openapi/openapi.json - LoyaltyRewardStatus: - enum: - - ISSUED - - REDEEMED - - DELETED - docs: The status of the loyalty reward. - source: - openapi: openapi/openapi.json - MeasurementUnit: - docs: >- - Represents a unit of measurement to use with a quantity, such as ounces - - or inches. Exactly one of the following fields are required: - `custom_unit`, - - `area_unit`, `length_unit`, `volume_unit`, and `weight_unit`. - properties: - custom_unit: - type: optional - docs: >- - A custom unit of measurement defined by the seller using the Point of - Sale - - app or ad-hoc as an order line item. - area_unit: - type: optional - docs: >- - Represents a standard area unit. - - See [MeasurementUnitArea](#type-measurementunitarea) for possible - values - length_unit: - type: optional + The [CatalogItemVariation](entity:CatalogItemVariation) ID applied to + this return line item. + validation: + maxLength: 192 + catalog_version: + type: optional> + docs: The version of the catalog object that this line item references. + variation_name: + type: optional> + docs: The name of the variation applied to this return line item. + validation: + maxLength: 400 + item_type: + type: optional docs: >- - Represents a standard length unit. + The type of line item: an itemized return, a non-itemized return + (custom amount), - See [MeasurementUnitLength](#type-measurementunitlength) for possible - values - volume_unit: - type: optional - docs: >- - Represents a standard volume unit. + or the return of an unactivated gift card sale. - See [MeasurementUnitVolume](#type-measurementunitvolume) for possible + See [OrderLineItemItemType](#type-orderlineitemitemtype) for possible values - weight_unit: - type: optional + return_modifiers: + type: optional>> docs: >- - Represents a standard unit of weight or mass. - - See [MeasurementUnitWeight](#type-measurementunitweight) for possible - values - generic_unit: - type: optional + The [CatalogModifier](entity:CatalogModifier)s applied to this line + item. + applied_taxes: + type: optional>> docs: >- - Reserved for API integrations that lack the ability to specify a real - measurement unit + The list of references to `OrderReturnTax` entities applied to the + return line item. Each - See [MeasurementUnitGeneric](#type-measurementunitgeneric) for - possible values - time_unit: - type: optional - docs: >- - Represents a standard unit of time. + `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of + a top-level - See [MeasurementUnitTime](#type-measurementunittime) for possible - values - type: - type: optional - docs: >- - Represents the type of the measurement unit. + `OrderReturnTax` applied to the return line item. On reads, the + applied amount - See [MeasurementUnitUnitType](#type-measurementunitunittype) for - possible values - source: - openapi: openapi/openapi.json - MeasurementUnitArea: - enum: - - IMPERIAL_ACRE - - IMPERIAL_SQUARE_INCH - - IMPERIAL_SQUARE_FOOT - - IMPERIAL_SQUARE_YARD - - IMPERIAL_SQUARE_MILE - - METRIC_SQUARE_CENTIMETER - - METRIC_SQUARE_METER - - METRIC_SQUARE_KILOMETER - docs: Unit of area used to measure a quantity. - source: - openapi: openapi/openapi.json - MeasurementUnitCustom: - docs: The information needed to define a custom unit, provided by the seller. - properties: - name: - type: string - docs: The name of the custom unit, for example "bushel". - abbreviation: - type: string + is populated. + applied_discounts: + type: optional>> docs: >- - The abbreviation of the custom unit, such as "bsh" (bushel). This - appears + The list of references to `OrderReturnDiscount` entities applied to + the return line item. Each - in the cart for the Point of Sale app, and in reports. - source: - openapi: openapi/openapi.json - MeasurementUnitGeneric: literal<"UNIT"> - MeasurementUnitLength: - enum: - - IMPERIAL_INCH - - IMPERIAL_FOOT - - IMPERIAL_YARD - - IMPERIAL_MILE - - METRIC_MILLIMETER - - METRIC_CENTIMETER - - METRIC_METER - - METRIC_KILOMETER - docs: The unit of length used to measure a quantity. - source: - openapi: openapi/openapi.json - MeasurementUnitTime: - enum: - - GENERIC_MILLISECOND - - GENERIC_SECOND - - GENERIC_MINUTE - - GENERIC_HOUR - - GENERIC_DAY - docs: Unit of time used to measure a quantity (a duration). - source: - openapi: openapi/openapi.json - MeasurementUnitUnitType: - enum: - - TYPE_CUSTOM - - TYPE_AREA - - TYPE_LENGTH - - TYPE_VOLUME - - TYPE_WEIGHT - - TYPE_GENERIC - docs: >- - Describes the type of this unit and indicates which field contains the - unit information. This is an ‘open’ enum. - source: - openapi: openapi/openapi.json - MeasurementUnitVolume: - enum: - - GENERIC_FLUID_OUNCE - - GENERIC_SHOT - - GENERIC_CUP - - GENERIC_PINT - - GENERIC_QUART - - GENERIC_GALLON - - IMPERIAL_CUBIC_INCH - - IMPERIAL_CUBIC_FOOT - - IMPERIAL_CUBIC_YARD - - METRIC_MILLILITER - - METRIC_LITER - docs: The unit of volume used to measure a quantity. - source: - openapi: openapi/openapi.json - MeasurementUnitWeight: - enum: - - IMPERIAL_WEIGHT_OUNCE - - IMPERIAL_POUND - - IMPERIAL_STONE - - METRIC_MILLIGRAM - - METRIC_GRAM - - METRIC_KILOGRAM - docs: Unit of weight used to measure a quantity. - source: - openapi: openapi/openapi.json - Merchant: - docs: Represents a business that sells with Square. - properties: - id: - type: optional - docs: The Square-issued ID of the merchant. - business_name: - type: optional> - docs: The name of the merchant's overall business. - country: - type: Country + `OrderLineItemAppliedDiscount` has a `discount_uid` that references + the `uid` of a top-level + + `OrderReturnDiscount` applied to the return line item. On reads, the + applied amount + + is populated. + base_price_money: + type: optional + docs: The base price for a single unit of the line item. + variation_total_price_money: + type: optional docs: >- - The country code associated with the merchant, in the two-letter - format of ISO 3166. For example, `US` or `JP`. + The total price of all item variations returned in this line item. - See [Country](#type-country) for possible values - language_code: - type: optional> + The price is calculated as `base_price_money` multiplied by `quantity` + and + + does not include modifiers. + gross_return_money: + type: optional docs: >- - The code indicating the [language - preferences](https://developer.squareup.com/docs/build-basics/general-considerations/language-preferences) - of the merchant, in [BCP 47 - format](https://tools.ietf.org/html/bcp47#appendix-A). For example, - `en-US` or `fr-CA`. - currency: - type: optional + The gross return amount of money calculated as (item base price + + modifiers price) * quantity. + total_tax_money: + type: optional + docs: The total amount of tax money to return for the line item. + total_discount_money: + type: optional + docs: The total amount of discount money to return for the line item. + total_money: + type: optional + docs: The total amount of money to return for this line item. + applied_service_charges: + type: optional>> docs: >- - The currency associated with the merchant, in ISO 4217 format. For - example, the currency code for US dollars is `USD`. + The list of references to `OrderReturnServiceCharge` entities applied + to the return - See [Currency](#type-currency) for possible values - status: - type: optional - docs: |- - The merchant's status. - See [MerchantStatus](#type-merchantstatus) for possible values - main_location_id: - type: optional> + line item. Each `OrderLineItemAppliedServiceCharge` has a + `service_charge_uid` that + + references the `uid` of a top-level `OrderReturnServiceCharge` applied + to the return line + + item. On reads, the applied amount is populated. + total_service_charge_money: + type: optional docs: >- - The ID of the [main - `Location`](https://developer.squareup.com/docs/locations-api#about-the-main-location) - for this merchant. - created_at: - type: optional - docs: |- - The time when the merchant was created, in RFC 3339 format. - For more information, see [Working with Dates](https://developer.squareup.com/docs/build-basics/working-with-dates). - access: read-only - source: - openapi: openapi/openapi.json - MerchantStatus: - enum: - - ACTIVE - - INACTIVE + The total amount of apportioned service charge money to return for the + line item. source: openapi: openapi/openapi.json - ModifierLocationOverrides: - docs: >- - Location-specific overrides for specified properties of a - `CatalogModifier` object. + OrderReturnLineItemModifier: + docs: A line item modifier being returned. properties: - location_id: + uid: + type: optional> + docs: >- + A unique ID that identifies the return modifier only within this + order. + validation: + maxLength: 60 + source_modifier_uid: + type: optional> + docs: |- + The modifier `uid` from the order's line item that contains the + original sale of this line item modifier. + validation: + maxLength: 60 + catalog_object_id: type: optional> docs: >- - The ID of the `Location` object representing the location. This can - include a deactivated location. - price_money: + The catalog object ID referencing + [CatalogModifier](entity:CatalogModifier). + validation: + maxLength: 192 + catalog_version: + type: optional> + docs: >- + The version of the catalog object that this line item modifier + references. + name: + type: optional> + docs: The name of the item modifier. + validation: + maxLength: 255 + base_price_money: type: optional docs: >- - The overridden price at the specified location. If this is - unspecified, the modifier price is not overridden. + The base price for the modifier. - The modifier becomes free of charge at the specified location, when - this `price_money` field is set to 0. - sold_out: - type: optional + + `base_price_money` is required for ad hoc modifiers. + + If both `catalog_object_id` and `base_price_money` are set, + `base_price_money` overrides the predefined + [CatalogModifier](entity:CatalogModifier) price. + total_price_money: + type: optional docs: >- - Indicates whether the modifier is sold out at the specified location - or not. As an example, for cheese (modifier) burger (item), when the - modifier is sold out, it is the cheese, but not the burger, that is - sold out. + The total price of the item modifier for its line item. - The seller can manually set this sold out status. Attempts by an - application to set this attribute are ignored. - access: read-only - source: - openapi: openapi/openapi.json - Money: - docs: >- - Represents an amount of money. `Money` fields can be signed or unsigned. + This is the modifier's `base_price_money` multiplied by the line + item's quantity. + quantity: + type: optional> + docs: >- + The quantity of the line item modifier. The modifier quantity can be 0 + or more. - Fields that do not explicitly define whether they are signed or unsigned - are + For example, suppose a restaurant offers a cheeseburger on the menu. + When a buyer orders - considered unsigned and can only hold positive amounts. For signed fields, - the + this item, the restaurant records the purchase by creating an `Order` + object with a line item - sign of the value indicates the purpose of the money transfer. See + for a burger. The line item includes a line item modifier: the name is + cheese and the quantity - [Working with Monetary - Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts) + is 1. The buyer has the option to order extra cheese (or no cheese). + If the buyer chooses - for more information. + the extra cheese option, the modifier quantity increases to 2. If the + buyer does not want + + any cheese, the modifier quantity is set to 0. + source: + openapi: openapi/openapi.json + OrderReturnServiceCharge: + docs: Represents the service charge applied to the original order. properties: - amount: - type: optional> + uid: + type: optional> docs: >- - The amount of money, in the smallest denomination of the currency - - indicated by `currency`. For example, when `currency` is `USD`, - `amount` is + A unique ID that identifies the return service charge only within this + order. + validation: + maxLength: 60 + source_service_charge_uid: + type: optional> + docs: |- + The service charge `uid` from the order containing the original + service charge. `source_service_charge_uid` is `null` for + unlinked returns. + validation: + maxLength: 60 + name: + type: optional> + docs: The name of the service charge. + validation: + maxLength: 255 + catalog_object_id: + type: optional> + docs: >- + The catalog object ID of the associated + [OrderServiceCharge](entity:OrderServiceCharge). + validation: + maxLength: 192 + catalog_version: + type: optional> + docs: The version of the catalog object that this service charge references. + percentage: + type: optional> + docs: |- + The percentage of the service charge, as a string representation of + a decimal number. For example, a value of `"7.25"` corresponds to a + percentage of 7.25%. - in cents. Monetary amounts can be positive or negative. See the - specific + Either `percentage` or `amount_money` should be set, but not both. + validation: + maxLength: 10 + amount_money: + type: optional + docs: |- + The amount of a non-percentage-based service charge. - field description to determine the meaning of the sign in a particular - case. - currency: - type: optional + Either `percentage` or `amount_money` should be set, but not both. + applied_money: + type: optional docs: >- - The type of currency, in __ISO 4217 format__. For example, the - currency + The amount of money applied to the order by the service charge, + including - code for US dollars is `USD`. + any inclusive tax amounts, as calculated by Square. - See [Currency](entity:Currency) for possible values. + - For fixed-amount service charges, `applied_money` is equal to + `amount_money`. - See [Currency](#type-currency) for possible values - source: - openapi: openapi/openapi.json - ObtainTokenResponse: - docs: Represents an [ObtainToken](api-endpoint:OAuth-ObtainToken) response. - properties: - access_token: - type: optional + - For percentage-based service charges, `applied_money` is the money + calculated using the percentage. + total_money: + type: optional docs: >- - An OAuth access token used to authorize Square API requests on behalf - of the seller. - - Include this token as a bearer token in the `Authorization` header of - your API requests. + The total amount of money to collect for the service charge. - OAuth access tokens expire in 30 days (except `short_lived` access - tokens). You should call + __NOTE__: If an inclusive tax is applied to the service charge, + `total_money` - `ObtainToken` and provide the returned `refresh_token` to get a new - access token well before + does not equal `applied_money` plus `total_tax_money` because the + inclusive - the current one expires. For more information, see [OAuth API: - Walkthrough](https://developer.squareup.com/docs/oauth-api/walkthrough). - validation: - minLength: 2 - maxLength: 1024 - token_type: - type: optional - docs: The type of access token. This value is always `bearer`. - validation: - minLength: 2 - maxLength: 10 - expires_at: - type: optional - docs: >- - The timestamp of when the `access_token` expires, in [ISO - 8601](http://www.iso.org/iso/home/standards/iso8601.htm) format. - validation: - minLength: 20 - maxLength: 48 - merchant_id: - type: optional - docs: >- - The ID of the authorizing [merchant](entity:Merchant) (seller), which - represents a business. - validation: - minLength: 8 - maxLength: 191 - subscription_id: - type: optional + tax amount is already included in both `applied_money` and + `total_tax_money`. + total_tax_money: + type: optional + docs: The total amount of tax money to collect for the service charge. + calculation_phase: + type: optional docs: >- - __LEGACY__ The ID of merchant's subscription. + The calculation phase after which to apply the service charge. - The ID is only present if the merchant signed up for a subscription - plan during authorization. - plan_id: - type: optional + See + [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) + for possible values + taxable: + type: optional> + docs: |- + Indicates whether the surcharge can be taxed. Service charges + calculated in the `TOTAL_PHASE` cannot be marked as taxable. + applied_taxes: + type: optional>> docs: >- - __LEGACY__ The ID of the subscription plan the merchant signed + The list of references to `OrderReturnTax` entities applied to the - up for. The ID is only present if the merchant signed up for a - subscription plan during + `OrderReturnServiceCharge`. Each `OrderLineItemAppliedTax` has a + `tax_uid` - authorization. - id_token: - type: optional + that references the `uid` of a top-level `OrderReturnTax` that is + being + + applied to the `OrderReturnServiceCharge`. On reads, the applied + amount is + + populated. + treatment_type: + type: optional docs: >- - The OpenID token that belongs to this person. This token is only - present if the + The treatment type of the service charge. + + See + [OrderServiceChargeTreatmentType](#type-orderservicechargetreatmenttype) + for possible values + scope: + type: optional + docs: >- + Indicates the level at which the apportioned service charge applies. + For `ORDER` - `OPENID` scope is included in the authorization request. + scoped service charges, Square generates references in + `applied_service_charges` on + all order line items that do not have them. For `LINE_ITEM` scoped + service charges, - Deprecated at version 2021-09-15. Square doesn't support OpenID or - other single sign-on (SSO) + the service charge only applies to line items with a service charge + reference in their - protocols on top of OAuth. - refresh_token: - type: optional - docs: >- - A refresh token that can be used in an `ObtainToken` request to - generate a new access token. + `applied_service_charges` field. - With the code flow: + This field is immutable. To change the scope of an apportioned service + charge, you must delete - - For the `authorization_code` grant type, the refresh token is - multi-use and never expires. + the apportioned service charge and re-add it as a new apportioned + service charge. - - For the `refresh_token` grant type, the response returns the same - refresh token. + See [OrderServiceChargeScope](#type-orderservicechargescope) for + possible values + source: + openapi: openapi/openapi.json + OrderReturnTax: + docs: >- + Represents a tax being returned that applies to one or more return line + items in an order. - With the PKCE flow: + Fixed-amount, order-scoped taxes are distributed across all non-zero + return line item totals. - - For the `authorization_code` grant type, the refresh token is - single-use and expires in 90 days. + The amount distributed to each return line item is relative to that item’s + contribution to the - - For the `refresh_token` grant type, the refresh token is a new - single-use refresh token that expires in 90 days. + order subtotal. + properties: + uid: + type: optional> + docs: A unique ID that identifies the returned tax only within this order. + validation: + maxLength: 60 + source_tax_uid: + type: optional> + docs: The tax `uid` from the order that contains the original tax charge. + validation: + maxLength: 60 + catalog_object_id: + type: optional> + docs: The catalog object ID referencing [CatalogTax](entity:CatalogTax). + validation: + maxLength: 192 + catalog_version: + type: optional> + docs: The version of the catalog object that this tax references. + name: + type: optional> + docs: The tax's name. + validation: + maxLength: 255 + type: + type: optional + docs: >- + Indicates the calculation method used to apply the tax. + See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible + values + percentage: + type: optional> + docs: >- + The percentage of the tax, as a string representation of a decimal + number. - For more information, see [Refresh, Revoke, and Limit the Scope of - OAuth - Tokens](https://developer.squareup.com/docs/oauth-api/refresh-revoke-limit-scope). + For example, a value of `"7.25"` corresponds to a percentage of 7.25%. validation: - minLength: 2 - maxLength: 1024 - short_lived: - type: optional + maxLength: 10 + applied_money: + type: optional + docs: The amount of money applied by the tax in an order. + scope: + type: optional docs: >- - Indicates whether the access_token is short lived. If `true`, the - access token expires + Indicates the level at which the `OrderReturnTax` applies. For `ORDER` + scoped - in 24 hours. If `false`, the access token expires in 30 days. - errors: - type: optional> - docs: Any errors that occurred during the request. - refresh_token_expires_at: - type: optional - docs: >- - The timestamp of when the `refresh_token` expires, in [ISO - 8601](http://www.iso.org/iso/home/standards/iso8601.htm) + taxes, Square generates references in `applied_taxes` on all - format. + `OrderReturnLineItem`s. For `LINE_ITEM` scoped taxes, the tax is only + applied to + `OrderReturnLineItem`s with references in their `applied_discounts` + field. - This field is only returned for the PKCE flow. - validation: - minLength: 20 - maxLength: 48 + See [OrderLineItemTaxScope](#type-orderlineitemtaxscope) for possible + values source: openapi: openapi/openapi.json - OfflinePaymentDetails: - docs: Details specific to offline payments. + OrderReturnTip: + docs: A tip being returned. properties: - client_created_at: - type: optional + uid: + type: optional> + docs: A unique ID that identifies the tip only within this order. + validation: + maxLength: 60 + applied_money: + type: optional + docs: |- + The amount of tip being returned + -- + source_tender_uid: + type: optional> docs: >- - The client-side timestamp of when the offline payment was created, in - RFC 3339 format. + The tender `uid` from the order that contains the original application + of this tip. validation: - maxLength: 32 - access: read-only + maxLength: 192 + source_tender_id: + type: optional> + docs: >- + The tender `id` from the order that contains the original application + of this tip. + validation: + maxLength: 192 source: openapi: openapi/openapi.json - Order: - docs: >- - Contains all information related to a single order to process with Square, - - including line items that specify the products to purchase. `Order` - objects also - - include information about any associated tenders, refunds, and returns. - - - All Connect V2 Transactions have all been converted to Orders including - all associated - - itemization data. + OrderReward: + docs: |- + Represents a reward that can be applied to an order if the necessary + reward tier criteria are met. Rewards are created through the Loyalty API. properties: id: - type: optional - docs: The order's unique ID. - access: read-only - location_id: type: string - docs: The ID of the seller location that this order is associated with. + docs: The identifier of the reward. validation: minLength: 1 - reference_id: + reward_tier_id: + type: string + docs: The identifier of the reward tier corresponding to this reward. + validation: + minLength: 1 + source: + openapi: openapi/openapi.json + OrderRoundingAdjustment: + docs: >- + A rounding adjustment of the money being returned. Commonly used to apply + cash rounding + + when the minimum unit of the account is smaller than the lowest physical + denomination of the currency. + properties: + uid: type: optional> - docs: |- - A client-specified ID to associate an entity in another system - with this order. + docs: >- + A unique ID that identifies the rounding adjustment only within this + order. validation: - maxLength: 40 - source: - type: optional - docs: The origination details of the order. - customer_id: + maxLength: 60 + name: + type: optional> + docs: The name of the rounding adjustment from the original sale order. + amount_money: + type: optional + docs: The actual rounding adjustment amount. + source: + openapi: openapi/openapi.json + OrderServiceCharge: + docs: Represents a service charge applied to an order. + properties: + uid: + type: optional> + docs: A unique ID that identifies the service charge only within this order. + validation: + maxLength: 60 + name: + type: optional> + docs: The name of the service charge. + validation: + maxLength: 512 + catalog_object_id: type: optional> docs: >- - The ID of the [customer](entity:Customer) associated with the order. - - - You should specify a `customer_id` on the order (or the payment) to - ensure that transactions - - are reliably linked to customers. Omitting this field might result in - the creation of new - - [instant - profiles](https://developer.squareup.com/docs/customers-api/what-it-does#instant-profiles). + The catalog object ID referencing the service charge + [CatalogObject](entity:CatalogObject). validation: - maxLength: 191 - line_items: - type: optional>> - docs: The line items included in the order. - taxes: - type: optional>> + maxLength: 192 + catalog_version: + type: optional> + docs: The version of the catalog object that this service charge references. + percentage: + type: optional> docs: >- - The list of all taxes associated with the order. - - - Taxes can be scoped to either `ORDER` or `LINE_ITEM`. For taxes with - `LINE_ITEM` scope, an + The service charge percentage as a string representation of a - `OrderLineItemAppliedTax` must be added to each line item that the tax - applies to. For taxes + decimal number. For example, `"7.25"` indicates a service charge of + 7.25%. - with `ORDER` scope, the server generates an `OrderLineItemAppliedTax` - for every line item. + Exactly 1 of `percentage` or `amount_money` should be set. + validation: + maxLength: 10 + amount_money: + type: optional + docs: |- + The amount of a non-percentage-based service charge. - On reads, each tax in the list includes the total amount of that tax - applied to the order. + Exactly one of `percentage` or `amount_money` should be set. + applied_money: + type: optional + docs: >- + The amount of money applied to the order by the service charge, + including any inclusive tax amounts, as calculated by Square. - __IMPORTANT__: If `LINE_ITEM` scope is set on any taxes in this field, - using the deprecated - `line_items.taxes` field results in an error. Use - `line_items.applied_taxes` + - For fixed-amount service charges, `applied_money` is equal to + `amount_money`. - instead. - discounts: - type: optional>> - docs: >- - The list of all discounts associated with the order. + - For percentage-based service charges, `applied_money` is the money + calculated using the percentage. + total_money: + type: optional + docs: |- + The total amount of money to collect for the service charge. - Discounts can be scoped to either `ORDER` or `LINE_ITEM`. For - discounts scoped to `LINE_ITEM`, + __Note__: If an inclusive tax is applied to the service charge, + `total_money` does not equal `applied_money` plus `total_tax_money` + because the inclusive tax amount is already included in both + `applied_money` and `total_tax_money`. + total_tax_money: + type: optional + docs: The total amount of tax money to collect for the service charge. + calculation_phase: + type: optional + docs: >- + The calculation phase at which to apply the service charge. - an `OrderLineItemAppliedDiscount` must be added to each line item that - the discount applies to. + See + [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) + for possible values + taxable: + type: optional> + docs: >- + Indicates whether the service charge can be taxed. If set to `true`, - For discounts with `ORDER` scope, the server generates an - `OrderLineItemAppliedDiscount` + order-level taxes automatically apply to the service charge. Note that - for every line item. + service charges calculated in the `TOTAL_PHASE` cannot be marked as + taxable. + applied_taxes: + type: optional>> + docs: >- + The list of references to the taxes applied to this service charge. + Each + `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of + a top-level - __IMPORTANT__: If `LINE_ITEM` scope is set on any discounts in this - field, using the deprecated + `OrderLineItemTax` that is being applied to this service charge. On + reads, the amount applied - `line_items.discounts` field results in an error. Use - `line_items.applied_discounts` + is populated. - instead. - service_charges: - type: optional>> - docs: A list of service charges applied to the order. - fulfillments: - type: optional>> - docs: >- - Details about order fulfillment. + An `OrderLineItemAppliedTax` is automatically created on every taxable + service charge - Orders can only be created with at most one fulfillment. However, - orders returned + for all `ORDER` scoped taxes that are added to the order. + `OrderLineItemAppliedTax` records - by the API might contain multiple fulfillments. - returns: - type: optional> - docs: >- - A collection of items from sale orders being returned in this one. - Normally part of an + for `LINE_ITEM` scoped taxes must be added in requests for the tax to + apply to any taxable - itemized return or exchange. There is exactly one `Return` object per - sale `Order` being + service charge. Taxable service charges have the `taxable` field set + to `true` and calculated - referenced. - access: read-only - return_amounts: - type: optional - docs: The rollup of the returned money amounts. - net_amounts: - type: optional - docs: The net money amounts (sale money - return money). - rounding_adjustment: - type: optional - docs: >- - A positive rounding adjustment to the total of the order. This - adjustment is commonly + in the `SUBTOTAL_PHASE`. - used to apply cash rounding when the minimum unit of account is - smaller than the lowest physical - denomination of the currency. - tenders: - type: optional> - docs: The tenders that were used to pay for the order. - access: read-only - refunds: - type: optional> - docs: The refunds that are part of this order. - access: read-only + To change the amount of a tax, modify the referenced top-level tax. metadata: type: optional>>>> docs: >- - Application-defined data attached to this order. Metadata fields are - intended + Application-defined data attached to this service charge. Metadata + fields are intended to store descriptive references or associations with an entity in another system or store brief @@ -18152,107 +25564,121 @@ types: application. - For more information, see + For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata). - created_at: - type: optional - docs: >- - The timestamp for when the order was created, at server side, in RFC - 3339 format (for example, "2016-09-04T23:59:33.123Z"). - access: read-only - updated_at: - type: optional + 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"). - access: read-only - closed_at: - type: optional + The type of the service charge. + + See [OrderServiceChargeType](#type-orderservicechargetype) for + possible values + treatment_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"). - access: read-only - state: - type: optional - docs: |- - The current state of the order. - See [OrderState](#type-orderstate) for possible values - version: - type: optional + The treatment type of the service charge. + + See + [OrderServiceChargeTreatmentType](#type-orderservicechargetreatmenttype) + for possible values + scope: + type: optional docs: >- - The version number, which is incremented each time an update is - committed to the order. + Indicates the level at which the apportioned service charge applies. + For `ORDER` - Orders not created through the API do not include a version number and + scoped service charges, Square generates references in + `applied_service_charges` on - therefore cannot be updated. + all order line items that do not have them. For `LINE_ITEM` scoped + service charges, + the service charge only applies to line items with a service charge + reference in their - [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. + `applied_service_charges` field. - Note: `total_service_charge_money` is the sum of `applied_money` - fields for each individual + This field is immutable. To change the scope of an apportioned service + charge, you must delete - service charge. Therefore, `total_service_charge_money` only includes - inclusive tax amounts, + the apportioned service charge and re-add it as a new apportioned + service charge. - not additive tax amounts. - ticket_name: + See [OrderServiceChargeScope](#type-orderservicechargescope) for + possible values + source: + openapi: openapi/openapi.json + OrderServiceChargeCalculationPhase: + enum: + - SUBTOTAL_PHASE + - TOTAL_PHASE + - APPORTIONED_PERCENTAGE_PHASE + - APPORTIONED_AMOUNT_PHASE + docs: >- + Represents a phase in the process of calculating order totals. + + Service charges are applied after the indicated phase. + + + [Read more about how order totals are + calculated.](https://developer.squareup.com/docs/orders-api/how-it-works#how-totals-are-calculated) + source: + openapi: openapi/openapi.json + OrderServiceChargeScope: + enum: + - OTHER_SERVICE_CHARGE_SCOPE + - LINE_ITEM + - ORDER + docs: |- + Indicates whether this is a line-item or order-level apportioned + service charge. + source: + openapi: openapi/openapi.json + OrderServiceChargeTreatmentType: + enum: + - LINE_ITEM_TREATMENT + - APPORTIONED_TREATMENT + docs: >- + Indicates whether the service charge will be treated as a value-holding + line item or + + apportioned toward a line item. + source: + openapi: openapi/openapi.json + OrderServiceChargeType: + enum: + - AUTO_GRATUITY + - CUSTOM + source: + openapi: openapi/openapi.json + OrderSource: + docs: Represents the origination details of an order. + properties: + 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 + The name used to identify the place (physical or digital) that an + order originates. - 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. + If unset, the name defaults to the name of the application that + created the order. 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). + OrderState: + enum: + - OPEN + - COMPLETED + - CANCELED + - DRAFT + docs: The state of the order. + source: + openapi: openapi/openapi.json + OrderUpdated: properties: order_id: type: optional> - docs: The ID of the order. + docs: The order's unique ID. version: type: optional docs: >- @@ -18267,9668 +25693,11184 @@ types: [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. + 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 - OrderLineItem: + OrderUpdatedEvent: docs: |- - Represents a line item in an order. Each line item describes a different - product to purchase, with its own quantity and price details. + 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: - uid: + merchant_id: type: optional> - docs: A unique ID that identifies the line item only within this order. - validation: - maxLength: 60 - name: + docs: The ID of the target merchant associated with the event. + type: type: optional> - docs: The name of the line item. + 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 + + [PauseSubscription](api-endpoint:Subscriptions-PauseSubscription) + endpoint. + properties: + errors: + type: optional> + docs: Errors encountered during the request. + subscription: + type: optional + docs: The subscription to be paused by the scheduled `PAUSE` action. + actions: + type: optional> + docs: >- + The list of a `PAUSE` action and a possible `RESUME` action created by + the request. + source: + openapi: openapi/openapi.json + PayOrderResponse: + docs: >- + Defines the fields that are included in the response body of a request to + the + + [PayOrder](api-endpoint:Orders-PayOrder) endpoint. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + order: + type: optional + docs: The paid, updated [order](entity:Order). + source: + openapi: openapi/openapi.json + Payment: + docs: Represents a payment processed by the Square API. + properties: + id: + type: optional + docs: A unique ID for the payment. validation: - maxLength: 512 - quantity: - type: string + maxLength: 192 + access: read-only + created_at: + type: optional + docs: The timestamp of when the payment was created, in RFC 3339 format. + validation: + maxLength: 32 + access: read-only + updated_at: + type: optional docs: >- - The count, or measurement, of a line item being purchased: + The timestamp of when the payment was last updated, in RFC 3339 + format. + validation: + maxLength: 32 + access: read-only + amount_money: + type: optional + docs: >- + The amount processed for this payment, not including `tip_money`. - If `quantity` is a whole number, and `quantity_unit` is not specified, - then `quantity` denotes an item count. For example: `3` apples. + The amount is specified in the smallest denomination of the applicable + currency (for example, + US dollar amounts are specified in cents). For more information, see - If `quantity` is a whole or decimal number, and `quantity_unit` is - also specified, then `quantity` denotes a measurement. For example: - `2.25` pounds of broccoli. + [Working with Monetary + Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). + tip_money: + type: optional + docs: >- + The amount designated as a tip. - For more information, see [Specify item quantity and measurement - unit](https://developer.squareup.com/docs/orders-api/create-orders#specify-item-quantity-and-measurement-unit). + This amount is specified in the smallest denomination of the + applicable currency (for example, + US dollar amounts are specified in cents). For more information, see - Line items with a quantity of `0` are automatically removed + [Working with Monetary + Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). + total_money: + type: optional + docs: >- + The total amount for the payment, including `amount_money` and + `tip_money`. - when paying for or otherwise completing the order. - validation: - minLength: 1 - maxLength: 12 - quantity_unit: - type: optional + This amount is specified in the smallest denomination of the + applicable currency (for example, + + US dollar amounts are specified in cents). For more information, see + + [Working with Monetary + Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). + app_fee_money: + type: optional docs: >- - The measurement unit and decimal precision that this line item's - quantity is measured in. - note: - type: optional> - docs: An optional note associated with the line item. - validation: - maxLength: 2000 - catalog_object_id: - type: optional> + The amount the developer is taking as a fee for facilitating the + payment on behalf + + of the seller. This amount is specified in the smallest denomination + of the applicable currency + + (for example, US dollar amounts are specified in cents). For more + information, + + see [Take Payments and Collect + Fees](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees). + + + The amount cannot be more than 90% of the `total_money` value. + + + To set this field, `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth + permission is required. + + For more information, see + [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions). + approved_money: + type: optional + docs: >- + The amount of money approved for this payment. This value may change + if Square chooses to + + obtain reauthorization as part of a call to + [UpdatePayment](api-endpoint:Payments-UpdatePayment). + processing_fee: + type: optional> + docs: >- + The processing fees and fee adjustments assessed by Square for this + payment. + access: read-only + refunded_money: + type: optional + docs: >- + The total amount of the payment refunded to date. + + + This amount is specified in the smallest denomination of the + applicable currency (for example, + + US dollar amounts are specified in cents). + status: + type: optional docs: >- - The [CatalogItemVariation](entity:CatalogItemVariation) ID applied to - this line item. - validation: - maxLength: 192 - catalog_version: - type: optional> - docs: The version of the catalog object that this line item references. - variation_name: - type: optional> - docs: The name of the variation applied to this line item. + Indicates whether the payment is APPROVED, PENDING, COMPLETED, + CANCELED, or FAILED. validation: - maxLength: 400 - item_type: - type: optional + maxLength: 50 + access: read-only + delay_duration: + type: optional docs: >- - The type of line item: an itemized sale, a non-itemized sale (custom - amount), or the + The duration of time after the payment's creation when Square + automatically applies the - activation or reloading of a gift card. + `delay_action` to the payment. This automatic `delay_action` applies + only to payments that - See [OrderLineItemItemType](#type-orderlineitemitemtype) for possible - values - metadata: - type: optional>>>> - docs: >- - Application-defined data attached to this line item. Metadata fields - are intended + do not reach a terminal state (COMPLETED, CANCELED, or FAILED) before + the `delay_duration` - to store descriptive references or associations with an entity in - another system or store brief + time period. - 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 + This field is specified as a time duration, in RFC 3339 format. - identifiable information or card details). + Notes: - Keys written by applications must be 60 characters or less and must be - in the character set + This feature is only supported for card payments. - `[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. + Default: - Values have a maximum length of 255 characters. + - Card-present payments: "PT36H" (36 hours) from the creation time. + + - Card-not-present payments: "P7D" (7 days) from the creation time. + access: read-only + delay_action: + type: optional> + docs: >- + The action to be applied to the payment when the `delay_duration` has + elapsed. - An application can have up to 10 entries per metadata field. + Current values include `CANCEL` and `COMPLETE`. + delayed_until: + type: optional + docs: >- + The read-only timestamp of when the `delay_action` is automatically + applied, + in RFC 3339 format. - Entries written by applications are private and can only be read or - modified by the same - application. + Note that this field is calculated by summing the payment's + `delay_duration` and `created_at` + fields. The `created_at` field is generated by Square and might not + exactly match the - For more information, see - [Metadata](https://developer.squareup.com/docs/build-basics/metadata). - modifiers: - type: optional>> - docs: >- - The [CatalogModifier](entity:CatalogModifier)s applied to this line - item. - applied_taxes: - type: optional>> + time on your local machine. + access: read-only + source_type: + type: optional docs: >- - The list of references to taxes applied to this line item. Each + The source type for this payment. - `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of - a - top-level `OrderLineItemTax` applied to the line item. On reads, the + Current values include `CARD`, `BANK_ACCOUNT`, `WALLET`, + `BUY_NOW_PAY_LATER`, `SQUARE_ACCOUNT`, - amount applied is populated. + `CASH` and `EXTERNAL`. For information about these payment source + types, + + see [Take + Payments](https://developer.squareup.com/docs/payments-api/take-payments). + validation: + maxLength: 50 + access: read-only + card_details: + type: optional + docs: >- + Details about a card payment. These details are only populated if the + source_type is `CARD`. + cash_details: + type: optional + docs: >- + Details about a cash payment. These details are only populated if the + source_type is `CASH`. + bank_account_details: + type: optional + docs: >- + Details about a bank account payment. These details are only populated + if the source_type is `BANK_ACCOUNT`. + external_details: + type: optional + docs: |- + Details about an external payment. The details are only populated + if the `source_type` is `EXTERNAL`. + wallet_details: + type: optional + docs: |- + Details about an wallet payment. The details are only populated + if the `source_type` is `WALLET`. + buy_now_pay_later_details: + type: optional + docs: >- + Details about a Buy Now Pay Later payment. The details are only + populated + if the `source_type` is `BUY_NOW_PAY_LATER`. For more information, + see - An `OrderLineItemAppliedTax` is automatically created on every line + [Afterpay + Payments](https://developer.squareup.com/docs/payments-api/take-payments/afterpay-payments). + square_account_details: + type: optional + docs: |- + Details about a Square Account payment. The details are only populated + if the `source_type` is `SQUARE_ACCOUNT`. + location_id: + type: optional + docs: The ID of the location associated with the payment. + validation: + maxLength: 50 + access: read-only + order_id: + type: optional + docs: The ID of the order associated with the payment. + validation: + maxLength: 192 + access: read-only + reference_id: + type: optional + docs: |- + An optional ID that associates the payment with an entity in + another system. + validation: + maxLength: 40 + access: read-only + customer_id: + type: optional + docs: >- + The ID of the customer associated with the payment. If the ID is - item for all `ORDER` scoped taxes added to the order. - `OrderLineItemAppliedTax` + not provided in the `CreatePayment` request that was used to create + the `Payment`, - records for `LINE_ITEM` scoped taxes must be added in requests for the - tax + Square may use information in the request - to apply to any line items. + (such as the billing and shipping address, email address, and payment + source) + to identify a matching customer profile in the Customer Directory. - To change the amount of a tax, modify the referenced top-level tax. - applied_discounts: - type: optional>> - docs: >- - The list of references to discounts applied to this line item. Each + If found, the profile ID is used. If a profile is not found, the - `OrderLineItemAppliedDiscount` has a `discount_uid` that references - the `uid` of a top-level + API attempts to create an - `OrderLineItemDiscounts` applied to the line item. On reads, the - amount + [instant + profile](https://developer.squareup.com/docs/customers-api/what-it-does#instant-profiles). - applied is populated. + If the API cannot create an + instant profile (either because the seller has disabled it or the - An `OrderLineItemAppliedDiscount` is automatically created on every - line item for all + seller's region prevents creating it), this field remains unset. Note + that - `ORDER` scoped discounts that are added to the order. - `OrderLineItemAppliedDiscount` records + this process is asynchronous and it may take some time before a - for `LINE_ITEM` scoped discounts must be added in requests for the - discount to apply to any + customer ID is added to the payment. + validation: + maxLength: 191 + access: read-only + employee_id: + type: optional + docs: |- + __Deprecated__: Use `Payment.team_member_id` instead. - line items. + An optional ID of the employee associated with taking the payment. + validation: + maxLength: 192 + access: read-only + team_member_id: + type: optional> + docs: >- + An optional ID of the [TeamMember](entity:TeamMember) associated with + taking the payment. + validation: + maxLength: 192 + refund_ids: + type: optional> + docs: A list of `refund_id`s identifying refunds for the payment. + access: read-only + risk_evaluation: + type: optional + docs: >- + Provides information about the risk associated with the payment, as + determined by Square. + This field is present for payments to sellers that have opted in to + receive risk - To change the amount of a discount, modify the referenced top-level - discount. - applied_service_charges: - type: optional>> + evaluations. + terminal_checkout_id: + type: optional + docs: >- + An optional ID for a Terminal checkout that is associated with the + payment. + access: read-only + buyer_email_address: + type: optional + docs: The buyer's email address. + validation: + maxLength: 255 + access: read-only + billing_address: + type: optional
+ docs: The buyer's billing address. + shipping_address: + type: optional
+ docs: The buyer's shipping address. + note: + type: optional + docs: An optional note to include when creating a payment. + validation: + maxLength: 500 + access: read-only + statement_description_identifier: + type: optional docs: >- - The list of references to service charges applied to this line item. - Each + Additional payment information that gets added to the customer's card + statement - `OrderLineItemAppliedServiceCharge` has a `service_charge_id` that - references the `uid` of a + as part of the statement description. - top-level `OrderServiceCharge` applied to the line item. On reads, the - amount applied is - populated. + Note that the `statement_description_identifier` might get truncated + on the statement description + to fit the required information including the Square identifier (SQ *) + and the name of the - To change the amount of a service charge, modify the referenced - top-level service charge. - base_price_money: - type: optional - docs: The base price for a single unit of the line item. - variation_total_price_money: - type: optional + seller taking the payment. + access: read-only + capabilities: + type: optional> + docs: |- + Actions that can be performed on this payment: + - `EDIT_AMOUNT_UP` - The payment amount can be edited up. + - `EDIT_AMOUNT_DOWN` - The payment amount can be edited down. + - `EDIT_TIP_AMOUNT_UP` - The tip amount can be edited up. + - `EDIT_TIP_AMOUNT_DOWN` - The tip amount can be edited down. + - `EDIT_DELAY_ACTION` - The delay_action can be edited. + access: read-only + receipt_number: + type: optional + docs: |- + The payment's receipt number. + The field is missing if a payment is canceled. + validation: + maxLength: 4 + access: read-only + receipt_url: + type: optional + docs: |- + The URL for the payment's receipt. + The field is only populated for COMPLETED payments. + validation: + maxLength: 255 + access: read-only + device_details: + type: optional + docs: Details about the device that took the payment. + application_details: + type: optional + docs: Details about the application that took the payment. + is_offline_payment: + type: optional + docs: Whether or not this payment was taken offline. + access: read-only + offline_payment_details: + type: optional + docs: Additional information about the payment if it was taken offline. + version_token: + type: optional> docs: >- - The total price of all item variations sold in this line item. - - The price is calculated as `base_price_money` multiplied by - `quantity`. + Used for optimistic concurrency. This opaque token identifies a + specific version of the - It does not include modifiers. - gross_sales_money: - type: optional + `Payment` object. + source: + openapi: openapi/openapi.json + PaymentBalanceActivityAppFeeRefundDetail: + properties: + payment_id: + type: optional> + docs: The ID of the payment associated with this activity. + refund_id: + type: optional> + docs: The ID of the refund associated with this activity. + location_id: + type: optional> docs: >- - The amount of money made in gross sales for this line item. - - The amount is calculated as the sum of the variation's total price and - each modifier's total price. - - For inclusive tax items in the US, Canada, and Japan, tax is deducted - from `gross_sales_money`. For Europe and - - Australia, inclusive tax remains as part of the gross sale - calculation. - total_tax_money: - type: optional - docs: The total amount of tax money to collect for the line item. - total_discount_money: - type: optional - docs: The total amount of discount money to collect for the line item. - total_money: - type: optional - docs: The total amount of money to collect for this line item. - pricing_blocklists: - type: optional + The ID of the location of the merchant associated with the payment + refund activity + source: + openapi: openapi/openapi.json + PaymentBalanceActivityAppFeeRevenueDetail: + properties: + payment_id: + type: optional> + docs: The ID of the payment associated with this activity. + location_id: + type: optional> docs: >- - Describes pricing adjustments that are blocked from automatic + The ID of the location of the merchant associated with the payment + activity + source: + openapi: openapi/openapi.json + PaymentBalanceActivityAutomaticSavingsDetail: + properties: + payment_id: + type: optional> + docs: The ID of the payment associated with this activity. + payout_id: + type: optional> + docs: The ID of the payout associated with this activity. + source: + openapi: openapi/openapi.json + PaymentBalanceActivityAutomaticSavingsReversedDetail: + properties: + payment_id: + type: optional> + docs: The ID of the payment associated with this activity. + payout_id: + type: optional> + docs: The ID of the payout associated with this activity. + source: + openapi: openapi/openapi.json + PaymentBalanceActivityChargeDetail: + properties: + payment_id: + type: optional> + docs: The ID of the payment associated with this activity. + source: + openapi: openapi/openapi.json + PaymentBalanceActivityDepositFeeDetail: + properties: + payout_id: + type: optional> + docs: The ID of the payout that triggered this deposit fee activity. + source: + openapi: openapi/openapi.json + PaymentBalanceActivityDepositFeeReversedDetail: + properties: + payout_id: + type: optional> + docs: The ID of the payout that triggered this deposit fee activity. + source: + openapi: openapi/openapi.json + PaymentBalanceActivityDisputeDetail: + properties: + payment_id: + type: optional> + docs: The ID of the payment associated with this activity. + dispute_id: + type: optional> + docs: The ID of the dispute associated with this activity. + source: + openapi: openapi/openapi.json + PaymentBalanceActivityFeeDetail: + properties: + payment_id: + type: optional> + docs: >- + The ID of the payment associated with this activity - application to a line item. For more information, see + This will only be populated when a principal LedgerEntryToken is also + populated. - [Apply Taxes and - Discounts](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts). - total_service_charge_money: - type: optional - docs: >- - The total amount of apportioned service charge money to collect for - the line item. + If the fee is independent (there is no principal LedgerEntryToken) + then this will likely not + + be populated. + source: + openapi: openapi/openapi.json + PaymentBalanceActivityFreeProcessingDetail: + properties: + payment_id: + type: optional> + docs: The ID of the payment associated with this activity. + source: + openapi: openapi/openapi.json + PaymentBalanceActivityHoldAdjustmentDetail: + properties: + payment_id: + type: optional> + docs: The ID of the payment associated with this activity. + source: + openapi: openapi/openapi.json + PaymentBalanceActivityOpenDisputeDetail: + properties: + payment_id: + type: optional> + docs: The ID of the payment associated with this activity. + dispute_id: + type: optional> + docs: The ID of the dispute associated with this activity. + source: + openapi: openapi/openapi.json + PaymentBalanceActivityOtherAdjustmentDetail: + properties: + payment_id: + type: optional> + docs: The ID of the payment associated with this activity. + source: + openapi: openapi/openapi.json + PaymentBalanceActivityOtherDetail: + properties: + payment_id: + type: optional> + docs: The ID of the payment associated with this activity. + source: + openapi: openapi/openapi.json + PaymentBalanceActivityRefundDetail: + properties: + payment_id: + type: optional> + docs: The ID of the payment associated with this activity. + refund_id: + type: optional> + docs: The ID of the refund associated with this activity. source: openapi: openapi/openapi.json - OrderLineItemAppliedDiscount: - docs: >- - Represents an applied portion of a discount to a line item in an order. - - - Order scoped discounts have automatically applied discounts present for - each line item. - - Line-item scoped discounts must have applied discounts added manually for - any applicable line - - items. The corresponding applied money is automatically computed based on - participating - - line items. + PaymentBalanceActivityReleaseAdjustmentDetail: properties: - uid: + payment_id: type: optional> - docs: >- - A unique ID that identifies the applied discount only within this - order. - validation: - maxLength: 60 - discount_uid: - type: string - docs: >- - The `uid` of the discount that the applied discount represents. It - must - - reference a discount present in the `order.discounts` field. - - - This field is immutable. To change which discounts apply to a line - item, - - you must delete the discount and re-add it as a new - `OrderLineItemAppliedDiscount`. - validation: - minLength: 1 - maxLength: 60 - applied_money: - type: optional - docs: The amount of money applied by the discount to the line item. + docs: The ID of the payment associated with this activity. source: openapi: openapi/openapi.json - OrderLineItemAppliedServiceCharge: + PaymentBalanceActivityReserveHoldDetail: properties: - uid: + payment_id: + type: optional> + docs: The ID of the payment associated with this activity. + source: + openapi: openapi/openapi.json + PaymentBalanceActivityReserveReleaseDetail: + properties: + payment_id: + type: optional> + docs: The ID of the payment associated with this activity. + source: + openapi: openapi/openapi.json + PaymentBalanceActivitySquareCapitalPaymentDetail: + properties: + payment_id: + type: optional> + docs: The ID of the payment associated with this activity. + source: + openapi: openapi/openapi.json + PaymentBalanceActivitySquareCapitalReversedPaymentDetail: + properties: + payment_id: + type: optional> + docs: The ID of the payment associated with this activity. + source: + openapi: openapi/openapi.json + PaymentBalanceActivitySquarePayrollTransferDetail: + properties: + payment_id: + type: optional> + docs: The ID of the payment associated with this activity. + source: + openapi: openapi/openapi.json + PaymentBalanceActivitySquarePayrollTransferReversedDetail: + properties: + payment_id: + type: optional> + docs: The ID of the payment associated with this activity. + source: + openapi: openapi/openapi.json + PaymentBalanceActivityTaxOnFeeDetail: + properties: + payment_id: + type: optional> + docs: The ID of the payment associated with this activity. + tax_rate_description: type: optional> docs: >- - A unique ID that identifies the applied service charge only within - this order. - validation: - maxLength: 60 - service_charge_uid: - type: string - docs: >- - The `uid` of the service charge that the applied service charge - represents. It must - - reference a service charge present in the `order.service_charges` - field. - - - This field is immutable. To change which service charges apply to a - line item, - - delete and add a new `OrderLineItemAppliedServiceCharge`. - validation: - minLength: 1 - maxLength: 60 - applied_money: - type: optional - docs: The amount of money applied by the service charge to the line item. + The description of the tax rate being applied. For example: "GST", + "HST". source: openapi: openapi/openapi.json - OrderLineItemAppliedTax: - docs: >- - Represents an applied portion of a tax to a line item in an order. - - - Order-scoped taxes automatically include the applied taxes in each line - item. - - Line item taxes must be referenced from any applicable line items. - - The corresponding applied money is automatically computed, based on the - - set of participating line items. + PaymentBalanceActivityThirdPartyFeeDetail: properties: - uid: + payment_id: type: optional> - docs: A unique ID that identifies the applied tax only within this order. + docs: The ID of the payment associated with this activity. + source: + openapi: openapi/openapi.json + PaymentBalanceActivityThirdPartyFeeRefundDetail: + properties: + payment_id: + type: optional> + docs: The ID of the payment associated with this activity. + refund_id: + type: optional> + docs: The public refund id associated with this activity. + source: + openapi: 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: 60 - tax_uid: - type: string - docs: >- - The `uid` of the tax for which this applied tax represents. It must - reference - - a tax present in the `order.taxes` field. - - - This field is immutable. To change which taxes apply to a line item, - delete and add a new - - `OrderLineItemAppliedTax`. + maxLength: 50 + id: + type: optional + docs: ID of the affected payment. validation: - minLength: 1 - maxLength: 60 - applied_money: - type: optional - docs: The amount of money applied by the tax to the line item. + maxLength: 192 + object: + type: optional + docs: An object containing the created payment. source: openapi: openapi/openapi.json - OrderLineItemDiscount: - docs: >- - Represents a discount that applies to one or more line items in an - - order. - - - Fixed-amount, order-scoped discounts are distributed across all non-zero - line item totals. - - The amount distributed to each line item is relative to the - - amount contributed by the item to the order subtotal. + PaymentCreatedEventObject: properties: - uid: - type: optional> - docs: A unique ID that identifies the discount only within this order. + payment: + type: optional + docs: The created payment. + source: + openapi: openapi/openapi.json + PaymentLink: + properties: + id: + type: optional + docs: The Square-assigned ID of the payment link. + access: read-only + version: + type: integer + docs: >- + The Square-assigned version number, which is incremented each time an + update is committed to the payment link. validation: - maxLength: 60 - catalog_object_id: + max: 65535 + description: type: optional> + docs: |- + The optional description of the `payment_link` object. + It is primarily for use by your application and is not used anywhere. + validation: + maxLength: 4096 + order_id: + type: optional + docs: The ID of the order associated with the payment link. + validation: + maxLength: 192 + access: read-only + checkout_options: + type: optional docs: >- - The catalog object ID referencing - [CatalogDiscount](entity:CatalogDiscount). + The checkout options configured for the payment link. + + For more information, see [Optional Checkout + Configurations](https://developer.squareup.com/docs/checkout-api/optional-checkout-configurations). + pre_populated_data: + type: optional + docs: |- + Describes buyer data to prepopulate + on the checkout page. + url: + type: optional + docs: The shortened URL of the payment link. validation: - maxLength: 192 - catalog_version: - type: optional> - docs: The version of the catalog object that this discount references. - name: - type: optional> - docs: The discount's name. + maxLength: 255 + access: read-only + long_url: + type: optional + docs: The long URL of the payment link. validation: maxLength: 255 - type: - type: optional + access: read-only + created_at: + type: optional + docs: The timestamp when the payment link was created, in RFC 3339 format. + updated_at: + type: optional docs: >- - The type of the discount. - - - Discounts that do not reference a catalog object ID must have a type - of - - `FIXED_PERCENTAGE` or `FIXED_AMOUNT`. - - See [OrderLineItemDiscountType](#type-orderlineitemdiscounttype) for - possible values - percentage: + The timestamp when the payment link was last updated, in RFC 3339 + format. + payment_note: type: optional> docs: >- - The percentage of the discount, as a string representation of a - decimal number. - - A value of `7.25` corresponds to a percentage of 7.25%. - + An optional note. After Square processes the payment, this note is + added to the - `percentage` is not set for amount-based discounts. + resulting `Payment`. validation: - maxLength: 10 - amount_money: - type: optional - docs: |- - The total declared monetary amount of the discount. - - `amount_money` is not set for percentage-based discounts. - applied_money: - type: optional - docs: >- - The amount of discount actually applied to the line item. - - - The amount represents the amount of money applied as a line-item - scoped discount. - - When an amount-based discount is scoped to the entire order, the value - - of `applied_money` is different than `amount_money` because the total - - amount of the discount is distributed across all line items. - metadata: - type: optional>>>> + maxLength: 500 + source: + openapi: openapi/openapi.json + PaymentLinkRelatedResources: + properties: + orders: + type: optional>> + docs: The order associated with the payment link. + subscription_plans: + type: optional>> + docs: The subscription plan associated with the payment link. + source: + openapi: openapi/openapi.json + PaymentOptions: + properties: + autocomplete: + type: optional> docs: >- - Application-defined data attached to this discount. Metadata fields - are intended - - to store descriptive references or associations with an entity in - another system or store brief - - information about the object. Square does not process this field; it - only stores and returns it - - in relevant API calls. Do not use metadata to store any sensitive - information (such as personally - - identifiable information or card details). - - - Keys written by applications must be 60 characters or less and must be - in the character set - - `[a-zA-Z0-9_-]`. Entries can also include metadata generated by - Square. These keys are prefixed - - with a namespace, separated from the key with a ':' character. - - - Values have a maximum length of 255 characters. - - - An application can have up to 10 entries per metadata field. - - - Entries written by applications are private and can only be read or - modified by the same + Indicates whether the `Payment` objects created from this + `TerminalCheckout` are - application. + automatically `COMPLETED` or left in an `APPROVED` state for later + modification. - For more information, see - [Metadata](https://developer.squareup.com/docs/build-basics/metadata). - scope: - type: optional + Default: true + delay_duration: + type: optional> docs: >- - Indicates the level at which the discount applies. For `ORDER` scoped - discounts, - - Square generates references in `applied_discounts` on all order line - items that do - - not have them. For `LINE_ITEM` scoped discounts, the discount only - applies to line items - - with a discount reference in their `applied_discounts` field. + The duration of time after the payment's creation when Square + automatically resolves the + payment. This automatic resolution applies only to payments that do + not reach a terminal state - This field is immutable. To change the scope of a discount, you must - delete + (`COMPLETED` or `CANCELED`) before the `delay_duration` time period. - the discount and re-add it as a new discount. - See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for - possible values - reward_ids: - type: optional> - docs: >- - The reward IDs corresponding to this discount. The application and + This parameter should be specified as a time duration, in RFC 3339 + format, with a minimum value - specification of discounts that have `reward_ids` are completely - controlled by the backing + of 1 minute and a maximum value of 36 hours. This feature is only + supported for card payments, - criteria corresponding to the reward tiers of the rewards that are - added to the order + and all payments will be considered card-present. - through the Loyalty API. To manually unapply discounts that are the - result of added rewards, - the rewards must be removed from the order through the Loyalty API. - access: read-only - pricing_rule_id: - type: optional - docs: >- - The object ID of a [pricing rule](entity:CatalogPricingRule) to be - applied + This parameter can only be set for a delayed capture payment + (`autocomplete=false`). For more - automatically to this discount. The specification and application of - the discounts, to + information, see [Delayed + Capture](https://developer.squareup.com/docs/payments-api/take-payments/card-payments/delayed-capture#time-threshold). - which a `pricing_rule_id` is assigned, are completely controlled by - the corresponding - pricing rule. - access: read-only - source: - openapi: openapi/openapi.json - OrderLineItemDiscountScope: - enum: - - OTHER_DISCOUNT_SCOPE - - LINE_ITEM - - ORDER - docs: Indicates whether this is a line-item or order-level discount. - source: - openapi: openapi/openapi.json - OrderLineItemDiscountType: - enum: - - UNKNOWN_DISCOUNT - - FIXED_PERCENTAGE - - FIXED_AMOUNT - - VARIABLE_PERCENTAGE - - VARIABLE_AMOUNT - docs: >- - Indicates how the discount is applied to the associated line item or - order. - source: - openapi: openapi/openapi.json - OrderLineItemItemType: - enum: - - ITEM - - CUSTOM_AMOUNT - - GIFT_CARD - docs: Represents the line item type. - source: - openapi: openapi/openapi.json - OrderLineItemModifier: - docs: A [CatalogModifier](entity:CatalogModifier). - properties: - uid: - type: optional> - docs: A unique ID that identifies the modifier only within this order. - validation: - maxLength: 60 - catalog_object_id: - type: optional> - docs: >- - The catalog object ID referencing - [CatalogModifier](entity:CatalogModifier). - validation: - maxLength: 192 - catalog_version: - type: optional> - docs: The version of the catalog object that this modifier references. - name: - type: optional> - docs: The name of the item modifier. - validation: - maxLength: 255 - quantity: - type: optional> + Default: "PT36H" (36 hours) from the creation time + accept_partial_authorization: + type: optional> docs: >- - The quantity of the line item modifier. The modifier quantity can be 0 - or more. - - For example, suppose a restaurant offers a cheeseburger on the menu. - When a buyer orders + If set to `true` and charging a Square Gift Card, a payment might be + returned with - this item, the restaurant records the purchase by creating an `Order` - object with a line item + `amount_money` equal to less than what was requested. For example, a + request for $20 when charging - for a burger. The line item includes a line item modifier: the name is - cheese and the quantity + a Square Gift Card with a balance of $5 results in an APPROVED payment + of $5. You might choose - is 1. The buyer has the option to order extra cheese (or no cheese). - If the buyer chooses + to prompt the buyer for an additional payment to cover the remainder + or cancel the Gift Card - the extra cheese option, the modifier quantity increases to 2. If the - buyer does not want + payment. - any cheese, the modifier quantity is set to 0. - base_price_money: - type: optional - docs: >- - The base price for the modifier. + This parameter can only be set for a delayed capture payment + (`autocomplete=false`). - `base_price_money` is required for ad hoc modifiers. - If both `catalog_object_id` and `base_price_money` are set, - `base_price_money` will + For more information, see [Take Partial + Payments](https://developer.squareup.com/docs/payments-api/take-payments/card-payments/partial-payments-with-gift-cards). - override the predefined [CatalogModifier](entity:CatalogModifier) - price. - total_price_money: - type: optional - docs: >- - The total price of the item modifier for its line item. - This is the modifier's `base_price_money` multiplied by the line - item's quantity. - metadata: - type: optional>>>> + Default: false + delay_action: + type: optional docs: >- - Application-defined data attached to this order. Metadata fields are - intended + The action to be applied to the `Payment` when the delay_duration has + elapsed. - to store descriptive references or associations with an entity in - another system or store brief + The action must be CANCEL or COMPLETE. - 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 + The action cannot be set to COMPLETE if an `order_id` is present on + the TerminalCheckout. - identifiable information or card details). + This parameter can only be set for a delayed capture payment + (`autocomplete=false`). For more - Keys written by applications must be 60 characters or less and must be - in the character set + information, see [Delayed + Capture](https://developer.squareup.com/docs/payments-api/take-payments/card-payments/delayed-capture#time-threshold). - `[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. + Default: CANCEL + See [DelayAction](#type-delayaction) for possible values + source: + openapi: openapi/openapi.json + PaymentOptionsDelayAction: + enum: + - CANCEL + - COMPLETE + docs: >- + Describes the action to be applied to a delayed capture payment when the + delay_duration - Values have a maximum length of 255 characters. + has elapsed. + source: + openapi: openapi/openapi.json + PaymentRefund: + docs: >- + Represents a refund of a payment made using Square. Contains information + about + the original payment and the amount of money refunded. + properties: + id: + type: string + docs: The unique ID for this refund, generated by Square. + validation: + minLength: 1 + maxLength: 255 + status: + type: optional> + docs: |- + The refund's status: + - `PENDING` - Awaiting approval. + - `COMPLETED` - Successfully completed. + - `REJECTED` - The refund was rejected. + - `FAILED` - An error occurred. + validation: + maxLength: 50 + location_id: + type: optional> + docs: >- + The location ID associated with the payment this refund is attached + to. + validation: + maxLength: 50 + unlinked: + type: optional + docs: >- + Flag indicating whether or not the refund is linked to an existing + payment in Square. + access: read-only + destination_type: + type: optional> + docs: >- + The destination type for this refund. - An application can have up to 10 entries per metadata field. + Current values include `CARD`, `BANK_ACCOUNT`, `WALLET`, + `BUY_NOW_PAY_LATER`, `CASH`, - Entries written by applications are private and can only be read or - modified by the same + `EXTERNAL`, and `SQUARE_ACCOUNT`. + validation: + maxLength: 50 + destination_details: + type: optional + docs: >- + Contains information about the refund destination. This field is + populated only if - application. + `destination_id` is defined in the `RefundPayment` request. + amount_money: + type: Money + docs: >- + The amount of money refunded. This amount is specified in the smallest + denomination + + of the applicable currency (for example, US dollar amounts are + specified in cents). + app_fee_money: + type: optional + docs: >- + The amount of money the application developer contributed to help + cover the refunded amount. + This amount is specified in the smallest denomination of the + applicable currency (for example, - For more information, see - [Metadata](https://developer.squareup.com/docs/build-basics/metadata). + US dollar amounts are specified in cents). For more information, see + + [Working with Monetary + Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). + processing_fee: + type: optional>> + docs: >- + Processing fees and fee adjustments assessed by Square for this + refund. + payment_id: + type: optional> + docs: The ID of the payment associated with this refund. + validation: + maxLength: 192 + order_id: + type: optional> + docs: The ID of the order associated with the refund. + validation: + maxLength: 192 + reason: + type: optional> + docs: The reason for the refund. + validation: + maxLength: 192 + created_at: + type: optional + docs: The timestamp of when the refund was created, in RFC 3339 format. + validation: + maxLength: 32 + access: read-only + updated_at: + type: optional + docs: The timestamp of when the refund was last updated, in RFC 3339 format. + validation: + maxLength: 32 + access: read-only + team_member_id: + type: optional + docs: An optional ID of the team member associated with taking the payment. + validation: + maxLength: 192 + access: read-only + terminal_refund_id: + type: optional + docs: An optional ID for a Terminal refund. + access: read-only source: openapi: openapi/openapi.json - OrderLineItemPricingBlocklists: + PaymentUpdatedEvent: docs: >- - Describes pricing adjustments that are blocked from automatic + Published when a [Payment](entity:Payment) is updated. - application to a line item. For more information, see + Typically the `payment.status`, or `card_details.status` fields are + updated - [Apply Taxes and - Discounts](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts). + as a payment is canceled, authorized, or completed. properties: - blocked_discounts: - type: >- - optional>> + 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 + transfer to their + + external bank account or to the Square balance. + properties: + id: + type: string + docs: A unique ID for the payout. + validation: + minLength: 1 + status: + type: optional + docs: |- + Indicates the payout status. + See [PayoutStatus](#type-payoutstatus) for possible values + location_id: + type: string + docs: The ID of the location associated with the payout. + validation: + minLength: 1 + created_at: + type: optional + docs: >- + The timestamp of when the payout was created and submitted for deposit + to the seller's banking destination, in RFC 3339 format. + updated_at: + type: optional + docs: The timestamp of when the payout was last updated, in RFC 3339 format. + amount_money: + type: optional docs: >- - A list of discounts blocked from applying to the line item. + The amount of money involved in the payout. A positive amount + indicates a deposit, and a negative amount indicates a withdrawal. + This amount is never zero. + destination: + type: optional + docs: >- + Information about the banking destination (such as a bank account, + Square checking account, or debit card) - Discounts can be blocked by the `discount_uid` (for ad hoc discounts) - or + against which the payout was made. + version: + type: optional + docs: >- + The version number, which is incremented each time an update is made + to this payout record. - the `discount_catalog_object_id` (for catalog discounts). - blocked_taxes: - type: optional>> + The version number helps developers receive event notifications or + feeds out of order. + type: + type: optional docs: |- - A list of taxes blocked from applying to the line item. - Taxes can be blocked by the `tax_uid` (for ad hoc taxes) or - the `tax_catalog_object_id` (for catalog taxes). - source: - openapi: openapi/openapi.json - OrderLineItemPricingBlocklistsBlockedDiscount: - docs: >- - A discount to block from applying to a line item. The discount must be - - identified by either `discount_uid` or `discount_catalog_object_id`, but - not both. - properties: - uid: - type: optional> - docs: A unique ID of the `BlockedDiscount` within the order. - validation: - maxLength: 60 - discount_uid: + Indicates the payout type. + See [PayoutType](#type-payouttype) for possible values + payout_fee: + type: optional>> + docs: >- + A list of transfer fees and any taxes on the fees assessed by Square + for this payout. + arrival_date: type: optional> docs: >- - The `uid` of the discount that should be blocked. Use this field to - block - - ad hoc discounts. For catalog discounts, use the - `discount_catalog_object_id` field. - validation: - maxLength: 60 - discount_catalog_object_id: + The calendar date, in ISO 8601 format (YYYY-MM-DD), when the payout is + due to arrive in the seller’s banking destination. + end_to_end_id: type: optional> docs: >- - The `catalog_object_id` of the discount that should be blocked. - - Use this field to block catalog discounts. For ad hoc discounts, use - the - - `discount_uid` field. - validation: - maxLength: 192 + A unique ID for each `Payout` object that might also appear on the + seller’s bank statement. You can use this ID to automate the process + of reconciling each payout with the corresponding line item on the + bank statement. source: openapi: openapi/openapi.json - OrderLineItemPricingBlocklistsBlockedTax: - docs: |- - A tax to block from applying to a line item. The tax must be - identified by either `tax_uid` or `tax_catalog_object_id`, but not both. + PayoutEntry: + docs: >- + One or more PayoutEntries that make up a Payout. Each one has a date, + amount, and type of activity. + + The total amount of the payout will equal the sum of the payout entries + for a batch payout properties: - uid: - type: optional> - docs: A unique ID of the `BlockedTax` within the order. + id: + type: string + docs: A unique ID for the payout entry. validation: - maxLength: 60 - tax_uid: - type: optional> - docs: >- - The `uid` of the tax that should be blocked. Use this field to block - - ad hoc taxes. For catalog, taxes use the `tax_catalog_object_id` - field. + minLength: 1 + payout_id: + type: string + docs: The ID of the payout entries’ associated payout. validation: - maxLength: 60 - tax_catalog_object_id: + minLength: 1 + effective_at: type: optional> + docs: >- + The timestamp of when the payout entry affected the balance, in RFC + 3339 format. + type: + type: optional docs: |- - The `catalog_object_id` of the tax that should be blocked. - Use this field to block catalog taxes. For ad hoc taxes, use the - `tax_uid` field. - validation: - maxLength: 192 + The type of activity associated with this payout entry. + See [ActivityType](#type-activitytype) for possible values + gross_amount_money: + type: optional + docs: The amount of money involved in this payout entry. + fee_amount_money: + type: optional + docs: The amount of Square fees associated with this payout entry. + net_amount_money: + type: optional + docs: The net proceeds from this transaction after any fees. + type_app_fee_revenue_details: + type: optional + docs: Details of any developer app fee revenue generated on a payment. + type_app_fee_refund_details: + type: optional + docs: Details of a refund for an app fee on a payment. + type_automatic_savings_details: + type: optional + docs: >- + Details of any automatic transfer from the payment processing balance + to the Square Savings account. These are, generally, proportional to + the merchant's sales. + type_automatic_savings_reversed_details: + type: optional + docs: >- + Details of any automatic transfer from the Square Savings account back + to the processing balance. These are, generally, proportional to the + merchant's refunds. + type_charge_details: + type: optional + docs: Details of credit card payment captures. + type_deposit_fee_details: + type: optional + docs: >- + Details of any fees involved with deposits such as for instant + deposits. + type_deposit_fee_reversed_details: + type: optional + docs: >- + Details of any reversal or refund of fees involved with deposits such + as for instant deposits. + type_dispute_details: + type: optional + docs: Details of any balance change due to a dispute event. + type_fee_details: + type: optional + docs: Details of adjustments due to the Square processing fee. + type_free_processing_details: + type: optional + docs: >- + Square offers Free Payments Processing for a variety of business + scenarios including seller referral or when Square wants to apologize + for a bug, customer service, repricing complication, and so on. This + entry represents details of any credit to the merchant for the + purposes of Free Processing. + type_hold_adjustment_details: + type: optional + docs: >- + Details of any adjustment made by Square related to the holding or + releasing of a payment. + type_open_dispute_details: + type: optional + docs: Details of any open disputes. + type_other_details: + type: optional + docs: >- + Details of any other type that does not belong in the rest of the + types. + type_other_adjustment_details: + type: optional + docs: >- + Details of any other type of adjustments that don't fall under + existing types. + type_refund_details: + type: optional + docs: Details of a refund for an existing card payment. + type_release_adjustment_details: + type: optional + docs: Details of fees released for adjustments. + type_reserve_hold_details: + type: optional + docs: Details of fees paid for funding risk reserve. + type_reserve_release_details: + type: optional + docs: Details of fees released from risk reserve. + type_square_capital_payment_details: + type: optional + docs: >- + Details of capital merchant cash advance (MCA) assessments. These are, + generally, proportional to the merchant's sales but may be issued for + other reasons related to the MCA. + type_square_capital_reversed_payment_details: + type: optional + docs: >- + Details of capital merchant cash advance (MCA) assessment refunds. + These are, generally, proportional to the merchant's refunds but may + be issued for other reasons related to the MCA. + type_tax_on_fee_details: + type: optional + docs: Details of tax paid on fee amounts. + type_third_party_fee_details: + type: optional + docs: Details of fees collected by a 3rd party platform. + type_third_party_fee_refund_details: + type: optional + docs: Details of refunded fees from a 3rd party platform. + type_square_payroll_transfer_details: + type: optional + docs: >- + Details of a payroll payment that was transferred to a team member’s + bank account. + type_square_payroll_transfer_reversed_details: + type: optional + docs: >- + Details of a payroll payment to a team member’s bank account that was + deposited back to the seller’s account by Square. source: openapi: openapi/openapi.json - OrderLineItemTax: - docs: >- - Represents a tax that applies to one or more line item in the order. - - - Fixed-amount, order-scoped taxes are distributed across all non-zero line - item totals. - - The amount distributed to each line item is relative to the amount the - item - - contributes to the order subtotal. - properties: - uid: - type: optional> - docs: A unique ID that identifies the tax only within this order. - validation: - maxLength: 60 - catalog_object_id: + PayoutFailedEvent: + docs: Published when a [Payout](entity:Payout) has failed. + properties: + merchant_id: type: optional> - docs: The catalog object ID referencing [CatalogTax](entity:CatalogTax). - validation: - maxLength: 192 - catalog_version: - type: optional> - docs: The version of the catalog object that this tax references. - name: + docs: The ID of the target merchant associated with the event. + location_id: type: optional> - docs: The tax's name. - validation: - maxLength: 255 + docs: The ID of the target location associated with the event. type: - type: optional - docs: >- - Indicates the calculation method used to apply the tax. - - See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible - values - percentage: type: optional> - docs: >- - The percentage of the tax, as a string representation of a decimal - - number. For example, a value of `"7.25"` corresponds to a percentage - of - - 7.25%. - validation: - maxLength: 10 - metadata: - type: optional>>>> - docs: >- - Application-defined data attached to this tax. Metadata fields are - intended - - to store descriptive references or associations with an entity in - another system or store brief - - information about the object. Square does not process this field; it - only stores and returns it - - in relevant API calls. Do not use metadata to store any sensitive - information (such as personally - - identifiable information or card details). - - - Keys written by applications must be 60 characters or less and must be - in the character set - - `[a-zA-Z0-9_-]`. Entries can also include metadata generated by - Square. These keys are prefixed - - with a namespace, separated from the key with a ':' character. - - - Values have a maximum length of 255 characters. - - - An application can have up to 10 entries per metadata field. - - - Entries written by applications are private and can only be read or - modified by the same - - application. - - - For more information, see - [Metadata](https://developer.squareup.com/docs/build-basics/metadata). - applied_money: - type: optional - docs: |- - The amount of money applied to the order by the tax. - - - For percentage-based taxes, `applied_money` is the money - calculated using the percentage. - scope: - type: optional - docs: >- - Indicates the level at which the tax applies. For `ORDER` scoped - taxes, - - Square generates references in `applied_taxes` on all order line items - that do - - not have them. For `LINE_ITEM` scoped taxes, the tax only applies to - line items - - with references in their `applied_taxes` field. - - - This field is immutable. To change the scope, you must delete the tax - and - - re-add it as a new tax. - - See [OrderLineItemTaxScope](#type-orderlineitemtaxscope) for possible - values - auto_applied: - type: optional - docs: >- - Determines whether the tax was automatically applied to the order - based on - - the catalog configuration. For an example, see - - [Automatically Apply Taxes to an - Order](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts/auto-apply-taxes). + 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 - OrderLineItemTaxScope: - enum: - - OTHER_TAX_SCOPE - - LINE_ITEM - - ORDER - docs: Indicates whether this is a line-item or order-level tax. + 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 - OrderLineItemTaxType: - enum: - - UNKNOWN_TAX - - ADDITIVE - - INCLUSIVE - docs: Indicates how the tax is applied to the associated line item or order. + PayoutFailedEventObject: + properties: + payout: + type: optional + docs: The payout that failed. source: openapi: openapi/openapi.json - OrderMoneyAmounts: - docs: A collection of various money amounts. + PayoutFee: + docs: Represents a payout fee that can incur as part of a payout. properties: - total_money: - type: optional - docs: The total money. - tax_money: - type: optional - docs: The money associated with taxes. - discount_money: - type: optional - docs: The money associated with discounts. - tip_money: - type: optional - docs: The money associated with tips. - service_charge_money: + amount_money: type: optional - docs: The money associated with service charges. + 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 - OrderPricingOptions: - docs: >- - Pricing options for an order. The options affect how the order's price is - calculated. - - They can be used, for example, to apply automatic price adjustments that - are based on preconfigured - - [pricing rules](entity:CatalogPricingRule). + 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: - auto_apply_discounts: - type: optional> - docs: |- - The option to determine whether pricing rule-based - discounts are automatically applied to an order. - auto_apply_taxes: - type: optional> - docs: >- - The option to determine whether rule-based taxes are automatically - - applied to an order when the criteria of the corresponding rules are - met. + 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 - OrderQuantityUnit: - docs: >- - Contains the measurement unit for a quantity and a precision that - - specifies the number of digits after the decimal point for decimal - quantities. + PayoutPaidEventData: properties: - measurement_unit: - type: optional - docs: |- - A [MeasurementUnit](entity:MeasurementUnit) that represents the - unit of measure for the quantity. - precision: - type: optional> - docs: >- - For non-integer quantities, represents the number of digits after the - decimal point that are - - recorded for this quantity. - - - For example, a precision of 1 allows quantities such as `"1.0"` and - `"1.1"`, but not `"1.01"`. - - - Min: 0. Max: 5. - catalog_object_id: + type: type: optional> - docs: |- - The catalog object ID referencing the - [CatalogMeasurementUnit](entity:CatalogMeasurementUnit). - - This field is set when this is a catalog-backed measurement unit. - catalog_version: - type: optional> - docs: >- - The version of the catalog object that this measurement unit - references. - - - This field is set when this is a catalog-backed measurement unit. + 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 - OrderReturn: - docs: >- - The set of line items, service charges, taxes, discounts, tips, and other - items being returned in an order. + PayoutSentEvent: + docs: Published when a [Payout](entity:Payout) is sent. properties: - uid: + merchant_id: type: optional> - docs: A unique ID that identifies the return only within this order. - validation: - maxLength: 60 - source_order_id: + docs: The ID of the target merchant associated with the event. + location_id: type: optional> - docs: >- - An order that contains the original sale of these return line items. - This is unset - - for unlinked returns. - return_line_items: - type: optional>> - docs: A collection of line items that are being returned. - return_service_charges: - type: optional>> - docs: A collection of service charges that are being returned. - return_taxes: - type: optional> - docs: >- - A collection of references to taxes being returned for an order, - including the total - - applied tax amount to be returned. The taxes must reference a - top-level tax ID from the source - - order. - access: read-only - return_discounts: - type: optional> - docs: >- - A collection of references to discounts being returned for an order, - including the total - - applied discount amount to be returned. The discounts must reference a - top-level discount ID - - from the source order. + 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 - return_tips: - type: optional>> - docs: A collection of references to tips being returned for an order. - rounding_adjustment: - type: optional - docs: >- - A positive or negative rounding adjustment to the total value being - returned. Adjustments are commonly - - used to apply cash rounding when the minimum unit of the account is - smaller than the lowest - - physical denomination of the currency. - return_amounts: - type: optional - docs: An aggregate monetary value being returned by this return entry. + data: + type: optional + docs: Data associated with the event. source: openapi: openapi/openapi.json - OrderReturnDiscount: + PayoutSentEventData: + properties: + type: + type: optional> + docs: Name of the affected object’s type, `"payout"`. + id: + type: optional + docs: ID of the sent payout. + object: + type: optional + docs: An object containing the sent payout. + source: + openapi: openapi/openapi.json + PayoutSentEventObject: + properties: + payout: + type: optional + docs: The payout that was sent. + source: + openapi: openapi/openapi.json + PayoutStatus: + enum: + - SENT + - FAILED + - PAID + docs: Payout status types + source: + openapi: openapi/openapi.json + PayoutType: + enum: + - BATCH + - SIMPLE docs: >- - Represents a discount being returned that applies to one or more return - line items in an - - order. - + The type of payout: “BATCH” or “SIMPLE”. - Fixed-amount, order-scoped discounts are distributed across all non-zero - return line item totals. + BATCH payouts include a list of payout entries that can be considered + settled. - The amount distributed to each return line item is relative to that item’s - contribution to the + SIMPLE payouts do not have any payout entries associated with them - order subtotal. + and will show up as one of the payout entries in a future BATCH payout. + source: + openapi: openapi/openapi.json + Phase: + docs: >- + Represents a phase, which can override subscription phases as defined by + plan_id properties: uid: type: optional> - docs: >- - A unique ID that identifies the returned discount only within this - order. - validation: - maxLength: 60 - source_discount_uid: - type: optional> - docs: >- - The discount `uid` from the order that contains the original - application of this discount. - validation: - maxLength: 60 - catalog_object_id: - type: optional> - docs: >- - The catalog object ID referencing - [CatalogDiscount](entity:CatalogDiscount). - validation: - maxLength: 192 - catalog_version: + docs: id of subscription phase + ordinal: type: optional> - docs: The version of the catalog object that this discount references. - name: + docs: index of phase in total subscription plan + order_template_id: type: optional> - docs: The discount's name. - validation: - maxLength: 255 - type: - type: optional - docs: >- - The type of the discount. If it is created by the API, it is - `FIXED_PERCENTAGE` or `FIXED_AMOUNT`. - - - Discounts that do not reference a catalog object ID must have a type - of - - `FIXED_PERCENTAGE` or `FIXED_AMOUNT`. - - See [OrderLineItemDiscountType](#type-orderlineitemdiscounttype) for - possible values - percentage: + docs: id of order to be used in billing + plan_phase_uid: type: optional> - docs: >- - The percentage of the tax, as a string representation of a decimal - number. - - A value of `"7.25"` corresponds to a percentage of 7.25%. - - - `percentage` is not set for amount-based discounts. - validation: - maxLength: 10 - amount_money: - type: optional - docs: |- - The total declared monetary amount of the discount. - - `amount_money` is not set for percentage-based discounts. - applied_money: - type: optional - docs: >- - The amount of discount actually applied to this line item. When an - amount-based - - discount is at the order level, this value is different from - `amount_money` because the discount - - is distributed across the line items. - scope: - type: optional - docs: >- - Indicates the level at which the `OrderReturnDiscount` applies. For - `ORDER` scoped - - discounts, the server generates references in `applied_discounts` on - all - - `OrderReturnLineItem`s. For `LINE_ITEM` scoped discounts, the discount - is only applied to - - `OrderReturnLineItem`s with references in their `applied_discounts` - field. - - See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for - possible values + docs: the uid from the plan's phase in catalog source: openapi: openapi/openapi.json - OrderReturnLineItem: - docs: The line item being returned in an order. + PhaseInput: + docs: Represents the arguments used to construct a new phase. properties: - uid: - type: optional> - docs: A unique ID for this return line-item entry. - validation: - maxLength: 60 - source_line_item_uid: - type: optional> - docs: The `uid` of the line item in the original sale order. - validation: - maxLength: 60 - name: + ordinal: + type: long + docs: index of phase in total subscription plan + order_template_id: type: optional> - docs: The name of the line item. - validation: - maxLength: 512 - quantity: - type: string - docs: |- - The quantity returned, formatted as a decimal number. - For example, `"3"`. + docs: id of order to be used in billing + source: + openapi: openapi/openapi.json + PrePopulatedData: + docs: >- + Describes buyer data to prepopulate in the payment form. - Line items with a `quantity_unit` can have non-integer quantities. - For example, `"1.70000"`. - validation: - minLength: 1 - maxLength: 12 - quantity_unit: - type: optional - docs: >- - The unit and precision that this return line item's quantity is - measured in. - note: + For more information, + + see [Optional Checkout + Configurations](https://developer.squareup.com/docs/checkout-api/optional-checkout-configurations). + properties: + buyer_email: type: optional> - docs: The note of the return line item. + docs: The buyer email to prepopulate in the payment form. validation: - maxLength: 2000 - catalog_object_id: + maxLength: 256 + buyer_phone_number: type: optional> - docs: >- - The [CatalogItemVariation](entity:CatalogItemVariation) ID applied to - this return line item. + docs: The buyer phone number to prepopulate in the payment form. validation: - maxLength: 192 - catalog_version: - type: optional> - docs: The version of the catalog object that this line item references. - variation_name: + maxLength: 17 + buyer_address: + type: optional
+ docs: The buyer address to prepopulate in the payment form. + source: + openapi: openapi/openapi.json + ProcessingFee: + docs: Represents the Square processing fee. + properties: + effective_at: + type: optional> + docs: The timestamp of when the fee takes effect, in RFC 3339 format. + type: type: optional> - docs: The name of the variation applied to this return line item. - validation: - maxLength: 400 - item_type: - type: optional - docs: >- - The type of line item: an itemized return, a non-itemized return - (custom amount), - - or the return of an unactivated gift card sale. - - See [OrderLineItemItemType](#type-orderlineitemitemtype) for possible - values - return_modifiers: - type: optional>> - docs: >- - The [CatalogModifier](entity:CatalogModifier)s applied to this line - item. - applied_taxes: - type: optional>> - docs: >- - The list of references to `OrderReturnTax` entities applied to the - return line item. Each - - `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of - a top-level - - `OrderReturnTax` applied to the return line item. On reads, the - applied amount - - is populated. - applied_discounts: - type: optional>> docs: >- - The list of references to `OrderReturnDiscount` entities applied to - the return line item. Each - - `OrderLineItemAppliedDiscount` has a `discount_uid` that references - the `uid` of a top-level - - `OrderReturnDiscount` applied to the return line item. On reads, the - applied amount - - is populated. - base_price_money: - type: optional - docs: The base price for a single unit of the line item. - variation_total_price_money: + The type of fee assessed or adjusted. The fee type can be `INITIAL` or + `ADJUSTMENT`. + amount_money: type: optional docs: >- - The total price of all item variations returned in this line item. - - The price is calculated as `base_price_money` multiplied by `quantity` - and + The fee amount, which might be negative, that is assessed or adjusted + by Square. - does not include modifiers. - gross_return_money: - type: optional - docs: >- - The gross return amount of money calculated as (item base price + - modifiers price) * quantity. - total_tax_money: - type: optional - docs: The total amount of tax money to return for the line item. - total_discount_money: - type: optional - docs: The total amount of discount money to return for the line item. - total_money: - type: optional - docs: The total amount of money to return for this line item. - applied_service_charges: - type: optional>> - docs: >- - The list of references to `OrderReturnServiceCharge` entities applied - to the return - line item. Each `OrderLineItemAppliedServiceCharge` has a - `service_charge_uid` that + Positive values represent funds being assessed, while negative values + represent - references the `uid` of a top-level `OrderReturnServiceCharge` applied - to the return line + funds being returned. + source: + openapi: openapi/openapi.json + Product: + enum: + - SQUARE_POS + - EXTERNAL_API + - BILLING + - APPOINTMENTS + - INVOICES + - ONLINE_STORE + - PAYROLL + - DASHBOARD + - ITEM_LIBRARY_IMPORT + - OTHER + docs: Indicates the Square product used to generate a change. + source: + openapi: openapi/openapi.json + ProductType: literal<"TERMINAL_API"> + PublishInvoiceResponse: + docs: Describes a `PublishInvoice` response. + properties: + invoice: + type: optional + docs: The published invoice. + errors: + type: optional> + docs: Information about errors encountered during the request. + source: + openapi: openapi/openapi.json + PublishScheduledShiftResponse: + docs: >- + Represents a + [PublishScheduledShift](api-endpoint:Labor-PublishScheduledShift) + response. - item. On reads, the applied amount is populated. - total_service_charge_money: - type: optional - docs: >- - The total amount of apportioned service charge money to return for the - line item. + Either `scheduled_shift` or `errors` is present in the response. + properties: + scheduled_shift: + type: optional + docs: The published scheduled shift. + errors: + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - OrderReturnLineItemModifier: - docs: A line item modifier being returned. + QrCodeOptions: + docs: Fields to describe the action that displays QR-Codes. properties: - uid: - type: optional> - docs: >- - A unique ID that identifies the return modifier only within this - order. + title: + type: string + docs: The title text to display in the QR code flow on the Terminal. validation: - maxLength: 60 - source_modifier_uid: - type: optional> - docs: |- - The modifier `uid` from the order's line item that contains the - original sale of this line item modifier. + minLength: 1 + maxLength: 250 + body: + type: string + docs: The body text to display in the QR code flow on the Terminal. validation: - maxLength: 60 - catalog_object_id: - type: optional> - docs: >- - The catalog object ID referencing - [CatalogModifier](entity:CatalogModifier). + minLength: 1 + maxLength: 10000 + barcode_contents: + type: string + docs: |- + The text representation of the data to show in the QR code + as UTF8-encoded data. validation: - maxLength: 192 - catalog_version: - type: optional> - docs: >- - The version of the catalog object that this line item modifier - references. + minLength: 1 + maxLength: 1024 + source: + openapi: openapi/openapi.json + QuickPay: + docs: >- + Describes an ad hoc item and price to generate a quick pay checkout link. + + For more information, + + see [Quick Pay + Checkout](https://developer.squareup.com/docs/checkout-api/quick-pay-checkout). + properties: name: - type: optional> - docs: The name of the item modifier. + type: string + docs: >- + The ad hoc item name. In the resulting `Order`, this name appears as + the line item name. validation: + minLength: 1 maxLength: 255 - base_price_money: - type: optional - docs: >- - The base price for the modifier. - - - `base_price_money` is required for ad hoc modifiers. - - If both `catalog_object_id` and `base_price_money` are set, - `base_price_money` overrides the predefined - [CatalogModifier](entity:CatalogModifier) price. - total_price_money: - type: optional + price_money: + type: Money + docs: The price of the item. + location_id: + type: string + docs: The ID of the business location the checkout is associated with. + source: + openapi: openapi/openapi.json + Range: + docs: The range of a number value between the specified lower and upper bounds. + properties: + min: + type: optional> docs: >- - The total price of the item modifier for its line item. + The lower bound of the number range. At least one of `min` or `max` + must be specified. - This is the modifier's `base_price_money` multiplied by the line - item's quantity. - quantity: + If unspecified, the results will have no minimum value. + max: type: optional> docs: >- - The quantity of the line item modifier. The modifier quantity can be 0 - or more. - - For example, suppose a restaurant offers a cheeseburger on the menu. - When a buyer orders - - this item, the restaurant records the purchase by creating an `Order` - object with a line item - - for a burger. The line item includes a line item modifier: the name is - cheese and the quantity + The upper bound of the number range. At least one of `min` or `max` + must be specified. - is 1. The buyer has the option to order extra cheese (or no cheese). - If the buyer chooses + If unspecified, the results will have no maximum value. + source: + openapi: openapi/openapi.json + ReceiptOptions: + docs: Describes receipt action fields. + properties: + payment_id: + type: string + docs: The reference to the Square payment ID for the receipt. + print_only: + type: optional> + docs: >- + Instructs the device to print the receipt without displaying the + receipt selection screen. - the extra cheese option, the modifier quantity increases to 2. If the - buyer does not want + Requires `printer_enabled` set to true. - any cheese, the modifier quantity is set to 0. + Defaults to false. + is_duplicate: + type: optional> + docs: |- + Identify the receipt as a reprint rather than an original receipt. + Defaults to false. source: openapi: openapi/openapi.json - OrderReturnServiceCharge: - docs: Represents the service charge applied to the original order. + RedeemLoyaltyRewardResponse: + docs: >- + A response that includes the `LoyaltyEvent` published for redeeming the + reward. properties: - uid: - type: optional> - docs: >- - A unique ID that identifies the return service charge only within this - order. + errors: + type: optional> + docs: Any errors that occurred during the request. + event: + type: optional + docs: The `LoyaltyEvent` for redeeming the reward. + source: + openapi: openapi/openapi.json + Refund: + docs: Represents a refund processed for a Square transaction. + properties: + id: + type: string + docs: The refund's unique ID. validation: - maxLength: 60 - source_service_charge_uid: - type: optional> - docs: |- - The service charge `uid` from the order containing the original - service charge. `source_service_charge_uid` is `null` for - unlinked returns. + maxLength: 255 + location_id: + type: string + docs: The ID of the refund's associated location. validation: - maxLength: 60 - name: + maxLength: 50 + transaction_id: type: optional> - docs: The name of the service charge. + docs: The ID of the transaction that the refunded tender is part of. validation: - maxLength: 255 - catalog_object_id: + maxLength: 192 + tender_id: type: optional> - docs: >- - The catalog object ID of the associated - [OrderServiceCharge](entity:OrderServiceCharge). + docs: The ID of the refunded tender. validation: maxLength: 192 - catalog_version: - type: optional> - docs: The version of the catalog object that this service charge references. - percentage: - type: optional> - docs: |- - The percentage of the service charge, as a string representation of - a decimal number. For example, a value of `"7.25"` corresponds to a - percentage of 7.25%. - - Either `percentage` or `amount_money` should be set, but not both. + created_at: + type: optional + docs: The timestamp for when the refund was created, in RFC 3339 format. validation: - maxLength: 10 + maxLength: 32 + access: read-only + reason: + type: string + docs: The reason for the refund being issued. + validation: + maxLength: 192 amount_money: - type: optional + type: Money + docs: The amount of money refunded to the buyer. + status: + type: RefundStatus docs: |- - The amount of a non-percentage-based service charge. - - Either `percentage` or `amount_money` should be set, but not both. - applied_money: - type: optional - docs: >- - The amount of money applied to the order by the service charge, - including - - any inclusive tax amounts, as calculated by Square. - - - - For fixed-amount service charges, `applied_money` is equal to - `amount_money`. - - - For percentage-based service charges, `applied_money` is the money - calculated using the percentage. - total_money: + The current status of the refund (`PENDING`, `APPROVED`, `REJECTED`, + or `FAILED`). + See [RefundStatus](#type-refundstatus) for possible values + processing_fee_money: type: optional + docs: The amount of Square processing fee money refunded to the *merchant*. + additional_recipients: + type: optional>> docs: >- - The total amount of money to collect for the service charge. - - - __NOTE__: If an inclusive tax is applied to the service charge, - `total_money` + Additional recipients (other than the merchant) receiving a portion of + this refund. - does not equal `applied_money` plus `total_tax_money` because the - inclusive + For example, fees assessed on a refund of a purchase by a third party + 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 - tax amount is already included in both `applied_money` and - `total_tax_money`. - total_tax_money: - type: optional - docs: The total amount of tax money to collect for the service charge. - calculation_phase: - type: optional - docs: >- - The calculation phase after which to apply the service charge. + [RefundPayment](api-endpoint:Refunds-RefundPayment). - See - [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) - for possible values - taxable: - type: optional> - docs: |- - Indicates whether the surcharge can be taxed. Service charges - calculated in the `TOTAL_PHASE` cannot be marked as taxable. - applied_taxes: - type: optional>> - docs: >- - The list of references to `OrderReturnTax` entities applied to the - `OrderReturnServiceCharge`. Each `OrderLineItemAppliedTax` has a - `tax_uid` + If there are errors processing the request, the `refund` field might not + be - that references the `uid` of a top-level `OrderReturnTax` that is - being + present, or it might be present with a status of `FAILED`. + properties: + errors: + type: optional> + docs: Information about errors encountered during the request. + refund: + type: optional + docs: The successfully created `PaymentRefund`. + source: + openapi: openapi/openapi.json + RefundStatus: + enum: + - PENDING + - APPROVED + - REJECTED + - FAILED + 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 - applied to the `OrderReturnServiceCharge`. On reads, the applied - amount is + a request to the [RegisterDomain](api-endpoint:ApplePay-RegisterDomain) + endpoint. - populated. - treatment_type: - type: optional - docs: >- - The treatment type of the service charge. - See - [OrderServiceChargeTreatmentType](#type-orderservicechargetreatmenttype) - for possible values - scope: - type: optional + Either `errors` or `status` are present in a given response (never both). + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + status: + type: optional docs: >- - Indicates the level at which the apportioned service charge applies. - For `ORDER` - - scoped service charges, Square generates references in - `applied_service_charges` on - - all order line items that do not have them. For `LINE_ITEM` scoped - service charges, - - the service charge only applies to line items with a service charge - reference in their - - `applied_service_charges` field. - + The status of the domain registration. - This field is immutable. To change the scope of an apportioned service - charge, you must delete - the apportioned service charge and re-add it as a new apportioned - service charge. + See + [RegisterDomainResponseStatus](entity:RegisterDomainResponseStatus) + for possible values. - See [OrderServiceChargeScope](#type-orderservicechargescope) for - possible values + See [RegisterDomainResponseStatus](#type-registerdomainresponsestatus) + for possible values source: openapi: openapi/openapi.json - OrderReturnTax: + RegisterDomainResponseStatus: + enum: + - PENDING + - VERIFIED + docs: The status of the domain registration. + source: + openapi: openapi/openapi.json + RemoveGroupFromCustomerResponse: docs: >- - Represents a tax being returned that applies to one or more return line - items in an order. - + Defines the fields that are included in the response body of - Fixed-amount, order-scoped taxes are distributed across all non-zero - return line item totals. + a request to the + [RemoveGroupFromCustomer](api-endpoint:Customers-RemoveGroupFromCustomer) - The amount distributed to each return line item is relative to that item’s - contribution to the + endpoint. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + ResumeSubscriptionResponse: + docs: >- + Defines output parameters in a response from the - order subtotal. + [ResumeSubscription](api-endpoint:Subscriptions-ResumeSubscription) + endpoint. properties: - uid: - type: optional> - docs: A unique ID that identifies the returned tax only within this order. - validation: - maxLength: 60 - source_tax_uid: - type: optional> - docs: The tax `uid` from the order that contains the original tax charge. - validation: - maxLength: 60 - catalog_object_id: - type: optional> - docs: The catalog object ID referencing [CatalogTax](entity:CatalogTax). - validation: - maxLength: 192 - catalog_version: - type: optional> - docs: The version of the catalog object that this tax references. - name: - type: optional> - docs: The tax's name. - validation: - maxLength: 255 - type: - type: optional + errors: + type: optional> + docs: Errors encountered during the request. + subscription: + type: optional + docs: The resumed subscription. + actions: + type: optional> docs: >- - Indicates the calculation method used to apply the tax. + A list of `RESUME` actions created by the request and scheduled for + the subscription. + source: + openapi: openapi/openapi.json + RetrieveBookingCustomAttributeDefinitionResponse: + docs: >- + Represents a + [RetrieveBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-RetrieveBookingCustomAttributeDefinition) + response. - See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible - values - percentage: - type: optional> - docs: >- - The percentage of the tax, as a string representation of a decimal - number. + Either `custom_attribute_definition` or `errors` is present in the + response. + properties: + custom_attribute_definition: + type: optional + docs: The retrieved custom attribute definition. + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + RetrieveBookingCustomAttributeResponse: + docs: >- + Represents a + [RetrieveBookingCustomAttribute](api-endpoint:BookingCustomAttributes-RetrieveBookingCustomAttribute) + response. - For example, a value of `"7.25"` corresponds to a percentage of 7.25%. - validation: - maxLength: 10 - applied_money: - type: optional - docs: The amount of money applied by the tax in an order. - scope: - type: optional + Either `custom_attribute_definition` or `errors` is present in the + response. + properties: + custom_attribute: + type: optional docs: >- - Indicates the level at which the `OrderReturnTax` applies. For `ORDER` - scoped + The retrieved custom attribute. If `with_definition` was set to `true` + in the request, - taxes, Square generates references in `applied_taxes` on all + the custom attribute definition is returned in the `definition` field. + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + GetBookingResponse: + properties: + booking: + type: optional + docs: The booking that was requested. + errors: + type: optional> + docs: Errors that occurred during the request. + source: + openapi: openapi/openapi.json + GetBusinessBookingProfileResponse: + properties: + business_booking_profile: + type: optional + docs: The seller's booking profile. + errors: + type: optional> + docs: Errors that occurred during the request. + source: + openapi: openapi/openapi.json + GetCardResponse: + docs: >- + Defines the fields that are included in the response body of - `OrderReturnLineItem`s. For `LINE_ITEM` scoped taxes, the tax is only - applied to + a request to the [RetrieveCard](api-endpoint:Cards-RetrieveCard) endpoint. - `OrderReturnLineItem`s with references in their `applied_discounts` - field. - See [OrderLineItemTaxScope](#type-orderlineitemtaxscope) for possible - values + 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 - OrderReturnTip: - docs: A tip being returned. + GetCashDrawerShiftResponse: properties: - uid: - type: optional> - docs: A unique ID that identifies the tip only within this order. - validation: - maxLength: 60 - applied_money: - type: optional - docs: |- - The amount of tip being returned - -- - source_tender_uid: - type: optional> - docs: >- - The tender `uid` from the order that contains the original application - of this tip. - validation: - maxLength: 192 - source_tender_id: - type: optional> - docs: >- - The tender `id` from the order that contains the original application - of this tip. - validation: - maxLength: 192 + cash_drawer_shift: + type: optional + docs: The cash drawer shift queried for. + errors: + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - OrderReward: - docs: |- - Represents a reward that can be applied to an order if the necessary - reward tier criteria are met. Rewards are created through the Loyalty API. + GetCatalogObjectResponse: properties: - id: - type: string - docs: The identifier of the reward. - validation: - minLength: 1 - reward_tier_id: - type: string - docs: The identifier of the reward tier corresponding to this reward. - validation: - minLength: 1 + errors: + type: optional> + docs: Any errors that occurred during the request. + object: + type: optional + docs: The `CatalogObject`s returned. + related_objects: + type: optional> + docs: >- + A list of `CatalogObject`s referenced by the object in the `object` + field. source: openapi: openapi/openapi.json - OrderRoundingAdjustment: + GetCustomerCustomAttributeDefinitionResponse: docs: >- - A rounding adjustment of the money being returned. Commonly used to apply - cash rounding + Represents a + [RetrieveCustomerCustomAttributeDefinition](api-endpoint:CustomerCustomAttributes-RetrieveCustomerCustomAttributeDefinition) + response. - when the minimum unit of the account is smaller than the lowest physical - denomination of the currency. + Either `custom_attribute_definition` or `errors` is present in the + response. properties: - uid: - type: optional> - docs: >- - A unique ID that identifies the rounding adjustment only within this - order. - validation: - maxLength: 60 - name: - type: optional> - docs: The name of the rounding adjustment from the original sale order. - amount_money: - type: optional - docs: The actual rounding adjustment amount. + custom_attribute_definition: + type: optional + docs: The retrieved custom attribute definition. + errors: + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - OrderServiceCharge: - docs: Represents a service charge applied to an order. - properties: - uid: - type: optional> - docs: A unique ID that identifies the service charge only within this order. - validation: - maxLength: 60 - name: - type: optional> - docs: The name of the service charge. - validation: - maxLength: 512 - catalog_object_id: - type: optional> - docs: >- - The catalog object ID referencing the service charge - [CatalogObject](entity:CatalogObject). - validation: - maxLength: 192 - catalog_version: - type: optional> - docs: The version of the catalog object that this service charge references. - percentage: - type: optional> - docs: >- - The service charge percentage as a string representation of a - - decimal number. For example, `"7.25"` indicates a service charge of - 7.25%. - - - Exactly 1 of `percentage` or `amount_money` should be set. - validation: - maxLength: 10 - amount_money: - type: optional - docs: |- - The amount of a non-percentage-based service charge. - - Exactly one of `percentage` or `amount_money` should be set. - applied_money: - type: optional - docs: >- - The amount of money applied to the order by the service charge, - - including any inclusive tax amounts, as calculated by Square. - - - - For fixed-amount service charges, `applied_money` is equal to - `amount_money`. - - - For percentage-based service charges, `applied_money` is the money - - calculated using the percentage. - total_money: - type: optional - docs: |- - The total amount of money to collect for the service charge. - - __Note__: If an inclusive tax is applied to the service charge, - `total_money` does not equal `applied_money` plus `total_tax_money` - because the inclusive tax amount is already included in both - `applied_money` and `total_tax_money`. - total_tax_money: - type: optional - docs: The total amount of tax money to collect for the service charge. - calculation_phase: - type: optional - docs: >- - The calculation phase at which to apply the service charge. - - See - [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) - for possible values - taxable: - type: optional> - docs: >- - Indicates whether the service charge can be taxed. If set to `true`, - - order-level taxes automatically apply to the service charge. Note that + GetCustomerCustomAttributeResponse: + docs: >- + Represents a + [RetrieveCustomerCustomAttribute](api-endpoint:CustomerCustomAttributes-RetrieveCustomerCustomAttribute) + response. - service charges calculated in the `TOTAL_PHASE` cannot be marked as - taxable. - applied_taxes: - type: optional>> + Either `custom_attribute_definition` or `errors` is present in the + response. + properties: + custom_attribute: + type: optional docs: >- - The list of references to the taxes applied to this service charge. - Each - - `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of - a top-level - - `OrderLineItemTax` that is being applied to this service charge. On - reads, the amount applied - - is populated. + The retrieved custom attribute. If `with_definition` was set to `true` + in the request, + the custom attribute definition is returned in the `definition` field. + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + GetCustomerGroupResponse: + docs: >- + Defines the fields that are included in the response body of - An `OrderLineItemAppliedTax` is automatically created on every taxable - service charge + a request to the + [RetrieveCustomerGroup](api-endpoint:CustomerGroups-RetrieveCustomerGroup) + endpoint. - for all `ORDER` scoped taxes that are added to the order. - `OrderLineItemAppliedTax` records - for `LINE_ITEM` scoped taxes must be added in requests for the tax to - apply to any taxable + Either `errors` or `group` is present in a given response (never both). + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + group: + type: optional + docs: The retrieved customer group. + source: + openapi: openapi/openapi.json + GetCustomerResponse: + docs: |- + Defines the fields that are included in the response body of + a request to the `RetrieveCustomer` endpoint. - service charge. Taxable service charges have the `taxable` field set - to `true` and calculated + Either `errors` or `customer` is present in a given response (never both). + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + customer: + type: optional + docs: The requested customer. + source: + openapi: openapi/openapi.json + GetCustomerSegmentResponse: + docs: >- + Defines the fields that are included in the response body for requests to + the `RetrieveCustomerSegment` endpoint. - in the `SUBTOTAL_PHASE`. + Either `errors` or `segment` is present in a given response (never both). + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + segment: + type: optional + docs: The retrieved customer segment. + source: + openapi: openapi/openapi.json + GetDisputeEvidenceResponse: + docs: Defines the fields in a `RetrieveDisputeEvidence` response. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + evidence: + type: optional + docs: Metadata about the dispute evidence file. + source: + openapi: openapi/openapi.json + GetDisputeResponse: + docs: Defines fields in a `RetrieveDispute` response. + properties: + errors: + type: optional> + docs: Information about errors encountered during the request. + dispute: + type: optional + docs: Details about the requested `Dispute`. + source: + openapi: openapi/openapi.json + GetEmployeeResponse: + properties: + employee: optional + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + GetGiftCardFromGANResponse: + docs: >- + A response that contains a `GiftCard`. This response might contain a set + of `Error` objects - To change the amount of a tax, modify the referenced top-level tax. - metadata: - type: optional>>>> + if the request resulted in errors. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + gift_card: + type: optional docs: >- - Application-defined data attached to this service charge. Metadata - fields are intended - - to store descriptive references or associations with an entity in - another system or store brief - - information about the object. Square does not process this field; it - only stores and returns it - - in relevant API calls. Do not use metadata to store any sensitive - information (such as personally + A gift card that was fetched, if present. It returns empty if an error + occurred. + source: + openapi: openapi/openapi.json + GetGiftCardFromNonceResponse: + docs: >- + A response that contains a `GiftCard` object. If the request resulted in + errors, - identifiable information or card details). + the response contains a set of `Error` objects. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + gift_card: + type: optional + docs: The retrieved gift card. + source: + openapi: openapi/openapi.json + GetGiftCardResponse: + docs: >- + A response that contains a `GiftCard`. The response might contain a set of + `Error` objects + if the request resulted in errors. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + gift_card: + type: optional + docs: The gift card retrieved. + source: + openapi: openapi/openapi.json + GetInventoryAdjustmentResponse: + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + adjustment: + type: optional + docs: The requested [InventoryAdjustment](entity:InventoryAdjustment). + source: + openapi: openapi/openapi.json + GetInventoryChangesResponse: + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + changes: + type: optional> + docs: The set of inventory changes for the requested object and locations. + cursor: + type: optional + docs: >- + The pagination cursor to be used in a subsequent request. If unset, - Keys written by applications must be 60 characters or less and must be - in the character set + this is the final response. - `[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. + See the + [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) + guide for more information. + source: + openapi: openapi/openapi.json + GetInventoryCountResponse: + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + counts: + type: optional> + docs: |- + The current calculated inventory counts for the requested object and + locations. + cursor: + type: optional + docs: >- + The pagination cursor to be used in a subsequent request. If unset, + this is the final response. - Values have a maximum length of 255 characters. + See the + [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) + guide for more information. + source: + openapi: openapi/openapi.json + GetInventoryPhysicalCountResponse: + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + count: + type: optional + docs: The requested [InventoryPhysicalCount](entity:InventoryPhysicalCount). + source: + openapi: openapi/openapi.json + GetInventoryTransferResponse: + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + transfer: + type: optional + docs: The requested [InventoryTransfer](entity:InventoryTransfer). + source: + openapi: openapi/openapi.json + RetrieveJobResponse: + docs: >- + Represents a [RetrieveJob](api-endpoint:Team-RetrieveJob) response. Either + `job` or `errors` - An application can have up to 10 entries per metadata field. + is present in the response. + properties: + job: + type: optional + docs: The retrieved job. + errors: + type: optional> + docs: The errors that occurred during the request. + source: + openapi: openapi/openapi.json + RetrieveLocationBookingProfileResponse: + properties: + location_booking_profile: + type: optional + docs: The requested location booking profile. + errors: + type: optional> + docs: Errors that occurred during the request. + source: + openapi: openapi/openapi.json + RetrieveLocationCustomAttributeDefinitionResponse: + docs: >- + Represents a + [RetrieveLocationCustomAttributeDefinition](api-endpoint:LocationCustomAttributes-RetrieveLocationCustomAttributeDefinition) + response. + Either `custom_attribute_definition` or `errors` is present in the + response. + properties: + custom_attribute_definition: + type: optional + docs: The retrieved custom attribute definition. + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + RetrieveLocationCustomAttributeResponse: + docs: >- + Represents a + [RetrieveLocationCustomAttribute](api-endpoint:LocationCustomAttributes-RetrieveLocationCustomAttribute) + response. - Entries written by applications are private and can only be read or - modified by the same + Either `custom_attribute_definition` or `errors` is present in the + response. + properties: + custom_attribute: + type: optional + docs: >- + The retrieved custom attribute. If `with_definition` was set to `true` + in the request, - application. + the custom attribute definition is returned in the `definition` field. + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + GetLocationResponse: + docs: >- + Defines the fields that the + [RetrieveLocation](api-endpoint:Locations-RetrieveLocation) + endpoint returns in a response. + properties: + errors: + type: optional> + docs: Information about errors encountered during the request. + location: + type: optional + docs: The requested location. + source: + openapi: openapi/openapi.json + RetrieveLocationSettingsResponse: + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + location_settings: + type: optional + docs: The location settings. + source: + openapi: openapi/openapi.json + GetLoyaltyAccountResponse: + docs: A response that includes the loyalty account. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + loyalty_account: + type: optional + docs: The loyalty account. + source: + openapi: openapi/openapi.json + GetLoyaltyProgramResponse: + docs: A response that contains the loyalty program. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + program: + type: optional + docs: The loyalty program that was requested. + source: + openapi: openapi/openapi.json + GetLoyaltyPromotionResponse: + docs: >- + Represents a + [RetrieveLoyaltyPromotionPromotions](api-endpoint:Loyalty-RetrieveLoyaltyPromotion) + response. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + loyalty_promotion: + type: optional + docs: The retrieved loyalty promotion. + source: + openapi: openapi/openapi.json + GetLoyaltyRewardResponse: + docs: A response that includes the loyalty reward. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + reward: + type: optional + docs: The loyalty reward retrieved. + source: + openapi: openapi/openapi.json + RetrieveMerchantCustomAttributeDefinitionResponse: + docs: >- + Represents a + [RetrieveMerchantCustomAttributeDefinition](api-endpoint:MerchantCustomAttributes-RetrieveMerchantCustomAttributeDefinition) + response. - For more information, see - [Metadata](https://developer.squareup.com/docs/build-basics/metadata). - type: - type: optional - docs: >- - The type of the service charge. + Either `custom_attribute_definition` or `errors` is present in the + response. + properties: + custom_attribute_definition: + type: optional + docs: The retrieved custom attribute definition. + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + RetrieveMerchantCustomAttributeResponse: + docs: >- + Represents a + [RetrieveMerchantCustomAttribute](api-endpoint:MerchantCustomAttributes-RetrieveMerchantCustomAttribute) + response. - See [OrderServiceChargeType](#type-orderservicechargetype) for - possible values - treatment_type: - type: optional + Either `custom_attribute_definition` or `errors` is present in the + response. + properties: + custom_attribute: + type: optional docs: >- - The treatment type of the service charge. + The retrieved custom attribute. If `with_definition` was set to `true` + in the request, - See - [OrderServiceChargeTreatmentType](#type-orderservicechargetreatmenttype) - for possible values - scope: - type: optional + the custom attribute definition is returned in the `definition` field. + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + GetMerchantResponse: + docs: >- + The response object returned by the + [RetrieveMerchant](api-endpoint:Merchants-RetrieveMerchant) endpoint. + properties: + errors: + type: optional> + docs: Information on errors encountered during the request. + merchant: + type: optional + docs: The requested `Merchant` object. + source: + openapi: openapi/openapi.json + RetrieveMerchantSettingsResponse: + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + merchant_settings: + type: optional + docs: The merchant settings. + source: + openapi: openapi/openapi.json + RetrieveOrderCustomAttributeDefinitionResponse: + docs: Represents a response from getting an order custom attribute definition. + properties: + custom_attribute_definition: + type: optional + docs: The retrieved custom attribute definition. + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + RetrieveOrderCustomAttributeResponse: + docs: Represents a response from getting an order custom attribute. + properties: + custom_attribute: + type: optional docs: >- - Indicates the level at which the apportioned service charge applies. - For `ORDER` - - scoped service charges, Square generates references in - `applied_service_charges` on - - all order line items that do not have them. For `LINE_ITEM` scoped - service charges, - - the service charge only applies to line items with a service charge - reference in their - - `applied_service_charges` field. - - - This field is immutable. To change the scope of an apportioned service - charge, you must delete - - the apportioned service charge and re-add it as a new apportioned - service charge. + The retrieved custom attribute. If `with_definition` was set to `true` + in the request, the custom attribute definition is returned in the + `definition field. + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + GetOrderResponse: + properties: + order: + type: optional + docs: The requested order. + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + GetPaymentLinkResponse: + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + payment_link: + type: optional + docs: The payment link that is retrieved. + source: + openapi: openapi/openapi.json + RetrieveScheduledShiftResponse: + docs: >- + Represents a + [RetrieveScheduledShift](api-endpoint:Labor-RetrieveScheduledShift) + response. - See [OrderServiceChargeScope](#type-orderservicechargescope) for - possible values + Either `scheduled_shift` or `errors` is present in the response. + properties: + scheduled_shift: + type: optional + docs: The requested scheduled shift. + errors: + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - OrderServiceChargeCalculationPhase: - enum: - - SUBTOTAL_PHASE - - TOTAL_PHASE - - APPORTIONED_PERCENTAGE_PHASE - - APPORTIONED_AMOUNT_PHASE + GetSnippetResponse: docs: >- - Represents a phase in the process of calculating order totals. + Represents a `RetrieveSnippet` response. The response can include either + `snippet` or `errors`. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + snippet: + type: optional + docs: The retrieved snippet. + source: + openapi: openapi/openapi.json + GetSubscriptionResponse: + docs: >- + Defines output parameters in a response from the - Service charges are applied after the indicated phase. + [RetrieveSubscription](api-endpoint:Subscriptions-RetrieveSubscription) + endpoint. + properties: + errors: + type: optional> + docs: Errors encountered during the request. + subscription: + type: optional + docs: The subscription retrieved. + source: + openapi: openapi/openapi.json + GetTeamMemberBookingProfileResponse: + properties: + team_member_booking_profile: + type: optional + docs: The returned team member booking profile. + errors: + type: optional> + docs: Errors that occurred during the request. + source: + openapi: openapi/openapi.json + GetTeamMemberResponse: + docs: >- + Represents a response from a retrieve request containing a `TeamMember` + object or error messages. + properties: + team_member: + type: optional + docs: The successfully retrieved `TeamMember` object. + errors: + type: optional> + docs: The errors that occurred during the request. + source: + openapi: openapi/openapi.json + RetrieveTimecardResponse: + docs: >- + A response to a request to get a `Timecard`. The response contains + the requested `Timecard` object and might contain a set of `Error` objects + if - [Read more about how order totals are - calculated.](https://developer.squareup.com/docs/orders-api/how-it-works#how-totals-are-calculated) + the request resulted in errors. + properties: + timecard: + type: optional + docs: The requested `Timecard`. + errors: + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - OrderServiceChargeScope: - enum: - - OTHER_SERVICE_CHARGE_SCOPE - - LINE_ITEM - - ORDER + RetrieveTokenStatusResponse: docs: |- - Indicates whether this is a line-item or order-level apportioned - service charge. + Defines the fields that are included in the response body of + a request to the `RetrieveTokenStatus` endpoint. + properties: + scopes: + type: optional> + docs: The list of scopes associated with an access token. + expires_at: + type: optional + docs: "The date and time when the\_`access_token`\_expires, in RFC 3339 format. Empty if the token never expires." + client_id: + type: optional + docs: >- + The Square-issued application ID associated with the access token. + This is the same application ID used to obtain the token. + validation: + maxLength: 191 + merchant_id: + type: optional + docs: The ID of the authorizing merchant's business. + validation: + minLength: 8 + maxLength: 191 + errors: + type: optional> + docs: ' Any errors that occurred during the request.' source: openapi: openapi/openapi.json - OrderServiceChargeTreatmentType: - enum: - - LINE_ITEM_TREATMENT - - APPORTIONED_TREATMENT + GetTransactionResponse: docs: >- - Indicates whether the service charge will be treated as a value-holding - line item or + Defines the fields that are included in the response body of - apportioned toward a line item. - source: - openapi: openapi/openapi.json - OrderServiceChargeType: - enum: - - AUTO_GRATUITY - - CUSTOM + a request to the + [RetrieveTransaction](api-endpoint:Transactions-RetrieveTransaction) + endpoint. + + + One of `errors` or `transaction` is present in a given response (never + both). + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + transaction: + type: optional + docs: The requested transaction. source: openapi: openapi/openapi.json - OrderSource: - docs: Represents the origination details of an order. + GetVendorResponse: + docs: >- + Represents an output from a call to + [RetrieveVendor](api-endpoint:Vendors-RetrieveVendor). properties: - name: - type: optional> - docs: >- - The name used to identify the place (physical or digital) that an - order originates. - - If unset, the name defaults to the name of the application that - created the order. + errors: + type: optional> + docs: Errors encountered when the request fails. + vendor: + type: optional + docs: The successfully retrieved [Vendor](entity:Vendor) object. source: openapi: openapi/openapi.json - OrderState: - enum: - - OPEN - - COMPLETED - - CANCELED - - DRAFT - docs: The state of the order. + GetWageSettingResponse: + docs: >- + Represents a response from a retrieve request containing the specified + `WageSetting` object or error messages. + properties: + wage_setting: + type: optional + docs: The successfully retrieved `WageSetting` object. + errors: + type: optional> + docs: The errors that occurred during the request. source: openapi: openapi/openapi.json - PauseSubscriptionResponse: + GetWebhookSubscriptionResponse: docs: >- - Defines output parameters in a response from the + Defines the fields that are included in the response body of - [PauseSubscription](api-endpoint:Subscriptions-PauseSubscription) + a request to the + [RetrieveWebhookSubscription](api-endpoint:WebhookSubscriptions-RetrieveWebhookSubscription) endpoint. + + + Note: if there are errors processing the request, the + [Subscription](entity:WebhookSubscription) will not be + + present. properties: errors: type: optional> - docs: Errors encountered during the request. + docs: Information on errors encountered during the request. subscription: - type: optional - docs: The subscription to be paused by the scheduled `PAUSE` action. - actions: - type: optional> - docs: >- - The list of a `PAUSE` action and a possible `RESUME` action created by - the request. + type: optional + docs: The requested [Subscription](entity:WebhookSubscription). source: openapi: openapi/openapi.json - PayOrderResponse: - docs: >- - Defines the fields that are included in the response body of a request to - the - - [PayOrder](api-endpoint:Orders-PayOrder) endpoint. + RevokeTokenResponse: properties: + success: + type: optional + docs: If the request is successful, this is `true`. errors: type: optional> docs: Any errors that occurred during the request. - order: - type: optional - docs: The paid, updated [order](entity:Order). source: openapi: openapi/openapi.json - Payment: - docs: Represents a payment processed by the Square API. - properties: - id: - type: optional - docs: A unique ID for the payment. - validation: - maxLength: 192 - access: read-only - created_at: - type: optional - docs: The timestamp of when the payment was created, in RFC 3339 format. - validation: - maxLength: 32 - access: read-only - updated_at: - type: optional - docs: >- - The timestamp of when the payment was last updated, in RFC 3339 - format. - validation: - maxLength: 32 - access: read-only - amount_money: - type: optional - docs: >- - The amount processed for this payment, not including `tip_money`. - - - The amount is specified in the smallest denomination of the applicable - currency (for example, - - US dollar amounts are specified in cents). For more information, see + RiskEvaluation: + docs: >- + Represents fraud risk information for the associated payment. - [Working with Monetary - Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). - tip_money: - type: optional - docs: >- - The amount designated as a tip. + When you take a payment through Square's Payments API (using the + `CreatePayment` - This amount is specified in the smallest denomination of the - applicable currency (for example, + endpoint), Square evaluates it and assigns a risk level to the payment. + Sellers - US dollar amounts are specified in cents). For more information, see + can use this information to determine the course of action (for example, - [Working with Monetary - Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). - total_money: - type: optional + provide the goods/services or refund the payment). + properties: + created_at: + type: optional + docs: The timestamp when payment risk was evaluated, in RFC 3339 format. + access: read-only + risk_level: + type: optional docs: >- - The total amount for the payment, including `amount_money` and - `tip_money`. - - This amount is specified in the smallest denomination of the - applicable currency (for example, - - US dollar amounts are specified in cents). For more information, see + The risk level associated with the payment - [Working with Monetary - Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). - app_fee_money: - type: optional + See [RiskEvaluationRiskLevel](#type-riskevaluationrisklevel) for + possible values + source: + openapi: openapi/openapi.json + RiskEvaluationRiskLevel: + enum: + - PENDING + - NORMAL + - MODERATE + - HIGH + source: + openapi: openapi/openapi.json + SaveCardOptions: + docs: Describes save-card action fields. + properties: + customer_id: + type: string + docs: The square-assigned ID of the customer linked to the saved card. + card_id: + type: optional + docs: The id of the created card-on-file. + validation: + maxLength: 64 + access: read-only + reference_id: + type: optional> docs: >- - The amount the developer is taking as a fee for facilitating the - payment on behalf - - of the seller. This amount is specified in the smallest denomination - of the applicable currency - - (for example, US dollar amounts are specified in cents). For more - information, - - see [Take Payments and Collect - Fees](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees). - + An optional user-defined reference ID that can be used to associate - The amount cannot be more than 90% of the `total_money` value. + this `Card` to another entity in an external system. For example, a + customer + ID generated by a third-party system. + validation: + maxLength: 128 + source: + openapi: openapi/openapi.json + ScheduledShift: + docs: >- + Represents a specific time slot in a work schedule. This object is used to + manage the - To set this field, `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth - permission is required. + lifecycle of a scheduled shift from the draft to published state. A + scheduled shift contains - For more information, see - [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions). - approved_money: - type: optional + the latest draft shift details and current published shift details. + properties: + id: + type: optional + docs: '**Read only** The Square-issued ID of the scheduled shift.' + validation: + maxLength: 255 + draft_shift_details: + type: optional docs: >- - The amount of money approved for this payment. This value may change - if Square chooses to + The latest draft shift details for the scheduled shift. Draft shift + details are used to - obtain reauthorization as part of a call to - [UpdatePayment](api-endpoint:Payments-UpdatePayment). - processing_fee: - type: optional> - docs: >- - The processing fees and fee adjustments assessed by Square for this - payment. - access: read-only - refunded_money: - type: optional + stage and manage shifts before publishing. This field is always + present. + published_shift_details: + type: optional docs: >- - The total amount of the payment refunded to date. + The current published (public) shift details for the scheduled shift. + This field is + present only if the shift was published. + version: + type: optional + docs: >- + **Read only** The current version of the scheduled shift, which is + incremented with each update. - This amount is specified in the smallest denomination of the - applicable currency (for example, + This field is used for [optimistic + concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) - US dollar amounts are specified in cents). - status: + control to ensure that requests don't overwrite data from another + request. + created_at: type: optional docs: >- - Indicates whether the payment is APPROVED, PENDING, COMPLETED, - CANCELED, or FAILED. - validation: - maxLength: 50 + The timestamp of when the scheduled shift was created, in RFC 3339 + format presented as UTC. access: read-only - delay_duration: + updated_at: type: optional docs: >- - The duration of time after the payment's creation when Square - automatically applies the - - `delay_action` to the payment. This automatic `delay_action` applies - only to payments that - - do not reach a terminal state (COMPLETED, CANCELED, or FAILED) before - the `delay_duration` - - time period. - - - This field is specified as a time duration, in RFC 3339 format. - - - Notes: - - This feature is only supported for card payments. - - - Default: - - - - Card-present payments: "PT36H" (36 hours) from the creation time. - - - Card-not-present payments: "P7D" (7 days) from the creation time. + The timestamp of when the scheduled shift was last updated, in RFC + 3339 format presented as UTC. access: read-only - delay_action: + source: + openapi: openapi/openapi.json + ScheduledShiftDetails: + docs: >- + Represents shift details for draft and published versions of a [scheduled + shift](entity:ScheduledShift), + + such as job ID, team member assignment, and start and end times. + properties: + team_member_id: type: optional> docs: >- - The action to be applied to the payment when the `delay_duration` has - elapsed. + The ID of the [team member](entity:TeamMember) scheduled for the + shift. + validation: + maxLength: 255 + location_id: + type: optional> + docs: The ID of the [location](entity:Location) the shift is scheduled for. + validation: + maxLength: 255 + job_id: + type: optional> + docs: The ID of the [job](entity:Job) the shift is scheduled for. + start_at: + type: optional> + docs: >- + The start time of the shift, in RFC 3339 format in the time zone + + + offset of the shift location specified in `location_id`. Precision up + to the minute - Current values include `CANCEL` and `COMPLETE`. - delayed_until: - type: optional + is respected; seconds are truncated. + end_at: + type: optional> docs: >- - The read-only timestamp of when the `delay_action` is automatically - applied, - - in RFC 3339 format. + The end time for the shift, in RFC 3339 format in the time zone + + offset of the shift location specified in `location_id`. Precision up + to the minute - Note that this field is calculated by summing the payment's - `delay_duration` and `created_at` + is respected; seconds are truncated. + notes: + type: optional> + docs: Optional notes for the shift. + validation: + maxLength: 1000 + is_deleted: + type: optional> + docs: >- + Indicates whether the draft shift version is deleted. If set to `true` + when the shift - fields. The `created_at` field is generated by Square and might not - exactly match the + is published, the entire scheduled shift (including the published + shift) is deleted and - time on your local machine. - access: read-only - source_type: + cannot be accessed using any endpoint. + timezone: type: optional docs: >- - The source type for this payment. - - - Current values include `CARD`, `BANK_ACCOUNT`, `WALLET`, - `BUY_NOW_PAY_LATER`, `SQUARE_ACCOUNT`, - - `CASH` and `EXTERNAL`. For information about these payment source - types, + The time zone of the shift location, calculated based on the + `location_id`. This field - see [Take - Payments](https://developer.squareup.com/docs/payments-api/take-payments). - validation: - maxLength: 50 + is provided for convenience. access: read-only - card_details: - type: optional - docs: >- - Details about a card payment. These details are only populated if the - source_type is `CARD`. - cash_details: - type: optional - docs: >- - Details about a cash payment. These details are only populated if the - source_type is `CASH`. - bank_account_details: - type: optional - docs: >- - Details about a bank account payment. These details are only populated - if the source_type is `BANK_ACCOUNT`. - external_details: - type: optional - docs: |- - Details about an external payment. The details are only populated - if the `source_type` is `EXTERNAL`. - wallet_details: - type: optional - docs: |- - Details about an wallet payment. The details are only populated - if the `source_type` is `WALLET`. - buy_now_pay_later_details: - type: optional + source: + openapi: openapi/openapi.json + ScheduledShiftFilter: + docs: >- + Defines filter criteria for a + [SearchScheduledShifts](api-endpoint:Labor-SearchScheduledShifts) + + request. Multiple filters in a query are combined as an `AND` operation. + properties: + location_ids: + type: optional>> docs: >- - Details about a Buy Now Pay Later payment. The details are only - populated + Return shifts for the specified locations. When omitted, shifts for + all - if the `source_type` is `BUY_NOW_PAY_LATER`. For more information, - see + locations are returned. If needed, call + [ListLocations](api-endpoint:Locations-ListLocations) - [Afterpay - Payments](https://developer.squareup.com/docs/payments-api/take-payments/afterpay-payments). - square_account_details: - type: optional + to get location IDs. + start: + type: optional docs: |- - Details about a Square Account payment. The details are only populated - if the `source_type` is `SQUARE_ACCOUNT`. - location_id: - type: optional - docs: The ID of the location associated with the payment. - validation: - maxLength: 50 - access: read-only - order_id: - type: optional - docs: The ID of the order associated with the payment. - validation: - maxLength: 192 - access: read-only - reference_id: - type: optional + Return shifts whose `start_at` time is within the specified + time range (inclusive). + end: + type: optional docs: |- - An optional ID that associates the payment with an entity in - another system. - validation: - maxLength: 40 - access: read-only - customer_id: - type: optional + Return shifts whose `end_at` time is within the specified + time range (inclusive). + workday: + type: optional + docs: Return shifts based on a workday date range. + team_member_ids: + type: optional>> docs: >- - The ID of the customer associated with the payment. If the ID is - - not provided in the `CreatePayment` request that was used to create - the `Payment`, - - Square may use information in the request - - (such as the billing and shipping address, email address, and payment - source) - - to identify a matching customer profile in the Customer Directory. + Return shifts assigned to specified team members. If needed, call - If found, the profile ID is used. If a profile is not found, the + [SearchTeamMembers](api-endpoint:Team-SearchTeamMembers) to get team + member IDs. - API attempts to create an - [instant - profile](https://developer.squareup.com/docs/customers-api/what-it-does#instant-profiles). + To return only the shifts assigned to the specified team members, + include the - If the API cannot create an + `assignment_status` filter in the query. Otherwise, all unassigned + shifts are - instant profile (either because the seller has disabled it or the + returned along with shifts assigned to the specified team members. + assignment_status: + type: optional + docs: >- + Return shifts based on whether a team member is assigned. A shift is - seller's region prevents creating it), this field remains unset. Note - that + assigned if the `team_member_id` field is populated in the + `draft_shift_details` - this process is asynchronous and it may take some time before a + or `published_shift details` field of the shift. - customer ID is added to the payment. - validation: - maxLength: 191 - access: read-only - employee_id: - type: optional - docs: |- - __Deprecated__: Use `Payment.team_member_id` instead. - An optional ID of the employee associated with taking the payment. - validation: - maxLength: 192 - access: read-only - team_member_id: - type: optional> - docs: >- - An optional ID of the [TeamMember](entity:TeamMember) associated with - taking the payment. - validation: - maxLength: 192 - refund_ids: - type: optional> - docs: A list of `refund_id`s identifying refunds for the payment. - access: read-only - risk_evaluation: - type: optional - docs: >- - Provides information about the risk associated with the payment, as - determined by Square. + To return only draft or published shifts, include the + `scheduled_shift_statuses` - This field is present for payments to sellers that have opted in to - receive risk + filter in the query. - evaluations. - terminal_checkout_id: - type: optional - docs: >- - An optional ID for a Terminal checkout that is associated with the - payment. - access: read-only - buyer_email_address: - type: optional - docs: The buyer's email address. - validation: - maxLength: 255 - access: read-only - billing_address: - type: optional
- docs: The buyer's billing address. - shipping_address: - type: optional
- docs: The buyer's shipping address. - note: - type: optional - docs: An optional note to include when creating a payment. - validation: - maxLength: 500 - access: read-only - statement_description_identifier: - type: optional + See + [ScheduledShiftFilterAssignmentStatus](#type-scheduledshiftfilterassignmentstatus) + for possible values + scheduled_shift_statuses: + type: optional>> docs: >- - Additional payment information that gets added to the customer's card - statement - - as part of the statement description. + Return shifts based on the draft or published status of the shift. + A shift is published if the `published_shift_details` field is + present. - Note that the `statement_description_identifier` might get truncated - on the statement description - to fit the required information including the Square identifier (SQ *) - and the name of the + Note that shifts with `draft_shift_details.is_deleted` set to `true` + are ignored - seller taking the payment. - access: read-only - capabilities: - type: optional> - docs: |- - Actions that can be performed on this payment: - - `EDIT_AMOUNT_UP` - The payment amount can be edited up. - - `EDIT_AMOUNT_DOWN` - The payment amount can be edited down. - - `EDIT_TIP_AMOUNT_UP` - The tip amount can be edited up. - - `EDIT_TIP_AMOUNT_DOWN` - The tip amount can be edited down. - - `EDIT_DELAY_ACTION` - The delay_action can be edited. - access: read-only - receipt_number: - type: optional - docs: |- - The payment's receipt number. - The field is missing if a payment is canceled. - validation: - maxLength: 4 - access: read-only - receipt_url: - type: optional - docs: |- - The URL for the payment's receipt. - The field is only populated for COMPLETED payments. - validation: - maxLength: 255 - access: read-only - device_details: - type: optional - docs: Details about the device that took the payment. - application_details: - type: optional - docs: Details about the application that took the payment. - is_offline_payment: - type: optional - docs: Whether or not this payment was taken offline. - access: read-only - offline_payment_details: - type: optional - docs: Additional information about the payment if it was taken offline. - version_token: - type: optional> - docs: >- - Used for optimistic concurrency. This opaque token identifies a - specific version of the + with the `DRAFT` filter. - `Payment` object. - source: - openapi: openapi/openapi.json - PaymentBalanceActivityAppFeeRefundDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. - refund_id: - type: optional> - docs: The ID of the refund associated with this activity. - location_id: - type: optional> - docs: >- - The ID of the location of the merchant associated with the payment - refund activity - source: - openapi: openapi/openapi.json - PaymentBalanceActivityAppFeeRevenueDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. - location_id: - type: optional> - docs: >- - The ID of the location of the merchant associated with the payment - activity + See + [ScheduledShiftFilterScheduledShiftStatus](#type-scheduledshiftfilterscheduledshiftstatus) + for possible values source: openapi: openapi/openapi.json - PaymentBalanceActivityAutomaticSavingsDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. - payout_id: - type: optional> - docs: The ID of the payout associated with this activity. + ScheduledShiftFilterAssignmentStatus: + enum: + - ASSIGNED + - UNASSIGNED + docs: |- + Defines valid values for the `assignment_status` filter in a + [SearchScheduledShifts](api-endpoint:Labor-SearchScheduledShifts) request. + Assignment status is based on the `draft_shift_details.team_member_id` and + `published_shift_details.team_member_id` fields of the scheduled shift. source: openapi: openapi/openapi.json - PaymentBalanceActivityAutomaticSavingsReversedDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. - payout_id: - type: optional> - docs: The ID of the payout associated with this activity. + ScheduledShiftFilterScheduledShiftStatus: + enum: + - DRAFT + - PUBLISHED + docs: |- + Defines valid values for the `scheduled_shift_statuses` filter in a + [SearchScheduledShifts](api-endpoint:Labor-SearchScheduledShifts) request. source: openapi: openapi/openapi.json - PaymentBalanceActivityChargeDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. + ScheduledShiftNotificationAudience: + enum: + - ALL + - AFFECTED + - NONE + docs: >- + Indicates whether Square sends an email notification to team members + + when a scheduled shift is published and which team members receive the + notification. source: openapi: openapi/openapi.json - PaymentBalanceActivityDepositFeeDetail: + ScheduledShiftQuery: + docs: |- + Represents filter and sort criteria for the `query` field in a + [SearchScheduledShifts](api-endpoint:Labor-SearchScheduledShifts) request. properties: - payout_id: - type: optional> - docs: The ID of the payout that triggered this deposit fee activity. + filter: + type: optional + docs: Filtering options for the query. + sort: + type: optional + docs: Sorting options for the query. source: openapi: openapi/openapi.json - PaymentBalanceActivityDepositFeeReversedDetail: + ScheduledShiftSort: + docs: >- + Defines sort criteria for a + [SearchScheduledShifts](api-endpoint:Labor-SearchScheduledShifts) + + request. properties: - payout_id: - type: optional> - docs: The ID of the payout that triggered this deposit fee activity. + field: + type: optional + docs: >- + The field to sort on. The default value is `START_AT`. + + See [ScheduledShiftSortField](#type-scheduledshiftsortfield) for + possible values + order: + type: optional + docs: |- + The order in which results are returned. The default value is `ASC`. + See [SortOrder](#type-sortorder) for possible values source: openapi: openapi/openapi.json - PaymentBalanceActivityDisputeDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. - dispute_id: - type: optional> - docs: The ID of the dispute associated with this activity. + ScheduledShiftSortField: + enum: + - START_AT + - END_AT + - CREATED_AT + - UPDATED_AT + docs: |- + Defines valid values for the `field` sort setting in a + [SearchScheduledShifts](api-endpoint:Labor-SearchScheduledShifts) request. source: openapi: openapi/openapi.json - PaymentBalanceActivityFeeDetail: + ScheduledShiftWorkday: + docs: >- + A `ScheduledShift` search query filter parameter that sets a range of days + that + + a `Shift` must start or end in before passing the filter condition. properties: - payment_id: + date_range: + type: optional + docs: Dates for fetching the scheduled shifts. + match_scheduled_shifts_by: + type: optional + docs: >- + The strategy on which the dates are applied. + + See [ScheduledShiftWorkdayMatcher](#type-scheduledshiftworkdaymatcher) + for possible values + default_timezone: type: optional> docs: >- - The ID of the payment associated with this activity + Location-specific timezones convert workdays to datetime filters. - This will only be populated when a principal LedgerEntryToken is also - populated. + Every location included in the query must have a timezone or this + field - If the fee is independent (there is no principal LedgerEntryToken) - then this will likely not + must be provided as a fallback. Format: the IANA timezone database - be populated. - source: - openapi: openapi/openapi.json - PaymentBalanceActivityFreeProcessingDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. + identifier for the relevant timezone. source: openapi: openapi/openapi.json - PaymentBalanceActivityHoldAdjustmentDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. + ScheduledShiftWorkdayMatcher: + enum: + - START_AT + - END_AT + - INTERSECTION + docs: Defines the logic used to apply a workday filter. source: openapi: openapi/openapi.json - PaymentBalanceActivityOpenDisputeDetail: + SearchAvailabilityFilter: + docs: A query filter to search for buyer-accessible availabilities by. properties: - payment_id: + start_at_range: + type: TimeRange + docs: >- + The query expression to search for buy-accessible availabilities with + their starting times falling within the specified time range. + + The time range must be at least 24 hours and at most 32 days long. + + For waitlist availabilities, the time range can be 0 or more up to 367 + days long. + location_id: type: optional> - docs: The ID of the payment associated with this activity. - dispute_id: + docs: >- + The query expression to search for buyer-accessible availabilities + with their location IDs matching the specified location ID. + + This query expression cannot be set if `booking_id` is set. + validation: + maxLength: 32 + segment_filters: + type: optional>> + docs: >- + The query expression to search for buyer-accessible availabilities + matching the specified list of segment filters. + + If the size of the `segment_filters` list is `n`, the search returns + availabilities with `n` segments per availability. + + + This query expression cannot be set if `booking_id` is set. + booking_id: type: optional> - docs: The ID of the dispute associated with this activity. + docs: >- + The query expression to search for buyer-accessible availabilities for + an existing booking by matching the specified `booking_id` value. + + This is commonly used to reschedule an appointment. + + If this expression is set, the `location_id` and `segment_filters` + expressions cannot be set. + validation: + maxLength: 36 source: openapi: openapi/openapi.json - PaymentBalanceActivityOtherAdjustmentDetail: + SearchAvailabilityQuery: + docs: The query used to search for buyer-accessible availabilities of bookings. properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. + filter: + type: SearchAvailabilityFilter + docs: >- + The query filter to search for buyer-accessible availabilities of + existing bookings. source: openapi: openapi/openapi.json - PaymentBalanceActivityOtherDetail: + SearchAvailabilityResponse: properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. + availabilities: + type: optional> + docs: List of appointment slots available for booking. + errors: + type: optional> + docs: Errors that occurred during the request. source: openapi: openapi/openapi.json - PaymentBalanceActivityRefundDetail: - properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. - refund_id: - type: optional> - docs: The ID of the refund associated with this activity. + SearchCatalogItemsRequestStockLevel: + enum: + - OUT + - LOW + docs: Defines supported stock levels of the item inventory. source: openapi: openapi/openapi.json - PaymentBalanceActivityReleaseAdjustmentDetail: + SearchCatalogItemsResponse: + docs: >- + Defines the response body returned from the + [SearchCatalogItems](api-endpoint:Catalog-SearchCatalogItems) endpoint. properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. + errors: + type: optional> + docs: Any errors that occurred during the request. + items: + type: optional> + docs: Returned items matching the specified query expressions. + cursor: + type: optional + docs: >- + Pagination token used in the next request to return more of the search + result. + matched_variation_ids: + type: optional> + docs: >- + Ids of returned item variations matching the specified query + expression. source: openapi: openapi/openapi.json - PaymentBalanceActivityReserveHoldDetail: + SearchCatalogObjectsResponse: properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. + errors: + type: optional> + docs: Any errors that occurred during the request. + cursor: + type: optional + docs: >- + The pagination cursor to be used in a subsequent request. If unset, + this is the final response. + + See + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) + for more information. + objects: + type: optional> + docs: The CatalogObjects returned. + related_objects: + type: optional> + docs: >- + A list of CatalogObjects referenced by the objects in the `objects` + field. + latest_time: + type: optional + docs: >- + When the associated product catalog was last updated. Will + + match the value for `end_time` or `cursor` if either field is included + in the `SearchCatalog` request. source: openapi: openapi/openapi.json - PaymentBalanceActivityReserveReleaseDetail: + SearchCustomersResponse: + docs: >- + Defines the fields that are included in the response body of + + a request to the `SearchCustomers` endpoint. + + + Either `errors` or `customers` is present in a given response (never + both). properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. + errors: + type: optional> + docs: Any errors that occurred during the request. + customers: + type: optional> + docs: >- + The customer profiles that match the search query. If any search + condition is not met, the result is an empty object (`{}`). + + Only customer profiles with public information (`given_name`, + `family_name`, `company_name`, `email_address`, or `phone_number`) + + are included in the response. + cursor: + type: optional + docs: >- + A pagination cursor that can be used during subsequent calls + + to `SearchCustomers` to retrieve the next set of results associated + + with the original query. Pagination cursors are only present when + + a request succeeds and additional results are available. + + + For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + count: + type: optional + docs: >- + The total count of customers associated with the Square account that + match the search query. Only customer profiles with + + public information (`given_name`, `family_name`, `company_name`, + `email_address`, or `phone_number`) are counted. This field is + + present only if `count` is set to `true` in the request. source: openapi: openapi/openapi.json - PaymentBalanceActivitySquareCapitalPaymentDetail: + SearchEventsFilter: + docs: Criteria to filter events by. properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. + event_types: + type: optional>> + docs: Filter events by event types. + merchant_ids: + type: optional>> + docs: Filter events by merchant. + location_ids: + type: optional>> + docs: Filter events by location. + created_at: + type: optional + docs: Filter events by when they were created. source: openapi: openapi/openapi.json - PaymentBalanceActivitySquareCapitalReversedPaymentDetail: + SearchEventsQuery: + docs: Contains query criteria for the search. properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. + filter: + type: optional + docs: Criteria to filter events by. + sort: + type: optional + docs: Criteria to sort events by. source: openapi: openapi/openapi.json - PaymentBalanceActivitySquarePayrollTransferDetail: + SearchEventsResponse: + docs: >- + Defines the fields that are included in the response body of + + a request to the [SearchEvents](api-endpoint:Events-SearchEvents) + endpoint. + + + Note: if there are errors processing the request, the events field will + not be + + present. properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. + errors: + type: optional> + docs: Information on errors encountered during the request. + events: + type: optional> + docs: The list of [Event](entity:Event)s returned by the search. + metadata: + type: optional> + docs: >- + Contains the metadata of an event. For more information, see + [Event](entity:Event). + cursor: + type: optional + docs: >- + When a response is truncated, it includes a cursor that you can use in + a subsequent request to fetch the next set of events. If empty, this + is the final response. + + + For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). source: openapi: openapi/openapi.json - PaymentBalanceActivitySquarePayrollTransferReversedDetail: + SearchEventsSort: + docs: Criteria to sort events by. properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. + field: + type: optional + docs: >- + Sort events by event types. + + See [SearchEventsSortField](#type-searcheventssortfield) for possible + values + order: + type: optional + docs: |- + The order to use for sorting the events. + See [SortOrder](#type-sortorder) for possible values source: openapi: openapi/openapi.json - PaymentBalanceActivityTaxOnFeeDetail: + SearchEventsSortField: + type: literal<"DEFAULT"> + docs: Specifies the sort key for events returned from a search. + SearchInvoicesResponse: + docs: Describes a `SearchInvoices` response. properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. - tax_rate_description: - type: optional> + invoices: + type: optional> + docs: The list of invoices returned by the search. + cursor: + type: optional docs: >- - The description of the tax rate being applied. For example: "GST", - "HST". + When a response is truncated, it includes a cursor that you can use in + a + + subsequent request to fetch the next set of invoices. If empty, this + is the final + + response. + + For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + errors: + type: optional> + docs: Information about errors encountered during the request. source: openapi: openapi/openapi.json - PaymentBalanceActivityThirdPartyFeeDetail: + SearchLoyaltyAccountsRequestLoyaltyAccountQuery: + docs: The search criteria for the loyalty accounts. properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. + mappings: + type: optional>> + docs: |- + The set of mappings to use in the loyalty account search. + + This cannot be combined with `customer_ids`. + + Max: 30 mappings + customer_ids: + type: optional>> + docs: |- + The set of customer IDs to use in the loyalty account search. + + This cannot be combined with `mappings`. + + Max: 30 customer IDs source: openapi: openapi/openapi.json - PaymentBalanceActivityThirdPartyFeeRefundDetail: + SearchLoyaltyAccountsResponse: + docs: >- + A response that includes loyalty accounts that satisfy the search + criteria. properties: - payment_id: - type: optional> - docs: The ID of the payment associated with this activity. - refund_id: - type: optional> - docs: The public refund id associated with this activity. + errors: + type: optional> + docs: Any errors that occurred during the request. + loyalty_accounts: + type: optional> + docs: |- + The loyalty accounts that met the search criteria, + in order of creation date. + cursor: + type: optional + docs: >- + The pagination cursor to use in a subsequent + + request. If empty, this is the final response. + + For more information, + + see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). source: openapi: openapi/openapi.json - PaymentLink: + SearchLoyaltyEventsResponse: + docs: |- + A response that contains loyalty events that satisfy the search + criteria, in order by the `created_at` date. properties: - id: - type: optional - docs: The Square-assigned ID of the payment link. - access: read-only - version: - type: integer - docs: >- - The Square-assigned version number, which is incremented each time an - update is committed to the payment link. - validation: - max: 65535 - description: - type: optional> - docs: |- - The optional description of the `payment_link` object. - It is primarily for use by your application and is not used anywhere. - validation: - maxLength: 4096 - order_id: + errors: + type: optional> + docs: Any errors that occurred during the request. + events: + type: optional> + docs: The loyalty events that satisfy the search criteria. + cursor: type: optional - docs: The ID of the order associated with the payment link. - validation: - maxLength: 192 - access: read-only - checkout_options: - type: optional docs: >- - The checkout options configured for the payment link. + The pagination cursor to be used in a subsequent - For more information, see [Optional Checkout - Configurations](https://developer.squareup.com/docs/checkout-api/optional-checkout-configurations). - pre_populated_data: - type: optional - docs: |- - Describes buyer data to prepopulate - on the checkout page. - url: - type: optional - docs: The shortened URL of the payment link. - validation: - maxLength: 255 - access: read-only - long_url: - type: optional - docs: The long URL of the payment link. - validation: - maxLength: 255 - access: read-only - created_at: - type: optional - docs: The timestamp when the payment link was created, in RFC 3339 format. - updated_at: - type: optional + request. If empty, this is the final response. + + For more information, + + see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + source: + openapi: openapi/openapi.json + SearchLoyaltyRewardsRequestLoyaltyRewardQuery: + docs: The set of search requirements. + properties: + loyalty_account_id: + type: string docs: >- - The timestamp when the payment link was last updated, in RFC 3339 - format. - payment_note: - type: optional> + The ID of the [loyalty account](entity:LoyaltyAccount) to which the + loyalty reward belongs. + validation: + minLength: 1 + status: + type: optional docs: >- - An optional note. After Square processes the payment, this note is - added to the + The status of the loyalty reward. - resulting `Payment`. - validation: - maxLength: 500 + See [LoyaltyRewardStatus](#type-loyaltyrewardstatus) for possible + values source: openapi: openapi/openapi.json - PaymentLinkRelatedResources: + SearchLoyaltyRewardsResponse: + docs: >- + A response that includes the loyalty rewards satisfying the search + criteria. properties: - orders: - type: optional>> - docs: The order associated with the payment link. - subscription_plans: - type: optional>> - docs: The subscription plan associated with the payment link. + errors: + type: optional> + docs: Any errors that occurred during the request. + rewards: + type: optional> + docs: |- + The loyalty rewards that satisfy the search criteria. + These are returned in descending order by `updated_at`. + cursor: + type: optional + docs: |- + The pagination cursor to be used in a subsequent + request. If empty, this is the final response. source: openapi: openapi/openapi.json - PaymentOptions: + SearchOrdersCustomerFilter: + docs: |- + A filter based on the order `customer_id` and any tender `customer_id` + associated with the order. It does not filter based on the + [FulfillmentRecipient](entity:FulfillmentRecipient) `customer_id`. properties: - autocomplete: - type: optional> - docs: >- - Indicates whether the `Payment` objects created from this - `TerminalCheckout` are + customer_ids: + type: optional>> + docs: |- + A list of customer IDs to filter by. - automatically `COMPLETED` or left in an `APPROVED` state for later - modification. + Max: 10 customer ids. + source: + openapi: openapi/openapi.json + SearchOrdersDateTimeFilter: + docs: >- + Filter for `Order` objects based on whether their `CREATED_AT`, + `CLOSED_AT`, or `UPDATED_AT` timestamps fall within a specified time + range. - Default: true - delay_duration: - type: optional> - docs: >- - The duration of time after the payment's creation when Square - automatically resolves the + You can specify the time range and which timestamp to filter for. You can + filter - payment. This automatic resolution applies only to payments that do - not reach a terminal state + for only one time range at a time. - (`COMPLETED` or `CANCELED`) before the `delay_duration` time period. + For each time range, the start time and end time are inclusive. If the end + time - This parameter should be specified as a time duration, in RFC 3339 - format, with a minimum value + is absent, it defaults to the time of the first request for the cursor. - of 1 minute and a maximum value of 36 hours. This feature is only - supported for card payments, - and all payments will be considered card-present. + __Important:__ If you use the `DateTimeFilter` in a `SearchOrders` query, + you must set the `sort_field` in [OrdersSort](entity:SearchOrdersSort) - This parameter can only be set for a delayed capture payment - (`autocomplete=false`). For more + to the same field you filter for. For example, if you set the `CLOSED_AT` + field - information, see [Delayed - Capture](https://developer.squareup.com/docs/payments-api/take-payments/card-payments/delayed-capture#time-threshold). + in `DateTimeFilter`, you must set the `sort_field` in `SearchOrdersSort` + to + `CLOSED_AT`. Otherwise, `SearchOrders` throws an error. - Default: "PT36H" (36 hours) from the creation time - accept_partial_authorization: - type: optional> + [Learn more about filtering orders by time + range.](https://developer.squareup.com/docs/orders-api/manage-orders/search-orders#important-note-about-filtering-orders-by-time-range) + properties: + created_at: + type: optional docs: >- - If set to `true` and charging a Square Gift Card, a payment might be - returned with + The time range for filtering on the `created_at` timestamp. If you use + this - `amount_money` equal to less than what was requested. For example, a - request for $20 when charging + value, you must set the `sort_field` in the `OrdersSearchSort` object + to - a Square Gift Card with a balance of $5 results in an APPROVED payment - of $5. You might choose + `CREATED_AT`. + updated_at: + type: optional + docs: >- + The time range for filtering on the `updated_at` timestamp. If you use + this - to prompt the buyer for an additional payment to cover the remainder - or cancel the Gift Card + value, you must set the `sort_field` in the `OrdersSearchSort` object + to - payment. + `UPDATED_AT`. + closed_at: + type: optional + docs: >- + The time range for filtering on the `closed_at` timestamp. If you use + this + value, you must set the `sort_field` in the `OrdersSearchSort` object + to - This parameter can only be set for a delayed capture payment - (`autocomplete=false`). + `CLOSED_AT`. + source: + openapi: openapi/openapi.json + SearchOrdersFilter: + docs: |- + Filtering criteria to use for a `SearchOrders` request. Multiple filters + are ANDed together. + properties: + state_filter: + type: optional + docs: Filter by [OrderState](entity:OrderState). + date_time_filter: + type: optional + docs: >- + Filter for results within a time range. - For more information, see [Take Partial - Payments](https://developer.squareup.com/docs/payments-api/take-payments/card-payments/partial-payments-with-gift-cards). + __Important:__ If you filter for orders by time range, you must set + `SearchOrdersSort` + to sort by the same field. - Default: false - delay_action: - type: optional + [Learn more about filtering orders by time + range.](https://developer.squareup.com/docs/orders-api/manage-orders/search-orders#important-note-about-filtering-orders-by-time-range) + fulfillment_filter: + type: optional + docs: Filter by the fulfillment type or state. + source_filter: + type: optional + docs: Filter by the source of the order. + customer_filter: + type: optional + docs: Filter by customers associated with the order. + source: + openapi: openapi/openapi.json + SearchOrdersFulfillmentFilter: + docs: Filter based on [order fulfillment](entity:Fulfillment) information. + properties: + fulfillment_types: + type: optional>> docs: >- - The action to be applied to the `Payment` when the delay_duration has - elapsed. + A list of [fulfillment types](entity:FulfillmentType) to filter - The action must be CANCEL or COMPLETE. + for. The list returns orders if any of its fulfillments match any of + the fulfillment types + + listed in this field. + + See [FulfillmentType](#type-fulfillmenttype) for possible values + fulfillment_states: + type: optional>> + docs: >- + A list of [fulfillment states](entity:FulfillmentState) to filter + + for. The list returns orders if any of its fulfillments match any of + the + + fulfillment states listed in this field. + + See [FulfillmentState](#type-fulfillmentstate) for possible values + source: + openapi: openapi/openapi.json + SearchOrdersQuery: + docs: Contains query criteria for the search. + properties: + filter: + type: optional + docs: Criteria to filter results by. + sort: + type: optional + docs: Criteria to sort results by. + source: + openapi: openapi/openapi.json + SearchOrdersResponse: + docs: >- + Either the `order_entries` or `orders` field is set, depending on whether + + `return_entries` is set on the + [SearchOrdersRequest](api-endpoint:Orders-SearchOrders). + properties: + order_entries: + type: optional> + docs: >- + A list of [OrderEntries](entity:OrderEntry) that fit the query + + conditions. The list is populated only if `return_entries` is set to + `true` in the request. + orders: + type: optional> + docs: >- + A list of + + [Order](entity:Order) objects that match the query conditions. The + list is populated only if + + `return_entries` is set to `false` in the request. + cursor: + type: optional + docs: >- + The pagination cursor to be used in a subsequent request. If unset, + + this is the final response. + + For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + errors: + type: optional> + docs: '[Errors](entity:Error) encountered during the search.' + source: + openapi: openapi/openapi.json + SearchOrdersSort: + docs: |- + Sorting criteria for a `SearchOrders` request. Results can only be sorted + by a timestamp field. + properties: + sort_field: + type: SearchOrdersSortField + docs: >- + The field to sort by. - The action cannot be set to COMPLETE if an `order_id` is present on - the TerminalCheckout. + __Important:__ When using a + [DateTimeFilter](entity:SearchOrdersFilter), + + `sort_field` must match the timestamp field that the `DateTimeFilter` + uses to + + filter. For example, if you set your `sort_field` to `CLOSED_AT` and + you use a + + `DateTimeFilter`, your `DateTimeFilter` must filter for orders by + their `CLOSED_AT` date. + If this field does not match the timestamp field in `DateTimeFilter`, - This parameter can only be set for a delayed capture payment - (`autocomplete=false`). For more + `SearchOrders` returns an error. - information, see [Delayed - Capture](https://developer.squareup.com/docs/payments-api/take-payments/card-payments/delayed-capture#time-threshold). + Default: `CREATED_AT`. - Default: CANCEL + See [SearchOrdersSortField](#type-searchorderssortfield) for possible + values + sort_order: + type: optional + docs: >- + The chronological order in which results are returned. Defaults to + `DESC`. - See [DelayAction](#type-delayaction) for possible values + See [SortOrder](#type-sortorder) for possible values source: openapi: openapi/openapi.json - PaymentOptionsDelayAction: + SearchOrdersSortField: enum: - - CANCEL - - COMPLETE - docs: >- - Describes the action to be applied to a delayed capture payment when the - delay_duration - - has elapsed. + - CREATED_AT + - UPDATED_AT + - CLOSED_AT + docs: Specifies which timestamp to use to sort `SearchOrder` results. source: openapi: openapi/openapi.json - PaymentRefund: - docs: >- - Represents a refund of a payment made using Square. Contains information - about - - the original payment and the amount of money refunded. + SearchOrdersSourceFilter: + docs: A filter based on order `source` information. properties: - id: - type: string - docs: The unique ID for this refund, generated by Square. - validation: - minLength: 1 - maxLength: 255 - status: - type: optional> - docs: |- - The refund's status: - - `PENDING` - Awaiting approval. - - `COMPLETED` - Successfully completed. - - `REJECTED` - The refund was rejected. - - `FAILED` - An error occurred. - validation: - maxLength: 50 - location_id: - type: optional> - docs: >- - The location ID associated with the payment this refund is attached - to. - validation: - maxLength: 50 - unlinked: - type: optional - docs: >- - Flag indicating whether or not the refund is linked to an existing - payment in Square. - access: read-only - destination_type: - type: optional> + source_names: + type: optional>> docs: >- - The destination type for this refund. - + Filters by the [Source](entity:OrderSource) `name`. The filter returns + any orders - Current values include `CARD`, `BANK_ACCOUNT`, `WALLET`, - `BUY_NOW_PAY_LATER`, `CASH`, + with a `source.name` that matches any of the listed source names. - `EXTERNAL`, and `SQUARE_ACCOUNT`. - validation: - maxLength: 50 - destination_details: - type: optional - docs: >- - Contains information about the refund destination. This field is - populated only if - `destination_id` is defined in the `RefundPayment` request. - amount_money: - type: Money - docs: >- - The amount of money refunded. This amount is specified in the smallest - denomination + Max: 10 source names. + source: + openapi: openapi/openapi.json + SearchOrdersStateFilter: + docs: Filter by the current order `state`. + properties: + states: + docs: |- + States to filter for. + See [OrderState](#type-orderstate) for possible values + type: list + source: + openapi: openapi/openapi.json + SearchScheduledShiftsResponse: + docs: >- + Represents a + [SearchScheduledShifts](api-endpoint:Labor-SearchScheduledShifts) + response. - of the applicable currency (for example, US dollar amounts are - specified in cents). - app_fee_money: - type: optional + Either `scheduled_shifts` or `errors` is present in the response. + properties: + scheduled_shifts: + type: optional> + docs: A paginated list of scheduled shifts that match the query conditions. + cursor: + type: optional docs: >- - The amount of money the application developer contributed to help - cover the refunded amount. + The pagination cursor used to retrieve the next page of results. This + field is present - This amount is specified in the smallest denomination of the - applicable currency (for example, + only if additional results are available. + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + SearchShiftsResponse: + docs: >- + The response to a request for `Shift` objects. The response contains - US dollar amounts are specified in cents). For more information, see + the requested `Shift` objects and might contain a set of `Error` objects + if - [Working with Monetary - Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). - processing_fee: - type: optional>> - docs: >- - Processing fees and fee adjustments assessed by Square for this - refund. - payment_id: - type: optional> - docs: The ID of the payment associated with this refund. - validation: - maxLength: 192 - order_id: - type: optional> - docs: The ID of the order associated with the refund. - validation: - maxLength: 192 - reason: - type: optional> - docs: The reason for the refund. - validation: - maxLength: 192 - created_at: - type: optional - docs: The timestamp of when the refund was created, in RFC 3339 format. - validation: - maxLength: 32 - access: read-only - updated_at: - type: optional - docs: The timestamp of when the refund was last updated, in RFC 3339 format. - validation: - maxLength: 32 - access: read-only - team_member_id: - type: optional - docs: An optional ID of the team member associated with taking the payment. - validation: - maxLength: 192 - access: read-only - terminal_refund_id: + the request resulted in errors. + properties: + shifts: + type: optional> + docs: Shifts. + cursor: type: optional - docs: An optional ID for a Terminal refund. - access: read-only + docs: An opaque cursor for fetching the next page. + errors: + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - Payout: + SearchSubscriptionsFilter: docs: >- - An accounting of the amount owed the seller and record of the actual - transfer to their + Represents a set of query expressions (filters) to narrow the scope of + targeted subscriptions returned by - external bank account or to the Square balance. + the [SearchSubscriptions](api-endpoint:Subscriptions-SearchSubscriptions) + endpoint. properties: - id: - type: string - docs: A unique ID for the payout. - validation: - minLength: 1 - status: - type: optional - docs: |- - Indicates the payout status. - See [PayoutStatus](#type-payoutstatus) for possible values - location_id: - type: string - docs: The ID of the location associated with the payout. - validation: - minLength: 1 - created_at: - type: optional + customer_ids: + type: optional>> docs: >- - The timestamp of when the payout was created and submitted for deposit - to the seller's banking destination, in RFC 3339 format. - updated_at: + A filter to select subscriptions based on the subscribing customer + IDs. + location_ids: + type: optional>> + docs: A filter to select subscriptions based on the location. + source_names: + type: optional>> + docs: A filter to select subscriptions based on the source application. + source: + openapi: openapi/openapi.json + SearchSubscriptionsQuery: + docs: >- + Represents a query, consisting of specified query expressions, used to + search for subscriptions. + properties: + filter: + type: optional + docs: A list of query expressions. + source: + openapi: openapi/openapi.json + SearchSubscriptionsResponse: + docs: >- + Defines output parameters in a response from the + + [SearchSubscriptions](api-endpoint:Subscriptions-SearchSubscriptions) + endpoint. + properties: + errors: + type: optional> + docs: Errors encountered during the request. + subscriptions: + type: optional> + docs: The subscriptions matching the specified query expressions. + cursor: type: optional - docs: The timestamp of when the payout was last updated, in RFC 3339 format. - amount_money: - type: optional - docs: >- - The amount of money involved in the payout. A positive amount - indicates a deposit, and a negative amount indicates a withdrawal. - This amount is never zero. - destination: - type: optional docs: >- - Information about the banking destination (such as a bank account, - Square checking account, or debit card) + When the total number of resulting subscription exceeds the limit of a + paged response, - against which the payout was made. - version: - type: optional - docs: >- - The version number, which is incremented each time an update is made - to this payout record. + the response includes a cursor for you to use in a subsequent request + to fetch the next set of results. - The version number helps developers receive event notifications or - feeds out of order. - type: - type: optional - docs: |- - Indicates the payout type. - See [PayoutType](#type-payouttype) for possible values - payout_fee: - type: optional>> - docs: >- - A list of transfer fees and any taxes on the fees assessed by Square - for this payout. - arrival_date: - type: optional> - docs: >- - The calendar date, in ISO 8601 format (YYYY-MM-DD), when the payout is - due to arrive in the seller’s banking destination. - end_to_end_id: - type: optional> - docs: >- - A unique ID for each `Payout` object that might also appear on the - seller’s bank statement. You can use this ID to automate the process - of reconciling each payout with the corresponding line item on the - bank statement. + If the cursor is unset, the response contains the last page of the + results. + + + For more information, see + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). source: openapi: openapi/openapi.json - PayoutEntry: + SearchTeamMembersFilter: docs: >- - One or more PayoutEntries that make up a Payout. Each one has a date, - amount, and type of activity. + Represents a filter used in a search for `TeamMember` objects. `AND` logic + is applied - The total amount of the payout will equal the sum of the payout entries - for a batch payout + between the individual fields, and `OR` logic is applied within list-based + fields. + + For example, setting this filter value: + + ``` + + filter = (locations_ids = ["A", "B"], status = ACTIVE) + + ``` + + returns only active team members assigned to either location "A" or "B". properties: - id: - type: string - docs: A unique ID for the payout entry. - validation: - minLength: 1 - payout_id: - type: string - docs: The ID of the payout entries’ associated payout. - validation: - minLength: 1 - effective_at: - type: optional> + location_ids: + type: optional>> docs: >- - The timestamp of when the payout entry affected the balance, in RFC - 3339 format. - type: - type: optional + When present, filters by team members assigned to the specified + locations. + + When empty, includes team members assigned to any location. + status: + type: optional docs: |- - The type of activity associated with this payout entry. - See [ActivityType](#type-activitytype) for possible values - gross_amount_money: - type: optional - docs: The amount of money involved in this payout entry. - fee_amount_money: - type: optional - docs: The amount of Square fees associated with this payout entry. - net_amount_money: - type: optional - docs: The net proceeds from this transaction after any fees. - type_app_fee_revenue_details: - type: optional - docs: Details of any developer app fee revenue generated on a payment. - type_app_fee_refund_details: - type: optional - docs: Details of a refund for an app fee on a payment. - type_automatic_savings_details: - type: optional - docs: >- - Details of any automatic transfer from the payment processing balance - to the Square Savings account. These are, generally, proportional to - the merchant's sales. - type_automatic_savings_reversed_details: - type: optional - docs: >- - Details of any automatic transfer from the Square Savings account back - to the processing balance. These are, generally, proportional to the - merchant's refunds. - type_charge_details: - type: optional - docs: Details of credit card payment captures. - type_deposit_fee_details: - type: optional - docs: >- - Details of any fees involved with deposits such as for instant - deposits. - type_deposit_fee_reversed_details: - type: optional - docs: >- - Details of any reversal or refund of fees involved with deposits such - as for instant deposits. - type_dispute_details: - type: optional - docs: Details of any balance change due to a dispute event. - type_fee_details: - type: optional - docs: Details of adjustments due to the Square processing fee. - type_free_processing_details: - type: optional - docs: >- - Square offers Free Payments Processing for a variety of business - scenarios including seller referral or when Square wants to apologize - for a bug, customer service, repricing complication, and so on. This - entry represents details of any credit to the merchant for the - purposes of Free Processing. - type_hold_adjustment_details: - type: optional - docs: >- - Details of any adjustment made by Square related to the holding or - releasing of a payment. - type_open_dispute_details: - type: optional - docs: Details of any open disputes. - type_other_details: - type: optional - docs: >- - Details of any other type that does not belong in the rest of the - types. - type_other_adjustment_details: - type: optional - docs: >- - Details of any other type of adjustments that don't fall under - existing types. - type_refund_details: - type: optional - docs: Details of a refund for an existing card payment. - type_release_adjustment_details: - type: optional - docs: Details of fees released for adjustments. - type_reserve_hold_details: - type: optional - docs: Details of fees paid for funding risk reserve. - type_reserve_release_details: - type: optional - docs: Details of fees released from risk reserve. - type_square_capital_payment_details: - type: optional - docs: >- - Details of capital merchant cash advance (MCA) assessments. These are, - generally, proportional to the merchant's sales but may be issued for - other reasons related to the MCA. - type_square_capital_reversed_payment_details: - type: optional - docs: >- - Details of capital merchant cash advance (MCA) assessment refunds. - These are, generally, proportional to the merchant's refunds but may - be issued for other reasons related to the MCA. - type_tax_on_fee_details: - type: optional - docs: Details of tax paid on fee amounts. - type_third_party_fee_details: - type: optional - docs: Details of fees collected by a 3rd party platform. - type_third_party_fee_refund_details: - type: optional - docs: Details of refunded fees from a 3rd party platform. - type_square_payroll_transfer_details: - type: optional - docs: >- - Details of a payroll payment that was transferred to a team member’s - bank account. - type_square_payroll_transfer_reversed_details: - type: optional + When present, filters by team members who match the given status. + When empty, includes team members of all statuses. + See [TeamMemberStatus](#type-teammemberstatus) for possible values + is_owner: + type: optional> docs: >- - Details of a payroll payment to a team member’s bank account that was - deposited back to the seller’s account by Square. + When present and set to true, returns the team member who is the owner + of the Square account. source: openapi: openapi/openapi.json - PayoutFee: - docs: Represents a payout fee that can incur as part of a payout. + SearchTeamMembersQuery: + docs: Represents the parameters in a search for `TeamMember` objects. 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 + filter: + type: optional + docs: The options to filter by. + source: + openapi: openapi/openapi.json + SearchTeamMembersResponse: + docs: >- + Represents a response from a search request containing a filtered list of + `TeamMember` objects. + properties: + team_members: + type: optional> + docs: The filtered list of `TeamMember` objects. + cursor: + type: optional + docs: >- + The opaque cursor for fetching the next page. For more information, + see + + [pagination](https://developer.squareup.com/docs/working-with-apis/pagination). + errors: + type: optional> + docs: The errors that occurred during the request. source: openapi: 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. + SearchTerminalActionsResponse: + properties: + errors: + type: optional> + docs: Information on errors encountered during the request. + action: + type: optional> + docs: The requested search result of `TerminalAction`s. + cursor: + type: optional + docs: >- + The pagination cursor to be used in a subsequent request. If empty, + + this is the final response. + + + See + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) + for more + + information. source: openapi: openapi/openapi.json - PayoutStatus: - enum: - - SENT - - FAILED - - PAID - docs: Payout status types + SearchTerminalCheckoutsResponse: + properties: + errors: + type: optional> + docs: Information about errors encountered during the request. + checkouts: + type: optional> + docs: The requested search result of `TerminalCheckout` objects. + cursor: + type: optional + docs: >- + The pagination cursor to be used in a subsequent request. If empty, + + this is the final response. + + + See + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) + for more information. source: openapi: openapi/openapi.json - PayoutType: - enum: - - BATCH - - SIMPLE - docs: >- - The type of payout: “BATCH” or “SIMPLE”. + SearchTerminalRefundsResponse: + properties: + errors: + type: optional> + docs: Information about errors encountered during the request. + refunds: + type: optional> + docs: The requested search result of `TerminalRefund` objects. + cursor: + type: optional + docs: >- + The pagination cursor to be used in a subsequent request. If empty, - BATCH payouts include a list of payout entries that can be considered - settled. + this is the final response. - SIMPLE payouts do not have any payout entries associated with them - and will show up as one of the payout entries in a future BATCH payout. + See + [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) + for more information. source: openapi: openapi/openapi.json - Phase: + SearchTimecardsResponse: docs: >- - Represents a phase, which can override subscription phases as defined by - plan_id + The response to a request for `Timecard` objects. The response contains + + the requested `Timecard` objects and might contain a set of `Error` + objects if + + the request resulted in errors. properties: - uid: - type: optional> - docs: id of subscription phase - ordinal: - type: optional> - docs: index of phase in total subscription plan - order_template_id: - type: optional> - docs: id of order to be used in billing - plan_phase_uid: - type: optional> - docs: the uid from the plan's phase in catalog + timecards: + type: optional> + docs: Timecards. + cursor: + type: optional + docs: An opaque cursor for fetching the next page. + errors: + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - PhaseInput: - docs: Represents the arguments used to construct a new phase. + SearchVendorsRequestFilter: + docs: Defines supported query expressions to search for vendors by. properties: - ordinal: - type: long - docs: index of phase in total subscription plan - order_template_id: - type: optional> - docs: id of order to be used in billing + name: + type: optional>> + docs: The names of the [Vendor](entity:Vendor) objects to retrieve. + status: + type: optional>> + docs: |- + The statuses of the [Vendor](entity:Vendor) objects to retrieve. + See [VendorStatus](#type-vendorstatus) for possible values source: openapi: openapi/openapi.json - PrePopulatedData: + SearchVendorsRequestSort: docs: >- - Describes buyer data to prepopulate in the payment form. - - For more information, - - see [Optional Checkout - Configurations](https://developer.squareup.com/docs/checkout-api/optional-checkout-configurations). + Defines a sorter used to sort results from + [SearchVendors](api-endpoint:Vendors-SearchVendors). properties: - buyer_email: - type: optional> - docs: The buyer email to prepopulate in the payment form. - validation: - maxLength: 256 - buyer_phone_number: - type: optional> - docs: The buyer phone number to prepopulate in the payment form. - validation: - maxLength: 17 - buyer_address: - type: optional
- docs: The buyer address to prepopulate in the payment form. + field: + type: optional + docs: |- + Specifies the sort key to sort the returned vendors. + See [Field](#type-field) for possible values + order: + type: optional + docs: |- + Specifies the sort order for the returned vendors. + See [SortOrder](#type-sortorder) for possible values source: openapi: openapi/openapi.json - ProcessingFee: - docs: Represents the Square processing fee. + SearchVendorsRequestSortField: + enum: + - NAME + - CREATED_AT + docs: The field to sort the returned [Vendor](entity:Vendor) objects by. + source: + openapi: openapi/openapi.json + SearchVendorsResponse: + docs: >- + Represents an output from a call to + [SearchVendors](api-endpoint:Vendors-SearchVendors). properties: - effective_at: - type: optional> - docs: The timestamp of when the fee takes effect, in RFC 3339 format. - type: - type: optional> + errors: + type: optional> + docs: Errors encountered when the request fails. + vendors: + type: optional> docs: >- - The type of fee assessed or adjusted. The fee type can be `INITIAL` or - `ADJUSTMENT`. - amount_money: - type: optional + The [Vendor](entity:Vendor) objects matching the specified search + filter. + cursor: + type: optional docs: >- - The fee amount, which might be negative, that is assessed or adjusted - by Square. + The pagination cursor to be used in a subsequent request. If unset, + this is the final response. - Positive values represent funds being assessed, while negative values - represent - funds being returned. - source: - openapi: openapi/openapi.json - Product: - enum: - - SQUARE_POS - - EXTERNAL_API - - BILLING - - APPOINTMENTS - - INVOICES - - ONLINE_STORE - - PAYROLL - - DASHBOARD - - ITEM_LIBRARY_IMPORT - - OTHER - docs: Indicates the Square product used to generate a change. + See the + [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) + guide for more information. source: openapi: openapi/openapi.json - ProductType: literal<"TERMINAL_API"> - PublishInvoiceResponse: - docs: Describes a `PublishInvoice` response. + SegmentFilter: + docs: A query filter to search for buyer-accessible appointment segments by. properties: - invoice: - type: optional - docs: The published invoice. - errors: - type: optional> - docs: Information about errors encountered during the request. + service_variation_id: + type: string + docs: >- + The ID of the [CatalogItemVariation](entity:CatalogItemVariation) + object representing the service booked in this segment. + validation: + minLength: 1 + maxLength: 36 + team_member_id_filter: + type: optional + docs: >- + A query filter to search for buyer-accessible appointment segments + with service-providing team members matching the specified list of + team member IDs. Supported query expressions are + + - `ANY`: return the appointment segments with team members whose IDs + match any member in this list. + + - `NONE`: return the appointment segments with team members whose IDs + are not in this list. + + - `ALL`: not supported. + + + When no expression is specified, any service-providing team member is + eligible to fulfill the Booking. source: openapi: openapi/openapi.json - PublishScheduledShiftResponse: - docs: >- - Represents a - [PublishScheduledShift](api-endpoint:Labor-PublishScheduledShift) - response. - - Either `scheduled_shift` or `errors` is present in the response. + SelectOption: properties: - scheduled_shift: - type: optional - docs: The published scheduled shift. - errors: - type: optional> - docs: Any errors that occurred during the request. + reference_id: + type: string + docs: The reference id for the option. + validation: + minLength: 1 + maxLength: 40 + title: + type: string + docs: The title text that displays in the select option button. + validation: + minLength: 1 + maxLength: 250 source: openapi: openapi/openapi.json - QrCodeOptions: - docs: Fields to describe the action that displays QR-Codes. + SelectOptions: properties: title: type: string - docs: The title text to display in the QR code flow on the Terminal. + docs: The title text to display in the select flow on the Terminal. validation: minLength: 1 maxLength: 250 body: type: string - docs: The body text to display in the QR code flow on the Terminal. + docs: The body text to display in the select flow on the Terminal. validation: minLength: 1 maxLength: 10000 - barcode_contents: - type: string - docs: |- - The text representation of the data to show in the QR code - as UTF8-encoded data. - validation: - minLength: 1 - maxLength: 1024 + options: + docs: >- + Represents the buttons/options that should be displayed in the select + flow on the Terminal. + type: list + selected_option: + type: optional + docs: The buyer’s selected option. source: openapi: openapi/openapi.json - QuickPay: + Shift: docs: >- - Describes an ad hoc item and price to generate a quick pay checkout link. + A record of the hourly rate, start, and end times for a single work shift - For more information, + for an employee. This might include a record of the start and end times + for breaks - see [Quick Pay - Checkout](https://developer.squareup.com/docs/checkout-api/quick-pay-checkout). + taken during the shift. + + + Deprecated at Square API version 2025-05-21. Replaced by + [Timecard](entity:Timecard). + + See the [migration + notes](https://developer.squareup.com/docs/labor-api/what-it-does#migration-notes). properties: - name: - type: string - docs: >- - The ad hoc item name. In the resulting `Order`, this name appears as - the line item name. + id: + type: optional + docs: The UUID for this object. validation: - minLength: 1 maxLength: 255 - price_money: - type: Money - docs: The price of the item. + employee_id: + type: optional> + docs: >- + The ID of the employee this shift belongs to. DEPRECATED at version + 2020-08-26. Use `team_member_id` instead. location_id: type: string - docs: The ID of the business location the checkout is associated with. - source: - openapi: openapi/openapi.json - Range: - docs: The range of a number value between the specified lower and upper bounds. - properties: - min: - type: optional> docs: >- - The lower bound of the number range. At least one of `min` or `max` - must be specified. + The ID of the location this shift occurred at. The location should be + based on - If unspecified, the results will have no minimum value. - max: + where the employee clocked in. + validation: + minLength: 1 + timezone: type: optional> docs: >- - The upper bound of the number range. At least one of `min` or `max` - must be specified. + The read-only convenience value that is calculated from the location + based - If unspecified, the results will have no maximum value. - source: - openapi: openapi/openapi.json - ReceiptOptions: - docs: Describes receipt action fields. - properties: - payment_id: + on the `location_id`. Format: the IANA timezone database identifier + for the + + location timezone. + start_at: type: string - docs: The reference to the Square payment ID for the receipt. - print_only: - type: optional> docs: >- - Instructs the device to print the receipt without displaying the - receipt selection screen. - - Requires `printer_enabled` set to true. + RFC 3339; shifted to the location timezone + offset. Precision up to + the - Defaults to false. - is_duplicate: - type: optional> - docs: |- - Identify the receipt as a reprint rather than an original receipt. - Defaults to false. - source: - openapi: openapi/openapi.json - RedeemLoyaltyRewardResponse: - docs: >- - A response that includes the `LoyaltyEvent` published for redeeming the - reward. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - event: - type: optional - docs: The `LoyaltyEvent` for redeeming the reward. - source: - openapi: openapi/openapi.json - Refund: - docs: Represents a refund processed for a Square transaction. - properties: - id: - type: string - docs: The refund's unique ID. - validation: - maxLength: 255 - location_id: - type: string - docs: The ID of the refund's associated location. + minute is respected; seconds are truncated. validation: - maxLength: 50 - transaction_id: + minLength: 1 + end_at: type: optional> - docs: The ID of the transaction that the refunded tender is part of. - validation: - maxLength: 192 - tender_id: - type: string - docs: The ID of the refunded tender. - validation: - maxLength: 192 - created_at: - type: optional - docs: The timestamp for when the refund was created, in RFC 3339 format. - validation: - maxLength: 32 - access: read-only - reason: - type: string - docs: The reason for the refund being issued. - validation: - maxLength: 192 - amount_money: - type: Money - docs: The amount of money refunded to the buyer. - status: - type: RefundStatus - docs: |- - The current status of the refund (`PENDING`, `APPROVED`, `REJECTED`, - or `FAILED`). - See [RefundStatus](#type-refundstatus) for possible values - processing_fee_money: - type: optional - docs: The amount of Square processing fee money refunded to the *merchant*. - additional_recipients: - type: optional>> docs: >- - Additional recipients (other than the merchant) receiving a portion of - this refund. - - For example, fees assessed on a refund of a purchase by a third party - integration. - source: - openapi: openapi/openapi.json - RefundPaymentResponse: - docs: >- - Defines the response returned by + RFC 3339; shifted to the timezone + offset. Precision up to the minute + is - [RefundPayment](api-endpoint:Refunds-RefundPayment). + respected; seconds are truncated. + wage: + type: optional + docs: >- + Job and pay related information. If the wage is not set on create, it + defaults to a wage + of zero. If the title is not set on create, it defaults to the name of + the role the employee - If there are errors processing the request, the `refund` field might not - be + is assigned to, if any. + breaks: + type: optional>> + docs: >- + A list of all the paid or unpaid breaks that were taken during this + shift. + status: + type: optional + docs: |- + Describes the working state of the current `Shift`. + See [ShiftStatus](#type-shiftstatus) for possible values + version: + type: optional + docs: >- + Used for resolving concurrency issues. The request fails if the + version - present, or it might be present with a status of `FAILED`. - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - refund: - type: optional - docs: The successfully created `PaymentRefund`. - source: - openapi: openapi/openapi.json - RefundStatus: - enum: - - PENDING - - APPROVED - - REJECTED - - FAILED - docs: Indicates a refund's current status. + provided does not match the server version at the time of the request. + If not provided, + + Square executes a blind write; potentially overwriting data from + another + + write. + created_at: + type: optional + docs: A read-only timestamp in RFC 3339 format; presented in UTC. + access: read-only + updated_at: + type: optional + docs: A read-only timestamp in RFC 3339 format; presented in UTC. + access: read-only + team_member_id: + type: optional> + docs: >- + The ID of the team member this shift belongs to. Replaced + `employee_id` at version "2020-08-26". + declared_cash_tip_money: + type: optional + docs: The tips declared by the team member for the shift. source: openapi: openapi/openapi.json - RegisterDomainResponse: + ShiftFilter: docs: >- - Defines the fields that are included in the response body of + Defines a filter used in a search for `Shift` records. `AND` logic is - a request to the [RegisterDomain](api-endpoint:ApplePay-RegisterDomain) - endpoint. + used by Square's servers to apply each filter property specified. - Either `errors` or `status` are present in a given response (never both). + Deprecated at Square API version 2025-05-21. See the [migration + notes](https://developer.squareup.com/docs/labor-api/what-it-does#migration-notes). properties: - errors: - type: optional> - docs: Any errors that occurred during the request. + location_ids: + type: optional>> + docs: Fetch shifts for the specified location. + employee_ids: + type: optional>> + docs: >- + Fetch shifts for the specified employees. DEPRECATED at version + 2020-08-26. Use `team_member_ids` instead. status: - type: optional + type: optional + docs: |- + Fetch a `Shift` instance by `Shift.status`. + See [ShiftFilterStatus](#type-shiftfilterstatus) for possible values + start: + type: optional + docs: Fetch `Shift` instances that start in the time range - Inclusive. + end: + type: optional + docs: Fetch the `Shift` instances that end in the time range - Inclusive. + workday: + type: optional + docs: Fetch the `Shift` instances based on the workday date range. + team_member_ids: + type: optional>> docs: >- - The status of the domain registration. - - - See - [RegisterDomainResponseStatus](entity:RegisterDomainResponseStatus) - for possible values. - - See [RegisterDomainResponseStatus](#type-registerdomainresponsestatus) - for possible values + Fetch shifts for the specified team members. Replaced `employee_ids` + at version "2020-08-26". source: openapi: openapi/openapi.json - RegisterDomainResponseStatus: + ShiftFilterStatus: enum: - - PENDING - - VERIFIED - docs: The status of the domain registration. - source: - openapi: openapi/openapi.json - RemoveGroupFromCustomerResponse: + - OPEN + - CLOSED docs: >- - Defines the fields that are included in the response body of + Specifies the `status` of `Shift` records to be returned. - a request to the - [RemoveGroupFromCustomer](api-endpoint:Customers-RemoveGroupFromCustomer) - endpoint. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. + Deprecated at Square API version 2025-05-21. See the [migration + notes](https://developer.squareup.com/docs/labor-api/what-it-does#migration-notes). source: openapi: openapi/openapi.json - ResumeSubscriptionResponse: + ShiftQuery: docs: >- - Defines output parameters in a response from the + The parameters of a `Shift` search query, which includes filter and sort + options. - [ResumeSubscription](api-endpoint:Subscriptions-ResumeSubscription) - endpoint. + + Deprecated at Square API version 2025-05-21. See the [migration + notes](https://developer.squareup.com/docs/labor-api/what-it-does#migration-notes). properties: - errors: - type: optional> - docs: Errors encountered during the request. - subscription: - type: optional - docs: The resumed subscription. - actions: - type: optional> - docs: >- - A list of `RESUME` actions created by the request and scheduled for - the subscription. + filter: + type: optional + docs: Query filter options. + sort: + type: optional + docs: Sort order details. source: openapi: openapi/openapi.json - RetrieveBookingCustomAttributeDefinitionResponse: + ShiftSort: docs: >- - Represents a - [RetrieveBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-RetrieveBookingCustomAttributeDefinition) - response. + Sets the sort order of search results. - Either `custom_attribute_definition` or `errors` is present in the - response. + + Deprecated at Square API version 2025-05-21. See the [migration + notes](https://developer.squareup.com/docs/labor-api/what-it-does#migration-notes). properties: - custom_attribute_definition: - type: optional - docs: The retrieved custom attribute definition. - errors: - type: optional> - docs: Any errors that occurred during the request. + field: + type: optional + docs: |- + The field to sort on. + See [ShiftSortField](#type-shiftsortfield) for possible values + order: + type: optional + docs: |- + The order in which results are returned. Defaults to DESC. + See [SortOrder](#type-sortorder) for possible values source: openapi: openapi/openapi.json - RetrieveBookingCustomAttributeResponse: + ShiftSortField: + enum: + - START_AT + - END_AT + - CREATED_AT + - UPDATED_AT docs: >- - Represents a - [RetrieveBookingCustomAttribute](api-endpoint:BookingCustomAttributes-RetrieveBookingCustomAttribute) - response. + Enumerates the `Shift` fields to sort on. - Either `custom_attribute_definition` or `errors` is present in the - response. - properties: - custom_attribute: - type: optional - docs: >- - The retrieved custom attribute. If `with_definition` was set to `true` - in the request, - the custom attribute definition is returned in the `definition` field. - errors: - type: optional> - docs: Any errors that occurred during the request. + Deprecated at Square API version 2025-05-21. See the [migration + notes](https://developer.squareup.com/docs/labor-api/what-it-does#migration-notes). source: openapi: openapi/openapi.json - GetBookingResponse: - properties: - booking: - type: optional - docs: The booking that was requested. - errors: - type: optional> - docs: Errors that occurred during the request. + ShiftStatus: + enum: + - OPEN + - CLOSED + docs: >- + Enumerates the possible status of a `Shift`. + + + Deprecated at Square API version 2025-05-21. See the [migration + notes](https://developer.squareup.com/docs/labor-api/what-it-does#migration-notes). source: openapi: openapi/openapi.json - GetBusinessBookingProfileResponse: + ShiftWage: + docs: >- + The hourly wage rate used to compensate an employee for this shift. + + + Deprecated at Square API version 2025-05-21. See the [migration + notes](https://developer.squareup.com/docs/labor-api/what-it-does#migration-notes). properties: - business_booking_profile: - type: optional - docs: The seller's booking profile. - errors: - type: optional> - docs: Errors that occurred during the request. + title: + type: optional> + docs: The name of the job performed during this shift. + hourly_rate: + type: optional + docs: |- + Can be a custom-set hourly wage or the calculated effective hourly + wage based on the annual wage and hours worked per week. + job_id: + type: optional + docs: |- + The id of the job performed during this shift. Square + labor-reporting UIs might group shifts together by id. + access: read-only + tip_eligible: + type: optional> + docs: Whether team members are eligible for tips when working this job. source: openapi: openapi/openapi.json - GetCardResponse: + ShiftWorkday: docs: >- - Defines the fields that are included in the response body of + A `Shift` search query filter parameter that sets a range of days that - a request to the [RetrieveCard](api-endpoint:Cards-RetrieveCard) endpoint. + a `Shift` must start or end in before passing the filter condition. - Note: if there are errors processing the request, the card field will not - be + Deprecated at Square API version 2025-05-21. See the [migration + notes](https://developer.squareup.com/docs/labor-api/what-it-does#migration-notes). + properties: + date_range: + type: optional + docs: Dates for fetching the shifts. + match_shifts_by: + type: optional + docs: >- + The strategy on which the dates are applied. - present. + See [ShiftWorkdayMatcher](#type-shiftworkdaymatcher) for possible + values + default_timezone: + type: optional> + docs: >- + Location-specific timezones convert workdays to datetime filters. + + Every location included in the query must have a timezone or this + field + + must be provided as a fallback. Format: the IANA timezone database + + identifier for the relevant timezone. + source: + openapi: openapi/openapi.json + ShiftWorkdayMatcher: + enum: + - START_AT + - END_AT + - INTERSECTION + docs: Defines the logic used to apply a workday filter. + source: + openapi: openapi/openapi.json + ShippingFee: properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - card: - type: optional - docs: The retrieved card. + name: + type: optional> + docs: The name for the shipping fee. + charge: + type: Money + docs: The amount and currency for the shipping fee. source: openapi: openapi/openapi.json - GetCashDrawerShiftResponse: + SignatureImage: properties: - cash_drawer_shift: - type: optional - docs: The cash drawer shift queried for. - errors: - type: optional> - docs: Any errors that occurred during the request. + image_type: + type: optional + docs: |- + The mime/type of the image data. + Use `image/png;base64` for png. + access: read-only + data: + type: optional + docs: The base64 representation of the image. + access: read-only source: openapi: openapi/openapi.json - GetCatalogObjectResponse: + SignatureOptions: properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - object: - type: optional - docs: The `CatalogObject`s returned. - related_objects: - type: optional> + title: + type: string docs: >- - A list of `CatalogObject`s referenced by the object in the `object` - field. + The title text to display in the signature capture flow on the + Terminal. + validation: + minLength: 1 + maxLength: 250 + body: + type: string + docs: >- + The body text to display in the signature capture flow on the + Terminal. + validation: + minLength: 1 + maxLength: 10000 + signature: + type: optional> + docs: An image representation of the collected signature. + access: read-only source: openapi: openapi/openapi.json - GetCustomerCustomAttributeDefinitionResponse: + Site: docs: >- - Represents a - [RetrieveCustomerCustomAttributeDefinition](api-endpoint:CustomerCustomAttributes-RetrieveCustomerCustomAttributeDefinition) - response. - - Either `custom_attribute_definition` or `errors` is present in the - response. + Represents a Square Online site, which is an online store for a Square + seller. properties: - custom_attribute_definition: - type: optional - docs: The retrieved custom attribute definition. - errors: - type: optional> - docs: Any errors that occurred during the request. + id: + type: optional + docs: The Square-assigned ID of the site. + validation: + maxLength: 32 + access: read-only + site_title: + type: optional> + docs: The title of the site. + domain: + type: optional> + docs: >- + The domain of the site (without the protocol). For example, + `mysite1.square.site`. + is_published: + type: optional> + docs: Indicates whether the site is published. + created_at: + type: optional + docs: The timestamp of when the site was created, in RFC 3339 format. + access: read-only + updated_at: + type: optional + docs: The timestamp of when the site was last updated, in RFC 3339 format. + access: read-only source: openapi: openapi/openapi.json - GetCustomerCustomAttributeResponse: + Snippet: docs: >- - Represents a - [RetrieveCustomerCustomAttribute](api-endpoint:CustomerCustomAttributes-RetrieveCustomerCustomAttribute) - response. - - Either `custom_attribute_definition` or `errors` is present in the - response. + Represents the snippet that is added to a Square Online site. The snippet + code is injected into the `head` element of all pages on the site, except + for checkout pages. properties: - custom_attribute: - type: optional + id: + type: optional + docs: The Square-assigned ID for the snippet. + validation: + maxLength: 48 + access: read-only + site_id: + type: optional + docs: The ID of the site that contains the snippet. + access: read-only + content: + type: string + docs: The snippet code, which can contain valid HTML, JavaScript, or both. + validation: + minLength: 1 + maxLength: 65535 + created_at: + type: optional docs: >- - The retrieved custom attribute. If `with_definition` was set to `true` - in the request, - - the custom attribute definition is returned in the `definition` field. - errors: - type: optional> - docs: Any errors that occurred during the request. + The timestamp of when the snippet was initially added to the site, in + RFC 3339 format. + access: read-only + updated_at: + type: optional + docs: >- + The timestamp of when the snippet was last updated on the site, in RFC + 3339 format. + access: read-only source: openapi: openapi/openapi.json - GetCustomerGroupResponse: + SortOrder: + enum: + - DESC + - ASC docs: >- - Defines the fields that are included in the response body of - - a request to the - [RetrieveCustomerGroup](api-endpoint:CustomerGroups-RetrieveCustomerGroup) - endpoint. + The order (e.g., chronological or alphabetical) in which results from a + request are returned. + source: + openapi: openapi/openapi.json + SourceApplication: + docs: Represents information about the application used to generate a change. + properties: + product: + type: optional + docs: |- + __Read only__ The [product](entity:Product) type of the application. + See [Product](#type-product) for possible values + application_id: + type: optional> + docs: >- + __Read only__ The Square-assigned ID of the application. This field is + used only if the + [product](entity:Product) type is `EXTERNAL_API`. + name: + type: optional> + docs: >- + __Read only__ The display name of the application - Either `errors` or `group` is present in a given response (never both). - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - group: - type: optional - docs: The retrieved customer group. + (for example, `"Custom Application"` or `"Square POS 4.74 for + Android"`). source: openapi: openapi/openapi.json - GetCustomerResponse: - docs: |- - Defines the fields that are included in the response body of - a request to the `RetrieveCustomer` endpoint. - - Either `errors` or `customer` is present in a given response (never both). + SquareAccountDetails: + docs: Additional details about Square Account payments. properties: + payment_source_token: + type: optional> + docs: Unique identifier for the payment source used for this payment. + validation: + maxLength: 255 errors: - type: optional> - docs: Any errors that occurred during the request. - customer: - type: optional - docs: The requested customer. + type: optional>> + docs: Information about errors encountered during the request. source: openapi: openapi/openapi.json - GetCustomerSegmentResponse: - docs: >- - Defines the fields that are included in the response body for requests to - the `RetrieveCustomerSegment` endpoint. - - - Either `errors` or `segment` is present in a given response (never both). + StandardUnitDescription: + docs: Contains the name and abbreviation for standard measurement unit. properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - segment: - type: optional - docs: The retrieved customer segment. + unit: + type: optional + docs: Identifies the measurement unit being described. + name: + type: optional> + docs: UI display name of the measurement unit. For example, 'Pound'. + abbreviation: + type: optional> + docs: UI display abbreviation for the measurement unit. For example, 'lb'. source: openapi: openapi/openapi.json - GetDisputeEvidenceResponse: - docs: Defines the fields in a `RetrieveDisputeEvidence` response. + StandardUnitDescriptionGroup: + docs: Group of standard measurement units. properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - evidence: - type: optional - docs: Metadata about the dispute evidence file. + standard_unit_descriptions: + type: optional>> + docs: >- + List of standard (non-custom) measurement units in this description + group. + language_code: + type: optional> + docs: IETF language tag. source: openapi: openapi/openapi.json - GetDisputeResponse: - docs: Defines fields in a `RetrieveDispute` response. + SubmitEvidenceResponse: + docs: Defines the fields in a `SubmitEvidence` response. properties: errors: type: optional> docs: Information about errors encountered during the request. dispute: type: optional - docs: Details about the requested `Dispute`. - source: - openapi: openapi/openapi.json - GetEmployeeResponse: - properties: - employee: optional - errors: - type: optional> - docs: Any errors that occurred during the request. + docs: The `Dispute` for which evidence was submitted. source: openapi: openapi/openapi.json - GetGiftCardFromGANResponse: + Subscription: docs: >- - A response that contains a `GiftCard`. This response might contain a set - of `Error` objects + Represents a subscription purchased by a customer. - if the request resulted in errors. + + For more information, see + + [Manage + Subscriptions](https://developer.squareup.com/docs/subscriptions-api/manage-subscriptions). properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - gift_card: - type: optional + id: + type: optional + docs: The Square-assigned ID of the subscription. + validation: + maxLength: 255 + access: read-only + location_id: + type: optional + docs: The ID of the location associated with the subscription. + access: read-only + plan_variation_id: + type: optional docs: >- - A gift card that was fetched, if present. It returns empty if an error - occurred. - source: - openapi: openapi/openapi.json - GetGiftCardFromNonceResponse: - docs: >- - A response that contains a `GiftCard` object. If the request resulted in - errors, + The ID of the subscribed-to [subscription plan + variation](entity:CatalogSubscriptionPlanVariation). + access: read-only + customer_id: + type: optional + docs: The ID of the subscribing [customer](entity:Customer) profile. + access: read-only + start_date: + type: optional + docs: >- + The `YYYY-MM-DD`-formatted date (for example, 2013-01-15) to start the + subscription. + access: read-only + canceled_date: + type: optional> + docs: >- + The `YYYY-MM-DD`-formatted date (for example, 2013-01-15) to cancel + the subscription, - the response contains a set of `Error` objects. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - gift_card: - type: optional - docs: The retrieved gift card. - source: - openapi: openapi/openapi.json - GetGiftCardResponse: - docs: >- - A response that contains a `GiftCard`. The response might contain a set of - `Error` objects + when the subscription status changes to `CANCELED` and the + subscription billing stops. - if the request resulted in errors. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - gift_card: - type: optional - docs: The gift card retrieved. - source: - openapi: openapi/openapi.json - GetInventoryAdjustmentResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - adjustment: - type: optional - docs: The requested [InventoryAdjustment](entity:InventoryAdjustment). - source: - openapi: openapi/openapi.json - GetInventoryChangesResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - changes: - type: optional> - docs: The set of inventory changes for the requested object and locations. - cursor: + + If this field is not set, the subscription ends according its + subscription plan. + + + This field cannot be updated, other than being cleared. + charged_through_date: type: optional docs: >- - The pagination cursor to be used in a subsequent request. If unset, + The `YYYY-MM-DD`-formatted date up to when the subscriber is invoiced + for the - this is the final response. + subscription. - See the - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) - guide for more information. + After the invoice is sent for a given billing period, + + this date will be the last day of the billing period. + + For example, + + suppose for the month of May a subscriber gets an invoice + + (or charged the card) on May 1. For the monthly billing scenario, + + this date is then set to May 31. + access: read-only + status: + type: optional + docs: |- + The current status of the subscription. + See [SubscriptionStatus](#type-subscriptionstatus) for possible values + tax_percentage: + type: optional> + docs: |- + The tax amount applied when billing the subscription. The + percentage is expressed in decimal form, using a `'.'` as the decimal + separator and without a `'%'` sign. For example, a value of `7.5` + corresponds to 7.5%. + invoice_ids: + type: optional> + docs: |- + The IDs of the [invoices](entity:Invoice) created for the + subscription, listed in order when the invoices were created + (newest invoices appear first). + access: read-only + price_override_money: + type: optional + docs: >- + A custom price which overrides the cost of a subscription plan + variation with `STATIC` pricing. + + This field does not affect itemized subscriptions with `RELATIVE` + pricing. Instead, + + you should edit the Subscription's [order + template](https://developer.squareup.com/docs/subscriptions-api/manage-subscriptions#phases-and-order-templates). + version: + type: optional + docs: >- + The version of the object. When updating an object, the version + + supplied must match the version in the database, otherwise the write + will + + be rejected as conflicting. + created_at: + type: optional + docs: The timestamp when the subscription was created, in RFC 3339 format. + access: read-only + card_id: + type: optional> + docs: |- + The ID of the [subscriber's](entity:Customer) [card](entity:Card) + used to charge for the subscription. + timezone: + type: optional + docs: >- + Timezone that will be used in date calculations for the subscription. + + Defaults to the timezone of the location based on `location_id`. + + Format: the IANA Timezone Database identifier for the location + timezone (for example, `America/Los_Angeles`). + access: read-only + source: + type: optional + docs: The origination details of the subscription. + actions: + type: optional>> + docs: >- + The list of scheduled actions on this subscription. It is set only in + the response from + + [RetrieveSubscription](api-endpoint:Subscriptions-RetrieveSubscription) + with the query parameter + + of `include=actions` or from + + [SearchSubscriptions](api-endpoint:Subscriptions-SearchSubscriptions) + with the input parameter + + of `include:["actions"]`. + monthly_billing_anchor_date: + type: optional + docs: >- + The day of the month on which the subscription will issue invoices and + publish orders. + access: read-only + phases: + type: optional> + docs: array of phases for this subscription + access: read-only source: openapi: openapi/openapi.json - GetInventoryCountResponse: + SubscriptionAction: + docs: Represents an action as a pending change to a subscription. properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - counts: - type: optional> - docs: |- - The current calculated inventory counts for the requested object and - locations. - cursor: + id: type: optional + docs: The ID of an action scoped to a subscription. + type: + type: optional + docs: >- + The type of the action. + + See [SubscriptionActionType](#type-subscriptionactiontype) for + possible values + effective_date: + type: optional> + docs: >- + The `YYYY-MM-DD`-formatted date when the action occurs on the + subscription. + monthly_billing_anchor_date: + type: optional> docs: >- - The pagination cursor to be used in a subsequent request. If unset, - - this is the final response. - - - See the - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) - guide for more information. + The new billing anchor day value, for a `CHANGE_BILLING_ANCHOR_DATE` + action. + phases: + type: optional>> + docs: A list of Phases, to pass phase-specific information used in the swap. + new_plan_variation_id: + type: optional> + docs: >- + The target subscription plan variation that a subscription switches + to, for a `SWAP_PLAN` action. source: openapi: openapi/openapi.json - GetInventoryPhysicalCountResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - count: - type: optional - docs: The requested [InventoryPhysicalCount](entity:InventoryPhysicalCount). + SubscriptionActionType: + enum: + - CANCEL + - PAUSE + - RESUME + - SWAP_PLAN + - CHANGE_BILLING_ANCHOR_DATE + docs: Supported types of an action as a pending change to a subscription. source: openapi: openapi/openapi.json - GetInventoryTransferResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - transfer: - type: optional - docs: The requested [InventoryTransfer](entity:InventoryTransfer). + SubscriptionCadence: + enum: + - DAILY + - WEEKLY + - EVERY_TWO_WEEKS + - THIRTY_DAYS + - SIXTY_DAYS + - NINETY_DAYS + - MONTHLY + - EVERY_TWO_MONTHS + - QUARTERLY + - EVERY_FOUR_MONTHS + - EVERY_SIX_MONTHS + - ANNUAL + - EVERY_TWO_YEARS + docs: Determines the billing cadence of a [Subscription](entity:Subscription) source: openapi: openapi/openapi.json - RetrieveJobResponse: - docs: >- - Represents a [RetrieveJob](api-endpoint:Team-RetrieveJob) response. Either - `job` or `errors` - - is present in the response. + SubscriptionCreatedEvent: + docs: Published when a [Subscription](entity:Subscription) is created. properties: - job: - type: optional - docs: The retrieved job. - errors: - type: optional> - docs: The errors that occurred during the request. + 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 - RetrieveLocationBookingProfileResponse: + SubscriptionCreatedEventData: properties: - location_booking_profile: - type: optional - docs: The requested location booking profile. - errors: - type: optional> - docs: Errors that occurred during the request. + 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 - RetrieveLocationCustomAttributeDefinitionResponse: - docs: >- - Represents a - [RetrieveLocationCustomAttributeDefinition](api-endpoint:LocationCustomAttributes-RetrieveLocationCustomAttributeDefinition) - response. - - Either `custom_attribute_definition` or `errors` is present in the - response. + SubscriptionCreatedEventObject: properties: - custom_attribute_definition: - type: optional - docs: The retrieved custom attribute definition. - errors: - type: optional> - docs: Any errors that occurred during the request. + subscription: + type: optional + docs: The created subscription. source: openapi: openapi/openapi.json - RetrieveLocationCustomAttributeResponse: - docs: >- - Represents a - [RetrieveLocationCustomAttribute](api-endpoint:LocationCustomAttributes-RetrieveLocationCustomAttribute) - response. - - Either `custom_attribute_definition` or `errors` is present in the - response. + SubscriptionEvent: + docs: Describes changes to a subscription and the subscription status. properties: - custom_attribute: - type: optional + id: + type: string + docs: The ID of the subscription event. + subscription_event_type: + type: SubscriptionEventSubscriptionEventType docs: >- - The retrieved custom attribute. If `with_definition` was set to `true` - in the request, + Type of the subscription event. - the custom attribute definition is returned in the `definition` field. - errors: - type: optional> - docs: Any errors that occurred during the request. + See + [SubscriptionEventSubscriptionEventType](#type-subscriptioneventsubscriptioneventtype) + for possible values + effective_date: + type: string + docs: >- + The `YYYY-MM-DD`-formatted date (for example, 2013-01-15) when the + subscription event occurred. + monthly_billing_anchor_date: + type: optional + docs: >- + The day-of-the-month the billing anchor date was changed to, if + applicable. + access: read-only + info: + type: optional + docs: Additional information about the subscription event. + phases: + type: optional>> + docs: A list of Phases, to pass phase-specific information used in the swap. + plan_variation_id: + type: string + docs: >- + The ID of the subscription plan variation associated with the + subscription. source: openapi: openapi/openapi.json - GetLocationResponse: - docs: >- - Defines the fields that the - [RetrieveLocation](api-endpoint:Locations-RetrieveLocation) - - endpoint returns in a response. + SubscriptionEventInfo: + docs: Provides information about the subscription event. properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - location: - type: optional - docs: The requested location. + detail: + type: optional> + docs: A human-readable explanation for the event. + code: + type: optional + docs: |- + An info code indicating the subscription event that occurred. + See [InfoCode](#type-infocode) for possible values source: openapi: openapi/openapi.json - RetrieveLocationSettingsResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - location_settings: - type: optional - docs: The location settings. + SubscriptionEventInfoCode: + enum: + - LOCATION_NOT_ACTIVE + - LOCATION_CANNOT_ACCEPT_PAYMENT + - CUSTOMER_DELETED + - CUSTOMER_NO_EMAIL + - CUSTOMER_NO_NAME + - USER_PROVIDED + docs: Supported info codes of a subscription event. source: openapi: openapi/openapi.json - GetLoyaltyAccountResponse: - docs: A response that includes the loyalty account. + SubscriptionEventSubscriptionEventType: + enum: + - START_SUBSCRIPTION + - PLAN_CHANGE + - STOP_SUBSCRIPTION + - DEACTIVATE_SUBSCRIPTION + - RESUME_SUBSCRIPTION + - PAUSE_SUBSCRIPTION + - BILLING_ANCHOR_DATE_CHANGED + docs: Supported types of an event occurred to a subscription. + source: + openapi: openapi/openapi.json + SubscriptionPhase: + docs: >- + Describes a phase in a subscription plan variation. For more information, + see [Subscription Plans and + Variations](https://developer.squareup.com/docs/subscriptions-api/plans-and-variations). properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - loyalty_account: - type: optional - docs: The loyalty account. + uid: + type: optional> + docs: >- + The Square-assigned ID of the subscription phase. This field cannot be + changed after a `SubscriptionPhase` is created. + cadence: + type: SubscriptionCadence + docs: >- + The billing cadence of the phase. For example, weekly or monthly. This + field cannot be changed after a `SubscriptionPhase` is created. + + See [SubscriptionCadence](#type-subscriptioncadence) for possible + values + periods: + type: optional> + docs: >- + The number of `cadence`s the phase lasts. If not set, the phase never + ends. Only the last phase can be indefinite. This field cannot be + changed after a `SubscriptionPhase` is created. + recurring_price_money: + type: optional + docs: >- + The amount to bill for each `cadence`. Failure to specify this field + results in a `MISSING_REQUIRED_PARAMETER` error at runtime. + ordinal: + type: optional> + docs: >- + The position this phase appears in the sequence of phases defined for + the plan, indexed from 0. This field cannot be changed after a + `SubscriptionPhase` is created. + pricing: + type: optional + docs: The subscription pricing. source: openapi: openapi/openapi.json - GetLoyaltyProgramResponse: - docs: A response that contains the loyalty program. + SubscriptionPricing: + docs: Describes the pricing for the subscription. properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - program: - type: optional - docs: The loyalty program that was requested. + type: + type: optional + docs: >- + RELATIVE or STATIC + + See [SubscriptionPricingType](#type-subscriptionpricingtype) for + possible values + discount_ids: + type: optional>> + docs: The ids of the discount catalog objects + price_money: + type: optional + docs: The price of the subscription, if STATIC source: openapi: openapi/openapi.json - GetLoyaltyPromotionResponse: - docs: >- - Represents a - [RetrieveLoyaltyPromotionPromotions](api-endpoint:Loyalty-RetrieveLoyaltyPromotion) - response. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - loyalty_promotion: - type: optional - docs: The retrieved loyalty promotion. + SubscriptionPricingType: + enum: + - STATIC + - RELATIVE + docs: Determines the pricing of a [Subscription](entity:Subscription) source: openapi: openapi/openapi.json - GetLoyaltyRewardResponse: - docs: A response that includes the loyalty reward. + SubscriptionSource: + docs: The origination details of the subscription. properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - reward: - type: optional - docs: The loyalty reward retrieved. + name: + type: optional> + docs: |- + The name used to identify the place (physical or digital) that + a subscription originates. If unset, the name defaults to the name + of the application that created the subscription. + validation: + maxLength: 255 source: openapi: openapi/openapi.json - RetrieveMerchantCustomAttributeDefinitionResponse: - docs: >- - Represents a - [RetrieveMerchantCustomAttributeDefinition](api-endpoint:MerchantCustomAttributes-RetrieveMerchantCustomAttributeDefinition) - response. - - Either `custom_attribute_definition` or `errors` is present in the - response. - properties: - custom_attribute_definition: - type: optional - docs: The retrieved custom attribute definition. - errors: - type: optional> - docs: Any errors that occurred during the request. + SubscriptionStatus: + enum: + - PENDING + - ACTIVE + - CANCELED + - DEACTIVATED + - PAUSED + docs: Supported subscription statuses. source: openapi: openapi/openapi.json - RetrieveMerchantCustomAttributeResponse: + SubscriptionTestResult: docs: >- - Represents a - [RetrieveMerchantCustomAttribute](api-endpoint:MerchantCustomAttributes-RetrieveMerchantCustomAttribute) - response. + Represents the details of a webhook subscription, including notification + URL, - Either `custom_attribute_definition` or `errors` is present in the - response. + event types, and signature key. properties: - custom_attribute: - type: optional + id: + type: optional + docs: A Square-generated unique ID for the subscription test result. + validation: + maxLength: 64 + access: read-only + status_code: + type: optional> + docs: The status code returned by the subscription notification URL. + payload: + type: optional> docs: >- - The retrieved custom attribute. If `with_definition` was set to `true` - in the request, + An object containing the payload of the test event. For example, a + `payment.created` event. + created_at: + type: optional + docs: >- + The timestamp of when the subscription was created, in RFC 3339 + format. - the custom attribute definition is returned in the `definition` field. - errors: - type: optional> - docs: Any errors that occurred during the request. + For example, "2016-09-04T23:59:33.123Z". + access: read-only + updated_at: + type: optional + docs: >- + The timestamp of when the subscription was updated, in RFC 3339 + format. For example, "2016-09-04T23:59:33.123Z". + + Because a subscription test result is unique, this field is the same + as the `created_at` field. + access: read-only source: openapi: openapi/openapi.json - GetMerchantResponse: + SubscriptionUpdatedEvent: docs: >- - The response object returned by the - [RetrieveMerchant](api-endpoint:Merchants-RetrieveMerchant) endpoint. + Published when a [Subscription](entity:Subscription) is updated. + + Typically the `subscription.status` is updated as subscriptions become + active + + or cancelled. properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - merchant: - type: optional - docs: The requested `Merchant` object. + 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 - RetrieveMerchantSettingsResponse: + SubscriptionUpdatedEventData: properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - merchant_settings: - type: optional - docs: The merchant settings. + 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 - RetrieveOrderCustomAttributeDefinitionResponse: - docs: Represents a response from getting an order custom attribute definition. + SubscriptionUpdatedEventObject: properties: - custom_attribute_definition: - type: optional - docs: The retrieved custom attribute definition. - errors: - type: optional> - docs: Any errors that occurred during the request. + subscription: + type: optional + docs: The updated subscription. source: openapi: openapi/openapi.json - RetrieveOrderCustomAttributeResponse: - docs: Represents a response from getting an order custom attribute. + SwapPlanResponse: + docs: |- + Defines output parameters in a response of the + [SwapPlan](api-endpoint:Subscriptions-SwapPlan) endpoint. properties: - custom_attribute: - type: optional - docs: >- - The retrieved custom attribute. If `with_definition` was set to `true` - in the request, the custom attribute definition is returned in the - `definition field. errors: type: optional> - docs: Any errors that occurred during the request. + docs: Errors encountered during the request. + subscription: + type: optional + docs: The subscription with the updated subscription plan. + actions: + type: optional> + docs: A list of a `SWAP_PLAN` action created by the request. source: openapi: openapi/openapi.json - GetOrderResponse: - properties: - order: - type: optional - docs: The requested order. - errors: - type: optional> - docs: Any errors that occurred during the request. + TaxCalculationPhase: + enum: + - TAX_SUBTOTAL_PHASE + - TAX_TOTAL_PHASE + docs: When to calculate the taxes due on a cart. source: openapi: openapi/openapi.json - GetPaymentLinkResponse: + TaxIds: + docs: Identifiers for the location used by various governments for tax purposes. properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - payment_link: - type: optional - docs: The payment link that is retrieved. - source: - openapi: openapi/openapi.json - RetrieveScheduledShiftResponse: - docs: >- - Represents a - [RetrieveScheduledShift](api-endpoint:Labor-RetrieveScheduledShift) - response. + eu_vat: + type: optional + docs: |- + The EU VAT number for this location. For example, `IE3426675K`. + If the EU VAT number is present, it is well-formed and has been + validated with VIES, the VAT Information Exchange System. + access: read-only + fr_siret: + type: optional + docs: >- + The SIRET (Système d'Identification du Répertoire des Entreprises et + de leurs Etablissements) + + number is a 14-digit code issued by the French INSEE. For example, + `39922799000021`. + access: read-only + fr_naf: + type: optional + docs: >- + The French government uses the NAF (Nomenclature des Activités + Françaises) to display and + + track economic statistical data. This is also called the APE (Activite + Principale de l’Entreprise) code. - Either `scheduled_shift` or `errors` is present in the response. - properties: - scheduled_shift: - type: optional - docs: The requested scheduled shift. - errors: - type: optional> - docs: Any errors that occurred during the request. + For example, `6910Z`. + access: read-only + es_nif: + type: optional + docs: >- + The NIF (Numero de Identificacion Fiscal) number is a nine-character + tax identifier used in Spain. + + If it is present, it has been validated. For example, `73628495A`. + access: read-only + jp_qii: + type: optional + docs: >- + The QII (Qualified Invoice Issuer) number is a 14-character tax + identifier used in Japan. + + For example, `T1234567890123`. + access: read-only source: openapi: openapi/openapi.json - GetSnippetResponse: + TaxInclusionType: + enum: + - ADDITIVE + - INCLUSIVE docs: >- - Represents a `RetrieveSnippet` response. The response can include either - `snippet` or `errors`. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - snippet: - type: optional - docs: The retrieved snippet. + Whether to the tax amount should be additional to or included in the + CatalogItem price. source: openapi: openapi/openapi.json - GetSubscriptionResponse: - docs: >- - Defines output parameters in a response from the - - [RetrieveSubscription](api-endpoint:Subscriptions-RetrieveSubscription) - endpoint. + TeamMember: + docs: A record representing an individual team member for a business. properties: - errors: - type: optional> - docs: Errors encountered during the request. - subscription: - type: optional - docs: The subscription retrieved. + id: + type: optional + docs: The unique ID for the team member. + access: read-only + reference_id: + type: optional> + docs: >- + A second ID used to associate the team member with an entity in + another system. + is_owner: + type: optional + docs: Whether the team member is the owner of the Square account. + access: read-only + status: + type: optional + docs: |- + Describes the status of the team member. + See [TeamMemberStatus](#type-teammemberstatus) for possible values + given_name: + type: optional> + docs: >- + The given name (that is, the first name) associated with the team + member. + family_name: + type: optional> + docs: >- + The family name (that is, the last name) associated with the team + member. + email_address: + type: optional> + docs: >- + The email address associated with the team member. After accepting the + invitation + + from Square, only the team member can change this value. + phone_number: + type: optional> + docs: |- + The team member's phone number, in E.164 format. For example: + +14155552671 - the country code is 1 for US + +551155256325 - the country code is 55 for BR + created_at: + type: optional + docs: The timestamp when the team member was created, in RFC 3339 format. + access: read-only + updated_at: + type: optional + docs: >- + The timestamp when the team member was last updated, in RFC 3339 + format. + access: read-only + assigned_locations: + type: optional + docs: Describes the team member's assigned locations. + wage_setting: + type: optional + docs: >- + Information about the team member's overtime exemption status, job + assignments, and compensation. source: openapi: openapi/openapi.json - GetTeamMemberBookingProfileResponse: + TeamMemberAssignedLocations: + docs: An object that represents a team member's assignment to locations. properties: - team_member_booking_profile: - type: optional - docs: The returned team member booking profile. - errors: - type: optional> - docs: Errors that occurred during the request. + assignment_type: + type: optional + docs: >- + The current assignment type of the team member. + + See + [TeamMemberAssignedLocationsAssignmentType](#type-teammemberassignedlocationsassignmenttype) + for possible values + location_ids: + type: optional>> + docs: The explicit locations that the team member is assigned to. source: openapi: openapi/openapi.json - GetTeamMemberResponse: - docs: >- - Represents a response from a retrieve request containing a `TeamMember` - object or error messages. - properties: - team_member: - type: optional - docs: The successfully retrieved `TeamMember` object. - errors: - type: optional> - docs: The errors that occurred during the request. + TeamMemberAssignedLocationsAssignmentType: + enum: + - ALL_CURRENT_AND_FUTURE_LOCATIONS + - EXPLICIT_LOCATIONS + docs: Enumerates the possible assignment types that the team member can have. source: openapi: openapi/openapi.json - RetrieveTimecardResponse: + TeamMemberBookingProfile: docs: >- - A response to a request to get a `Timecard`. The response contains - - the requested `Timecard` object and might contain a set of `Error` objects - if - - the request resulted in errors. - properties: - timecard: - type: optional - docs: The requested `Timecard`. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: openapi/openapi.json - RetrieveTokenStatusResponse: - docs: |- - Defines the fields that are included in the response body of - a request to the `RetrieveTokenStatus` endpoint. + The booking profile of a seller's team member, including the team member's + ID, display name, description and whether the team member can be booked as + a service provider. properties: - scopes: - type: optional> - docs: The list of scopes associated with an access token. - expires_at: + team_member_id: type: optional - docs: "The date and time when the\_`access_token`\_expires, in RFC 3339 format. Empty if the token never expires." - client_id: + docs: >- + The ID of the [TeamMember](entity:TeamMember) object for the team + member associated with the booking profile. + validation: + maxLength: 32 + access: read-only + description: + type: optional + docs: The description of the team member. + validation: + maxLength: 65536 + access: read-only + display_name: type: optional + docs: The display name of the team member. + validation: + maxLength: 512 + access: read-only + is_bookable: + type: optional> docs: >- - The Square-issued application ID associated with the access token. - This is the same application ID used to obtain the token. + Indicates whether the team member can be booked through the Bookings + API or the seller's online booking channel or site (`true`) or not + (`false`). + profile_image_url: + type: optional + docs: The URL of the team member's image for the bookings profile. validation: - maxLength: 191 + maxLength: 2048 + 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: The ID of the authorizing merchant's business. - validation: - minLength: 8 - maxLength: 191 - errors: - type: optional> - docs: ' Any errors that occurred during the request.' + 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 - GetTransactionResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the - [RetrieveTransaction](api-endpoint:Transactions-RetrieveTransaction) - endpoint. - - - One of `errors` or `transaction` is present in a given response (never - both). + TeamMemberCreatedEventData: properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - transaction: - type: optional - docs: The requested transaction. + 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 - GetVendorResponse: - docs: >- - Represents an output from a call to - [RetrieveVendor](api-endpoint:Vendors-RetrieveVendor). + TeamMemberCreatedEventObject: properties: - errors: - type: optional> - docs: Errors encountered when the request fails. - vendor: - type: optional - docs: The successfully retrieved [Vendor](entity:Vendor) object. + team_member: + type: optional + docs: The created team member. source: openapi: openapi/openapi.json - GetWageSettingResponse: + TeamMemberInvitationStatus: + enum: + - UNINVITED + - PENDING + - ACCEPTED docs: >- - Represents a response from a retrieve request containing the specified - `WageSetting` object or error messages. - properties: - wage_setting: - type: optional - docs: The successfully retrieved `WageSetting` object. - errors: - type: optional> - docs: The errors that occurred during the request. + Enumerates the possible invitation statuses the team member can have + within a business. source: openapi: openapi/openapi.json - GetWebhookSubscriptionResponse: + TeamMemberStatus: + enum: + - ACTIVE + - INACTIVE docs: >- - Defines the fields that are included in the response body of - - a request to the - [RetrieveWebhookSubscription](api-endpoint:WebhookSubscriptions-RetrieveWebhookSubscription) - endpoint. - - - Note: if there are errors processing the request, the - [Subscription](entity:WebhookSubscription) will not be - - present. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - subscription: - type: optional - docs: The requested [Subscription](entity:WebhookSubscription). + Enumerates the possible statuses the team member can have within a + business. source: openapi: openapi/openapi.json - RevokeTokenResponse: + TeamMemberUpdatedEvent: + docs: Published when a Team Member is updated. properties: - success: - type: optional - docs: If the request is successful, this is `true`. - 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. + 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 - RiskEvaluation: - docs: >- - Represents fraud risk information for the associated payment. - - - When you take a payment through Square's Payments API (using the - `CreatePayment` - - endpoint), Square evaluates it and assigns a risk level to the payment. - Sellers - - can use this information to determine the course of action (for example, - - provide the goods/services or refund the payment). + TeamMemberUpdatedEventData: properties: - created_at: + type: + type: optional> + docs: Name of the affected object’s type, `"team_member"`. + id: type: optional - docs: The timestamp when payment risk was evaluated, in RFC 3339 format. - access: read-only - risk_level: - type: optional - docs: >- - The risk level associated with the payment - - See [RiskEvaluationRiskLevel](#type-riskevaluationrisklevel) for - possible values + docs: ID of the affected team member. + object: + type: optional + docs: An object containing the updated team member. source: openapi: openapi/openapi.json - RiskEvaluationRiskLevel: - enum: - - PENDING - - NORMAL - - MODERATE - - HIGH + TeamMemberUpdatedEventObject: + properties: + team_member: + type: optional + docs: The updated team member. source: openapi: openapi/openapi.json - SaveCardOptions: - docs: Describes save-card action fields. + TeamMemberWage: + docs: |- + Job and wage information for a [team member](entity:TeamMember). + This convenience object provides details needed to specify the `wage` + field for a [timecard](entity:Timecard). properties: - customer_id: - type: string - docs: The square-assigned ID of the customer linked to the saved card. - card_id: + id: type: optional - docs: The id of the created card-on-file. - validation: - maxLength: 64 - access: read-only - reference_id: + docs: The UUID for this object. + team_member_id: type: optional> - docs: >- - An optional user-defined reference ID that can be used to associate - - this `Card` to another entity in an external system. For example, a - customer - - ID generated by a third-party system. - validation: - maxLength: 128 + docs: The `TeamMember` that this wage is assigned to. + title: + type: optional> + docs: The job title that this wage relates to. + hourly_rate: + type: optional + docs: |- + Can be a custom-set hourly wage or the calculated effective hourly + wage based on the annual wage and hours worked per week. + job_id: + type: optional> + docs: An identifier for the [job](entity:Job) that this wage relates to. + tip_eligible: + type: optional> + docs: Whether team members are eligible for tips when working this job. source: openapi: openapi/openapi.json - ScheduledShift: - docs: >- - Represents a specific time slot in a work schedule. This object is used to - manage the - - lifecycle of a scheduled shift from the draft to published state. A - scheduled shift contains - - the latest draft shift details and current published shift details. + TeamMemberWageSettingUpdatedEvent: + docs: Published when a Wage Setting is updated. properties: - id: - type: optional - docs: '**Read only** The Square-issued ID of the scheduled shift.' - validation: - maxLength: 255 - draft_shift_details: - type: optional - docs: >- - The latest draft shift details for the scheduled shift. Draft shift - details are used to - - stage and manage shifts before publishing. This field is always - present. - published_shift_details: - type: optional - docs: >- - The current published (public) shift details for the scheduled shift. - This field is - - present only if the shift was published. - version: - type: optional + merchant_id: + type: optional> + docs: The ID of the target merchant associated with the event. + type: + type: optional> docs: >- - **Read only** The current version of the scheduled shift, which is - incremented with each update. - - This field is used for [optimistic - concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) - - control to ensure that requests don't overwrite data from another - request. + 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: >- - The timestamp of when the scheduled shift was created, in RFC 3339 - format presented as UTC. + docs: Timestamp of when the event was created, in RFC 3339 format. access: read-only - updated_at: + 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: >- - The timestamp of when the scheduled shift was last updated, in RFC - 3339 format presented as UTC. - access: read-only + 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 - ScheduledShiftDetails: + TeamMemberWageSettingUpdatedEventObject: + properties: + wage_setting: + type: optional + docs: The updated team member wage setting. + source: + openapi: openapi/openapi.json + Tender: docs: >- - Represents shift details for draft and published versions of a [scheduled - shift](entity:ScheduledShift), - - such as job ID, team member assignment, and start and end times. + Represents a tender (i.e., a method of payment) used in a Square + transaction. properties: - team_member_id: - type: optional> - docs: >- - The ID of the [team member](entity:TeamMember) scheduled for the - shift. - validation: - maxLength: 255 - location_id: - type: optional> - docs: The ID of the [location](entity:Location) the shift is scheduled for. - validation: - maxLength: 255 - job_id: - type: optional> - docs: The ID of the [job](entity:Job) the shift is scheduled for. - start_at: - type: optional> - docs: >- - The start time of the shift, in RFC 3339 format in the time zone - + - - offset of the shift location specified in `location_id`. Precision up - to the minute - - is respected; seconds are truncated. - end_at: + id: + type: optional + docs: The tender's unique ID. It is the associated payment ID. + validation: + maxLength: 192 + location_id: type: optional> - docs: >- - The end time for the shift, in RFC 3339 format in the time zone + - - offset of the shift location specified in `location_id`. Precision up - to the minute - - is respected; seconds are truncated. - notes: + docs: The ID of the transaction's associated location. + validation: + maxLength: 50 + transaction_id: type: optional> - docs: Optional notes for the shift. + docs: The ID of the tender's associated transaction. validation: - maxLength: 1000 - is_deleted: - type: optional> + maxLength: 192 + created_at: + type: optional + docs: The timestamp for when the tender was created, in RFC 3339 format. + validation: + maxLength: 32 + access: read-only + note: + type: optional> + docs: An optional note associated with the tender at the time of payment. + validation: + maxLength: 500 + amount_money: + type: optional docs: >- - Indicates whether the draft shift version is deleted. If set to `true` - when the shift + The total amount of the tender, including `tip_money`. If the tender + has a `payment_id`, - is published, the entire scheduled shift (including the published - shift) is deleted and + the `total_money` of the corresponding [Payment](entity:Payment) will + be equal to the - cannot be accessed using any endpoint. - timezone: - type: optional + `amount_money` of the tender. + tip_money: + type: optional + docs: The tip's amount of the tender. + processing_fee_money: + type: optional docs: >- - The time zone of the shift location, calculated based on the - `location_id`. This field + The amount of any Square processing fees applied to the tender. - is provided for convenience. - access: read-only - source: - openapi: openapi/openapi.json - ScheduledShiftFilter: - docs: >- - Defines filter criteria for a - [SearchScheduledShifts](api-endpoint:Labor-SearchScheduledShifts) - request. Multiple filters in a query are combined as an `AND` operation. - properties: - location_ids: - type: optional>> - docs: >- - Return shifts for the specified locations. When omitted, shifts for - all + This field is not immediately populated when a new transaction is + created. - locations are returned. If needed, call - [ListLocations](api-endpoint:Locations-ListLocations) + It is usually available after about ten seconds. + customer_id: + type: optional> + docs: >- + If the tender is associated with a customer or represents a customer's + card on file, - to get location IDs. - start: - type: optional + this is the ID of the associated customer. + validation: + maxLength: 191 + type: + type: TenderType docs: |- - Return shifts whose `start_at` time is within the specified - time range (inclusive). - end: - type: optional + The type of tender, such as `CARD` or `CASH`. + See [TenderType](#type-tendertype) for possible values + card_details: + type: optional docs: |- - Return shifts whose `end_at` time is within the specified - time range (inclusive). - workday: - type: optional - docs: Return shifts based on a workday date range. - team_member_ids: - type: optional>> - docs: >- - Return shifts assigned to specified team members. If needed, call - - [SearchTeamMembers](api-endpoint:Team-SearchTeamMembers) to get team - member IDs. - + The details of the card tender. - To return only the shifts assigned to the specified team members, - include the + This value is present only if the value of `type` is `CARD`. + cash_details: + type: optional + docs: |- + The details of the cash tender. - `assignment_status` filter in the query. Otherwise, all unassigned - shifts are + This value is present only if the value of `type` is `CASH`. + bank_account_details: + type: optional + docs: |- + The details of the bank account tender. - returned along with shifts assigned to the specified team members. - assignment_status: - type: optional + This value is present only if the value of `type` is `BANK_ACCOUNT`. + buy_now_pay_later_details: + type: optional docs: >- - Return shifts based on whether a team member is assigned. A shift is - - assigned if the `team_member_id` field is populated in the - `draft_shift_details` - - or `published_shift details` field of the shift. + The details of a Buy Now Pay Later tender. - To return only draft or published shifts, include the - `scheduled_shift_statuses` + This value is present only if the value of `type` is + `BUY_NOW_PAY_LATER`. + square_account_details: + type: optional + docs: |- + The details of a Square Account tender. - filter in the query. + This value is present only if the value of `type` is `SQUARE_ACCOUNT`. + additional_recipients: + type: optional>> + docs: >- + Additional recipients (other than the merchant) receiving a portion of + this tender. - See - [ScheduledShiftFilterAssignmentStatus](#type-scheduledshiftfilterassignmentstatus) - for possible values - scheduled_shift_statuses: - type: optional>> + For example, fees assessed on the purchase by a third party + integration. + payment_id: + type: optional> docs: >- - Return shifts based on the draft or published status of the shift. + The ID of the [Payment](entity:Payment) that corresponds to this + tender. - A shift is published if the `published_shift_details` field is - present. + This value is only present for payments created with the v2 Payments + API. + validation: + maxLength: 192 + source: + openapi: openapi/openapi.json + TenderBankAccountDetails: + docs: |- + Represents the details of a tender with `type` `BANK_ACCOUNT`. + See [BankAccountPaymentDetails](entity:BankAccountPaymentDetails) + for more exposed details of a bank account payment. + properties: + status: + type: optional + docs: >- + The bank account payment's current state. - Note that shifts with `draft_shift_details.is_deleted` set to `true` - are ignored - with the `DRAFT` filter. + See + [TenderBankAccountPaymentDetailsStatus](entity:TenderBankAccountDetailsStatus) + for possible values. See - [ScheduledShiftFilterScheduledShiftStatus](#type-scheduledshiftfilterscheduledshiftstatus) + [TenderBankAccountDetailsStatus](#type-tenderbankaccountdetailsstatus) for possible values source: openapi: openapi/openapi.json - ScheduledShiftFilterAssignmentStatus: + TenderBankAccountDetailsStatus: enum: - - ASSIGNED - - UNASSIGNED - docs: |- - Defines valid values for the `assignment_status` filter in a - [SearchScheduledShifts](api-endpoint:Labor-SearchScheduledShifts) request. - Assignment status is based on the `draft_shift_details.team_member_id` and - `published_shift_details.team_member_id` fields of the scheduled shift. + - PENDING + - COMPLETED + - FAILED + docs: Indicates the bank account payment's current status. source: openapi: openapi/openapi.json - ScheduledShiftFilterScheduledShiftStatus: - enum: - - DRAFT - - PUBLISHED - docs: |- - Defines valid values for the `scheduled_shift_statuses` filter in a - [SearchScheduledShifts](api-endpoint:Labor-SearchScheduledShifts) request. + TenderBuyNowPayLaterDetails: + docs: Represents the details of a tender with `type` `BUY_NOW_PAY_LATER`. + properties: + buy_now_pay_later_brand: + type: optional + docs: |- + The Buy Now Pay Later brand. + See [Brand](#type-brand) for possible values + status: + type: optional + docs: >- + The buy now pay later payment's current state (such as `AUTHORIZED` or + + `CAPTURED`). See + [TenderBuyNowPayLaterDetailsStatus](entity:TenderBuyNowPayLaterDetailsStatus) + + for possible values. + + See [Status](#type-status) for possible values source: openapi: openapi/openapi.json - ScheduledShiftNotificationAudience: + TenderBuyNowPayLaterDetailsBrand: enum: - - ALL - - AFFECTED - - NONE - docs: >- - Indicates whether Square sends an email notification to team members - - when a scheduled shift is published and which team members receive the - notification. + - OTHER_BRAND + - AFTERPAY source: openapi: openapi/openapi.json - ScheduledShiftQuery: - docs: |- - Represents filter and sort criteria for the `query` field in a - [SearchScheduledShifts](api-endpoint:Labor-SearchScheduledShifts) request. - properties: - filter: - type: optional - docs: Filtering options for the query. - sort: - type: optional - docs: Sorting options for the query. + TenderBuyNowPayLaterDetailsStatus: + enum: + - AUTHORIZED + - CAPTURED + - VOIDED + - FAILED source: openapi: openapi/openapi.json - ScheduledShiftSort: + TenderCardDetails: docs: >- - Defines sort criteria for a - [SearchScheduledShifts](api-endpoint:Labor-SearchScheduledShifts) - - request. + Represents additional details of a tender with `type` `CARD` or + `SQUARE_GIFT_CARD` properties: - field: - type: optional + status: + type: optional docs: >- - The field to sort on. The default value is `START_AT`. + The credit card payment's current state (such as `AUTHORIZED` or - See [ScheduledShiftSortField](#type-scheduledshiftsortfield) for + `CAPTURED`). See + [TenderCardDetailsStatus](entity:TenderCardDetailsStatus) + + for possible values. + + See [TenderCardDetailsStatus](#type-tendercarddetailsstatus) for possible values - order: - type: optional - docs: |- - The order in which results are returned. The default value is `ASC`. - See [SortOrder](#type-sortorder) for possible values + card: + type: optional + docs: The credit card's non-confidential details. + entry_method: + type: optional + docs: >- + The method used to enter the card's details for the transaction. + + See [TenderCardDetailsEntryMethod](#type-tendercarddetailsentrymethod) + for possible values source: openapi: openapi/openapi.json - ScheduledShiftSortField: + TenderCardDetailsEntryMethod: enum: - - START_AT - - END_AT - - CREATED_AT - - UPDATED_AT - docs: |- - Defines valid values for the `field` sort setting in a - [SearchScheduledShifts](api-endpoint:Labor-SearchScheduledShifts) request. + - SWIPED + - KEYED + - EMV + - ON_FILE + - CONTACTLESS + docs: Indicates the method used to enter the card's details. source: openapi: openapi/openapi.json - ScheduledShiftWorkday: - docs: >- - A `ScheduledShift` search query filter parameter that sets a range of days - that - - a `Shift` must start or end in before passing the filter condition. + TenderCardDetailsStatus: + enum: + - AUTHORIZED + - CAPTURED + - VOIDED + - FAILED + docs: Indicates the card transaction's current status. + source: + openapi: openapi/openapi.json + TenderCashDetails: + docs: Represents the details of a tender with `type` `CASH`. properties: - date_range: - type: optional - docs: Dates for fetching the scheduled shifts. - match_scheduled_shifts_by: - type: optional + buyer_tendered_money: + type: optional docs: >- - The strategy on which the dates are applied. - - See [ScheduledShiftWorkdayMatcher](#type-scheduledshiftworkdaymatcher) - for possible values - default_timezone: - type: optional> + The total amount of cash provided by the buyer, before change is + given. + change_back_money: + type: optional + docs: The amount of change returned to the buyer. + source: + openapi: openapi/openapi.json + TenderSquareAccountDetails: + docs: Represents the details of a tender with `type` `SQUARE_ACCOUNT`. + properties: + status: + type: optional docs: >- - Location-specific timezones convert workdays to datetime filters. + The Square Account payment's current state (such as `AUTHORIZED` or - Every location included in the query must have a timezone or this - field + `CAPTURED`). See + [TenderSquareAccountDetailsStatus](entity:TenderSquareAccountDetailsStatus) - must be provided as a fallback. Format: the IANA timezone database + for possible values. - identifier for the relevant timezone. + See [Status](#type-status) for possible values source: openapi: openapi/openapi.json - ScheduledShiftWorkdayMatcher: + TenderSquareAccountDetailsStatus: enum: - - START_AT - - END_AT - - INTERSECTION - docs: Defines the logic used to apply a workday filter. + - AUTHORIZED + - CAPTURED + - VOIDED + - FAILED source: openapi: openapi/openapi.json - SearchAvailabilityFilter: - docs: A query filter to search for buyer-accessible availabilities by. + TenderType: + enum: + - CARD + - CASH + - THIRD_PARTY_CARD + - SQUARE_GIFT_CARD + - NO_SALE + - BANK_ACCOUNT + - WALLET + - BUY_NOW_PAY_LATER + - SQUARE_ACCOUNT + - OTHER + docs: Indicates a tender's type. + source: + openapi: openapi/openapi.json + TerminalAction: + docs: Represents an action processed by the Square Terminal. properties: - start_at_range: - type: TimeRange + id: + type: optional + docs: A unique ID for this `TerminalAction`. + validation: + minLength: 10 + maxLength: 255 + access: read-only + device_id: + type: optional> + docs: |- + The unique Id of the device intended for this `TerminalAction`. + The Id can be retrieved from /v2/devices api. + deadline_duration: + type: optional> docs: >- - The query expression to search for buy-accessible availabilities with - their starting times falling within the specified time range. + The duration as an RFC 3339 duration, after which the action will be + automatically canceled. - The time range must be at least 24 hours and at most 32 days long. + TerminalActions that are `PENDING` will be automatically `CANCELED` + and have a cancellation reason - For waitlist availabilities, the time range can be 0 or more up to 367 - days long. - location_id: - type: optional> - docs: >- - The query expression to search for buyer-accessible availabilities - with their location IDs matching the specified location ID. + of `TIMED_OUT` - This query expression cannot be set if `booking_id` is set. - validation: - maxLength: 32 - segment_filters: - type: optional>> - docs: >- - The query expression to search for buyer-accessible availabilities - matching the specified list of segment filters. - If the size of the `segment_filters` list is `n`, the search returns - availabilities with `n` segments per availability. + Default: 5 minutes from creation - This query expression cannot be set if `booking_id` is set. - booking_id: - type: optional> + Maximum: 5 minutes + status: + type: optional docs: >- - The query expression to search for buyer-accessible availabilities for - an existing booking by matching the specified `booking_id` value. + The status of the `TerminalAction`. - This is commonly used to reschedule an appointment. + Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, + `COMPLETED` + access: read-only + cancel_reason: + type: optional + docs: >- + The reason why `TerminalAction` is canceled. Present if the status is + `CANCELED`. - If this expression is set, the `location_id` and `segment_filters` - expressions cannot be set. - validation: - maxLength: 36 - source: - openapi: openapi/openapi.json - SearchAvailabilityQuery: - docs: The query used to search for buyer-accessible availabilities of bookings. - properties: - filter: - type: SearchAvailabilityFilter + See [ActionCancelReason](#type-actioncancelreason) for possible values + created_at: + type: optional docs: >- - The query filter to search for buyer-accessible availabilities of - existing bookings. - source: - openapi: openapi/openapi.json - SearchAvailabilityResponse: - properties: - availabilities: - type: optional> - docs: List of appointment slots available for booking. - errors: - type: optional> - docs: Errors that occurred during the request. - source: - openapi: openapi/openapi.json - SearchCatalogItemsRequestStockLevel: - enum: - - OUT - - LOW - docs: Defines supported stock levels of the item inventory. - source: - openapi: openapi/openapi.json - SearchCatalogItemsResponse: - docs: >- - Defines the response body returned from the - [SearchCatalogItems](api-endpoint:Catalog-SearchCatalogItems) endpoint. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - items: - type: optional> - docs: Returned items matching the specified query expressions. - cursor: + The time when the `TerminalAction` was created as an RFC 3339 + timestamp. + access: read-only + updated_at: + type: optional + docs: >- + The time when the `TerminalAction` was last updated as an RFC 3339 + timestamp. + access: read-only + app_id: + type: optional + docs: The ID of the application that created the action. + access: read-only + location_id: type: optional + docs: The location id the action is attached to, if a link can be made. + validation: + maxLength: 64 + access: read-only + type: + type: optional + docs: |- + Represents the type of the action. + See [ActionType](#type-actiontype) for possible values + qr_code_options: + type: optional docs: >- - Pagination token used in the next request to return more of the search - result. - matched_variation_ids: - type: optional> + Describes configuration for the QR code action. Requires `QR_CODE` + type. + save_card_options: + type: optional docs: >- - Ids of returned item variations matching the specified query - expression. - source: - openapi: openapi/openapi.json - SearchCatalogObjectsResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - cursor: - type: optional + Describes configuration for the save-card action. Requires `SAVE_CARD` + type. + signature_options: + type: optional docs: >- - The pagination cursor to be used in a subsequent request. If unset, - this is the final response. - - See - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) - for more information. - objects: - type: optional> - docs: The CatalogObjects returned. - related_objects: - type: optional> + Describes configuration for the signature capture action. Requires + `SIGNATURE` type. + confirmation_options: + type: optional docs: >- - A list of CatalogObjects referenced by the objects in the `objects` - field. - latest_time: - type: optional + Describes configuration for the confirmation action. Requires + `CONFIRMATION` type. + receipt_options: + type: optional docs: >- - When the associated product catalog was last updated. Will - - match the value for `end_time` or `cursor` if either field is included - in the `SearchCatalog` request. - source: - openapi: openapi/openapi.json - SearchCustomersResponse: - docs: >- - Defines the fields that are included in the response body of + Describes configuration for the receipt action. Requires `RECEIPT` + type. + data_collection_options: + type: optional + docs: >- + Describes configuration for the data collection action. Requires + `DATA_COLLECTION` type. + select_options: + type: optional + docs: Describes configuration for the select action. Requires `SELECT` type. + device_metadata: + type: optional + docs: >- + Details about the Terminal that received the action request (such as + battery level, - a request to the `SearchCustomers` endpoint. + operating system version, and network connection settings). - Either `errors` or `customers` is present in a given response (never - both). - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - customers: - type: optional> + Only available for `PING` action type. + await_next_action: + type: optional> docs: >- - The customer profiles that match the search query. If any search - condition is not met, the result is an empty object (`{}`). - - Only customer profiles with public information (`given_name`, - `family_name`, `company_name`, `email_address`, or `phone_number`) + Indicates the action will be linked to another action and requires a + waiting dialog to be - are included in the response. - cursor: - type: optional - docs: >- - A pagination cursor that can be used during subsequent calls + displayed instead of returning to the idle screen on completion of the + action. - to `SearchCustomers` to retrieve the next set of results associated - with the original query. Pagination cursors are only present when + Only supported on SIGNATURE, CONFIRMATION, DATA_COLLECTION, and SELECT + types. + await_next_action_duration: + type: optional> + docs: >- + The timeout duration of the waiting dialog as an RFC 3339 duration, + after which the - a request succeeds and additional results are available. + waiting dialog will no longer be displayed and the Terminal will + return to the idle screen. - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - count: - type: optional - docs: >- - The total count of customers associated with the Square account that - match the search query. Only customer profiles with + Default: 5 minutes from when the waiting dialog is displayed - 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. + Maximum: 5 minutes source: openapi: openapi/openapi.json - SearchEventsFilter: - docs: Criteria to filter events by. + TerminalActionActionType: + enum: + - QR_CODE + - PING + - SAVE_CARD + - SIGNATURE + - CONFIRMATION + - RECEIPT + - DATA_COLLECTION + - SELECT + docs: >- + Describes the type of this unit and indicates which field contains the + unit information. This is an ‘open’ enum. + source: + openapi: openapi/openapi.json + TerminalActionCreatedEvent: + docs: Published when a TerminalAction is created. properties: - event_types: - type: optional>> - docs: Filter events by event types. - merchant_ids: - type: optional>> - docs: Filter events by merchant. - location_ids: - type: optional>> - docs: Filter events by location. + 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: Filter events by when they were created. + 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 - SearchEventsQuery: - docs: Contains query criteria for the search. + 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: - type: optional - docs: Criteria to filter events by. + type: optional + docs: Options for filtering returned `TerminalAction`s sort: - type: optional - docs: Criteria to sort events by. + type: optional + docs: Option for sorting returned `TerminalAction` objects. source: openapi: openapi/openapi.json - SearchEventsResponse: - docs: >- - Defines the fields that are included in the response body of - - a request to the [SearchEvents](api-endpoint:Events-SearchEvents) - endpoint. - - - Note: if there are errors processing the request, the events field will - not be - - present. + TerminalActionQueryFilter: properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - events: - type: optional> - docs: The list of [Event](entity:Event)s returned by the search. - metadata: - type: optional> - docs: >- - Contains the metadata of an event. For more information, see - [Event](entity:Event). - cursor: - type: optional + device_id: + type: optional> docs: >- - When a response is truncated, it includes a cursor that you can use in - a subsequent request to fetch the next set of events. If empty, this - is the final response. - + `TerminalAction`s associated with a specific device. If no device is + specified then all - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - source: - openapi: openapi/openapi.json - SearchEventsSort: - docs: Criteria to sort events by. - properties: - field: - type: optional + `TerminalAction`s for the merchant will be displayed. + created_at: + type: optional + docs: |- + Time range for the beginning of the reporting period. Inclusive. + Default value: The current time minus one day. + Note that `TerminalAction`s are available for 30 days after creation. + status: + type: optional> docs: >- - Sort events by event types. + Filter results with the desired status of the `TerminalAction` - See [SearchEventsSortField](#type-searcheventssortfield) for possible - values - order: + Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, + `COMPLETED` + type: + type: optional + docs: >- + Filter results with the requested ActionType. + + See [TerminalActionActionType](#type-terminalactionactiontype) for + possible values + source: + openapi: openapi/openapi.json + TerminalActionQuerySort: + properties: + sort_order: type: optional docs: |- - The order to use for sorting the events. + The order in which results are listed. + - `ASC` - Oldest to newest. + - `DESC` - Newest to oldest (default). See [SortOrder](#type-sortorder) for possible values source: openapi: openapi/openapi.json - SearchEventsSortField: - type: literal<"DEFAULT"> - docs: Specifies the sort key for events returned from a search. - SearchInvoicesResponse: - docs: Describes a `SearchInvoices` response. + TerminalActionUpdatedEvent: + docs: Published when a TerminalAction is updated. properties: - invoices: - type: optional> - docs: The list of invoices returned by the search. - cursor: + 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: >- - When a response is truncated, it includes a cursor that you can use in - a - - subsequent request to fetch the next set of invoices. If empty, this - is the final - - response. - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - errors: - type: optional> - docs: Information about errors encountered during the request. + 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 - SearchLoyaltyAccountsRequestLoyaltyAccountQuery: - docs: The search criteria for the loyalty accounts. + TerminalActionUpdatedEventData: properties: - mappings: - type: optional>> - docs: |- - The set of mappings to use in the loyalty account search. - - This cannot be combined with `customer_ids`. - - Max: 30 mappings - customer_ids: - type: optional>> - docs: |- - The set of customer IDs to use in the loyalty account search. - - This cannot be combined with `mappings`. - - Max: 30 customer IDs + 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 - SearchLoyaltyAccountsResponse: - docs: >- - A response that includes loyalty accounts that satisfy the search - criteria. + TerminalActionUpdatedEventObject: properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - loyalty_accounts: - type: optional> - docs: |- - The loyalty accounts that met the search criteria, - in order of creation date. - cursor: - type: optional - docs: >- - The pagination cursor to use in a subsequent - - request. If empty, this is the final response. - - For more information, - - see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + action: + type: optional + docs: The updated terminal action. source: openapi: openapi/openapi.json - SearchLoyaltyEventsResponse: - docs: |- - A response that contains loyalty events that satisfy the search - criteria, in order by the `created_at` date. + TerminalCheckout: + docs: Represents a checkout processed by the Square Terminal. properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - events: - type: optional> - docs: The loyalty events that satisfy the search criteria. - cursor: + id: type: optional + docs: A unique ID for this `TerminalCheckout`. + validation: + minLength: 10 + maxLength: 255 + access: read-only + amount_money: + type: Money docs: >- - The pagination cursor to be used in a subsequent + The amount of money (including the tax amount) that the Square + Terminal device should try to collect. + reference_id: + type: optional> + docs: >- + An optional user-defined reference ID that can be used to associate - request. If empty, this is the final response. + this `TerminalCheckout` to another entity in an external system. For + example, an order - For more information, + ID generated by a third-party shopping cart. The ID is also associated + with any payments - see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - source: - openapi: openapi/openapi.json - SearchLoyaltyRewardsRequestLoyaltyRewardQuery: - docs: The set of search requirements. - properties: - loyalty_account_id: - type: string + used to complete the checkout. + validation: + maxLength: 40 + note: + type: optional> docs: >- - The ID of the [loyalty account](entity:LoyaltyAccount) to which the - loyalty reward belongs. + An optional note to associate with the checkout, as well as with any + payments used to complete the checkout. + + Note: maximum 500 characters validation: - minLength: 1 - status: - type: optional + maxLength: 500 + order_id: + type: optional> + docs: The reference to the Square order ID for the checkout request. + payment_options: + type: optional + docs: Payment-specific options for the checkout request. + device_options: + type: DeviceCheckoutOptions docs: >- - The status of the loyalty reward. + Options to control the display and behavior of the Square Terminal + device. + deadline_duration: + type: optional> + docs: >- + An RFC 3339 duration, after which the checkout is automatically + canceled. - See [LoyaltyRewardStatus](#type-loyaltyrewardstatus) for possible - values - source: - openapi: openapi/openapi.json - SearchLoyaltyRewardsResponse: - docs: >- - A response that includes the loyalty rewards satisfying the search - criteria. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - rewards: - type: optional> - docs: |- - The loyalty rewards that satisfy the search criteria. - These are returned in descending order by `updated_at`. - cursor: - type: optional - docs: |- - The pagination cursor to be used in a subsequent - request. If empty, this is the final response. - source: - openapi: openapi/openapi.json - SearchOrdersCustomerFilter: - docs: |- - A filter based on the order `customer_id` and any tender `customer_id` - associated with the order. It does not filter based on the - [FulfillmentRecipient](entity:FulfillmentRecipient) `customer_id`. - properties: - customer_ids: - type: optional>> - docs: |- - A list of customer IDs to filter by. + A `TerminalCheckout` that is `PENDING` is automatically `CANCELED` and + has a cancellation reason - Max: 10 customer ids. - source: - openapi: openapi/openapi.json - SearchOrdersDateTimeFilter: - docs: >- - Filter for `Order` objects based on whether their `CREATED_AT`, + of `TIMED_OUT`. - `CLOSED_AT`, or `UPDATED_AT` timestamps fall within a specified time - range. - You can specify the time range and which timestamp to filter for. You can - filter + Default: 5 minutes from creation - for only one time range at a time. + Maximum: 5 minutes + status: + type: optional + docs: >- + The status of the `TerminalCheckout`. + + Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, + `COMPLETED` + access: read-only + cancel_reason: + type: optional + docs: >- + The reason why `TerminalCheckout` is canceled. Present if the status + is `CANCELED`. + + See [ActionCancelReason](#type-actioncancelreason) for possible values + payment_ids: + type: optional> + docs: A list of IDs for payments created by this `TerminalCheckout`. + access: read-only + created_at: + type: optional + docs: >- + The time when the `TerminalCheckout` was created, as an RFC 3339 + timestamp. + access: read-only + updated_at: + type: optional + docs: >- + The time when the `TerminalCheckout` was last updated, as an RFC 3339 + timestamp. + access: read-only + app_id: + type: optional + docs: The ID of the application that created the checkout. + access: read-only + location_id: + type: optional + docs: The location of the device where the `TerminalCheckout` was directed. + validation: + maxLength: 64 + access: read-only + payment_type: + type: optional + docs: >- + The type of payment the terminal should attempt to capture from. + Defaults to `CARD_PRESENT`. + + See [CheckoutOptionsPaymentType](#type-checkoutoptionspaymenttype) for + possible values + team_member_id: + type: optional> + docs: >- + An optional ID of the team member associated with creating the + checkout. + customer_id: + type: optional> + docs: An optional ID of the customer associated with the checkout. + app_fee_money: + type: optional + docs: >- + The amount the developer is taking as a fee for facilitating the + payment on behalf - For each time range, the start time and end time are inclusive. If the end - time + of the seller. - is absent, it defaults to the time of the first request for the cursor. + The amount cannot be more than 90% of the total amount of the payment. - __Important:__ If you use the `DateTimeFilter` in a `SearchOrders` query, - you must set the `sort_field` in [OrdersSort](entity:SearchOrdersSort) + The amount must be specified in the smallest denomination of the + applicable currency (for example, US dollar amounts are specified in + cents). For more information, see [Working with Monetary + Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). - to the same field you filter for. For example, if you set the `CLOSED_AT` - field - in `DateTimeFilter`, you must set the `sort_field` in `SearchOrdersSort` - to + The fee currency code must match the currency associated with the + seller that is accepting the payment. The application must be from a + developer account in the same country and using the same currency code + as the seller. - `CLOSED_AT`. Otherwise, `SearchOrders` throws an error. - [Learn more about filtering orders by time - range.](https://developer.squareup.com/docs/orders-api/manage-orders/search-orders#important-note-about-filtering-orders-by-time-range) - properties: - created_at: - type: optional - docs: >- - The time range for filtering on the `created_at` timestamp. If you use - this + For more information about the application fee scenario, see [Take + Payments and Collect + Fees](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees). - value, you must set the `sort_field` in the `OrdersSearchSort` object - to - `CREATED_AT`. - updated_at: - type: optional + To set this field, PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS OAuth + permission is required. For more information, see + [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions). + statement_description_identifier: + type: optional> docs: >- - The time range for filtering on the `updated_at` timestamp. If you use - this + Optional additional payment information to include on the customer's + card statement as - value, you must set the `sort_field` in the `OrdersSearchSort` object - to + part of the statement description. This can be, for example, an + invoice number, ticket number, - `UPDATED_AT`. - closed_at: - type: optional + or short description that uniquely identifies the purchase. + validation: + maxLength: 20 + tip_money: + type: optional docs: >- - The time range for filtering on the `closed_at` timestamp. If you use - this - - value, you must set the `sort_field` in the `OrdersSearchSort` object - to + The amount designated as a tip, in addition to `amount_money`. This + may only be set for a - `CLOSED_AT`. + checkout that has tipping disabled (`tip_settings.allow_tipping` is + `false`). source: openapi: openapi/openapi.json - SearchOrdersFilter: - docs: |- - Filtering criteria to use for a `SearchOrders` request. Multiple filters - are ANDed together. + TerminalCheckoutCreatedEvent: + docs: Published when a [TerminalCheckout](entity:TerminalCheckout) is created. properties: - state_filter: - type: optional - docs: Filter by [OrderState](entity:OrderState). - date_time_filter: - type: optional - docs: >- - Filter for results within a time range. - - - __Important:__ If you filter for orders by time range, you must set - `SearchOrdersSort` - - to sort by the same field. - - [Learn more about filtering orders by time - range.](https://developer.squareup.com/docs/orders-api/manage-orders/search-orders#important-note-about-filtering-orders-by-time-range) - fulfillment_filter: - type: optional - docs: Filter by the fulfillment type or state. - source_filter: - type: optional - docs: Filter by the source of the order. - customer_filter: - type: optional - docs: Filter by customers associated with the order. + 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 - SearchOrdersFulfillmentFilter: - docs: Filter based on [order fulfillment](entity:Fulfillment) information. + TerminalCheckoutCreatedEventData: properties: - fulfillment_types: - type: optional>> - docs: >- - A list of [fulfillment types](entity:FulfillmentType) to filter - - for. The list returns orders if any of its fulfillments match any of - the fulfillment types - - listed in this field. - - See [FulfillmentType](#type-fulfillmenttype) for possible values - fulfillment_states: - type: optional>> - docs: >- - A list of [fulfillment states](entity:FulfillmentState) to filter - - for. The list returns orders if any of its fulfillments match any of - the - - fulfillment states listed in this field. - - See [FulfillmentState](#type-fulfillmentstate) for possible values + 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 - SearchOrdersQuery: - docs: Contains query criteria for the search. + TerminalCheckoutCreatedEventObject: + properties: + checkout: + type: optional + docs: The created terminal checkout + source: + openapi: openapi/openapi.json + TerminalCheckoutQuery: properties: filter: - type: optional - docs: Criteria to filter results by. + type: optional + docs: Options for filtering returned `TerminalCheckout` objects. sort: - type: optional - docs: Criteria to sort results by. + type: optional + docs: Option for sorting returned `TerminalCheckout` objects. source: openapi: openapi/openapi.json - SearchOrdersResponse: - docs: >- - Either the `order_entries` or `orders` field is set, depending on whether - - `return_entries` is set on the - [SearchOrdersRequest](api-endpoint:Orders-SearchOrders). + TerminalCheckoutQueryFilter: properties: - order_entries: - type: optional> + device_id: + type: optional> docs: >- - A list of [OrderEntries](entity:OrderEntry) that fit the query + The `TerminalCheckout` objects associated with a specific device. If + no device is specified, then all - conditions. The list is populated only if `return_entries` is set to - `true` in the request. - orders: - type: optional> + `TerminalCheckout` objects for the merchant are displayed. + created_at: + type: optional docs: >- - A list of + The time range for the beginning of the reporting period, which is + inclusive. - [Order](entity:Order) objects that match the query conditions. The - list is populated only if + Default value: The current time minus one day. - `return_entries` is set to `false` in the request. - cursor: - type: optional + Note that `TerminalCheckout`s are available for 30 days after + creation. + status: + type: optional> docs: >- - The pagination cursor to be used in a subsequent request. If unset, - - this is the final response. + Filtered results with the desired status of the `TerminalCheckout`. - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). - errors: - type: optional> - docs: '[Errors](entity:Error) encountered during the search.' + Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, + `COMPLETED` + source: + openapi: openapi/openapi.json + TerminalCheckoutQuerySort: + properties: + sort_order: + type: optional + docs: |- + The order in which results are listed. + Default: `DESC` + See [SortOrder](#type-sortorder) for possible values + source: + openapi: 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 - SearchOrdersSort: - docs: |- - Sorting criteria for a `SearchOrders` request. Results can only be sorted - by a timestamp field. + TerminalCheckoutUpdatedEventObject: properties: - sort_field: - type: SearchOrdersSortField + 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 + supports Interac (Canadian debit network) payment refunds. + properties: + id: + type: optional + docs: A unique ID for this `TerminalRefund`. + validation: + minLength: 10 + maxLength: 255 + access: read-only + refund_id: + type: optional docs: >- - The field to sort by. - - - __Important:__ When using a - [DateTimeFilter](entity:SearchOrdersFilter), + The reference to the payment refund created by completing this + `TerminalRefund`. + access: read-only + payment_id: + type: string + docs: The unique ID of the payment being refunded. + validation: + minLength: 1 + order_id: + type: optional + docs: >- + The reference to the Square order ID for the payment identified by the + `payment_id`. + access: read-only + amount_money: + type: Money + docs: >- + The amount of money, inclusive of `tax_money`, that the + `TerminalRefund` should return. - `sort_field` must match the timestamp field that the `DateTimeFilter` - uses to + This value is limited to the amount taken in the original payment + minus any completed or - filter. For example, if you set your `sort_field` to `CLOSED_AT` and - you use a + pending refunds. + reason: + type: string + docs: A description of the reason for the refund. + validation: + maxLength: 192 + device_id: + type: string + docs: |- + The unique ID of the device intended for this `TerminalRefund`. + The Id can be retrieved from /v2/devices api. + deadline_duration: + type: optional> + docs: >- + The RFC 3339 duration, after which the refund is automatically + canceled. - `DateTimeFilter`, your `DateTimeFilter` must filter for orders by - their `CLOSED_AT` date. + A `TerminalRefund` that is `PENDING` is automatically `CANCELED` and + has a cancellation reason - If this field does not match the timestamp field in `DateTimeFilter`, + of `TIMED_OUT`. - `SearchOrders` returns an error. + Default: 5 minutes from creation. - Default: `CREATED_AT`. - See [SearchOrdersSortField](#type-searchorderssortfield) for possible - values - sort_order: - type: optional + Maximum: 5 minutes + status: + type: optional docs: >- - The chronological order in which results are returned. Defaults to - `DESC`. + The status of the `TerminalRefund`. - See [SortOrder](#type-sortorder) for possible values + Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, or + `COMPLETED`. + access: read-only + cancel_reason: + type: optional + docs: |- + Present if the status is `CANCELED`. + See [ActionCancelReason](#type-actioncancelreason) for possible values + created_at: + type: optional + docs: >- + The time when the `TerminalRefund` was created, as an RFC 3339 + timestamp. + access: read-only + updated_at: + type: optional + docs: >- + The time when the `TerminalRefund` was last updated, as an RFC 3339 + timestamp. + access: read-only + app_id: + type: optional + docs: The ID of the application that created the refund. + access: read-only + location_id: + type: optional + docs: The location of the device where the `TerminalRefund` was directed. + validation: + maxLength: 64 + access: read-only source: openapi: openapi/openapi.json - SearchOrdersSortField: - enum: - - CREATED_AT - - UPDATED_AT - - CLOSED_AT - docs: Specifies which timestamp to use to sort `SearchOrder` results. + 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 - SearchOrdersSourceFilter: - docs: A filter based on order `source` information. + TerminalRefundCreatedEventData: properties: - source_names: - type: optional>> - docs: >- - Filters by the [Source](entity:OrderSource) `name`. The filter returns - any orders - - with a `source.name` that matches any of the listed source names. - - - Max: 10 source names. + 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 - SearchOrdersStateFilter: - docs: Filter by the current order `state`. + TerminalRefundCreatedEventObject: properties: - states: - docs: |- - States to filter for. - See [OrderState](#type-orderstate) for possible values - type: list + refund: + type: optional + docs: The created terminal refund. source: openapi: openapi/openapi.json - SearchScheduledShiftsResponse: - docs: >- - Represents a - [SearchScheduledShifts](api-endpoint:Labor-SearchScheduledShifts) - response. - - Either `scheduled_shifts` or `errors` is present in the response. + TerminalRefundQuery: properties: - scheduled_shifts: - type: optional> - docs: A paginated list of scheduled shifts that match the query conditions. - cursor: - type: optional - docs: >- - The pagination cursor used to retrieve the next page of results. This - field is present - - only if additional results are available. - errors: - type: optional> - docs: Any errors that occurred during the request. + filter: + type: optional + docs: The filter for the Terminal refund query. + sort: + type: optional + docs: The sort order for the Terminal refund query. source: openapi: openapi/openapi.json - SearchShiftsResponse: - docs: >- - The response to a request for `Shift` objects. The response contains + TerminalRefundQueryFilter: + properties: + device_id: + type: optional> + docs: >- + `TerminalRefund` objects associated with a specific device. If no + device is specified, then all - the requested `Shift` objects and might contain a set of `Error` objects - if + `TerminalRefund` objects for the signed-in account are displayed. + created_at: + type: optional + docs: >- + The timestamp for the beginning of the reporting period, in RFC 3339 + format. Inclusive. - the request resulted in errors. - properties: - shifts: - type: optional> - docs: Shifts. - cursor: - type: optional - docs: An opaque cursor for fetching the next page. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: openapi/openapi.json - SearchSubscriptionsFilter: - docs: >- - Represents a set of query expressions (filters) to narrow the scope of - targeted subscriptions returned by + Default value: The current time minus one day. - the [SearchSubscriptions](api-endpoint:Subscriptions-SearchSubscriptions) - endpoint. - properties: - customer_ids: - type: optional>> + Note that `TerminalRefund`s are available for 30 days after creation. + status: + type: optional> docs: >- - A filter to select subscriptions based on the subscribing customer - IDs. - location_ids: - type: optional>> - docs: A filter to select subscriptions based on the location. - source_names: - type: optional>> - docs: A filter to select subscriptions based on the source application. + Filtered results with the desired status of the `TerminalRefund`. + + Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, or + `COMPLETED`. + source: + openapi: openapi/openapi.json + TerminalRefundQuerySort: + properties: + sort_order: + type: optional> + docs: |- + The order in which results are listed. + - `ASC` - Oldest to newest. + - `DESC` - Newest to oldest (default). source: openapi: openapi/openapi.json - SearchSubscriptionsQuery: - docs: >- - Represents a query, consisting of specified query expressions, used to - search for subscriptions. + TerminalRefundUpdatedEvent: + docs: Published when a Terminal API refund is updated. properties: - filter: - type: optional - docs: A list of query expressions. + 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 - SearchSubscriptionsResponse: - docs: >- - Defines output parameters in a response from the - - [SearchSubscriptions](api-endpoint:Subscriptions-SearchSubscriptions) - endpoint. + TerminalRefundUpdatedEventData: properties: - errors: - type: optional> - docs: Errors encountered during the request. - subscriptions: - type: optional> - docs: The subscriptions matching the specified query expressions. - cursor: + type: + type: optional> + docs: Name of the updated object’s type, `"refund"`. + id: type: optional - docs: >- - When the total number of resulting subscription exceeds the limit of a - paged response, - - the response includes a cursor for you to use in a subsequent request - to fetch the next set of results. - - If the cursor is unset, the response contains the last page of the - results. - - - For more information, see - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). + docs: ID of the updated terminal refund. + object: + type: optional + docs: An object containing the updated terminal refund. source: openapi: openapi/openapi.json - SearchTeamMembersFilter: + TerminalRefundUpdatedEventObject: + properties: + refund: + type: optional + docs: The updated terminal refund. + source: + openapi: openapi/openapi.json + TestWebhookSubscriptionResponse: docs: >- - Represents a filter used in a search for `TeamMember` objects. `AND` logic - is applied - - between the individual fields, and `OR` logic is applied within list-based - fields. - - For example, setting this filter value: + Defines the fields that are included in the response body of - ``` + a request to the + [TestWebhookSubscription](api-endpoint:WebhookSubscriptions-TestWebhookSubscription) + endpoint. - filter = (locations_ids = ["A", "B"], status = ACTIVE) - ``` + Note: If there are errors processing the request, the + [SubscriptionTestResult](entity:SubscriptionTestResult) field is not - returns only active team members assigned to either location "A" or "B". + present. properties: - location_ids: - type: optional>> - docs: >- - When present, filters by team members assigned to the specified - locations. - - When empty, includes team members assigned to any location. - status: - type: optional - docs: |- - When present, filters by team members who match the given status. - When empty, includes team members of all statuses. - See [TeamMemberStatus](#type-teammemberstatus) for possible values - is_owner: - type: optional> - docs: >- - When present and set to true, returns the team member who is the owner - of the Square account. + errors: + type: optional> + docs: Information on errors encountered during the request. + subscription_test_result: + type: optional + docs: The [SubscriptionTestResult](entity:SubscriptionTestResult). source: openapi: openapi/openapi.json - SearchTeamMembersQuery: - docs: Represents the parameters in a search for `TeamMember` objects. + TimeRange: + docs: |- + Represents a generic time range. The start and end values are + represented in RFC 3339 format. Time ranges are customized to be + inclusive or exclusive based on the needs of a particular endpoint. + Refer to the relevant endpoint-specific documentation to determine + how time ranges are handled. properties: - filter: - type: optional - docs: The options to filter by. + start_at: + type: optional> + docs: |- + A datetime value in RFC 3339 format indicating when the time range + starts. + end_at: + type: optional> + docs: |- + A datetime value in RFC 3339 format indicating when the time range + ends. source: openapi: openapi/openapi.json - SearchTeamMembersResponse: + Timecard: docs: >- - Represents a response from a search request containing a filtered list of - `TeamMember` objects. + A record of the hourly rate, start time, and end time of a single timecard + (shift) + + for a team member. This might include a record of the start and end times + of breaks + + taken during the shift. properties: - team_members: - type: optional> - docs: The filtered list of `TeamMember` objects. - cursor: + id: type: optional + docs: '**Read only** The Square-issued UUID for this object.' + validation: + maxLength: 255 + location_id: + type: string docs: >- - The opaque cursor for fetching the next page. For more information, - see + The ID of the [location](entity:Location) for this timecard. The + location should be based on - [pagination](https://developer.squareup.com/docs/working-with-apis/pagination). - errors: - type: optional> - docs: The errors that occurred during the request. - source: - openapi: openapi/openapi.json - SearchTerminalActionsResponse: - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - action: - type: optional> - docs: The requested search result of `TerminalAction`s. - cursor: - type: optional + where the team member clocked in. + validation: + minLength: 1 + timezone: + type: optional> docs: >- - The pagination cursor to be used in a subsequent request. If empty, + **Read only** The time zone calculated from the location based on the + `location_id`, - this is the final response. + provided as a convenience value. Format: the IANA time zone database + identifier for the + location time zone. + start_at: + type: string + docs: >- + The start time of the timecard, in RFC 3339 format and shifted to the + location - See - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) - for more + timezone + offset. Precision up to the minute is respected; seconds + are truncated. + validation: + minLength: 1 + end_at: + type: optional> + docs: >- + The end time of the timecard, in RFC 3339 format and shifted to the + location - information. - source: - openapi: openapi/openapi.json - SearchTerminalCheckoutsResponse: - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - checkouts: - type: optional> - docs: The requested search result of `TerminalCheckout` objects. - cursor: - type: optional + timezone + offset. Precision up to the minute is respected; seconds + are truncated. + wage: + type: optional docs: >- - The pagination cursor to be used in a subsequent request. If empty, + Job and pay related information. If the wage is not set on create, it + defaults to a wage - this is the final response. + of zero. If the title is not set on create, it defaults to the name of + the role the team member + + is assigned to, if any. + breaks: + type: optional>> + docs: >- + A list of all the paid or unpaid breaks that were taken during this + timecard. + status: + type: optional + docs: |- + Describes the working state of the timecard. + See [TimecardStatus](#type-timecardstatus) for possible values + version: + type: optional + docs: >- + **Read only** The current version of the timecard, which is + incremented with each update. + This field is used for [optimistic + concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) - See - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) - for more information. + control to ensure that requests don't overwrite data from another + request. + created_at: + type: optional + docs: >- + The timestamp of when the timecard was created, in RFC 3339 format + presented as UTC. + access: read-only + updated_at: + type: optional + docs: >- + The timestamp of when the timecard was last updated, in RFC 3339 + format presented as UTC. + access: read-only + team_member_id: + type: string + docs: >- + The ID of the [team member](entity:TeamMember) this timecard belongs + to. + validation: + minLength: 1 + declared_cash_tip_money: + type: optional + docs: The cash tips declared by the team member for this timecard. source: openapi: openapi/openapi.json - SearchTerminalRefundsResponse: + TimecardFilter: + docs: |- + Defines a filter used in a search for `Timecard` records. `AND` logic is + used by Square's servers to apply each filter property specified. properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - refunds: - type: optional> - docs: The requested search result of `TerminalRefund` objects. - cursor: - type: optional + location_ids: + type: optional>> + docs: Fetch timecards for the specified location. + status: + type: optional docs: >- - The pagination cursor to be used in a subsequent request. If empty, - - this is the final response. - + Fetch a `Timecard` instance by `Timecard.status`. - See - [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) - for more information. + See [TimecardFilterStatus](#type-timecardfilterstatus) for possible + values + start: + type: optional + docs: Fetch `Timecard` instances that start in the time range - Inclusive. + end: + type: optional + docs: Fetch the `Timecard` instances that end in the time range - Inclusive. + workday: + type: optional + docs: Fetch the `Timecard` instances based on the workday date range. + team_member_ids: + type: optional>> + docs: Fetch timecards for the specified team members. source: openapi: openapi/openapi.json - SearchTimecardsResponse: - docs: >- - The response to a request for `Timecard` objects. The response contains - - the requested `Timecard` objects and might contain a set of `Error` - objects if - - the request resulted in errors. - properties: - timecards: - type: optional> - docs: Timecards. - cursor: - type: optional - docs: An opaque cursor for fetching the next page. - errors: - type: optional> - docs: Any errors that occurred during the request. + TimecardFilterStatus: + enum: + - OPEN + - CLOSED + docs: Specifies the `status` of `Timecard` records to be returned. source: openapi: openapi/openapi.json - SearchVendorsRequestFilter: - docs: Defines supported query expressions to search for vendors by. + TimecardQuery: + docs: >- + The parameters of a `Timecard` search query, which includes filter and + sort options. properties: - name: - type: optional>> - docs: The names of the [Vendor](entity:Vendor) objects to retrieve. - status: - type: optional>> - docs: |- - The statuses of the [Vendor](entity:Vendor) objects to retrieve. - See [VendorStatus](#type-vendorstatus) for possible values + filter: + type: optional + docs: Query filter options. + sort: + type: optional + docs: Sort order details. source: openapi: openapi/openapi.json - SearchVendorsRequestSort: - docs: >- - Defines a sorter used to sort results from - [SearchVendors](api-endpoint:Vendors-SearchVendors). + TimecardSort: + docs: Sets the sort order of search results. properties: field: - type: optional + type: optional docs: |- - Specifies the sort key to sort the returned vendors. - See [Field](#type-field) for possible values + The field to sort on. + See [TimecardSortField](#type-timecardsortfield) for possible values order: type: optional docs: |- - Specifies the sort order for the returned vendors. + The order in which results are returned. Defaults to DESC. See [SortOrder](#type-sortorder) for possible values source: openapi: openapi/openapi.json - SearchVendorsRequestSortField: + TimecardSortField: enum: - - NAME + - START_AT + - END_AT - CREATED_AT - docs: The field to sort the returned [Vendor](entity:Vendor) objects by. + - UPDATED_AT + docs: Enumerates the `Timecard` fields to sort on. source: openapi: openapi/openapi.json - SearchVendorsResponse: + TimecardStatus: + enum: + - OPEN + - CLOSED docs: >- - Represents an output from a call to - [SearchVendors](api-endpoint:Vendors-SearchVendors). + **Read only** Enumerates the possible status of a + [timecard](entity:Timecard). + source: + openapi: openapi/openapi.json + TimecardWage: + docs: >- + The hourly wage rate used to compensate a team member for a + [timecard](entity:Timecard). properties: - errors: - type: optional> - docs: Errors encountered when the request fails. - vendors: - type: optional> - docs: >- - The [Vendor](entity:Vendor) objects matching the specified search - filter. - cursor: + title: + type: optional> + docs: The name of the job performed during this timecard. + hourly_rate: + type: optional + docs: |- + Can be a custom-set hourly wage or the calculated effective hourly + wage based on the annual wage and hours worked per week. + job_id: type: optional - docs: >- - The pagination cursor to be used in a subsequent request. If unset, - - this is the final response. - - - See the - [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) - guide for more information. + docs: |- + The ID of the [job](entity:Job) performed for this timecard. Square + labor-reporting UIs might group timecards together by ID. + access: read-only + tip_eligible: + type: optional> + docs: Whether team members are eligible for tips when working this job. source: openapi: openapi/openapi.json - SegmentFilter: - docs: A query filter to search for buyer-accessible appointment segments by. + TimecardWorkday: + docs: |- + A `Timecard` search query filter parameter that sets a range of days that + a `Timecard` must start or end in before passing the filter condition. properties: - service_variation_id: - type: string - docs: >- - The ID of the [CatalogItemVariation](entity:CatalogItemVariation) - object representing the service booked in this segment. - validation: - minLength: 1 - maxLength: 36 - team_member_id_filter: - type: optional + date_range: + type: optional + docs: Dates for fetching the timecards. + match_timecards_by: + type: optional docs: >- - A query filter to search for buyer-accessible appointment segments - with service-providing team members matching the specified list of - team member IDs. Supported query expressions are - - - `ANY`: return the appointment segments with team members whose IDs - match any member in this list. + The strategy on which the dates are applied. - - `NONE`: return the appointment segments with team members whose IDs - are not in this list. + See [TimecardWorkdayMatcher](#type-timecardworkdaymatcher) for + possible values + default_timezone: + type: optional> + docs: >- + Location-specific timezones convert workdays to datetime filters. - - `ALL`: not supported. + Every location included in the query must have a timezone or this + field + must be provided as a fallback. Format: the IANA timezone database - When no expression is specified, any service-providing team member is - eligible to fulfill the Booking. + identifier for the relevant timezone. source: openapi: openapi/openapi.json - SelectOption: - properties: - reference_id: - type: string - docs: The reference id for the option. - validation: - minLength: 1 - maxLength: 40 - title: - type: string - docs: The title text that displays in the select option button. - validation: - minLength: 1 - maxLength: 250 + TimecardWorkdayMatcher: + enum: + - START_AT + - END_AT + - INTERSECTION + docs: Defines the logic used to apply a workday filter. source: openapi: openapi/openapi.json - SelectOptions: + TipSettings: properties: - title: - type: string - docs: The title text to display in the select flow on the Terminal. - validation: - minLength: 1 - maxLength: 250 - body: - type: string - docs: The body text to display in the select flow on the Terminal. - validation: - minLength: 1 - maxLength: 10000 - options: + allow_tipping: + type: optional> + docs: >- + Indicates whether tipping is enabled for this checkout. Defaults to + false. + separate_tip_screen: + type: optional> + docs: >- + Indicates whether tip options should be presented on the screen before + presenting + + the signature screen during card payment. Defaults to false. + custom_tip_field: + type: optional> docs: >- - Represents the buttons/options that should be displayed in the select - flow on the Terminal. - type: list - selected_option: - type: optional - docs: The buyer’s selected option. + Indicates whether custom tip amounts are allowed during the checkout + flow. Defaults to false. + tip_percentages: + type: optional>> + docs: >- + A list of tip percentages that should be presented during the checkout + flow, specified as + + up to 3 non-negative integers from 0 to 100 (inclusive). Defaults to + 15, 20, and 25. + smart_tipping: + type: optional> + docs: >- + Enables the "Smart Tip Amounts" behavior. + + Exact tipping options depend on the region in which the Square seller + is active. + + + For payments under 10.00, in the Australia, Canada, Ireland, United + Kingdom, and United States, tipping options are presented as no tip, + .50, 1.00 or 2.00. + + + For payment amounts of 10.00 or greater, tipping options are presented + as the following percentages: 0%, 5%, 10%, 15%. + + + If set to true, the `tip_percentages` settings is ignored. + + Defaults to false. + + + To learn more about smart tipping, see [Accept Tips with the Square + App](https://squareup.com/help/us/en/article/5069-accept-tips-with-the-square-app). source: openapi: openapi/openapi.json - Shift: + Transaction: docs: >- - A record of the hourly rate, start, and end times for a single work shift - - for an employee. This might include a record of the start and end times - for breaks + Represents a transaction processed with Square, either with the - taken during the shift. + Connect API or with Square Point of Sale. - Deprecated at Square API version 2025-05-21. Replaced by - [Timecard](entity:Timecard). + The `tenders` field of this object lists all methods of payment used to + pay in - See the [migration - notes](https://developer.squareup.com/docs/labor-api/what-it-does#migration-notes). + the transaction. properties: id: type: optional - docs: The UUID for this object. + docs: The transaction's unique ID, issued by Square payments servers. validation: - maxLength: 255 - employee_id: - type: optional> - docs: >- - The ID of the employee this shift belongs to. DEPRECATED at version - 2020-08-26. Use `team_member_id` instead. + maxLength: 192 location_id: - type: string + type: optional> + docs: The ID of the transaction's associated location. + validation: + maxLength: 50 + created_at: + type: optional docs: >- - The ID of the location this shift occurred at. The location should be - based on - - where the employee clocked in. + The timestamp for when the transaction was created, in RFC 3339 + format. validation: - minLength: 1 - timezone: + maxLength: 32 + tenders: + type: optional>> + docs: The tenders used to pay in the transaction. + refunds: + type: optional>> + docs: Refunds that have been applied to any tender in the transaction. + reference_id: type: optional> docs: >- - The read-only convenience value that is calculated from the location - based - - on the `location_id`. Format: the IANA timezone database identifier - for the + If the transaction was created with the + [Charge](api-endpoint:Transactions-Charge) - location timezone. - start_at: - type: string - docs: >- - RFC 3339; shifted to the location timezone + offset. Precision up to - the + endpoint, this value is the same as the value provided for the + `reference_id` - minute is respected; seconds are truncated. + parameter in the request to that endpoint. Otherwise, it is not set. validation: - minLength: 1 - end_at: + maxLength: 40 + product: + type: optional + docs: |- + The Square product that processed the transaction. + See [TransactionProduct](#type-transactionproduct) for possible values + client_id: type: optional> docs: >- - RFC 3339; shifted to the timezone + offset. Precision up to the minute + If the transaction was created in the Square Point of Sale app, this + value + + is the ID generated for the transaction by Square Point of Sale. + + + This ID has no relationship to the transaction's canonical `id`, which is - respected; seconds are truncated. - wage: - type: optional - docs: >- - Job and pay related information. If the wage is not set on create, it - defaults to a wage + generated by Square's backend servers. This value is generated for + bookkeeping - of zero. If the title is not set on create, it defaults to the name of - the role the employee + purposes, in case the transaction cannot immediately be completed (for + example, - is assigned to, if any. - breaks: - type: optional>> - docs: >- - A list of all the paid or unpaid breaks that were taken during this - shift. - status: - type: optional - docs: |- - Describes the working state of the current `Shift`. - See [ShiftStatus](#type-shiftstatus) for possible values - version: - type: optional - docs: >- - Used for resolving concurrency issues. The request fails if the - version + if the transaction is processed in offline mode). - provided does not match the server version at the time of the request. - If not provided, - Square executes a blind write; potentially overwriting data from - another + It is not currently possible with the Connect API to perform a + transaction - write. - created_at: - type: optional - docs: A read-only timestamp in RFC 3339 format; presented in UTC. - access: read-only - updated_at: - type: optional - docs: A read-only timestamp in RFC 3339 format; presented in UTC. - access: read-only - team_member_id: + lookup by this value. + validation: + maxLength: 192 + shipping_address: + type: optional
+ docs: The shipping address provided in the request, if any. + order_id: type: optional> docs: >- - The ID of the team member this shift belongs to. Replaced - `employee_id` at version "2020-08-26". - declared_cash_tip_money: - type: optional - docs: The tips declared by the team member for the shift. + The order_id is an identifier for the order associated with this + transaction, if any. + validation: + maxLength: 192 + source: + openapi: openapi/openapi.json + TransactionProduct: + enum: + - REGISTER + - EXTERNAL_API + - BILLING + - APPOINTMENTS + - INVOICES + - ONLINE_STORE + - PAYROLL + - OTHER + docs: Indicates the Square product used to process a transaction. + source: + openapi: 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 + resulted in errors, + + the response contains a set of `Error` objects. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + gift_card: + type: optional + docs: >- + The gift card with the ID of the unlinked customer removed from the + `customer_ids` field. + + If no other customers are linked, the `customer_ids` field is also + removed. + source: + openapi: openapi/openapi.json + UpdateBookingCustomAttributeDefinitionResponse: + docs: >- + Represents an + [UpdateBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-UpdateBookingCustomAttributeDefinition) + response. + + Either `custom_attribute_definition` or `errors` is present in the + response. + properties: + custom_attribute_definition: + type: optional + docs: The updated custom attribute definition. + errors: + type: optional> + docs: Any errors that occurred during the request. + source: + openapi: openapi/openapi.json + UpdateBookingResponse: + properties: + booking: + type: optional + docs: The booking that was updated. + errors: + type: optional> + docs: Errors that occurred during the request. + source: + openapi: openapi/openapi.json + UpdateBreakTypeResponse: + docs: >- + A response to a request to update a `BreakType`. The response contains + + the requested `BreakType` objects and might contain a set of `Error` + objects if + + the request resulted in errors. + properties: + break_type: + type: optional + docs: The response object. + errors: + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - ShiftFilter: - docs: >- - Defines a filter used in a search for `Shift` records. `AND` logic is + UpdateCatalogImageRequest: + properties: + idempotency_key: + type: string + docs: >- + A unique string that identifies this UpdateCatalogImage request. - used by Square's servers to apply each filter property specified. + Keys can be any valid string but must be unique for every + UpdateCatalogImage request. - Deprecated at Square API version 2025-05-21. See the [migration - notes](https://developer.squareup.com/docs/labor-api/what-it-does#migration-notes). + See [Idempotency + keys](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) + for more information. + validation: + minLength: 1 + maxLength: 128 + source: + openapi: openapi/openapi.json + UpdateCatalogImageResponse: properties: - location_ids: - type: optional>> - docs: Fetch shifts for the specified location. - employee_ids: - type: optional>> - docs: >- - Fetch shifts for the specified employees. DEPRECATED at version - 2020-08-26. Use `team_member_ids` instead. - status: - type: optional + errors: + type: optional> + docs: Any errors that occurred during the request. + image: + type: optional docs: |- - Fetch a `Shift` instance by `Shift.status`. - See [ShiftFilterStatus](#type-shiftfilterstatus) for possible values - start: - type: optional - docs: Fetch `Shift` instances that start in the time range - Inclusive. - end: - type: optional - docs: Fetch the `Shift` instances that end in the time range - Inclusive. - workday: - type: optional - docs: Fetch the `Shift` instances based on the workday date range. - team_member_ids: - type: optional>> - docs: >- - Fetch shifts for the specified team members. Replaced `employee_ids` - at version "2020-08-26". + The newly updated `CatalogImage` including a Square-generated + URL for the encapsulated image file. source: openapi: openapi/openapi.json - ShiftFilterStatus: - enum: - - OPEN - - CLOSED + UpdateCustomerCustomAttributeDefinitionResponse: docs: >- - Specifies the `status` of `Shift` records to be returned. - + Represents an + [UpdateCustomerCustomAttributeDefinition](api-endpoint:CustomerCustomAttributes-UpdateCustomerCustomAttributeDefinition) + response. - Deprecated at Square API version 2025-05-21. See the [migration - notes](https://developer.squareup.com/docs/labor-api/what-it-does#migration-notes). + Either `custom_attribute_definition` or `errors` is present in the + response. + properties: + custom_attribute_definition: + type: optional + docs: The updated custom attribute definition. + errors: + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - ShiftQuery: + UpdateCustomerGroupResponse: docs: >- - The parameters of a `Shift` search query, which includes filter and sort - options. + Defines the fields that are included in the response body of + a request to the + [UpdateCustomerGroup](api-endpoint:CustomerGroups-UpdateCustomerGroup) + endpoint. - Deprecated at Square API version 2025-05-21. See the [migration - notes](https://developer.squareup.com/docs/labor-api/what-it-does#migration-notes). + + Either `errors` or `group` is present in a given response (never both). properties: - filter: - type: optional - docs: Query filter options. - sort: - type: optional - docs: Sort order details. + errors: + type: optional> + docs: Any errors that occurred during the request. + group: + type: optional + docs: The successfully updated customer group. source: openapi: openapi/openapi.json - ShiftSort: + UpdateCustomerResponse: docs: >- - Sets the sort order of search results. + Defines the fields that are included in the response body of + a request to the [UpdateCustomer](api-endpoint:Customers-UpdateCustomer) + or - Deprecated at Square API version 2025-05-21. See the [migration - notes](https://developer.squareup.com/docs/labor-api/what-it-does#migration-notes). + [BulkUpdateCustomers](api-endpoint:Customers-BulkUpdateCustomers) + endpoint. + + + Either `errors` or `customer` is present in a given response (never both). properties: - field: - type: optional - docs: |- - The field to sort on. - See [ShiftSortField](#type-shiftsortfield) for possible values - order: - type: optional - docs: |- - The order in which results are returned. Defaults to DESC. - See [SortOrder](#type-sortorder) for possible values + errors: + type: optional> + docs: Any errors that occurred during the request. + customer: + type: optional + docs: The updated customer. source: openapi: openapi/openapi.json - ShiftSortField: - enum: - - START_AT - - END_AT - - CREATED_AT - - UPDATED_AT + UpdateInvoiceResponse: + docs: Describes a `UpdateInvoice` response. + properties: + invoice: + type: optional + docs: The updated invoice. + errors: + type: optional> + docs: Information about errors encountered during the request. + source: + openapi: openapi/openapi.json + UpdateItemModifierListsResponse: + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + updated_at: + type: optional + docs: >- + The database + [timestamp](https://developer.squareup.com/docs/build-basics/common-data-types/working-with-dates) + of this update in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`. + source: + openapi: openapi/openapi.json + UpdateItemTaxesResponse: + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + updated_at: + type: optional + docs: >- + The database + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + of this update in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`. + source: + openapi: openapi/openapi.json + UpdateJobResponse: docs: >- - Enumerates the `Shift` fields to sort on. - + Represents an [UpdateJob](api-endpoint:Team-UpdateJob) response. Either + `job` or `errors` - Deprecated at Square API version 2025-05-21. See the [migration - notes](https://developer.squareup.com/docs/labor-api/what-it-does#migration-notes). + is present in the response. + properties: + job: + type: optional + docs: The updated job. + errors: + type: optional> + docs: The errors that occurred during the request. source: openapi: openapi/openapi.json - ShiftStatus: - enum: - - OPEN - - CLOSED + UpdateLocationCustomAttributeDefinitionResponse: docs: >- - Enumerates the possible status of a `Shift`. - + Represents an + [UpdateLocationCustomAttributeDefinition](api-endpoint:LocationCustomAttributes-UpdateLocationCustomAttributeDefinition) + response. - Deprecated at Square API version 2025-05-21. See the [migration - notes](https://developer.squareup.com/docs/labor-api/what-it-does#migration-notes). + Either `custom_attribute_definition` or `errors` is present in the + response. + properties: + custom_attribute_definition: + type: optional + docs: The updated custom attribute definition. + errors: + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - ShiftWage: + UpdateLocationResponse: docs: >- - The hourly wage rate used to compensate an employee for this shift. - - - Deprecated at Square API version 2025-05-21. See the [migration - notes](https://developer.squareup.com/docs/labor-api/what-it-does#migration-notes). + The response object returned by the + [UpdateLocation](api-endpoint:Locations-UpdateLocation) endpoint. properties: - title: - type: optional> - docs: The name of the job performed during this shift. - hourly_rate: - type: optional - docs: |- - Can be a custom-set hourly wage or the calculated effective hourly - wage based on the annual wage and hours worked per week. - job_id: - type: optional - docs: |- - The id of the job performed during this shift. Square - labor-reporting UIs might group shifts together by id. - access: read-only - tip_eligible: - type: optional> - docs: Whether team members are eligible for tips when working this job. + errors: + type: optional> + docs: Information about errors encountered during the request. + location: + type: optional + docs: The updated `Location` object. + source: + openapi: openapi/openapi.json + UpdateLocationSettingsResponse: + properties: + errors: + type: optional> + docs: Any errors that occurred when updating the location settings. + location_settings: + type: optional + docs: The updated location settings. source: openapi: openapi/openapi.json - ShiftWorkday: + UpdateMerchantCustomAttributeDefinitionResponse: docs: >- - A `Shift` search query filter parameter that sets a range of days that - - a `Shift` must start or end in before passing the filter condition. - + Represents an + [UpdateMerchantCustomAttributeDefinition](api-endpoint:MerchantCustomAttributes-UpdateMerchantCustomAttributeDefinition) + response. - Deprecated at Square API version 2025-05-21. See the [migration - notes](https://developer.squareup.com/docs/labor-api/what-it-does#migration-notes). + Either `custom_attribute_definition` or `errors` is present in the + response. properties: - date_range: - type: optional - docs: Dates for fetching the shifts. - match_shifts_by: - type: optional - docs: >- - The strategy on which the dates are applied. - - See [ShiftWorkdayMatcher](#type-shiftworkdaymatcher) for possible - values - default_timezone: - type: optional> - docs: >- - Location-specific timezones convert workdays to datetime filters. - - Every location included in the query must have a timezone or this - field - - must be provided as a fallback. Format: the IANA timezone database - - identifier for the relevant timezone. - source: - openapi: openapi/openapi.json - ShiftWorkdayMatcher: - enum: - - START_AT - - END_AT - - INTERSECTION - docs: Defines the logic used to apply a workday filter. + custom_attribute_definition: + type: optional + docs: The updated custom attribute definition. + errors: + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - ShippingFee: + UpdateMerchantSettingsResponse: properties: - name: - type: optional> - docs: The name for the shipping fee. - charge: - type: Money - docs: The amount and currency for the shipping fee. + errors: + type: optional> + docs: Any errors that occurred when updating the merchant settings. + merchant_settings: + type: optional + docs: The updated merchant settings. source: openapi: openapi/openapi.json - SignatureImage: + UpdateOrderCustomAttributeDefinitionResponse: + docs: Represents a response from updating an order custom attribute definition. properties: - image_type: - type: optional - docs: |- - The mime/type of the image data. - Use `image/png;base64` for png. - access: read-only - data: - type: optional - docs: The base64 representation of the image. - access: read-only + custom_attribute_definition: + type: optional + docs: The updated order custom attribute definition. + errors: + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - SignatureOptions: + UpdateOrderResponse: + docs: |- + Defines the fields that are included in the response body of + a request to the [UpdateOrder](api-endpoint:Orders-UpdateOrder) endpoint. properties: - title: - type: string - docs: >- - The title text to display in the signature capture flow on the - Terminal. - validation: - minLength: 1 - maxLength: 250 - body: - type: string - docs: >- - The body text to display in the signature capture flow on the - Terminal. - validation: - minLength: 1 - maxLength: 10000 - signature: - type: optional> - docs: An image representation of the collected signature. - access: read-only + order: + type: optional + docs: The updated order. + errors: + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - Site: - docs: >- - Represents a Square Online site, which is an online store for a Square - seller. + UpdatePaymentLinkResponse: properties: - id: - type: optional - docs: The Square-assigned ID of the site. - validation: - maxLength: 32 - access: read-only - site_title: - type: optional> - docs: The title of the site. - domain: - type: optional> - docs: >- - The domain of the site (without the protocol). For example, - `mysite1.square.site`. - is_published: - type: optional> - docs: Indicates whether the site is published. - created_at: - type: optional - docs: The timestamp of when the site was created, in RFC 3339 format. - access: read-only - updated_at: - type: optional - docs: The timestamp of when the site was last updated, in RFC 3339 format. - access: read-only + errors: + type: optional> + docs: Any errors that occurred when updating the payment link. + payment_link: + type: optional + docs: The updated payment link. source: openapi: openapi/openapi.json - Snippet: - docs: >- - Represents the snippet that is added to a Square Online site. The snippet - code is injected into the `head` element of all pages on the site, except - for checkout pages. + UpdatePaymentResponse: + docs: |- + Defines the response returned by + [UpdatePayment](api-endpoint:Payments-UpdatePayment). properties: - id: - type: optional - docs: The Square-assigned ID for the snippet. - validation: - maxLength: 48 - access: read-only - site_id: - type: optional - docs: The ID of the site that contains the snippet. - access: read-only - content: - type: string - docs: The snippet code, which can contain valid HTML, JavaScript, or both. - validation: - minLength: 1 - maxLength: 65535 - created_at: - type: optional - docs: >- - The timestamp of when the snippet was initially added to the site, in - RFC 3339 format. - access: read-only - updated_at: - type: optional - docs: >- - The timestamp of when the snippet was last updated on the site, in RFC - 3339 format. - access: read-only + errors: + type: optional> + docs: Any errors that occurred during the request. + payment: + type: optional + docs: The updated payment. source: openapi: openapi/openapi.json - SortOrder: - enum: - - DESC - - ASC + UpdateScheduledShiftResponse: docs: >- - The order (e.g., chronological or alphabetical) in which results from a - request are returned. - source: - openapi: openapi/openapi.json - SourceApplication: - docs: Represents information about the application used to generate a change. + Represents an + [UpdateScheduledShift](api-endpoint:Labor-UpdateScheduledShift) response. + + Either `scheduled_shift` or `errors` is present in the response. properties: - product: - type: optional - docs: |- - __Read only__ The [product](entity:Product) type of the application. - See [Product](#type-product) for possible values - application_id: - type: optional> + scheduled_shift: + type: optional docs: >- - __Read only__ The Square-assigned ID of the application. This field is - used only if the + The updated scheduled shift. To make the changes public, call - [product](entity:Product) type is `EXTERNAL_API`. - name: - type: optional> - docs: >- - __Read only__ The display name of the application + [PublishScheduledShift](api-endpoint:Labor-PublishScheduledShift) or - (for example, `"Custom Application"` or `"Square POS 4.74 for - Android"`). + [BulkPublishScheduledShifts](api-endpoint:Labor-BulkPublishScheduledShifts). + errors: + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - SquareAccountDetails: - docs: Additional details about Square Account payments. + UpdateShiftResponse: + docs: |- + The response to a request to update a `Shift`. The response contains + the updated `Shift` object and might contain a set of `Error` objects if + the request resulted in errors. properties: - payment_source_token: - type: optional> - docs: Unique identifier for the payment source used for this payment. - validation: - maxLength: 255 + shift: + type: optional + docs: The updated `Shift`. errors: - type: optional>> - docs: Information about errors encountered during the request. + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - StandardUnitDescription: - docs: Contains the name and abbreviation for standard measurement unit. + UpdateSubscriptionResponse: + docs: >- + Defines output parameters in a response from the + + [UpdateSubscription](api-endpoint:Subscriptions-UpdateSubscription) + endpoint. properties: - unit: - type: optional - docs: Identifies the measurement unit being described. - name: - type: optional> - docs: UI display name of the measurement unit. For example, 'Pound'. - abbreviation: - type: optional> - docs: UI display abbreviation for the measurement unit. For example, 'lb'. + errors: + type: optional> + docs: Errors encountered during the request. + subscription: + type: optional + docs: The updated subscription. source: openapi: openapi/openapi.json - StandardUnitDescriptionGroup: - docs: Group of standard measurement units. + UpdateTeamMemberRequest: + docs: Represents an update request for a `TeamMember` object. properties: - standard_unit_descriptions: - type: optional>> + team_member: + type: optional docs: >- - List of standard (non-custom) measurement units in this description - group. - language_code: - type: optional> - docs: IETF language tag. + The team member fields to add, change, or clear. Fields can be cleared + using a null value. To update + + `wage_setting.job_assignments`, you must provide the complete list of + job assignments. If needed, call + + [ListJobs](api-endpoint:Team-ListJobs) to get the required `job_id` + values. source: openapi: openapi/openapi.json - SubmitEvidenceResponse: - docs: Defines the fields in a `SubmitEvidence` response. + UpdateTeamMemberResponse: + docs: >- + Represents a response from an update request containing the updated + `TeamMember` object or error messages. properties: + team_member: + type: optional + docs: The successfully updated `TeamMember` object. errors: type: optional> - docs: Information about errors encountered during the request. - dispute: - type: optional - docs: The `Dispute` for which evidence was submitted. + docs: The errors that occurred during the request. source: openapi: openapi/openapi.json - Subscription: + UpdateTimecardResponse: docs: >- - Represents a subscription purchased by a customer. - + The response to a request to update a `Timecard`. The response contains - For more information, see + the updated `Timecard` object and might contain a set of `Error` objects + if - [Manage - Subscriptions](https://developer.squareup.com/docs/subscriptions-api/manage-subscriptions). + the request resulted in errors. properties: - id: - type: optional - docs: The Square-assigned ID of the subscription. - validation: - maxLength: 255 - access: read-only - location_id: - type: optional - docs: The ID of the location associated with the subscription. - access: read-only - plan_variation_id: - type: optional - docs: >- - The ID of the subscribed-to [subscription plan - variation](entity:CatalogSubscriptionPlanVariation). - access: read-only - customer_id: - type: optional - docs: The ID of the subscribing [customer](entity:Customer) profile. - access: read-only - start_date: - type: optional - docs: >- - The `YYYY-MM-DD`-formatted date (for example, 2013-01-15) to start the - subscription. - access: read-only - canceled_date: - type: optional> - docs: >- - The `YYYY-MM-DD`-formatted date (for example, 2013-01-15) to cancel - the subscription, - - when the subscription status changes to `CANCELED` and the - subscription billing stops. - - - If this field is not set, the subscription ends according its - subscription plan. - - - This field cannot be updated, other than being cleared. - charged_through_date: - type: optional - docs: >- - The `YYYY-MM-DD`-formatted date up to when the subscriber is invoiced - for the - - subscription. - - - After the invoice is sent for a given billing period, - - this date will be the last day of the billing period. - - For example, - - suppose for the month of May a subscriber gets an invoice - - (or charged the card) on May 1. For the monthly billing scenario, - - this date is then set to May 31. - access: read-only - status: - type: optional - docs: |- - The current status of the subscription. - See [SubscriptionStatus](#type-subscriptionstatus) for possible values - tax_percentage: - type: optional> - docs: |- - The tax amount applied when billing the subscription. The - percentage is expressed in decimal form, using a `'.'` as the decimal - separator and without a `'%'` sign. For example, a value of `7.5` - corresponds to 7.5%. - invoice_ids: - type: optional> - docs: |- - The IDs of the [invoices](entity:Invoice) created for the - subscription, listed in order when the invoices were created - (newest invoices appear first). - access: read-only - price_override_money: - type: optional - docs: >- - A custom price which overrides the cost of a subscription plan - variation with `STATIC` pricing. - - This field does not affect itemized subscriptions with `RELATIVE` - pricing. Instead, - - you should edit the Subscription's [order - template](https://developer.squareup.com/docs/subscriptions-api/manage-subscriptions#phases-and-order-templates). - version: - type: optional - docs: >- - The version of the object. When updating an object, the version - - supplied must match the version in the database, otherwise the write - will - - be rejected as conflicting. - created_at: - type: optional - docs: The timestamp when the subscription was created, in RFC 3339 format. - access: read-only - card_id: - type: optional> - docs: |- - The ID of the [subscriber's](entity:Customer) [card](entity:Card) - used to charge for the subscription. - timezone: - type: optional - docs: >- - Timezone that will be used in date calculations for the subscription. - - Defaults to the timezone of the location based on `location_id`. - - Format: the IANA Timezone Database identifier for the location - timezone (for example, `America/Los_Angeles`). - access: read-only - source: - type: optional - docs: The origination details of the subscription. - actions: - type: optional>> - docs: >- - The list of scheduled actions on this subscription. It is set only in - the response from - - [RetrieveSubscription](api-endpoint:Subscriptions-RetrieveSubscription) - with the query parameter - - of `include=actions` or from - - [SearchSubscriptions](api-endpoint:Subscriptions-SearchSubscriptions) - with the input parameter - - of `include:["actions"]`. - monthly_billing_anchor_date: - type: optional - docs: >- - The day of the month on which the subscription will issue invoices and - publish orders. - access: read-only - phases: - type: optional> - docs: array of phases for this subscription - access: read-only + timecard: + type: optional + docs: The updated `Timecard`. + errors: + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - SubscriptionAction: - docs: Represents an action as a pending change to a subscription. + UpdateVendorRequest: + docs: >- + Represents an input to a call to + [UpdateVendor](api-endpoint:Vendors-UpdateVendor). properties: - id: - type: optional - docs: The ID of an action scoped to a subscription. - type: - type: optional - docs: >- - The type of the action. - - See [SubscriptionActionType](#type-subscriptionactiontype) for - possible values - effective_date: - type: optional> - docs: >- - The `YYYY-MM-DD`-formatted date when the action occurs on the - subscription. - monthly_billing_anchor_date: - type: optional> - docs: >- - The new billing anchor day value, for a `CHANGE_BILLING_ANCHOR_DATE` - action. - phases: - type: optional>> - docs: A list of Phases, to pass phase-specific information used in the swap. - new_plan_variation_id: + idempotency_key: type: optional> docs: >- - The target subscription plan variation that a subscription switches - to, for a `SWAP_PLAN` action. + A client-supplied, universally unique identifier (UUID) for the + + request. + + + See + [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) + in the + + [API Development 101](https://developer.squareup.com/docs/buildbasics) + section for more + + information. + validation: + maxLength: 128 + vendor: + type: Vendor + docs: The specified [Vendor](entity:Vendor) to be updated. source: openapi: openapi/openapi.json - SubscriptionActionType: - enum: - - CANCEL - - PAUSE - - RESUME - - SWAP_PLAN - - CHANGE_BILLING_ANCHOR_DATE - docs: Supported types of an action as a pending change to a subscription. + UpdateVendorResponse: + docs: >- + Represents an output from a call to + [UpdateVendor](api-endpoint:Vendors-UpdateVendor). + properties: + errors: + type: optional> + docs: Errors occurred when the request fails. + vendor: + type: optional + docs: The [Vendor](entity:Vendor) that has been updated. source: openapi: openapi/openapi.json - SubscriptionCadence: - enum: - - DAILY - - WEEKLY - - EVERY_TWO_WEEKS - - THIRTY_DAYS - - SIXTY_DAYS - - NINETY_DAYS - - MONTHLY - - EVERY_TWO_MONTHS - - QUARTERLY - - EVERY_FOUR_MONTHS - - EVERY_SIX_MONTHS - - ANNUAL - - EVERY_TWO_YEARS - docs: Determines the billing cadence of a [Subscription](entity:Subscription) + UpdateWageSettingResponse: + docs: >- + Represents a response from an update request containing the updated + `WageSetting` object + + or error messages. + properties: + wage_setting: + type: optional + docs: The successfully updated `WageSetting` object. + errors: + type: optional> + docs: The errors that occurred during the request. source: openapi: openapi/openapi.json - SubscriptionEvent: - docs: Describes changes to a subscription and the subscription status. + UpdateWebhookSubscriptionResponse: + docs: >- + Defines the fields that are included in the response body of + + a request to the + [UpdateWebhookSubscription](api-endpoint:WebhookSubscriptions-UpdateWebhookSubscription) + endpoint. + + + Note: If there are errors processing the request, the + [Subscription](entity:WebhookSubscription) is not + + present. properties: - id: - type: string - docs: The ID of the subscription event. - subscription_event_type: - type: SubscriptionEventSubscriptionEventType - docs: >- - Type of the subscription event. + errors: + type: optional> + docs: Information on errors encountered during the request. + subscription: + type: optional + docs: The updated [Subscription](entity:WebhookSubscription). + source: + openapi: openapi/openapi.json + UpdateWebhookSubscriptionSignatureKeyResponse: + docs: >- + Defines the fields that are included in the response body of - See - [SubscriptionEventSubscriptionEventType](#type-subscriptioneventsubscriptioneventtype) - for possible values - effective_date: - type: string - docs: >- - The `YYYY-MM-DD`-formatted date (for example, 2013-01-15) when the - subscription event occurred. - monthly_billing_anchor_date: - type: optional + a request to the + [UpdateWebhookSubscriptionSignatureKey](api-endpoint:WebhookSubscriptions-UpdateWebhookSubscriptionSignatureKey) + endpoint. + + + Note: If there are errors processing the request, the + [Subscription](entity:WebhookSubscription) is not + + present. + properties: + errors: + type: optional> + docs: Information on errors encountered during the request. + signature_key: + type: optional docs: >- - The day-of-the-month the billing anchor date was changed to, if - applicable. + The new Square-generated signature key used to validate the origin of + the webhook event. access: read-only - info: - type: optional - docs: Additional information about the subscription event. - phases: - type: optional>> - docs: A list of Phases, to pass phase-specific information used in the swap. - plan_variation_id: - type: string - docs: >- - The ID of the subscription plan variation associated with the - subscription. source: openapi: openapi/openapi.json - SubscriptionEventInfo: - docs: Provides information about the subscription event. + UpdateWorkweekConfigResponse: + docs: >- + The response to a request to update a `WorkweekConfig` object. The + response contains + + the updated `WorkweekConfig` object and might contain a set of `Error` + objects if + + the request resulted in errors. properties: - detail: - type: optional> - docs: A human-readable explanation for the event. - code: - type: optional - docs: |- - An info code indicating the subscription event that occurred. - See [InfoCode](#type-infocode) for possible values + workweek_config: + type: optional + docs: The response object. + errors: + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - SubscriptionEventInfoCode: - enum: - - LOCATION_NOT_ACTIVE - - LOCATION_CANNOT_ACCEPT_PAYMENT - - CUSTOMER_DELETED - - CUSTOMER_NO_EMAIL - - CUSTOMER_NO_NAME - - USER_PROVIDED - docs: Supported info codes of a subscription event. + UpsertBookingCustomAttributeResponse: + docs: >- + Represents an + [UpsertBookingCustomAttribute](api-endpoint:BookingCustomAttributes-UpsertBookingCustomAttribute) + response. + + Either `custom_attribute_definition` or `errors` is present in the + response. + properties: + custom_attribute: + type: optional + docs: The new or updated custom attribute. + errors: + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - SubscriptionEventSubscriptionEventType: - enum: - - START_SUBSCRIPTION - - PLAN_CHANGE - - STOP_SUBSCRIPTION - - DEACTIVATE_SUBSCRIPTION - - RESUME_SUBSCRIPTION - - PAUSE_SUBSCRIPTION - - BILLING_ANCHOR_DATE_CHANGED - docs: Supported types of an event occurred to a subscription. + UpsertCatalogObjectResponse: + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + catalog_object: + type: optional + docs: The successfully created or updated CatalogObject. + id_mappings: + type: optional> + docs: The mapping between client and server IDs for this upsert. source: openapi: openapi/openapi.json - SubscriptionPhase: + UpsertCustomerCustomAttributeResponse: docs: >- - Describes a phase in a subscription plan variation. For more information, - see [Subscription Plans and - Variations](https://developer.squareup.com/docs/subscriptions-api/plans-and-variations). - properties: - uid: - type: optional> - docs: >- - The Square-assigned ID of the subscription phase. This field cannot be - changed after a `SubscriptionPhase` is created. - cadence: - type: SubscriptionCadence - docs: >- - The billing cadence of the phase. For example, weekly or monthly. This - field cannot be changed after a `SubscriptionPhase` is created. + Represents an + [UpsertCustomerCustomAttribute](api-endpoint:CustomerCustomAttributes-UpsertCustomerCustomAttribute) + response. - See [SubscriptionCadence](#type-subscriptioncadence) for possible - values - periods: - type: optional> - docs: >- - The number of `cadence`s the phase lasts. If not set, the phase never - ends. Only the last phase can be indefinite. This field cannot be - changed after a `SubscriptionPhase` is created. - recurring_price_money: - type: optional - docs: >- - The amount to bill for each `cadence`. Failure to specify this field - results in a `MISSING_REQUIRED_PARAMETER` error at runtime. - ordinal: - type: optional> - docs: >- - The position this phase appears in the sequence of phases defined for - the plan, indexed from 0. This field cannot be changed after a - `SubscriptionPhase` is created. - pricing: - type: optional - docs: The subscription pricing. + Either `custom_attribute_definition` or `errors` is present in the + response. + properties: + custom_attribute: + type: optional + docs: The new or updated custom attribute. + errors: + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - SubscriptionPricing: - docs: Describes the pricing for the subscription. - properties: - type: - type: optional - docs: >- - RELATIVE or STATIC + UpsertLocationCustomAttributeResponse: + docs: >- + Represents an + [UpsertLocationCustomAttribute](api-endpoint:LocationCustomAttributes-UpsertLocationCustomAttribute) + response. - See [SubscriptionPricingType](#type-subscriptionpricingtype) for - possible values - discount_ids: - type: optional>> - docs: The ids of the discount catalog objects - price_money: - type: optional - docs: The price of the subscription, if STATIC + Either `custom_attribute_definition` or `errors` is present in the + response. + properties: + custom_attribute: + type: optional + docs: The new or updated custom attribute. + errors: + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - SubscriptionPricingType: - enum: - - STATIC - - RELATIVE - docs: Determines the pricing of a [Subscription](entity:Subscription) + UpsertMerchantCustomAttributeResponse: + docs: >- + Represents an + [UpsertMerchantCustomAttribute](api-endpoint:MerchantCustomAttributes-UpsertMerchantCustomAttribute) + response. + + Either `custom_attribute_definition` or `errors` is present in the + response. + properties: + custom_attribute: + type: optional + docs: The new or updated custom attribute. + errors: + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - SubscriptionSource: - docs: The origination details of the subscription. + UpsertOrderCustomAttributeResponse: + docs: Represents a response from upserting order custom attribute definitions. properties: - name: - type: optional> - docs: |- - The name used to identify the place (physical or digital) that - a subscription originates. If unset, the name defaults to the name - of the application that created the subscription. - validation: - maxLength: 255 + custom_attribute: + type: optional + docs: The order custom attribute that was created or modified. + errors: + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - SubscriptionStatus: - enum: - - PENDING - - ACTIVE - - CANCELED - - DEACTIVATED - - PAUSED - docs: Supported subscription statuses. + UpsertSnippetResponse: + docs: >- + Represents an `UpsertSnippet` response. The response can include either + `snippet` or `errors`. + properties: + errors: + type: optional> + docs: Any errors that occurred during the request. + snippet: + type: optional + docs: The new or updated snippet. source: openapi: openapi/openapi.json - SubscriptionTestResult: - docs: >- - Represents the details of a webhook subscription, including notification - URL, - - event types, and signature key. + V1Money: properties: - id: - type: optional - docs: A Square-generated unique ID for the subscription test result. - validation: - maxLength: 64 - access: read-only - status_code: + amount: type: optional> - docs: The status code returned by the subscription notification URL. - payload: - type: optional> - docs: >- - An object containing the payload of the test event. For example, a - `payment.created` event. - created_at: - type: optional docs: >- - The timestamp of when the subscription was created, in RFC 3339 - format. + Amount in the lowest denominated value of this Currency. E.g. in USD - For example, "2016-09-04T23:59:33.123Z". - access: read-only - updated_at: - type: optional - docs: >- - The timestamp of when the subscription was updated, in RFC 3339 - format. For example, "2016-09-04T23:59:33.123Z". + these are cents, in JPY they are Yen (which do not have a 'cent' + concept). + currency_code: + type: optional + docs: |- - Because a subscription test result is unique, this field is the same - as the `created_at` field. - access: read-only + See [Currency](#type-currency) for possible values source: openapi: openapi/openapi.json - SwapPlanResponse: - docs: |- - Defines output parameters in a response of the - [SwapPlan](api-endpoint:Subscriptions-SwapPlan) endpoint. + V1Order: + docs: V1Order properties: errors: - type: optional> - docs: Errors encountered during the request. - subscription: - type: optional - docs: The subscription with the updated subscription plan. - actions: - type: optional> - docs: A list of a `SWAP_PLAN` action created by the request. - source: - openapi: openapi/openapi.json - TaxCalculationPhase: - enum: - - TAX_SUBTOTAL_PHASE - - TAX_TOTAL_PHASE - docs: When to calculate the taxes due on a cart. - source: - openapi: openapi/openapi.json - TaxIds: - docs: Identifiers for the location used by various governments for tax purposes. - properties: - eu_vat: + type: optional>> + docs: Any errors that occurred during the request. + id: type: optional + docs: The order's unique identifier. + buyer_email: + type: optional> + docs: The email address of the order's buyer. + recipient_name: + type: optional> + docs: The name of the order's buyer. + recipient_phone_number: + type: optional> + docs: The phone number to use for the order's delivery. + state: + type: optional docs: |- - The EU VAT number for this location. For example, `IE3426675K`. - If the EU VAT number is present, it is well-formed and has been - validated with VIES, the VAT Information Exchange System. - access: read-only - fr_siret: - type: optional + Whether the tax is an ADDITIVE tax or an INCLUSIVE tax. + See [V1OrderState](#type-v1orderstate) for possible values + shipping_address: + type: optional
+ docs: The address to ship the order to. + subtotal_money: + type: optional docs: >- - The SIRET (Système d'Identification du Répertoire des Entreprises et - de leurs Etablissements) - - number is a 14-digit code issued by the French INSEE. For example, - `39922799000021`. - access: read-only - fr_naf: + The amount of all items purchased in the order, before taxes and + shipping. + total_shipping_money: + type: optional + docs: The shipping cost for the order. + total_tax_money: + type: optional + docs: The total of all taxes applied to the order. + total_price_money: + type: optional + docs: The total cost of the order. + total_discount_money: + type: optional + docs: The total of all discounts applied to the order. + created_at: type: optional - docs: >- - The French government uses the NAF (Nomenclature des Activités - Françaises) to display and - - track economic statistical data. This is also called the APE (Activite - Principale de l’Entreprise) code. - - For example, `6910Z`. - access: read-only - es_nif: + docs: The time when the order was created, in ISO 8601 format. + updated_at: type: optional + docs: The time when the order was last modified, in ISO 8601 format. + expires_at: + type: optional> + docs: >- + The time when the order expires if no action is taken, in ISO 8601 + format. + payment_id: + type: optional> + docs: The unique identifier of the payment associated with the order. + buyer_note: + type: optional> + docs: A note provided by the buyer when the order was created, if any. + completed_note: + type: optional> + docs: >- + A note provided by the merchant when the order's state was set to + COMPLETED, if any + refunded_note: + type: optional> + docs: >- + A note provided by the merchant when the order's state was set to + REFUNDED, if any. + canceled_note: + type: optional> + docs: >- + A note provided by the merchant when the order's state was set to + CANCELED, if any. + tender: + type: optional + docs: The tender used to pay for the order. + order_history: + type: optional>> + docs: The history of actions associated with the order. + promo_code: + type: optional> + docs: The promo code provided by the buyer, if any. + btc_receive_address: + type: optional> + docs: For Bitcoin transactions, the address that the buyer sent Bitcoin to. + btc_price_satoshi: + type: optional> docs: >- - The NIF (Numero de Identificacion Fiscal) number is a nine-character - tax identifier used in Spain. - - If it is present, it has been validated. For example, `73628495A`. - access: read-only - jp_qii: - type: optional + For Bitcoin transactions, the price of the buyer's order in satoshi + (100 million satoshi equals 1 BTC). + source: + openapi: openapi/openapi.json + V1OrderHistoryEntry: + docs: V1OrderHistoryEntry + properties: + action: + type: optional docs: >- - The QII (Qualified Invoice Issuer) number is a 14-character tax - identifier used in Japan. + The type of action performed on the order. - For example, `T1234567890123`. - access: read-only + See [V1OrderHistoryEntryAction](#type-v1orderhistoryentryaction) for + possible values + created_at: + type: optional + docs: The time when the action was performed, in ISO 8601 format. source: openapi: openapi/openapi.json - TaxInclusionType: + V1OrderHistoryEntryAction: enum: - - ADDITIVE - - INCLUSIVE - docs: >- - Whether to the tax amount should be additional to or included in the - CatalogItem price. + - ORDER_PLACED + - DECLINED + - PAYMENT_RECEIVED + - CANCELED + - COMPLETED + - REFUNDED + - EXPIRED source: openapi: openapi/openapi.json - TeamMember: - docs: A record representing an individual team member for a business. + V1OrderState: + enum: + - PENDING + - OPEN + - COMPLETED + - CANCELED + - REFUNDED + - REJECTED + source: + openapi: openapi/openapi.json + V1Tender: + docs: >- + A tender represents a discrete monetary exchange. Square represents this + + exchange as a money object with a specific currency and amount, where the + + amount is given in the smallest denomination of the given currency. + + + Square POS can accept more than one form of tender for a single payment + (such + + as by splitting a bill between a credit card and a gift card). The + `tender` + + field of the Payment object lists all forms of tender used for the + payment. + + + Split tender payments behave slightly differently from single tender + payments: + + + The receipt_url for a split tender corresponds only to the first tender + listed + + in the tender field. To get the receipt URLs for the remaining tenders, + use + + the receipt_url fields of the corresponding Tender objects. + + + *A note on gift cards**: when a customer purchases a Square gift card from + a + + merchant, the merchant receives the full amount of the gift card in the + + associated payment. + + + When that gift card is used as a tender, the balance of the gift card is + + reduced and the merchant receives no funds. A `Tender` object with a type + of + + `SQUARE_GIFT_CARD` indicates a gift card was used for some or all of the + + associated payment. properties: id: type: optional - docs: The unique ID for the team member. - access: read-only - reference_id: + docs: The tender's unique ID. + type: + type: optional + docs: |- + The type of tender. + See [V1TenderType](#type-v1tendertype) for possible values + name: type: optional> - docs: >- - A second ID used to associate the team member with an entity in - another system. - is_owner: - type: optional - docs: Whether the team member is the owner of the Square account. - access: read-only - status: - type: optional + docs: A human-readable description of the tender. + employee_id: + type: optional> + docs: The ID of the employee that processed the tender. + receipt_url: + type: optional> + docs: The URL of the receipt for the tender. + card_brand: + type: optional docs: |- - Describes the status of the team member. - See [TeamMemberStatus](#type-teammemberstatus) for possible values - given_name: + The brand of credit card provided. + See [V1TenderCardBrand](#type-v1tendercardbrand) for possible values + pan_suffix: type: optional> + docs: The last four digits of the provided credit card's account number. + entry_method: + type: optional docs: >- - The given name (that is, the first name) associated with the team - member. - family_name: + The tender's unique ID. + + See [V1TenderEntryMethod](#type-v1tenderentrymethod) for possible + values + payment_note: type: optional> docs: >- - The family name (that is, the last name) associated with the team - member. - email_address: + Notes entered by the merchant about the tender at the time of payment, + if any. Typically only present for tender with the type: OTHER. + total_money: + type: optional + docs: The total amount of money provided in this form of tender. + tendered_money: + type: optional + docs: The amount of total_money applied to the payment. + tendered_at: type: optional> - docs: >- - The email address associated with the team member. After accepting the - invitation - - from Square, only the team member can change this value. - phone_number: + docs: The time when the tender was created, in ISO 8601 format. + settled_at: type: optional> - docs: |- - The team member's phone number, in E.164 format. For example: - +14155552671 - the country code is 1 for US - +551155256325 - the country code is 55 for BR - created_at: - type: optional - docs: The timestamp when the team member was created, in RFC 3339 format. - access: read-only - updated_at: - type: optional + docs: The time when the tender was settled, in ISO 8601 format. + change_back_money: + type: optional + docs: The amount of total_money returned to the buyer as change. + refunded_money: + type: optional docs: >- - The timestamp when the team member was last updated, in RFC 3339 - format. - access: read-only - assigned_locations: - type: optional - docs: Describes the team member's assigned locations. - wage_setting: - type: optional + The total of all refunds applied to this tender. This amount is always + negative or zero. + is_exchange: + type: optional> docs: >- - Information about the team member's overtime exemption status, job - assignments, and compensation. + Indicates whether or not the tender is associated with an exchange. If + is_exchange is true, the tender represents the value of goods returned + in an exchange not the actual money paid. The exchange value reduces + the tender amounts needed to pay for items purchased in the exchange. source: openapi: openapi/openapi.json - TeamMemberAssignedLocations: - docs: An object that represents a team member's assignment to locations. - properties: - assignment_type: - type: optional - docs: >- - The current assignment type of the team member. - - See - [TeamMemberAssignedLocationsAssignmentType](#type-teammemberassignedlocationsassignmenttype) - for possible values - location_ids: - type: optional>> - docs: The explicit locations that the team member is assigned to. + V1TenderCardBrand: + enum: + - OTHER_BRAND + - VISA + - MASTER_CARD + - AMERICAN_EXPRESS + - DISCOVER + - DISCOVER_DINERS + - JCB + - CHINA_UNIONPAY + - SQUARE_GIFT_CARD + docs: The brand of a credit card. source: openapi: openapi/openapi.json - TeamMemberAssignedLocationsAssignmentType: + V1TenderEntryMethod: enum: - - ALL_CURRENT_AND_FUTURE_LOCATIONS - - EXPLICIT_LOCATIONS - docs: Enumerates the possible assignment types that the team member can have. + - MANUAL + - SCANNED + - SQUARE_CASH + - SQUARE_WALLET + - SWIPED + - WEB_FORM + - OTHER + source: + openapi: openapi/openapi.json + V1TenderType: + enum: + - CREDIT_CARD + - CASH + - THIRD_PARTY_CARD + - NO_SALE + - SQUARE_WALLET + - SQUARE_GIFT_CARD + - UNKNOWN + - OTHER + source: + openapi: openapi/openapi.json + V1UpdateOrderRequestAction: + enum: + - COMPLETE + - CANCEL + - REFUND source: openapi: openapi/openapi.json - TeamMemberBookingProfile: - docs: >- - The booking profile of a seller's team member, including the team member's - ID, display name, description and whether the team member can be booked as - a service provider. + Vendor: + docs: Represents a supplier to a seller. properties: - team_member_id: + id: type: optional docs: >- - The ID of the [TeamMember](entity:TeamMember) object for the team - member associated with the booking profile. + A unique Square-generated ID for the [Vendor](entity:Vendor). + + This field is required when attempting to update a + [Vendor](entity:Vendor). validation: - maxLength: 32 - access: read-only - description: + maxLength: 100 + created_at: type: optional - docs: The description of the team member. + docs: |- + An RFC 3339-formatted timestamp that indicates when the + [Vendor](entity:Vendor) was created. validation: - maxLength: 65536 + maxLength: 34 access: read-only - display_name: + updated_at: type: optional - docs: The display name of the team member. + docs: |- + An RFC 3339-formatted timestamp that indicates when the + [Vendor](entity:Vendor) was last updated. validation: - maxLength: 512 + maxLength: 34 access: read-only - is_bookable: - type: optional> + name: + type: optional> docs: >- - Indicates whether the team member can be booked through the Bookings - API or the seller's online booking channel or site (`true`) or not - (`false`). - profile_image_url: - type: optional - docs: The URL of the team member's image for the bookings profile. + The name of the [Vendor](entity:Vendor). + + This field is required when attempting to create or update a + [Vendor](entity:Vendor). validation: - maxLength: 2048 - access: read-only - source: - openapi: openapi/openapi.json - TeamMemberStatus: - enum: - - ACTIVE - - INACTIVE - docs: >- - Enumerates the possible statuses the team member can have within a - business. + maxLength: 100 + address: + type: optional
+ docs: The address of the [Vendor](entity:Vendor). + contacts: + type: optional>> + docs: The contacts of the [Vendor](entity:Vendor). + account_number: + type: optional> + docs: The account number of the [Vendor](entity:Vendor). + validation: + maxLength: 100 + note: + type: optional> + docs: A note detailing information about the [Vendor](entity:Vendor). + validation: + maxLength: 4096 + version: + type: optional + docs: The version of the [Vendor](entity:Vendor). + status: + type: optional + docs: |- + The status of the [Vendor](entity:Vendor). + See [Status](#type-status) for possible values source: openapi: openapi/openapi.json - TeamMemberWage: - docs: |- - Job and wage information for a [team member](entity:TeamMember). - This convenience object provides details needed to specify the `wage` - field for a [timecard](entity:Timecard). + VendorContact: + docs: Represents a contact of a [Vendor](entity:Vendor). properties: id: type: optional - docs: The UUID for this object. - team_member_id: + docs: >- + A unique Square-generated ID for the + [VendorContact](entity:VendorContact). + + This field is required when attempting to update a + [VendorContact](entity:VendorContact). + validation: + maxLength: 100 + name: type: optional> - docs: The `TeamMember` that this wage is assigned to. - title: + docs: >- + The name of the [VendorContact](entity:VendorContact). + + This field is required when attempting to create a + [Vendor](entity:Vendor). + validation: + maxLength: 255 + email_address: type: optional> - docs: The job title that this wage relates to. - hourly_rate: - type: optional - docs: |- - Can be a custom-set hourly wage or the calculated effective hourly - wage based on the annual wage and hours worked per week. - job_id: + docs: The email address of the [VendorContact](entity:VendorContact). + validation: + maxLength: 255 + phone_number: type: optional> - docs: An identifier for the [job](entity:Job) that this wage relates to. - tip_eligible: + docs: The phone number of the [VendorContact](entity:VendorContact). + validation: + maxLength: 255 + removed: type: optional> - docs: Whether team members are eligible for tips when working this job. + docs: The state of the [VendorContact](entity:VendorContact). + ordinal: + type: integer + docs: The ordinal of the [VendorContact](entity:VendorContact). source: openapi: openapi/openapi.json - Tender: - docs: >- - Represents a tender (i.e., a method of payment) used in a Square - transaction. + VendorCreatedEvent: + docs: Published when a [Vendor](entity:Vendor) is created. properties: - id: - type: optional - docs: The tender's unique ID. It is the associated payment ID. - validation: - maxLength: 192 + merchant_id: + type: optional> + docs: The ID of a seller associated with this event. location_id: type: optional> - docs: The ID of the transaction's associated location. - validation: - maxLength: 50 - transaction_id: + 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 ID of the tender's associated transaction. - validation: - maxLength: 192 + 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 timestamp for when the tender was created, in RFC 3339 format. - validation: - maxLength: 32 - access: read-only - note: - type: optional> - docs: An optional note associated with the tender at the time of payment. - validation: - maxLength: 500 - amount_money: - type: optional - docs: >- - The total amount of the tender, including `tip_money`. If the tender - has a `payment_id`, - - the `total_money` of the corresponding [Payment](entity:Payment) will - be equal to the - - `amount_money` of the tender. - tip_money: - type: optional - docs: The tip's amount of the tender. - processing_fee_money: - type: optional docs: >- - The amount of any Square processing fees applied to the tender. - - - This field is not immediately populated when a new transaction is + The RFC 3339-formatted time when the underlying event data object is created. - - It is usually available after about ten seconds. - customer_id: - type: optional> - docs: >- - If the tender is associated with a customer or represents a customer's - card on file, - - this is the ID of the associated customer. - validation: - maxLength: 191 + 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: TenderType - docs: |- - The type of tender, such as `CARD` or `CASH`. - See [TenderType](#type-tendertype) for possible values - card_details: - type: optional - docs: |- - The details of the card tender. - - This value is present only if the value of `type` is `CARD`. - cash_details: - type: optional - docs: |- - The details of the cash tender. - - This value is present only if the value of `type` is `CASH`. - bank_account_details: - type: optional - docs: |- - The details of the bank account tender. - - This value is present only if the value of `type` is `BANK_ACCOUNT`. - buy_now_pay_later_details: - type: optional - docs: >- - The details of a Buy Now Pay Later tender. - - - This value is present only if the value of `type` is - `BUY_NOW_PAY_LATER`. - square_account_details: - type: optional - docs: |- - The details of a Square Account tender. - - This value is present only if the value of `type` is `SQUARE_ACCOUNT`. - additional_recipients: - type: optional>> - docs: >- - Additional recipients (other than the merchant) receiving a portion of - this tender. - - For example, fees assessed on the purchase by a third party - integration. - payment_id: type: optional> - docs: >- - The ID of the [Payment](entity:Payment) that corresponds to this - tender. - - This value is only present for payments created with the v2 Payments - API. - validation: - maxLength: 192 + 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 - TenderBankAccountDetails: - docs: |- - Represents the details of a tender with `type` `BANK_ACCOUNT`. - - See [BankAccountPaymentDetails](entity:BankAccountPaymentDetails) - for more exposed details of a bank account payment. + VendorCreatedEventObject: properties: - status: - type: optional + operation: + type: optional docs: >- - The bank account payment's current state. - - - See - [TenderBankAccountPaymentDetailsStatus](entity:TenderBankAccountDetailsStatus) - for possible values. + The operation on the vendor that caused the event to be published. The + value is `CREATED`. - See - [TenderBankAccountDetailsStatus](#type-tenderbankaccountdetailsstatus) - for possible values + 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 - TenderBankAccountDetailsStatus: + VendorCreatedEventObjectOperation: + type: literal<"CREATED"> + docs: >- + The operation that can be performed against a vendor to cause the event to + be published. + VendorStatus: enum: - - PENDING - - COMPLETED - - FAILED - docs: Indicates the bank account payment's current status. + - ACTIVE + - INACTIVE + docs: |- + The status of the [Vendor](entity:Vendor), + whether a [Vendor](entity:Vendor) is active or inactive. source: openapi: openapi/openapi.json - TenderBuyNowPayLaterDetails: - docs: Represents the details of a tender with `type` `BUY_NOW_PAY_LATER`. + VendorUpdatedEvent: + docs: Published when a [Vendor](entity:Vendor) is updated. properties: - buy_now_pay_later_brand: - type: optional - docs: |- - The Buy Now Pay Later brand. - See [Brand](#type-brand) for possible values - status: - type: optional + merchant_id: + type: optional> + docs: The ID of a seller associated with this event. + location_id: + type: optional> docs: >- - The buy now pay later payment's current state (such as `AUTHORIZED` or - - `CAPTURED`). See - [TenderBuyNowPayLaterDetailsStatus](entity:TenderBuyNowPayLaterDetailsStatus) - - for possible values. - - See [Status](#type-status) for possible values - source: - openapi: openapi/openapi.json - TenderBuyNowPayLaterDetailsBrand: - enum: - - OTHER_BRAND - - AFTERPAY + 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 - TenderBuyNowPayLaterDetailsStatus: - enum: - - AUTHORIZED - - CAPTURED - - VOIDED - - FAILED + 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 - TenderCardDetails: - docs: >- - Represents additional details of a tender with `type` `CARD` or - `SQUARE_GIFT_CARD` + VendorUpdatedEventObject: properties: - status: - type: optional - docs: >- - The credit card payment's current state (such as `AUTHORIZED` or - - `CAPTURED`). See - [TenderCardDetailsStatus](entity:TenderCardDetailsStatus) - - for possible values. - - See [TenderCardDetailsStatus](#type-tendercarddetailsstatus) for - possible values - card: - type: optional - docs: The credit card's non-confidential details. - entry_method: - type: optional + operation: + type: optional docs: >- - The method used to enter the card's details for the transaction. + The operation on the vendor that caused the event to be published. The + value is `UPDATED`. - See [TenderCardDetailsEntryMethod](#type-tendercarddetailsentrymethod) - for possible values - source: - openapi: openapi/openapi.json - TenderCardDetailsEntryMethod: - enum: - - SWIPED - - KEYED - - EMV - - ON_FILE - - CONTACTLESS - docs: Indicates the method used to enter the card's details. + 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 - TenderCardDetailsStatus: + VendorUpdatedEventObjectOperation: + type: literal<"UPDATED"> + docs: >- + The operation that can be performed against a vendor to cause the event to + be published. + VisibilityFilter: enum: - - AUTHORIZED - - CAPTURED - - VOIDED - - FAILED - docs: Indicates the card transaction's current status. + - ALL + - READ + - READ_WRITE + docs: >- + Enumeration of visibility-filter values used to set the ability to view + custom attributes or custom attribute definitions. source: openapi: openapi/openapi.json - TenderCashDetails: - docs: Represents the details of a tender with `type` `CASH`. + VoidTransactionResponse: + docs: >- + Defines the fields that are included in the response body of + + a request to the + [VoidTransaction](api-endpoint:Transactions-VoidTransaction) endpoint. properties: - buyer_tendered_money: - type: optional - docs: >- - The total amount of cash provided by the buyer, before change is - given. - change_back_money: - type: optional - docs: The amount of change returned to the buyer. + errors: + type: optional> + docs: Any errors that occurred during the request. source: openapi: openapi/openapi.json - TenderSquareAccountDetails: - docs: Represents the details of a tender with `type` `SQUARE_ACCOUNT`. + WageSetting: + docs: >- + Represents information about the overtime exemption status, job + assignments, and compensation + + for a [team member](entity:TeamMember). properties: - status: - type: optional + team_member_id: + type: optional> + docs: The ID of the team member associated with the wage setting. + job_assignments: + type: optional>> docs: >- - The Square Account payment's current state (such as `AUTHORIZED` or + **Required** The ordered list of jobs that the team member is assigned + to. - `CAPTURED`). See - [TenderSquareAccountDetailsStatus](entity:TenderSquareAccountDetailsStatus) + The first job assignment is considered the team member's primary job. + is_overtime_exempt: + type: optional> + docs: >- + Whether the team member is exempt from the overtime rules of the + seller's country. + version: + type: optional + docs: >- + **Read only** Used for resolving concurrency issues. The request fails + if the version - for possible values. + provided does not match the server version at the time of the request. + If not provided, - See [Status](#type-status) for possible values + Square executes a blind write, potentially overwriting data from + another write. For more information, + + see [optimistic + concurrency](https://developer.squareup.com/docs/working-with-apis/optimistic-concurrency). + created_at: + type: optional + docs: The timestamp when the wage setting was created, in RFC 3339 format. + access: read-only + updated_at: + type: optional + docs: >- + The timestamp when the wage setting was last updated, in RFC 3339 + format. + access: read-only source: openapi: openapi/openapi.json - TenderSquareAccountDetailsStatus: - enum: - - AUTHORIZED - - CAPTURED - - VOIDED - - FAILED + WebhookSubscription: + docs: >- + Represents the details of a webhook subscription, including notification + URL, + + event types, and signature key. + properties: + id: + type: optional + docs: A Square-generated unique ID for the subscription. + validation: + maxLength: 64 + access: read-only + name: + type: optional> + docs: The name of this subscription. + validation: + maxLength: 64 + enabled: + type: optional> + docs: >- + Indicates whether the subscription is enabled (`true`) or not + (`false`). + event_types: + type: optional>> + docs: The event types associated with this subscription. + notification_url: + type: optional> + docs: The URL to which webhooks are sent. + api_version: + type: optional> + docs: |- + The API version of the subscription. + This field is optional for `CreateWebhookSubscription`. + The value defaults to the API version used by the application. + signature_key: + type: optional + docs: >- + The Square-generated signature key used to validate the origin of the + webhook event. + access: read-only + created_at: + type: optional + docs: >- + The timestamp of when the subscription was created, in RFC 3339 + format. For example, "2016-09-04T23:59:33.123Z". + access: read-only + updated_at: + type: optional + docs: >- + The timestamp of when the subscription was last updated, in RFC 3339 + format. + + For example, "2016-09-04T23:59:33.123Z". + access: read-only source: openapi: openapi/openapi.json - TenderType: + Weekday: enum: - - CARD - - CASH - - THIRD_PARTY_CARD - - SQUARE_GIFT_CARD - - NO_SALE - - BANK_ACCOUNT - - WALLET - - BUY_NOW_PAY_LATER - - SQUARE_ACCOUNT - - OTHER - docs: Indicates a tender's type. + - MON + - TUE + - WED + - THU + - FRI + - SAT + - SUN + docs: The days of the week. source: openapi: openapi/openapi.json - TerminalAction: - docs: Represents an action processed by the Square Terminal. + WorkweekConfig: + docs: |- + Sets the day of the week and hour of the day that a business starts a + workweek. This is used to calculate overtime pay. properties: id: type: optional - docs: A unique ID for this `TerminalAction`. + docs: The UUID for this object. + start_of_week: + type: Weekday + docs: |- + The day of the week on which a business week starts for + compensation purposes. + See [Weekday](#type-weekday) for possible values + start_of_day_local_time: + type: string + docs: |- + The local time at which a business week starts. Represented as a + string in `HH:MM` format (`HH:MM:SS` is also accepted, but seconds are + truncated). validation: - minLength: 10 - maxLength: 255 + minLength: 1 + version: + type: optional + docs: >- + Used for resolving concurrency issues. The request fails if the + version + + provided does not match the server version at the time of the request. + If not provided, + + Square executes a blind write; potentially overwriting data from + another + + write. + created_at: + type: optional + docs: A read-only timestamp in RFC 3339 format; presented in UTC. access: read-only - device_id: - type: optional> - docs: |- - The unique Id of the device intended for this `TerminalAction`. - The Id can be retrieved from /v2/devices api. - deadline_duration: - type: optional> + updated_at: + type: optional + docs: A read-only timestamp in RFC 3339 format; presented in UTC. + access: read-only + source: + openapi: openapi/openapi.json + CatalogObjectBase: + properties: + type: + type: CatalogObjectType docs: >- - The duration as an RFC 3339 duration, after which the action will be - automatically canceled. + The type of this object. Each object type has expected - TerminalActions that are `PENDING` will be automatically `CANCELED` - and have a cancellation reason + properties expressed in a structured format within its corresponding + `*_data` field below. - of `TIMED_OUT` + See [CatalogObjectType](#type-catalogobjecttype) for possible values + id: + type: string + docs: >- + An identifier to reference this object in the catalog. When a new + `CatalogObject` + + is inserted, the client should set the id to a temporary identifier + starting with + a "`#`" character. Other objects being inserted or updated within the + same request - Default: 5 minutes from creation + may use this identifier to refer to the new object. - Maximum: 5 minutes - status: + When the server receives the new object, it will supply a unique + identifier that + + replaces the temporary identifier for all future references. + validation: + minLength: 1 + updated_at: type: optional docs: >- - The status of the `TerminalAction`. + Last modification + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + in RFC 3339 format, e.g., `"2016-08-15T23:59:33.123Z"` - Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, - `COMPLETED` + would indicate the UTC time (denoted by `Z`) of August 15, 2016 at + 23:59:33 and 123 milliseconds. access: read-only - cancel_reason: - type: optional + version: + type: optional docs: >- - The reason why `TerminalAction` is canceled. Present if the status is - `CANCELED`. + The version of the object. When updating an object, the version + supplied - See [ActionCancelReason](#type-actioncancelreason) for possible values - created_at: - type: optional + must match the version in the database, otherwise the write will be + rejected as conflicting. + is_deleted: + type: optional docs: >- - The time when the `TerminalAction` was created as an RFC 3339 - timestamp. - access: read-only - updated_at: - type: optional + If `true`, the object has been deleted from the database. Must be + `false` for new objects + + being inserted. When deleted, the `updated_at` field will equal the + deletion time. + custom_attribute_values: + type: optional> docs: >- - The time when the `TerminalAction` was last updated as an RFC 3339 - timestamp. - access: read-only - app_id: - type: optional - docs: The ID of the application that created the action. - access: read-only - location_id: - type: optional - docs: The location id the action is attached to, if a link can be made. - validation: - maxLength: 64 - access: read-only - type: - type: optional - docs: |- - Represents the type of the action. - See [ActionType](#type-actiontype) for possible values - qr_code_options: - type: optional + A map (key-value pairs) of application-defined custom attribute + values. The value of a key-value pair + + is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) + object. The key is the `key` attribute + + value defined in the associated + [CatalogCustomAttributeDefinition](entity:CatalogCustomAttributeDefinition) + + object defined by the application making the request. + + + If the `CatalogCustomAttributeDefinition` object is + + defined by another application, the + `CatalogCustomAttributeDefinition`'s key attribute value is prefixed + by + + the defining application ID. For example, if the + `CatalogCustomAttributeDefinition` has a `key` attribute of + + `"cocoa_brand"` and the defining application ID is `"abcd1234"`, the + key in the map is `"abcd1234:cocoa_brand"` + + if the application making the request is different from the + application defining the custom attribute definition. + + Otherwise, the key used in the map is simply `"cocoa_brand"`. + + + Application-defined custom attributes are set at a global + (location-independent) level. + + Custom attribute values are intended to store additional information + about a catalog object + + or associations with an entity in another system. Do not use custom + attributes + + to store any sensitive information (personally identifiable + information, card details, etc.). + catalog_v1_ids: + type: optional> docs: >- - Describes configuration for the QR code action. Requires `QR_CODE` - type. - save_card_options: - type: optional + The Connect v1 IDs for this object at each location where it is + present, where they + + differ from the object's Connect V2 ID. The field will only be present + for objects that + + have been created or modified by legacy APIs. + present_at_all_locations: + type: optional docs: >- - Describes configuration for the save-card action. Requires `SAVE_CARD` - type. - signature_options: - type: optional + If `true`, this object is present at all locations (including future + locations), except where specified in + + the `absent_at_location_ids` field. If `false`, this object is not + present at any locations (including future locations), + + except where specified in the `present_at_location_ids` field. If not + specified, defaults to `true`. + present_at_location_ids: + type: optional> + docs: >- + A list of locations where the object is present, even if + `present_at_all_locations` is `false`. + + This can include locations that are deactivated. + absent_at_location_ids: + type: optional> + docs: >- + A list of locations where the object is not present, even if + `present_at_all_locations` is `true`. + + This can include locations that are deactivated. + image_id: + type: optional + docs: Identifies the `CatalogImage` attached to this `CatalogObject`. + source: + openapi: openapi/openapi.json + CatalogObjectItem: + properties: + type: literal<"ITEM"> + item_data: + type: optional docs: >- - Describes configuration for the signature capture action. Requires - `SIGNATURE` type. - confirmation_options: - type: optional + Structured data for a `CatalogItem`, set for CatalogObjects of type + `ITEM`. + id: + type: string docs: >- - Describes configuration for the confirmation action. Requires - `CONFIRMATION` type. - receipt_options: - type: optional + An identifier to reference this object in the catalog. When a new + `CatalogObject` + + is inserted, the client should set the id to a temporary identifier + starting with + + a "`#`" character. Other objects being inserted or updated within the + same request + + may use this identifier to refer to the new object. + + + When the server receives the new object, it will supply a unique + identifier that + + replaces the temporary identifier for all future references. + validation: + minLength: 1 + updated_at: + type: optional docs: >- - Describes configuration for the receipt action. Requires `RECEIPT` - type. - data_collection_options: - type: optional + Last modification + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + in RFC 3339 format, e.g., `"2016-08-15T23:59:33.123Z"` + + would indicate the UTC time (denoted by `Z`) of August 15, 2016 at + 23:59:33 and 123 milliseconds. + version: + type: optional docs: >- - Describes configuration for the data collection action. Requires - `DATA_COLLECTION` type. - select_options: - type: optional - docs: Describes configuration for the select action. Requires `SELECT` type. - device_metadata: - type: optional + The version of the object. When updating an object, the version + supplied + + must match the version in the database, otherwise the write will be + rejected as conflicting. + is_deleted: + type: optional docs: >- - Details about the Terminal that received the action request (such as - battery level, + If `true`, the object has been deleted from the database. Must be + `false` for new objects - operating system version, and network connection settings). + being inserted. When deleted, the `updated_at` field will equal the + deletion time. + custom_attribute_values: + type: optional> + docs: >- + A map (key-value pairs) of application-defined custom attribute + values. The value of a key-value pair + is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) + object. The key is the `key` attribute - Only available for `PING` action type. - await_next_action: - type: optional> - docs: >- - Indicates the action will be linked to another action and requires a - waiting dialog to be + value defined in the associated + [CatalogCustomAttributeDefinition](entity:CatalogCustomAttributeDefinition) - displayed instead of returning to the idle screen on completion of the - action. + object defined by the application making the request. - Only supported on SIGNATURE, CONFIRMATION, DATA_COLLECTION, and SELECT - types. - await_next_action_duration: - type: optional> - docs: >- - The timeout duration of the waiting dialog as an RFC 3339 duration, - after which the + If the `CatalogCustomAttributeDefinition` object is - waiting dialog will no longer be displayed and the Terminal will - return to the idle screen. + defined by another application, the + `CatalogCustomAttributeDefinition`'s key attribute value is prefixed + by + the defining application ID. For example, if the + `CatalogCustomAttributeDefinition` has a `key` attribute of - Default: 5 minutes from when the waiting dialog is displayed + `"cocoa_brand"` and the defining application ID is `"abcd1234"`, the + key in the map is `"abcd1234:cocoa_brand"` + if the application making the request is different from the + application defining the custom attribute definition. - Maximum: 5 minutes - source: - openapi: openapi/openapi.json - TerminalActionActionType: - enum: - - QR_CODE - - PING - - SAVE_CARD - - SIGNATURE - - CONFIRMATION - - RECEIPT - - DATA_COLLECTION - - SELECT - docs: >- - Describes the type of this unit and indicates which field contains the - unit information. This is an ‘open’ enum. - source: - openapi: openapi/openapi.json - TerminalActionQuery: - properties: - filter: - type: optional - docs: Options for filtering returned `TerminalAction`s - sort: - type: optional - docs: Option for sorting returned `TerminalAction` objects. - source: - openapi: openapi/openapi.json - TerminalActionQueryFilter: - properties: - device_id: - type: optional> - docs: >- - `TerminalAction`s associated with a specific device. If no device is - specified then all + Otherwise, the key used in the map is simply `"cocoa_brand"`. - `TerminalAction`s for the merchant will be displayed. - created_at: - type: optional - docs: |- - Time range for the beginning of the reporting period. Inclusive. - Default value: The current time minus one day. - Note that `TerminalAction`s are available for 30 days after creation. - status: - type: optional> - docs: >- - Filter results with the desired status of the `TerminalAction` - Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, - `COMPLETED` - type: - type: optional - docs: >- - Filter results with the requested ActionType. + Application-defined custom attributes are set at a global + (location-independent) level. - See [TerminalActionActionType](#type-terminalactionactiontype) for - possible values - source: - openapi: openapi/openapi.json - TerminalActionQuerySort: - properties: - sort_order: - type: optional - docs: |- - The order in which results are listed. - - `ASC` - Oldest to newest. - - `DESC` - Newest to oldest (default). - See [SortOrder](#type-sortorder) for possible values - source: - openapi: openapi/openapi.json - TerminalCheckout: - docs: Represents a checkout processed by the Square Terminal. - properties: - id: - type: optional - docs: A unique ID for this `TerminalCheckout`. - validation: - minLength: 10 - maxLength: 255 - access: read-only - amount_money: - type: Money + Custom attribute values are intended to store additional information + about a catalog object + + or associations with an entity in another system. Do not use custom + attributes + + to store any sensitive information (personally identifiable + information, card details, etc.). + catalog_v1_ids: + type: optional> docs: >- - The amount of money (including the tax amount) that the Square - Terminal device should try to collect. - reference_id: - type: optional> + The Connect v1 IDs for this object at each location where it is + present, where they + + differ from the object's Connect V2 ID. The field will only be present + for objects that + + have been created or modified by legacy APIs. + present_at_all_locations: + type: optional docs: >- - An optional user-defined reference ID that can be used to associate + If `true`, this object is present at all locations (including future + locations), except where specified in - this `TerminalCheckout` to another entity in an external system. For - example, an order + the `absent_at_location_ids` field. If `false`, this object is not + present at any locations (including future locations), - ID generated by a third-party shopping cart. The ID is also associated - with any payments + except where specified in the `present_at_location_ids` field. If not + specified, defaults to `true`. + present_at_location_ids: + type: optional> + docs: >- + A list of locations where the object is present, even if + `present_at_all_locations` is `false`. - used to complete the checkout. - validation: - maxLength: 40 - note: - type: optional> + This can include locations that are deactivated. + absent_at_location_ids: + type: optional> docs: >- - An optional note to associate with the checkout, as well as with any - payments used to complete the checkout. + A list of locations where the object is not present, even if + `present_at_all_locations` is `true`. - Note: maximum 500 characters - validation: - maxLength: 500 - order_id: - type: optional> - docs: The reference to the Square order ID for the checkout request. - payment_options: - type: optional - docs: Payment-specific options for the checkout request. - device_options: - type: DeviceCheckoutOptions + This can include locations that are deactivated. + image_id: + type: optional + docs: Identifies the `CatalogImage` attached to this `CatalogObject`. + source: + openapi: openapi/openapi.json + CatalogObjectImage: + properties: + type: literal<"IMAGE"> + image_data: + type: optional docs: >- - Options to control the display and behavior of the Square Terminal - device. - deadline_duration: - type: optional> + Structured data for a `CatalogImage`, set for CatalogObjects of type + `IMAGE`. + id: + type: string docs: >- - An RFC 3339 duration, after which the checkout is automatically - canceled. + An identifier to reference this object in the catalog. When a new + `CatalogObject` - A `TerminalCheckout` that is `PENDING` is automatically `CANCELED` and - has a cancellation reason + is inserted, the client should set the id to a temporary identifier + starting with - of `TIMED_OUT`. + a "`#`" character. Other objects being inserted or updated within the + same request + may use this identifier to refer to the new object. - Default: 5 minutes from creation + When the server receives the new object, it will supply a unique + identifier that - Maximum: 5 minutes - status: + replaces the temporary identifier for all future references. + validation: + minLength: 1 + updated_at: type: optional docs: >- - The status of the `TerminalCheckout`. + Last modification + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + in RFC 3339 format, e.g., `"2016-08-15T23:59:33.123Z"` - Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, - `COMPLETED` - access: read-only - cancel_reason: - type: optional + would indicate the UTC time (denoted by `Z`) of August 15, 2016 at + 23:59:33 and 123 milliseconds. + version: + type: optional docs: >- - The reason why `TerminalCheckout` is canceled. Present if the status - is `CANCELED`. + The version of the object. When updating an object, the version + supplied - See [ActionCancelReason](#type-actioncancelreason) for possible values - payment_ids: - type: optional> - docs: A list of IDs for payments created by this `TerminalCheckout`. - access: read-only - created_at: - type: optional - docs: >- - The time when the `TerminalCheckout` was created, as an RFC 3339 - timestamp. - access: read-only - updated_at: - type: optional - docs: >- - The time when the `TerminalCheckout` was last updated, as an RFC 3339 - timestamp. - access: read-only - app_id: - type: optional - docs: The ID of the application that created the checkout. - access: read-only - location_id: - type: optional - docs: The location of the device where the `TerminalCheckout` was directed. - validation: - maxLength: 64 - access: read-only - payment_type: - type: optional + must match the version in the database, otherwise the write will be + rejected as conflicting. + is_deleted: + type: optional docs: >- - The type of payment the terminal should attempt to capture from. - Defaults to `CARD_PRESENT`. + If `true`, the object has been deleted from the database. Must be + `false` for new objects - See [CheckoutOptionsPaymentType](#type-checkoutoptionspaymenttype) for - possible values - team_member_id: - type: optional> - docs: >- - An optional ID of the team member associated with creating the - checkout. - customer_id: - type: optional> - docs: An optional ID of the customer associated with the checkout. - app_fee_money: - type: optional + being inserted. When deleted, the `updated_at` field will equal the + deletion time. + custom_attribute_values: + type: optional> docs: >- - The amount the developer is taking as a fee for facilitating the - payment on behalf + A map (key-value pairs) of application-defined custom attribute + values. The value of a key-value pair - of the seller. + is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) + object. The key is the `key` attribute + value defined in the associated + [CatalogCustomAttributeDefinition](entity:CatalogCustomAttributeDefinition) - The amount cannot be more than 90% of the total amount of the payment. + object defined by the application making the request. - The amount must be specified in the smallest denomination of the - applicable currency (for example, US dollar amounts are specified in - cents). For more information, see [Working with Monetary - Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). + If the `CatalogCustomAttributeDefinition` object is + defined by another application, the + `CatalogCustomAttributeDefinition`'s key attribute value is prefixed + by - The fee currency code must match the currency associated with the - seller that is accepting the payment. The application must be from a - developer account in the same country and using the same currency code - as the seller. + the defining application ID. For example, if the + `CatalogCustomAttributeDefinition` has a `key` attribute of + `"cocoa_brand"` and the defining application ID is `"abcd1234"`, the + key in the map is `"abcd1234:cocoa_brand"` - For more information about the application fee scenario, see [Take - Payments and Collect - Fees](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees). + if the application making the request is different from the + application defining the custom attribute definition. + Otherwise, the key used in the map is simply `"cocoa_brand"`. - To set this field, PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS OAuth - permission is required. For more information, see - [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions). - statement_description_identifier: - type: optional> - docs: >- - Optional additional payment information to include on the customer's - card statement as - part of the statement description. This can be, for example, an - invoice number, ticket number, + Application-defined custom attributes are set at a global + (location-independent) level. - or short description that uniquely identifies the purchase. - validation: - maxLength: 20 - tip_money: - type: optional - docs: >- - The amount designated as a tip, in addition to `amount_money`. This - may only be set for a + Custom attribute values are intended to store additional information + about a catalog object - checkout that has tipping disabled (`tip_settings.allow_tipping` is - `false`). - source: - openapi: openapi/openapi.json - TerminalCheckoutQuery: - properties: - filter: - type: optional - docs: Options for filtering returned `TerminalCheckout` objects. - sort: - type: optional - docs: Option for sorting returned `TerminalCheckout` objects. - source: - openapi: openapi/openapi.json - TerminalCheckoutQueryFilter: - properties: - device_id: - type: optional> - docs: >- - The `TerminalCheckout` objects associated with a specific device. If - no device is specified, then all + or associations with an entity in another system. Do not use custom + attributes - `TerminalCheckout` objects for the merchant are displayed. - created_at: - type: optional + to store any sensitive information (personally identifiable + information, card details, etc.). + catalog_v1_ids: + type: optional> docs: >- - The time range for the beginning of the reporting period, which is - inclusive. + The Connect v1 IDs for this object at each location where it is + present, where they - Default value: The current time minus one day. + differ from the object's Connect V2 ID. The field will only be present + for objects that - Note that `TerminalCheckout`s are available for 30 days after - creation. - status: - type: optional> + have been created or modified by legacy APIs. + present_at_all_locations: + type: optional docs: >- - Filtered results with the desired status of the `TerminalCheckout`. + If `true`, this object is present at all locations (including future + locations), except where specified in - Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, - `COMPLETED` - source: - openapi: openapi/openapi.json - TerminalCheckoutQuerySort: - properties: - sort_order: - type: optional - docs: |- - The order in which results are listed. - Default: `DESC` - See [SortOrder](#type-sortorder) for possible values - source: - openapi: openapi/openapi.json - TerminalRefund: - docs: >- - Represents a payment refund processed by the Square Terminal. Only - supports Interac (Canadian debit network) payment refunds. - properties: - id: - type: optional - docs: A unique ID for this `TerminalRefund`. - validation: - minLength: 10 - maxLength: 255 - access: read-only - refund_id: - type: optional - docs: >- - The reference to the payment refund created by completing this - `TerminalRefund`. - access: read-only - payment_id: - type: string - docs: The unique ID of the payment being refunded. - validation: - minLength: 1 - order_id: - type: optional - docs: >- - The reference to the Square order ID for the payment identified by the - `payment_id`. - access: read-only - amount_money: - type: Money + the `absent_at_location_ids` field. If `false`, this object is not + present at any locations (including future locations), + + except where specified in the `present_at_location_ids` field. If not + specified, defaults to `true`. + present_at_location_ids: + type: optional> docs: >- - The amount of money, inclusive of `tax_money`, that the - `TerminalRefund` should return. + A list of locations where the object is present, even if + `present_at_all_locations` is `false`. - This value is limited to the amount taken in the original payment - minus any completed or + This can include locations that are deactivated. + absent_at_location_ids: + type: optional> + docs: >- + A list of locations where the object is not present, even if + `present_at_all_locations` is `true`. - pending refunds. - reason: - type: string - docs: A description of the reason for the refund. - validation: - maxLength: 192 - device_id: + This can include locations that are deactivated. + image_id: + type: optional + docs: Identifies the `CatalogImage` attached to this `CatalogObject`. + source: + openapi: openapi/openapi.json + CatalogObjectItemVariation: + properties: + type: literal<"ITEM_VARIATION"> + item_variation_data: + type: optional + docs: >- + Structured data for a `CatalogItemVariation`, set for CatalogObjects + of type `ITEM_VARIATION`. + id: type: string - docs: |- - The unique ID of the device intended for this `TerminalRefund`. - The Id can be retrieved from /v2/devices api. - deadline_duration: - type: optional> docs: >- - The RFC 3339 duration, after which the refund is automatically - canceled. + An identifier to reference this object in the catalog. When a new + `CatalogObject` - A `TerminalRefund` that is `PENDING` is automatically `CANCELED` and - has a cancellation reason + is inserted, the client should set the id to a temporary identifier + starting with - of `TIMED_OUT`. + a "`#`" character. Other objects being inserted or updated within the + same request + may use this identifier to refer to the new object. - Default: 5 minutes from creation. + When the server receives the new object, it will supply a unique + identifier that - Maximum: 5 minutes - status: + replaces the temporary identifier for all future references. + validation: + minLength: 1 + updated_at: type: optional docs: >- - The status of the `TerminalRefund`. + Last modification + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + in RFC 3339 format, e.g., `"2016-08-15T23:59:33.123Z"` - Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, or - `COMPLETED`. - access: read-only - cancel_reason: - type: optional - docs: |- - Present if the status is `CANCELED`. - See [ActionCancelReason](#type-actioncancelreason) for possible values - created_at: - type: optional - docs: >- - The time when the `TerminalRefund` was created, as an RFC 3339 - timestamp. - access: read-only - updated_at: - type: optional + would indicate the UTC time (denoted by `Z`) of August 15, 2016 at + 23:59:33 and 123 milliseconds. + version: + type: optional docs: >- - The time when the `TerminalRefund` was last updated, as an RFC 3339 - timestamp. - access: read-only - app_id: - type: optional - docs: The ID of the application that created the refund. - access: read-only - location_id: - type: optional - docs: The location of the device where the `TerminalRefund` was directed. - validation: - maxLength: 64 - access: read-only - source: - openapi: openapi/openapi.json - TerminalRefundQuery: - properties: - filter: - type: optional - docs: The filter for the Terminal refund query. - sort: - type: optional - docs: The sort order for the Terminal refund query. - source: - openapi: openapi/openapi.json - TerminalRefundQueryFilter: - properties: - device_id: - type: optional> + The version of the object. When updating an object, the version + supplied + + must match the version in the database, otherwise the write will be + rejected as conflicting. + is_deleted: + type: optional docs: >- - `TerminalRefund` objects associated with a specific device. If no - device is specified, then all + If `true`, the object has been deleted from the database. Must be + `false` for new objects - `TerminalRefund` objects for the signed-in account are displayed. - created_at: - type: optional + being inserted. When deleted, the `updated_at` field will equal the + deletion time. + custom_attribute_values: + type: optional> docs: >- - The timestamp for the beginning of the reporting period, in RFC 3339 - format. Inclusive. + A map (key-value pairs) of application-defined custom attribute + values. The value of a key-value pair - Default value: The current time minus one day. + is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) + object. The key is the `key` attribute - Note that `TerminalRefund`s are available for 30 days after creation. - status: - type: optional> - docs: >- - Filtered results with the desired status of the `TerminalRefund`. + value defined in the associated + [CatalogCustomAttributeDefinition](entity:CatalogCustomAttributeDefinition) - Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, or - `COMPLETED`. - source: - openapi: openapi/openapi.json - TerminalRefundQuerySort: - properties: - sort_order: - type: optional> - docs: |- - The order in which results are listed. - - `ASC` - Oldest to newest. - - `DESC` - Newest to oldest (default). - source: - openapi: openapi/openapi.json - TestWebhookSubscriptionResponse: - docs: >- - Defines the fields that are included in the response body of + object defined by the application making the request. - a request to the - [TestWebhookSubscription](api-endpoint:WebhookSubscriptions-TestWebhookSubscription) - endpoint. + If the `CatalogCustomAttributeDefinition` object is - Note: If there are errors processing the request, the - [SubscriptionTestResult](entity:SubscriptionTestResult) field is not + defined by another application, the + `CatalogCustomAttributeDefinition`'s key attribute value is prefixed + by - present. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - subscription_test_result: - type: optional - docs: The [SubscriptionTestResult](entity:SubscriptionTestResult). - source: - openapi: openapi/openapi.json - TimeRange: - docs: |- - Represents a generic time range. The start and end values are - represented in RFC 3339 format. Time ranges are customized to be - inclusive or exclusive based on the needs of a particular endpoint. - Refer to the relevant endpoint-specific documentation to determine - how time ranges are handled. - properties: - start_at: - type: optional> - docs: |- - A datetime value in RFC 3339 format indicating when the time range - starts. - end_at: - type: optional> - docs: |- - A datetime value in RFC 3339 format indicating when the time range - ends. - source: - openapi: openapi/openapi.json - Timecard: - docs: >- - A record of the hourly rate, start time, and end time of a single timecard - (shift) + the defining application ID. For example, if the + `CatalogCustomAttributeDefinition` has a `key` attribute of - for a team member. This might include a record of the start and end times - of breaks + `"cocoa_brand"` and the defining application ID is `"abcd1234"`, the + key in the map is `"abcd1234:cocoa_brand"` - taken during the shift. - properties: - id: - type: optional - docs: '**Read only** The Square-issued UUID for this object.' - validation: - maxLength: 255 - location_id: - type: string - docs: >- - The ID of the [location](entity:Location) for this timecard. The - location should be based on + if the application making the request is different from the + application defining the custom attribute definition. - where the team member clocked in. - validation: - minLength: 1 - timezone: - type: optional> - docs: >- - **Read only** The time zone calculated from the location based on the - `location_id`, + Otherwise, the key used in the map is simply `"cocoa_brand"`. - provided as a convenience value. Format: the IANA time zone database - identifier for the - location time zone. - start_at: - type: string - docs: >- - The start time of the timecard, in RFC 3339 format and shifted to the - location + Application-defined custom attributes are set at a global + (location-independent) level. - timezone + offset. Precision up to the minute is respected; seconds - are truncated. - validation: - minLength: 1 - end_at: - type: optional> - docs: >- - The end time of the timecard, in RFC 3339 format and shifted to the - location + Custom attribute values are intended to store additional information + about a catalog object + + or associations with an entity in another system. Do not use custom + attributes - timezone + offset. Precision up to the minute is respected; seconds - are truncated. - wage: - type: optional + to store any sensitive information (personally identifiable + information, card details, etc.). + catalog_v1_ids: + type: optional> docs: >- - Job and pay related information. If the wage is not set on create, it - defaults to a wage + The Connect v1 IDs for this object at each location where it is + present, where they - of zero. If the title is not set on create, it defaults to the name of - the role the team member + differ from the object's Connect V2 ID. The field will only be present + for objects that - is assigned to, if any. - breaks: - type: optional>> - docs: >- - A list of all the paid or unpaid breaks that were taken during this - timecard. - status: - type: optional - docs: |- - Describes the working state of the timecard. - See [TimecardStatus](#type-timecardstatus) for possible values - version: - type: optional + have been created or modified by legacy APIs. + present_at_all_locations: + type: optional docs: >- - **Read only** The current version of the timecard, which is - incremented with each update. + If `true`, this object is present at all locations (including future + locations), except where specified in - This field is used for [optimistic - concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) + the `absent_at_location_ids` field. If `false`, this object is not + present at any locations (including future locations), - control to ensure that requests don't overwrite data from another - request. - created_at: - type: optional - docs: >- - The timestamp of when the timecard was created, in RFC 3339 format - presented as UTC. - access: read-only - updated_at: - type: optional - docs: >- - The timestamp of when the timecard was last updated, in RFC 3339 - format presented as UTC. - access: read-only - team_member_id: - type: string + except where specified in the `present_at_location_ids` field. If not + specified, defaults to `true`. + present_at_location_ids: + type: optional> docs: >- - The ID of the [team member](entity:TeamMember) this timecard belongs - to. - validation: - minLength: 1 - declared_cash_tip_money: - type: optional - docs: The cash tips declared by the team member for this timecard. - source: - openapi: openapi/openapi.json - TimecardFilter: - docs: |- - Defines a filter used in a search for `Timecard` records. `AND` logic is - used by Square's servers to apply each filter property specified. - properties: - location_ids: - type: optional>> - docs: Fetch timecards for the specified location. - status: - type: optional + A list of locations where the object is present, even if + `present_at_all_locations` is `false`. + + This can include locations that are deactivated. + absent_at_location_ids: + type: optional> docs: >- - Fetch a `Timecard` instance by `Timecard.status`. + A list of locations where the object is not present, even if + `present_at_all_locations` is `true`. - See [TimecardFilterStatus](#type-timecardfilterstatus) for possible - values - start: - type: optional - docs: Fetch `Timecard` instances that start in the time range - Inclusive. - end: - type: optional - docs: Fetch the `Timecard` instances that end in the time range - Inclusive. - workday: - type: optional - docs: Fetch the `Timecard` instances based on the workday date range. - team_member_ids: - type: optional>> - docs: Fetch timecards for the specified team members. - source: - openapi: openapi/openapi.json - TimecardFilterStatus: - enum: - - OPEN - - CLOSED - docs: Specifies the `status` of `Timecard` records to be returned. - source: - openapi: openapi/openapi.json - TimecardQuery: - docs: >- - The parameters of a `Timecard` search query, which includes filter and - sort options. - properties: - filter: - type: optional - docs: Query filter options. - sort: - type: optional - docs: Sort order details. - source: - openapi: openapi/openapi.json - TimecardSort: - docs: Sets the sort order of search results. - properties: - field: - type: optional - docs: |- - The field to sort on. - See [TimecardSortField](#type-timecardsortfield) for possible values - order: - type: optional - docs: |- - The order in which results are returned. Defaults to DESC. - See [SortOrder](#type-sortorder) for possible values - source: - openapi: openapi/openapi.json - TimecardSortField: - enum: - - START_AT - - END_AT - - CREATED_AT - - UPDATED_AT - docs: Enumerates the `Timecard` fields to sort on. - source: - openapi: openapi/openapi.json - TimecardStatus: - enum: - - OPEN - - CLOSED - docs: >- - **Read only** Enumerates the possible status of a - [timecard](entity:Timecard). - source: - openapi: openapi/openapi.json - TimecardWage: - docs: >- - The hourly wage rate used to compensate a team member for a - [timecard](entity:Timecard). - properties: - title: - type: optional> - docs: The name of the job performed during this timecard. - hourly_rate: - type: optional - docs: |- - Can be a custom-set hourly wage or the calculated effective hourly - wage based on the annual wage and hours worked per week. - job_id: + This can include locations that are deactivated. + image_id: type: optional - docs: |- - The ID of the [job](entity:Job) performed for this timecard. Square - labor-reporting UIs might group timecards together by ID. - access: read-only - tip_eligible: - type: optional> - docs: Whether team members are eligible for tips when working this job. + docs: Identifies the `CatalogImage` attached to this `CatalogObject`. source: openapi: openapi/openapi.json - TimecardWorkday: - docs: |- - A `Timecard` search query filter parameter that sets a range of days that - a `Timecard` must start or end in before passing the filter condition. + CatalogObjectTax: properties: - date_range: - type: optional - docs: Dates for fetching the timecards. - match_timecards_by: - type: optional + type: literal<"TAX"> + tax_data: + type: optional docs: >- - The strategy on which the dates are applied. - - See [TimecardWorkdayMatcher](#type-timecardworkdaymatcher) for - possible values - default_timezone: - type: optional> + Structured data for a `CatalogTax`, set for CatalogObjects of type + `TAX`. + id: + type: string docs: >- - Location-specific timezones convert workdays to datetime filters. + An identifier to reference this object in the catalog. When a new + `CatalogObject` - Every location included in the query must have a timezone or this - field + is inserted, the client should set the id to a temporary identifier + starting with - must be provided as a fallback. Format: the IANA timezone database + a "`#`" character. Other objects being inserted or updated within the + same request - identifier for the relevant timezone. - source: - openapi: openapi/openapi.json - TimecardWorkdayMatcher: - enum: - - START_AT - - END_AT - - INTERSECTION - docs: Defines the logic used to apply a workday filter. - source: - openapi: openapi/openapi.json - TipSettings: - properties: - allow_tipping: - type: optional> - docs: >- - Indicates whether tipping is enabled for this checkout. Defaults to - false. - separate_tip_screen: - type: optional> + may use this identifier to refer to the new object. + + + When the server receives the new object, it will supply a unique + identifier that + + replaces the temporary identifier for all future references. + validation: + minLength: 1 + updated_at: + type: optional docs: >- - Indicates whether tip options should be presented on the screen before - presenting + Last modification + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + in RFC 3339 format, e.g., `"2016-08-15T23:59:33.123Z"` - the signature screen during card payment. Defaults to false. - custom_tip_field: - type: optional> + would indicate the UTC time (denoted by `Z`) of August 15, 2016 at + 23:59:33 and 123 milliseconds. + version: + type: optional docs: >- - Indicates whether custom tip amounts are allowed during the checkout - flow. Defaults to false. - tip_percentages: - type: optional>> + The version of the object. When updating an object, the version + supplied + + must match the version in the database, otherwise the write will be + rejected as conflicting. + is_deleted: + type: optional docs: >- - A list of tip percentages that should be presented during the checkout - flow, specified as + If `true`, the object has been deleted from the database. Must be + `false` for new objects - up to 3 non-negative integers from 0 to 100 (inclusive). Defaults to - 15, 20, and 25. - smart_tipping: - type: optional> + being inserted. When deleted, the `updated_at` field will equal the + deletion time. + custom_attribute_values: + type: optional> docs: >- - Enables the "Smart Tip Amounts" behavior. + A map (key-value pairs) of application-defined custom attribute + values. The value of a key-value pair - Exact tipping options depend on the region in which the Square seller - is active. + is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) + object. The key is the `key` attribute + value defined in the associated + [CatalogCustomAttributeDefinition](entity:CatalogCustomAttributeDefinition) - For payments under 10.00, in the Australia, Canada, Ireland, United - Kingdom, and United States, tipping options are presented as no tip, - .50, 1.00 or 2.00. + object defined by the application making the request. - For payment amounts of 10.00 or greater, tipping options are presented - as the following percentages: 0%, 5%, 10%, 15%. + If the `CatalogCustomAttributeDefinition` object is + defined by another application, the + `CatalogCustomAttributeDefinition`'s key attribute value is prefixed + by - If set to true, the `tip_percentages` settings is ignored. + the defining application ID. For example, if the + `CatalogCustomAttributeDefinition` has a `key` attribute of - Defaults to false. + `"cocoa_brand"` and the defining application ID is `"abcd1234"`, the + key in the map is `"abcd1234:cocoa_brand"` + if the application making the request is different from the + application defining the custom attribute definition. - To learn more about smart tipping, see [Accept Tips with the Square - App](https://squareup.com/help/us/en/article/5069-accept-tips-with-the-square-app). - source: - openapi: openapi/openapi.json - Transaction: - docs: >- - Represents a transaction processed with Square, either with the + Otherwise, the key used in the map is simply `"cocoa_brand"`. - Connect API or with Square Point of Sale. + Application-defined custom attributes are set at a global + (location-independent) level. - The `tenders` field of this object lists all methods of payment used to - pay in + Custom attribute values are intended to store additional information + about a catalog object - the transaction. - properties: - id: - type: optional - docs: The transaction's unique ID, issued by Square payments servers. - validation: - maxLength: 192 - location_id: - type: optional> - docs: The ID of the transaction's associated location. - validation: - maxLength: 50 - created_at: - type: optional - docs: >- - The timestamp for when the transaction was created, in RFC 3339 - format. - validation: - maxLength: 32 - tenders: - type: optional>> - docs: The tenders used to pay in the transaction. - refunds: - type: optional>> - docs: Refunds that have been applied to any tender in the transaction. - reference_id: - type: optional> + or associations with an entity in another system. Do not use custom + attributes + + to store any sensitive information (personally identifiable + information, card details, etc.). + catalog_v1_ids: + type: optional> docs: >- - If the transaction was created with the - [Charge](api-endpoint:Transactions-Charge) + The Connect v1 IDs for this object at each location where it is + present, where they - endpoint, this value is the same as the value provided for the - `reference_id` + differ from the object's Connect V2 ID. The field will only be present + for objects that - parameter in the request to that endpoint. Otherwise, it is not set. - validation: - maxLength: 40 - product: - type: optional - docs: |- - The Square product that processed the transaction. - See [TransactionProduct](#type-transactionproduct) for possible values - client_id: - type: optional> + have been created or modified by legacy APIs. + present_at_all_locations: + type: optional docs: >- - If the transaction was created in the Square Point of Sale app, this - value + If `true`, this object is present at all locations (including future + locations), except where specified in - is the ID generated for the transaction by Square Point of Sale. + the `absent_at_location_ids` field. If `false`, this object is not + present at any locations (including future locations), + + except where specified in the `present_at_location_ids` field. If not + specified, defaults to `true`. + present_at_location_ids: + type: optional> + docs: >- + A list of locations where the object is present, even if + `present_at_all_locations` is `false`. + This can include locations that are deactivated. + absent_at_location_ids: + type: optional> + docs: >- + A list of locations where the object is not present, even if + `present_at_all_locations` is `true`. - This ID has no relationship to the transaction's canonical `id`, which - is + This can include locations that are deactivated. + image_id: + type: optional + docs: Identifies the `CatalogImage` attached to this `CatalogObject`. + source: + openapi: openapi/openapi.json + CatalogObjectDiscount: + properties: + type: literal<"DISCOUNT"> + discount_data: + type: optional + docs: >- + Structured data for a `CatalogDiscount`, set for CatalogObjects of + type `DISCOUNT`. + id: + type: string + docs: >- + An identifier to reference this object in the catalog. When a new + `CatalogObject` - generated by Square's backend servers. This value is generated for - bookkeeping + is inserted, the client should set the id to a temporary identifier + starting with - purposes, in case the transaction cannot immediately be completed (for - example, + a "`#`" character. Other objects being inserted or updated within the + same request - if the transaction is processed in offline mode). + may use this identifier to refer to the new object. - It is not currently possible with the Connect API to perform a - transaction + When the server receives the new object, it will supply a unique + identifier that - lookup by this value. - validation: - maxLength: 192 - shipping_address: - type: optional
- docs: The shipping address provided in the request, if any. - order_id: - type: optional> - docs: >- - The order_id is an identifier for the order associated with this - transaction, if any. + replaces the temporary identifier for all future references. validation: - maxLength: 192 - source: - openapi: openapi/openapi.json - TransactionProduct: - enum: - - REGISTER - - EXTERNAL_API - - BILLING - - APPOINTMENTS - - INVOICES - - ONLINE_STORE - - PAYROLL - - OTHER - docs: Indicates the Square product used to process a transaction. - source: - openapi: openapi/openapi.json - UnlinkCustomerFromGiftCardResponse: - docs: >- - A response that contains the unlinked `GiftCard` object. If the request - resulted in errors, - - the response contains a set of `Error` objects. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - gift_card: - type: optional + minLength: 1 + updated_at: + type: optional docs: >- - The gift card with the ID of the unlinked customer removed from the - `customer_ids` field. - - If no other customers are linked, the `customer_ids` field is also - removed. - source: - openapi: openapi/openapi.json - UpdateBookingCustomAttributeDefinitionResponse: - docs: >- - Represents an - [UpdateBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-UpdateBookingCustomAttributeDefinition) - response. - - Either `custom_attribute_definition` or `errors` is present in the - response. - properties: - custom_attribute_definition: - type: optional - docs: The updated custom attribute definition. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: openapi/openapi.json - UpdateBookingResponse: - properties: - booking: - type: optional - docs: The booking that was updated. - errors: - type: optional> - docs: Errors that occurred during the request. - source: - openapi: openapi/openapi.json - UpdateBreakTypeResponse: - docs: >- - A response to a request to update a `BreakType`. The response contains + Last modification + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + in RFC 3339 format, e.g., `"2016-08-15T23:59:33.123Z"` - the requested `BreakType` objects and might contain a set of `Error` - objects if + would indicate the UTC time (denoted by `Z`) of August 15, 2016 at + 23:59:33 and 123 milliseconds. + version: + type: optional + docs: >- + The version of the object. When updating an object, the version + supplied - 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 - UpdateCatalogImageRequest: - properties: - idempotency_key: - type: string + must match the version in the database, otherwise the write will be + rejected as conflicting. + is_deleted: + type: optional docs: >- - A unique string that identifies this UpdateCatalogImage request. + If `true`, the object has been deleted from the database. Must be + `false` for new objects - Keys can be any valid string but must be unique for every - UpdateCatalogImage request. + being inserted. When deleted, the `updated_at` field will equal the + deletion time. + custom_attribute_values: + type: optional> + docs: >- + A map (key-value pairs) of application-defined custom attribute + values. The value of a key-value pair + is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) + object. The key is the `key` attribute - See [Idempotency - keys](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) - for more information. - validation: - minLength: 1 - maxLength: 128 - source: - openapi: openapi/openapi.json - UpdateCatalogImageResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - image: - type: optional - docs: |- - The newly updated `CatalogImage` including a Square-generated - URL for the encapsulated image file. - source: - openapi: openapi/openapi.json - UpdateCustomerCustomAttributeDefinitionResponse: - docs: >- - Represents an - [UpdateCustomerCustomAttributeDefinition](api-endpoint:CustomerCustomAttributes-UpdateCustomerCustomAttributeDefinition) - response. + value defined in the associated + [CatalogCustomAttributeDefinition](entity:CatalogCustomAttributeDefinition) - Either `custom_attribute_definition` or `errors` is present in the - response. - properties: - custom_attribute_definition: - type: optional - docs: The updated custom attribute definition. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: openapi/openapi.json - UpdateCustomerGroupResponse: - docs: >- - Defines the fields that are included in the response body of + object defined by the application making the request. - a request to the - [UpdateCustomerGroup](api-endpoint:CustomerGroups-UpdateCustomerGroup) - endpoint. + If the `CatalogCustomAttributeDefinition` object is - Either `errors` or `group` is present in a given response (never both). - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - group: - type: optional - docs: The successfully updated customer group. - source: - openapi: openapi/openapi.json - UpdateCustomerResponse: - docs: >- - Defines the fields that are included in the response body of + defined by another application, the + `CatalogCustomAttributeDefinition`'s key attribute value is prefixed + by - a request to the [UpdateCustomer](api-endpoint:Customers-UpdateCustomer) - or + the defining application ID. For example, if the + `CatalogCustomAttributeDefinition` has a `key` attribute of - [BulkUpdateCustomers](api-endpoint:Customers-BulkUpdateCustomers) - endpoint. + `"cocoa_brand"` and the defining application ID is `"abcd1234"`, the + key in the map is `"abcd1234:cocoa_brand"` + if the application making the request is different from the + application defining the custom attribute definition. - Either `errors` or `customer` is present in a given response (never both). - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - customer: - type: optional - docs: The updated customer. - source: - openapi: openapi/openapi.json - UpdateInvoiceResponse: - docs: Describes a `UpdateInvoice` response. - properties: - invoice: - type: optional - docs: The updated invoice. - errors: - type: optional> - docs: Information about errors encountered during the request. - source: - openapi: openapi/openapi.json - UpdateItemModifierListsResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - updated_at: - type: optional + Otherwise, the key used in the map is simply `"cocoa_brand"`. + + + Application-defined custom attributes are set at a global + (location-independent) level. + + Custom attribute values are intended to store additional information + about a catalog object + + or associations with an entity in another system. Do not use custom + attributes + + to store any sensitive information (personally identifiable + information, card details, etc.). + catalog_v1_ids: + type: optional> docs: >- - The database - [timestamp](https://developer.squareup.com/docs/build-basics/common-data-types/working-with-dates) - of this update in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`. - source: - openapi: openapi/openapi.json - UpdateItemTaxesResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - updated_at: - type: optional + The Connect v1 IDs for this object at each location where it is + present, where they + + differ from the object's Connect V2 ID. The field will only be present + for objects that + + have been created or modified by legacy APIs. + present_at_all_locations: + type: optional docs: >- - The database - [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) - of this update in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`. - source: - openapi: openapi/openapi.json - UpdateJobResponse: - docs: >- - Represents an [UpdateJob](api-endpoint:Team-UpdateJob) response. Either - `job` or `errors` + If `true`, this object is present at all locations (including future + locations), except where specified in - is present in the response. - properties: - job: - type: optional - docs: The updated job. - errors: - type: optional> - docs: The errors that occurred during the request. - source: - openapi: openapi/openapi.json - UpdateLocationCustomAttributeDefinitionResponse: - docs: >- - Represents an - [UpdateLocationCustomAttributeDefinition](api-endpoint:LocationCustomAttributes-UpdateLocationCustomAttributeDefinition) - response. + the `absent_at_location_ids` field. If `false`, this object is not + present at any locations (including future locations), - Either `custom_attribute_definition` or `errors` is present in the - response. - properties: - custom_attribute_definition: - type: optional - docs: The updated custom attribute definition. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: openapi/openapi.json - UpdateLocationResponse: - docs: >- - The response object returned by the - [UpdateLocation](api-endpoint:Locations-UpdateLocation) endpoint. - properties: - errors: - type: optional> - docs: Information about errors encountered during the request. - location: - type: optional - docs: The updated `Location` object. - source: - openapi: openapi/openapi.json - UpdateLocationSettingsResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred when updating the location settings. - location_settings: - type: optional - docs: The updated location settings. - source: - openapi: openapi/openapi.json - UpdateMerchantCustomAttributeDefinitionResponse: - docs: >- - Represents an - [UpdateMerchantCustomAttributeDefinition](api-endpoint:MerchantCustomAttributes-UpdateMerchantCustomAttributeDefinition) - response. + except where specified in the `present_at_location_ids` field. If not + specified, defaults to `true`. + present_at_location_ids: + type: optional> + docs: >- + A list of locations where the object is present, even if + `present_at_all_locations` is `false`. + + This can include locations that are deactivated. + absent_at_location_ids: + type: optional> + docs: >- + A list of locations where the object is not present, even if + `present_at_all_locations` is `true`. - Either `custom_attribute_definition` or `errors` is present in the - response. - properties: - custom_attribute_definition: - type: optional - docs: The updated custom attribute definition. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: openapi/openapi.json - UpdateMerchantSettingsResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred when updating the merchant settings. - merchant_settings: - type: optional - docs: The updated merchant settings. - source: - openapi: openapi/openapi.json - UpdateOrderCustomAttributeDefinitionResponse: - docs: Represents a response from updating an order custom attribute definition. - properties: - custom_attribute_definition: - type: optional - docs: The updated order custom attribute definition. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: openapi/openapi.json - UpdateOrderResponse: - docs: |- - Defines the fields that are included in the response body of - a request to the [UpdateOrder](api-endpoint:Orders-UpdateOrder) endpoint. - properties: - order: - type: optional - docs: The updated order. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: openapi/openapi.json - UpdatePaymentLinkResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred when updating the payment link. - payment_link: - type: optional - docs: The updated payment link. + This can include locations that are deactivated. + image_id: + type: optional + docs: Identifies the `CatalogImage` attached to this `CatalogObject`. source: openapi: openapi/openapi.json - UpdatePaymentResponse: - docs: |- - Defines the response returned by - [UpdatePayment](api-endpoint:Payments-UpdatePayment). + CatalogObjectModifierList: properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - payment: - type: optional - docs: The updated payment. - source: - openapi: openapi/openapi.json - UpdateScheduledShiftResponse: - docs: >- - Represents an - [UpdateScheduledShift](api-endpoint:Labor-UpdateScheduledShift) response. + type: literal<"MODIFIER_LIST"> + modifier_list_data: + type: optional + docs: >- + Structured data for a `CatalogModifierList`, set for CatalogObjects of + type `MODIFIER_LIST`. + id: + type: string + docs: >- + An identifier to reference this object in the catalog. When a new + `CatalogObject` - Either `scheduled_shift` or `errors` is present in the response. - properties: - scheduled_shift: - type: optional + is inserted, the client should set the id to a temporary identifier + starting with + + a "`#`" character. Other objects being inserted or updated within the + same request + + may use this identifier to refer to the new object. + + + When the server receives the new object, it will supply a unique + identifier that + + replaces the temporary identifier for all future references. + validation: + minLength: 1 + updated_at: + type: optional docs: >- - The updated scheduled shift. To make the changes public, call + Last modification + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + in RFC 3339 format, e.g., `"2016-08-15T23:59:33.123Z"` - [PublishScheduledShift](api-endpoint:Labor-PublishScheduledShift) or + would indicate the UTC time (denoted by `Z`) of August 15, 2016 at + 23:59:33 and 123 milliseconds. + version: + type: optional + docs: >- + The version of the object. When updating an object, the version + supplied - [BulkPublishScheduledShifts](api-endpoint:Labor-BulkPublishScheduledShifts). - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: openapi/openapi.json - UpdateShiftResponse: - docs: |- - The response to a request to update a `Shift`. The response contains - the updated `Shift` object and might contain a set of `Error` objects if - the request resulted in errors. - properties: - shift: - type: optional - docs: The updated `Shift`. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: openapi/openapi.json - UpdateSubscriptionResponse: - docs: >- - Defines output parameters in a response from the + must match the version in the database, otherwise the write will be + rejected as conflicting. + is_deleted: + type: optional + docs: >- + If `true`, the object has been deleted from the database. Must be + `false` for new objects - [UpdateSubscription](api-endpoint:Subscriptions-UpdateSubscription) - endpoint. - properties: - errors: - type: optional> - docs: Errors encountered during the request. - subscription: - type: optional - docs: The updated subscription. - source: - openapi: openapi/openapi.json - UpdateTeamMemberRequest: - docs: Represents an update request for a `TeamMember` object. - properties: - team_member: - type: optional + being inserted. When deleted, the `updated_at` field will equal the + deletion time. + custom_attribute_values: + type: optional> docs: >- - The team member fields to add, change, or clear. Fields can be cleared - using a null value. To update + A map (key-value pairs) of application-defined custom attribute + values. The value of a key-value pair - `wage_setting.job_assignments`, you must provide the complete list of - job assignments. If needed, call + is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) + object. The key is the `key` attribute - [ListJobs](api-endpoint:Team-ListJobs) to get the required `job_id` - values. - source: - openapi: openapi/openapi.json - UpdateTeamMemberResponse: - docs: >- - Represents a response from an update request containing the updated - `TeamMember` object or error messages. - properties: - team_member: - type: optional - docs: The successfully updated `TeamMember` object. - errors: - type: optional> - docs: The errors that occurred during the request. - source: - openapi: openapi/openapi.json - UpdateTimecardResponse: - docs: >- - The response to a request to update a `Timecard`. The response contains + value defined in the associated + [CatalogCustomAttributeDefinition](entity:CatalogCustomAttributeDefinition) + + object defined by the application making the request. + + + If the `CatalogCustomAttributeDefinition` object is + + defined by another application, the + `CatalogCustomAttributeDefinition`'s key attribute value is prefixed + by + + the defining application ID. For example, if the + `CatalogCustomAttributeDefinition` has a `key` attribute of + + `"cocoa_brand"` and the defining application ID is `"abcd1234"`, the + key in the map is `"abcd1234:cocoa_brand"` + + if the application making the request is different from the + application defining the custom attribute definition. + + Otherwise, the key used in the map is simply `"cocoa_brand"`. + + + Application-defined custom attributes are set at a global + (location-independent) level. + + Custom attribute values are intended to store additional information + about a catalog object + + or associations with an entity in another system. Do not use custom + attributes + + to store any sensitive information (personally identifiable + information, card details, etc.). + catalog_v1_ids: + type: optional> + docs: >- + The Connect v1 IDs for this object at each location where it is + present, where they + + differ from the object's Connect V2 ID. The field will only be present + for objects that + + have been created or modified by legacy APIs. + present_at_all_locations: + type: optional + docs: >- + If `true`, this object is present at all locations (including future + locations), except where specified in + + the `absent_at_location_ids` field. If `false`, this object is not + present at any locations (including future locations), + + except where specified in the `present_at_location_ids` field. If not + specified, defaults to `true`. + present_at_location_ids: + type: optional> + docs: >- + A list of locations where the object is present, even if + `present_at_all_locations` is `false`. - the updated `Timecard` object and might contain a set of `Error` objects - if + This can include locations that are deactivated. + absent_at_location_ids: + type: optional> + docs: >- + A list of locations where the object is not present, even if + `present_at_all_locations` is `true`. - the request resulted in errors. - properties: - timecard: - type: optional - docs: The updated `Timecard`. - errors: - type: optional> - docs: Any errors that occurred during the request. + This can include locations that are deactivated. + image_id: + type: optional + docs: Identifies the `CatalogImage` attached to this `CatalogObject`. source: openapi: openapi/openapi.json - UpdateVendorRequest: - docs: >- - Represents an input to a call to - [UpdateVendor](api-endpoint:Vendors-UpdateVendor). + CatalogObjectModifier: properties: - idempotency_key: - type: optional> + type: literal<"MODIFIER"> + modifier_data: + type: optional docs: >- - A client-supplied, universally unique identifier (UUID) for the + Structured data for a `CatalogModifier`, set for CatalogObjects of + type `MODIFIER`. + id: + type: string + docs: >- + An identifier to reference this object in the catalog. When a new + `CatalogObject` - request. + is inserted, the client should set the id to a temporary identifier + starting with + a "`#`" character. Other objects being inserted or updated within the + same request - See - [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) - in the + may use this identifier to refer to the new object. - [API Development 101](https://developer.squareup.com/docs/buildbasics) - section for more - information. + When the server receives the new object, it will supply a unique + identifier that + + replaces the temporary identifier for all future references. validation: - maxLength: 128 - vendor: - type: Vendor - docs: The specified [Vendor](entity:Vendor) to be updated. - source: - openapi: openapi/openapi.json - UpdateVendorResponse: - docs: >- - Represents an output from a call to - [UpdateVendor](api-endpoint:Vendors-UpdateVendor). - properties: - errors: - type: optional> - docs: Errors occurred when the request fails. - vendor: - type: optional - docs: The [Vendor](entity:Vendor) that has been updated. - source: - openapi: openapi/openapi.json - UpdateWageSettingResponse: - docs: >- - Represents a response from an update request containing the updated - `WageSetting` object + minLength: 1 + updated_at: + type: optional + docs: >- + Last modification + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + in RFC 3339 format, e.g., `"2016-08-15T23:59:33.123Z"` - or error messages. - properties: - wage_setting: - type: optional - docs: The successfully updated `WageSetting` object. - errors: - type: optional> - docs: The errors that occurred during the request. - source: - openapi: openapi/openapi.json - UpdateWebhookSubscriptionResponse: - docs: >- - Defines the fields that are included in the response body of + would indicate the UTC time (denoted by `Z`) of August 15, 2016 at + 23:59:33 and 123 milliseconds. + version: + type: optional + docs: >- + The version of the object. When updating an object, the version + supplied - a request to the - [UpdateWebhookSubscription](api-endpoint:WebhookSubscriptions-UpdateWebhookSubscription) - endpoint. + must match the version in the database, otherwise the write will be + rejected as conflicting. + is_deleted: + type: optional + docs: >- + If `true`, the object has been deleted from the database. Must be + `false` for new objects + being inserted. When deleted, the `updated_at` field will equal the + deletion time. + custom_attribute_values: + type: optional> + docs: >- + A map (key-value pairs) of application-defined custom attribute + values. The value of a key-value pair - Note: If there are errors processing the request, the - [Subscription](entity:WebhookSubscription) is not + is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) + object. The key is the `key` attribute - present. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - subscription: - type: optional - docs: The updated [Subscription](entity:WebhookSubscription). - source: - openapi: openapi/openapi.json - UpdateWebhookSubscriptionSignatureKeyResponse: - docs: >- - Defines the fields that are included in the response body of + value defined in the associated + [CatalogCustomAttributeDefinition](entity:CatalogCustomAttributeDefinition) - a request to the - [UpdateWebhookSubscriptionSignatureKey](api-endpoint:WebhookSubscriptions-UpdateWebhookSubscriptionSignatureKey) - endpoint. + object defined by the application making the request. - Note: If there are errors processing the request, the - [Subscription](entity:WebhookSubscription) is not + If the `CatalogCustomAttributeDefinition` object is - present. - properties: - errors: - type: optional> - docs: Information on errors encountered during the request. - signature_key: - type: optional - docs: >- - The new Square-generated signature key used to validate the origin of - the webhook event. - access: read-only - source: - openapi: openapi/openapi.json - UpdateWorkweekConfigResponse: - docs: >- - The response to a request to update a `WorkweekConfig` object. The - response contains + defined by another application, the + `CatalogCustomAttributeDefinition`'s key attribute value is prefixed + by - the updated `WorkweekConfig` object and might contain a set of `Error` - objects if + the defining application ID. For example, if the + `CatalogCustomAttributeDefinition` has a `key` attribute of - the request resulted in errors. - properties: - workweek_config: - type: optional - docs: The response object. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: openapi/openapi.json - UpsertBookingCustomAttributeResponse: - docs: >- - Represents an - [UpsertBookingCustomAttribute](api-endpoint:BookingCustomAttributes-UpsertBookingCustomAttribute) - response. + `"cocoa_brand"` and the defining application ID is `"abcd1234"`, the + key in the map is `"abcd1234:cocoa_brand"` - Either `custom_attribute_definition` or `errors` is present in the - response. - properties: - custom_attribute: - type: optional - docs: The new or updated custom attribute. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: openapi/openapi.json - UpsertCatalogObjectResponse: - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - catalog_object: - type: optional - docs: The successfully created or updated CatalogObject. - id_mappings: - type: optional> - docs: The mapping between client and server IDs for this upsert. - source: - openapi: openapi/openapi.json - UpsertCustomerCustomAttributeResponse: - docs: >- - Represents an - [UpsertCustomerCustomAttribute](api-endpoint:CustomerCustomAttributes-UpsertCustomerCustomAttribute) - response. + if the application making the request is different from the + application defining the custom attribute definition. - Either `custom_attribute_definition` or `errors` is present in the - response. - properties: - custom_attribute: - type: optional - docs: The new or updated custom attribute. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: openapi/openapi.json - UpsertLocationCustomAttributeResponse: - docs: >- - Represents an - [UpsertLocationCustomAttribute](api-endpoint:LocationCustomAttributes-UpsertLocationCustomAttribute) - response. + Otherwise, the key used in the map is simply `"cocoa_brand"`. + + + Application-defined custom attributes are set at a global + (location-independent) level. + + Custom attribute values are intended to store additional information + about a catalog object + + or associations with an entity in another system. Do not use custom + attributes + + to store any sensitive information (personally identifiable + information, card details, etc.). + catalog_v1_ids: + type: optional> + docs: >- + The Connect v1 IDs for this object at each location where it is + present, where they - Either `custom_attribute_definition` or `errors` is present in the - response. - properties: - custom_attribute: - type: optional - docs: The new or updated custom attribute. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: openapi/openapi.json - UpsertMerchantCustomAttributeResponse: - docs: >- - Represents an - [UpsertMerchantCustomAttribute](api-endpoint:MerchantCustomAttributes-UpsertMerchantCustomAttribute) - response. + differ from the object's Connect V2 ID. The field will only be present + for objects that - Either `custom_attribute_definition` or `errors` is present in the - response. - properties: - custom_attribute: - type: optional - docs: The new or updated custom attribute. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: openapi/openapi.json - UpsertOrderCustomAttributeResponse: - docs: Represents a response from upserting order custom attribute definitions. - properties: - custom_attribute: - type: optional - docs: The order custom attribute that was created or modified. - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: openapi/openapi.json - UpsertSnippetResponse: - docs: >- - Represents an `UpsertSnippet` response. The response can include either - `snippet` or `errors`. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - snippet: - type: optional - docs: The new or updated snippet. - source: - openapi: openapi/openapi.json - V1Money: - properties: - amount: - type: optional> + have been created or modified by legacy APIs. + present_at_all_locations: + type: optional docs: >- - Amount in the lowest denominated value of this Currency. E.g. in USD + If `true`, this object is present at all locations (including future + locations), except where specified in - these are cents, in JPY they are Yen (which do not have a 'cent' - concept). - currency_code: - type: optional - docs: |- + the `absent_at_location_ids` field. If `false`, this object is not + present at any locations (including future locations), - See [Currency](#type-currency) for possible values + except where specified in the `present_at_location_ids` field. If not + specified, defaults to `true`. + present_at_location_ids: + type: optional> + docs: >- + A list of locations where the object is present, even if + `present_at_all_locations` is `false`. + + This can include locations that are deactivated. + absent_at_location_ids: + type: optional> + docs: >- + A list of locations where the object is not present, even if + `present_at_all_locations` is `true`. + + This can include locations that are deactivated. + image_id: + type: optional + docs: Identifies the `CatalogImage` attached to this `CatalogObject`. source: openapi: openapi/openapi.json - V1Order: - docs: V1Order + CatalogObjectPricingRule: properties: - errors: - type: optional>> - docs: Any errors that occurred during the request. + type: literal<"PRICING_RULE"> + pricing_rule_data: + type: optional + docs: >- + Structured data for a `CatalogPricingRule`, set for CatalogObjects of + type `PRICING_RULE`. + + A `CatalogPricingRule` object often works with a `CatalogProductSet` + object or a `CatalogTimePeriod` object. id: - type: optional - docs: The order's unique identifier. - buyer_email: - type: optional> - docs: The email address of the order's buyer. - recipient_name: - type: optional> - docs: The name of the order's buyer. - recipient_phone_number: - type: optional> - docs: The phone number to use for the order's delivery. - state: - type: optional - docs: |- - Whether the tax is an ADDITIVE tax or an INCLUSIVE tax. - See [V1OrderState](#type-v1orderstate) for possible values - shipping_address: - type: optional
- docs: The address to ship the order to. - subtotal_money: - type: optional + type: string docs: >- - The amount of all items purchased in the order, before taxes and - shipping. - total_shipping_money: - type: optional - docs: The shipping cost for the order. - total_tax_money: - type: optional - docs: The total of all taxes applied to the order. - total_price_money: - type: optional - docs: The total cost of the order. - total_discount_money: - type: optional - docs: The total of all discounts applied to the order. - created_at: - type: optional - docs: The time when the order was created, in ISO 8601 format. + An identifier to reference this object in the catalog. When a new + `CatalogObject` + + is inserted, the client should set the id to a temporary identifier + starting with + + a "`#`" character. Other objects being inserted or updated within the + same request + + may use this identifier to refer to the new object. + + + When the server receives the new object, it will supply a unique + identifier that + + replaces the temporary identifier for all future references. + validation: + minLength: 1 updated_at: type: optional - docs: The time when the order was last modified, in ISO 8601 format. - expires_at: - type: optional> docs: >- - The time when the order expires if no action is taken, in ISO 8601 - format. - payment_id: - type: optional> - docs: The unique identifier of the payment associated with the order. - buyer_note: - type: optional> - docs: A note provided by the buyer when the order was created, if any. - completed_note: - type: optional> + Last modification + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + in RFC 3339 format, e.g., `"2016-08-15T23:59:33.123Z"` + + would indicate the UTC time (denoted by `Z`) of August 15, 2016 at + 23:59:33 and 123 milliseconds. + version: + type: optional docs: >- - A note provided by the merchant when the order's state was set to - COMPLETED, if any - refunded_note: - type: optional> + The version of the object. When updating an object, the version + supplied + + must match the version in the database, otherwise the write will be + rejected as conflicting. + is_deleted: + type: optional + docs: >- + If `true`, the object has been deleted from the database. Must be + `false` for new objects + + being inserted. When deleted, the `updated_at` field will equal the + deletion time. + custom_attribute_values: + type: optional> + docs: >- + A map (key-value pairs) of application-defined custom attribute + values. The value of a key-value pair + + is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) + object. The key is the `key` attribute + + value defined in the associated + [CatalogCustomAttributeDefinition](entity:CatalogCustomAttributeDefinition) + + object defined by the application making the request. + + + If the `CatalogCustomAttributeDefinition` object is + + defined by another application, the + `CatalogCustomAttributeDefinition`'s key attribute value is prefixed + by + + the defining application ID. For example, if the + `CatalogCustomAttributeDefinition` has a `key` attribute of + + `"cocoa_brand"` and the defining application ID is `"abcd1234"`, the + key in the map is `"abcd1234:cocoa_brand"` + + if the application making the request is different from the + application defining the custom attribute definition. + + Otherwise, the key used in the map is simply `"cocoa_brand"`. + + + Application-defined custom attributes are set at a global + (location-independent) level. + + Custom attribute values are intended to store additional information + about a catalog object + + or associations with an entity in another system. Do not use custom + attributes + + to store any sensitive information (personally identifiable + information, card details, etc.). + catalog_v1_ids: + type: optional> + docs: >- + The Connect v1 IDs for this object at each location where it is + present, where they + + differ from the object's Connect V2 ID. The field will only be present + for objects that + + have been created or modified by legacy APIs. + present_at_all_locations: + type: optional docs: >- - A note provided by the merchant when the order's state was set to - REFUNDED, if any. - canceled_note: - type: optional> + If `true`, this object is present at all locations (including future + locations), except where specified in + + the `absent_at_location_ids` field. If `false`, this object is not + present at any locations (including future locations), + + except where specified in the `present_at_location_ids` field. If not + specified, defaults to `true`. + present_at_location_ids: + type: optional> docs: >- - A note provided by the merchant when the order's state was set to - CANCELED, if any. - tender: - type: optional - docs: The tender used to pay for the order. - order_history: - type: optional>> - docs: The history of actions associated with the order. - promo_code: - type: optional> - docs: The promo code provided by the buyer, if any. - btc_receive_address: - type: optional> - docs: For Bitcoin transactions, the address that the buyer sent Bitcoin to. - btc_price_satoshi: - type: optional> + A list of locations where the object is present, even if + `present_at_all_locations` is `false`. + + This can include locations that are deactivated. + absent_at_location_ids: + type: optional> docs: >- - For Bitcoin transactions, the price of the buyer's order in satoshi - (100 million satoshi equals 1 BTC). + A list of locations where the object is not present, even if + `present_at_all_locations` is `true`. + + This can include locations that are deactivated. + image_id: + type: optional + docs: Identifies the `CatalogImage` attached to this `CatalogObject`. source: openapi: openapi/openapi.json - V1OrderHistoryEntry: - docs: V1OrderHistoryEntry + CatalogObjectProductSet: properties: - action: - type: optional + type: literal<"PRODUCT_SET"> + product_set_data: + type: optional docs: >- - The type of action performed on the order. + Structured data for a `CatalogProductSet`, set for CatalogObjects of + type `PRODUCT_SET`. + id: + type: string + docs: >- + An identifier to reference this object in the catalog. When a new + `CatalogObject` - See [V1OrderHistoryEntryAction](#type-v1orderhistoryentryaction) for - possible values - created_at: - type: optional - docs: The time when the action was performed, in ISO 8601 format. - source: - openapi: openapi/openapi.json - V1OrderHistoryEntryAction: - enum: - - ORDER_PLACED - - DECLINED - - PAYMENT_RECEIVED - - CANCELED - - COMPLETED - - REFUNDED - - EXPIRED - source: - openapi: openapi/openapi.json - V1OrderState: - enum: - - PENDING - - OPEN - - COMPLETED - - CANCELED - - REFUNDED - - REJECTED - source: - openapi: openapi/openapi.json - V1Tender: - docs: >- - A tender represents a discrete monetary exchange. Square represents this + is inserted, the client should set the id to a temporary identifier + starting with - exchange as a money object with a specific currency and amount, where the + a "`#`" character. Other objects being inserted or updated within the + same request - amount is given in the smallest denomination of the given currency. + may use this identifier to refer to the new object. - Square POS can accept more than one form of tender for a single payment - (such + When the server receives the new object, it will supply a unique + identifier that - as by splitting a bill between a credit card and a gift card). The - `tender` + replaces the temporary identifier for all future references. + validation: + minLength: 1 + updated_at: + type: optional + docs: >- + Last modification + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + in RFC 3339 format, e.g., `"2016-08-15T23:59:33.123Z"` - field of the Payment object lists all forms of tender used for the - payment. + would indicate the UTC time (denoted by `Z`) of August 15, 2016 at + 23:59:33 and 123 milliseconds. + version: + type: optional + docs: >- + The version of the object. When updating an object, the version + supplied + + must match the version in the database, otherwise the write will be + rejected as conflicting. + is_deleted: + type: optional + docs: >- + If `true`, the object has been deleted from the database. Must be + `false` for new objects + being inserted. When deleted, the `updated_at` field will equal the + deletion time. + custom_attribute_values: + type: optional> + docs: >- + A map (key-value pairs) of application-defined custom attribute + values. The value of a key-value pair - Split tender payments behave slightly differently from single tender - payments: + is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) + object. The key is the `key` attribute + value defined in the associated + [CatalogCustomAttributeDefinition](entity:CatalogCustomAttributeDefinition) - The receipt_url for a split tender corresponds only to the first tender - listed + object defined by the application making the request. - in the tender field. To get the receipt URLs for the remaining tenders, - use - the receipt_url fields of the corresponding Tender objects. + If the `CatalogCustomAttributeDefinition` object is + defined by another application, the + `CatalogCustomAttributeDefinition`'s key attribute value is prefixed + by - *A note on gift cards**: when a customer purchases a Square gift card from - a + the defining application ID. For example, if the + `CatalogCustomAttributeDefinition` has a `key` attribute of - merchant, the merchant receives the full amount of the gift card in the + `"cocoa_brand"` and the defining application ID is `"abcd1234"`, the + key in the map is `"abcd1234:cocoa_brand"` - associated payment. + if the application making the request is different from the + application defining the custom attribute definition. + Otherwise, the key used in the map is simply `"cocoa_brand"`. - When that gift card is used as a tender, the balance of the gift card is - reduced and the merchant receives no funds. A `Tender` object with a type - of + Application-defined custom attributes are set at a global + (location-independent) level. - `SQUARE_GIFT_CARD` indicates a gift card was used for some or all of the + Custom attribute values are intended to store additional information + about a catalog object - associated payment. - properties: - id: - type: optional - docs: The tender's unique ID. - type: - type: optional - docs: |- - The type of tender. - See [V1TenderType](#type-v1tendertype) for possible values - name: - type: optional> - docs: A human-readable description of the tender. - employee_id: - type: optional> - docs: The ID of the employee that processed the tender. - receipt_url: - type: optional> - docs: The URL of the receipt for the tender. - card_brand: - type: optional - docs: |- - The brand of credit card provided. - See [V1TenderCardBrand](#type-v1tendercardbrand) for possible values - pan_suffix: - type: optional> - docs: The last four digits of the provided credit card's account number. - entry_method: - type: optional + or associations with an entity in another system. Do not use custom + attributes + + to store any sensitive information (personally identifiable + information, card details, etc.). + catalog_v1_ids: + type: optional> docs: >- - The tender's unique ID. + The Connect v1 IDs for this object at each location where it is + present, where they - See [V1TenderEntryMethod](#type-v1tenderentrymethod) for possible - values - payment_note: - type: optional> + differ from the object's Connect V2 ID. The field will only be present + for objects that + + have been created or modified by legacy APIs. + present_at_all_locations: + type: optional docs: >- - Notes entered by the merchant about the tender at the time of payment, - if any. Typically only present for tender with the type: OTHER. - total_money: - type: optional - docs: The total amount of money provided in this form of tender. - tendered_money: - type: optional - docs: The amount of total_money applied to the payment. - tendered_at: - type: optional> - docs: The time when the tender was created, in ISO 8601 format. - settled_at: - type: optional> - docs: The time when the tender was settled, in ISO 8601 format. - change_back_money: - type: optional - docs: The amount of total_money returned to the buyer as change. - refunded_money: - type: optional + If `true`, this object is present at all locations (including future + locations), except where specified in + + the `absent_at_location_ids` field. If `false`, this object is not + present at any locations (including future locations), + + except where specified in the `present_at_location_ids` field. If not + specified, defaults to `true`. + present_at_location_ids: + type: optional> docs: >- - The total of all refunds applied to this tender. This amount is always - negative or zero. - is_exchange: - type: optional> + A list of locations where the object is present, even if + `present_at_all_locations` is `false`. + + This can include locations that are deactivated. + absent_at_location_ids: + type: optional> docs: >- - Indicates whether or not the tender is associated with an exchange. If - is_exchange is true, the tender represents the value of goods returned - in an exchange not the actual money paid. The exchange value reduces - the tender amounts needed to pay for items purchased in the exchange. - source: - openapi: openapi/openapi.json - V1TenderCardBrand: - enum: - - OTHER_BRAND - - VISA - - MASTER_CARD - - AMERICAN_EXPRESS - - DISCOVER - - DISCOVER_DINERS - - JCB - - CHINA_UNIONPAY - - SQUARE_GIFT_CARD - docs: The brand of a credit card. - source: - openapi: openapi/openapi.json - V1TenderEntryMethod: - enum: - - MANUAL - - SCANNED - - SQUARE_CASH - - SQUARE_WALLET - - SWIPED - - WEB_FORM - - OTHER - source: - openapi: openapi/openapi.json - V1TenderType: - enum: - - CREDIT_CARD - - CASH - - THIRD_PARTY_CARD - - NO_SALE - - SQUARE_WALLET - - SQUARE_GIFT_CARD - - UNKNOWN - - OTHER - source: - openapi: openapi/openapi.json - V1UpdateOrderRequestAction: - enum: - - COMPLETE - - CANCEL - - REFUND + A list of locations where the object is not present, even if + `present_at_all_locations` is `true`. + + This can include locations that are deactivated. + image_id: + type: optional + docs: Identifies the `CatalogImage` attached to this `CatalogObject`. source: openapi: openapi/openapi.json - Vendor: - docs: Represents a supplier to a seller. + CatalogObjectTimePeriod: properties: + type: literal<"TIME_PERIOD"> + time_period_data: + type: optional + docs: >- + Structured data for a `CatalogTimePeriod`, set for CatalogObjects of + type `TIME_PERIOD`. id: - type: optional + type: string docs: >- - A unique Square-generated ID for the [Vendor](entity:Vendor). + An identifier to reference this object in the catalog. When a new + `CatalogObject` - This field is required when attempting to update a - [Vendor](entity:Vendor). - validation: - maxLength: 100 - created_at: - type: optional - docs: |- - An RFC 3339-formatted timestamp that indicates when the - [Vendor](entity:Vendor) was created. + is inserted, the client should set the id to a temporary identifier + starting with + + a "`#`" character. Other objects being inserted or updated within the + same request + + may use this identifier to refer to the new object. + + + When the server receives the new object, it will supply a unique + identifier that + + replaces the temporary identifier for all future references. validation: - maxLength: 34 - access: read-only + minLength: 1 updated_at: type: optional - docs: |- - An RFC 3339-formatted timestamp that indicates when the - [Vendor](entity:Vendor) was last updated. - validation: - maxLength: 34 - access: read-only - name: - type: optional> docs: >- - The name of the [Vendor](entity:Vendor). + Last modification + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + in RFC 3339 format, e.g., `"2016-08-15T23:59:33.123Z"` - This field is required when attempting to create or update a - [Vendor](entity:Vendor). - validation: - maxLength: 100 - address: - type: optional
- docs: The address of the [Vendor](entity:Vendor). - contacts: - type: optional>> - docs: The contacts of the [Vendor](entity:Vendor). - account_number: - type: optional> - docs: The account number of the [Vendor](entity:Vendor). - validation: - maxLength: 100 - note: - type: optional> - docs: A note detailing information about the [Vendor](entity:Vendor). - validation: - maxLength: 4096 + would indicate the UTC time (denoted by `Z`) of August 15, 2016 at + 23:59:33 and 123 milliseconds. version: - type: optional - docs: The version of the [Vendor](entity:Vendor). - status: - type: optional - docs: |- - The status of the [Vendor](entity:Vendor). - See [Status](#type-status) for possible values - source: - openapi: openapi/openapi.json - VendorContact: - docs: Represents a contact of a [Vendor](entity:Vendor). - properties: - id: - type: optional + type: optional docs: >- - A unique Square-generated ID for the - [VendorContact](entity:VendorContact). + The version of the object. When updating an object, the version + supplied - This field is required when attempting to update a - [VendorContact](entity:VendorContact). - validation: - maxLength: 100 - name: - type: optional> + must match the version in the database, otherwise the write will be + rejected as conflicting. + is_deleted: + type: optional docs: >- - The name of the [VendorContact](entity:VendorContact). + If `true`, the object has been deleted from the database. Must be + `false` for new objects - This field is required when attempting to create a - [Vendor](entity:Vendor). - validation: - maxLength: 255 - email_address: - type: optional> - docs: The email address of the [VendorContact](entity:VendorContact). - validation: - maxLength: 255 - phone_number: - type: optional> - docs: The phone number of the [VendorContact](entity:VendorContact). - validation: - maxLength: 255 - removed: - type: optional> - docs: The state of the [VendorContact](entity:VendorContact). - ordinal: - type: integer - docs: The ordinal of the [VendorContact](entity:VendorContact). - source: - openapi: openapi/openapi.json - VendorStatus: - enum: - - ACTIVE - - INACTIVE - docs: |- - The status of the [Vendor](entity:Vendor), - whether a [Vendor](entity:Vendor) is active or inactive. - source: - openapi: openapi/openapi.json - VisibilityFilter: - enum: - - ALL - - READ - - READ_WRITE - docs: >- - Enumeration of visibility-filter values used to set the ability to view - custom attributes or custom attribute definitions. - source: - openapi: openapi/openapi.json - VoidTransactionResponse: - docs: >- - Defines the fields that are included in the response body of + being inserted. When deleted, the `updated_at` field will equal the + deletion time. + custom_attribute_values: + type: optional> + docs: >- + A map (key-value pairs) of application-defined custom attribute + values. The value of a key-value pair - a request to the - [VoidTransaction](api-endpoint:Transactions-VoidTransaction) endpoint. - properties: - errors: - type: optional> - docs: Any errors that occurred during the request. - source: - openapi: openapi/openapi.json - WageSetting: - docs: >- - Represents information about the overtime exemption status, job - assignments, and compensation + is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) + object. The key is the `key` attribute + + value defined in the associated + [CatalogCustomAttributeDefinition](entity:CatalogCustomAttributeDefinition) + + object defined by the application making the request. + + + If the `CatalogCustomAttributeDefinition` object is + + defined by another application, the + `CatalogCustomAttributeDefinition`'s key attribute value is prefixed + by + + the defining application ID. For example, if the + `CatalogCustomAttributeDefinition` has a `key` attribute of + + `"cocoa_brand"` and the defining application ID is `"abcd1234"`, the + key in the map is `"abcd1234:cocoa_brand"` + + if the application making the request is different from the + application defining the custom attribute definition. + + Otherwise, the key used in the map is simply `"cocoa_brand"`. + + + Application-defined custom attributes are set at a global + (location-independent) level. - for a [team member](entity:TeamMember). - properties: - team_member_id: - type: optional> - docs: The ID of the team member associated with the wage setting. - job_assignments: - type: optional>> - docs: >- - **Required** The ordered list of jobs that the team member is assigned - to. + Custom attribute values are intended to store additional information + about a catalog object - The first job assignment is considered the team member's primary job. - is_overtime_exempt: - type: optional> + or associations with an entity in another system. Do not use custom + attributes + + to store any sensitive information (personally identifiable + information, card details, etc.). + catalog_v1_ids: + type: optional> docs: >- - Whether the team member is exempt from the overtime rules of the - seller's country. - version: - type: optional + The Connect v1 IDs for this object at each location where it is + present, where they + + differ from the object's Connect V2 ID. The field will only be present + for objects that + + have been created or modified by legacy APIs. + present_at_all_locations: + type: optional docs: >- - **Read only** Used for resolving concurrency issues. The request fails - if the version + If `true`, this object is present at all locations (including future + locations), except where specified in - provided does not match the server version at the time of the request. - If not provided, + the `absent_at_location_ids` field. If `false`, this object is not + present at any locations (including future locations), - Square executes a blind write, potentially overwriting data from - another write. For more information, + except where specified in the `present_at_location_ids` field. If not + specified, defaults to `true`. + present_at_location_ids: + type: optional> + docs: >- + A list of locations where the object is present, even if + `present_at_all_locations` is `false`. - see [optimistic - concurrency](https://developer.squareup.com/docs/working-with-apis/optimistic-concurrency). - created_at: - type: optional - docs: The timestamp when the wage setting was created, in RFC 3339 format. - access: read-only - updated_at: - type: optional + This can include locations that are deactivated. + absent_at_location_ids: + type: optional> docs: >- - The timestamp when the wage setting was last updated, in RFC 3339 - format. - access: read-only + A list of locations where the object is not present, even if + `present_at_all_locations` is `true`. + + This can include locations that are deactivated. + image_id: + type: optional + docs: Identifies the `CatalogImage` attached to this `CatalogObject`. source: openapi: openapi/openapi.json - WebhookSubscription: - docs: >- - Represents the details of a webhook subscription, including notification - URL, - - event types, and signature key. + CatalogObjectMeasurementUnit: properties: + type: literal<"MEASUREMENT_UNIT"> + measurement_unit_data: + type: optional + docs: >- + Structured data for a `CatalogMeasurementUnit`, set for CatalogObjects + of type `MEASUREMENT_UNIT`. id: - type: optional - docs: A Square-generated unique ID for the subscription. - validation: - maxLength: 64 - access: read-only - name: - type: optional> - docs: The name of this subscription. - validation: - maxLength: 64 - enabled: - type: optional> + type: string docs: >- - Indicates whether the subscription is enabled (`true`) or not - (`false`). - event_types: - type: optional>> - docs: The event types associated with this subscription. - notification_url: - type: optional> - docs: The URL to which webhooks are sent. - api_version: - type: optional> - docs: |- - The API version of the subscription. - This field is optional for `CreateWebhookSubscription`. - The value defaults to the API version used by the application. - signature_key: + An identifier to reference this object in the catalog. When a new + `CatalogObject` + + is inserted, the client should set the id to a temporary identifier + starting with + + a "`#`" character. Other objects being inserted or updated within the + same request + + may use this identifier to refer to the new object. + + + When the server receives the new object, it will supply a unique + identifier that + + replaces the temporary identifier for all future references. + validation: + minLength: 1 + updated_at: type: optional docs: >- - The Square-generated signature key used to validate the origin of the - webhook event. - access: read-only - created_at: - type: optional + Last modification + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + in RFC 3339 format, e.g., `"2016-08-15T23:59:33.123Z"` + + would indicate the UTC time (denoted by `Z`) of August 15, 2016 at + 23:59:33 and 123 milliseconds. + version: + type: optional docs: >- - The timestamp of when the subscription was created, in RFC 3339 - format. For example, "2016-09-04T23:59:33.123Z". - access: read-only - updated_at: - type: optional + The version of the object. When updating an object, the version + supplied + + must match the version in the database, otherwise the write will be + rejected as conflicting. + is_deleted: + type: optional docs: >- - The timestamp of when the subscription was last updated, in RFC 3339 - format. + If `true`, the object has been deleted from the database. Must be + `false` for new objects - For example, "2016-09-04T23:59:33.123Z". - access: read-only - source: - openapi: openapi/openapi.json - Weekday: - enum: - - MON - - TUE - - WED - - THU - - FRI - - SAT - - SUN - docs: The days of the week. + being inserted. When deleted, the `updated_at` field will equal the + deletion time. + custom_attribute_values: + type: optional> + docs: >- + A map (key-value pairs) of application-defined custom attribute + values. The value of a key-value pair + + is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) + object. The key is the `key` attribute + + value defined in the associated + [CatalogCustomAttributeDefinition](entity:CatalogCustomAttributeDefinition) + + object defined by the application making the request. + + + If the `CatalogCustomAttributeDefinition` object is + + defined by another application, the + `CatalogCustomAttributeDefinition`'s key attribute value is prefixed + by + + the defining application ID. For example, if the + `CatalogCustomAttributeDefinition` has a `key` attribute of + + `"cocoa_brand"` and the defining application ID is `"abcd1234"`, the + key in the map is `"abcd1234:cocoa_brand"` + + if the application making the request is different from the + application defining the custom attribute definition. + + Otherwise, the key used in the map is simply `"cocoa_brand"`. + + + Application-defined custom attributes are set at a global + (location-independent) level. + + Custom attribute values are intended to store additional information + about a catalog object + + or associations with an entity in another system. Do not use custom + attributes + + to store any sensitive information (personally identifiable + information, card details, etc.). + catalog_v1_ids: + type: optional> + docs: >- + The Connect v1 IDs for this object at each location where it is + present, where they + + differ from the object's Connect V2 ID. The field will only be present + for objects that + + have been created or modified by legacy APIs. + present_at_all_locations: + type: optional + docs: >- + If `true`, this object is present at all locations (including future + locations), except where specified in + + the `absent_at_location_ids` field. If `false`, this object is not + present at any locations (including future locations), + + except where specified in the `present_at_location_ids` field. If not + specified, defaults to `true`. + present_at_location_ids: + type: optional> + docs: >- + A list of locations where the object is present, even if + `present_at_all_locations` is `false`. + + This can include locations that are deactivated. + absent_at_location_ids: + type: optional> + docs: >- + A list of locations where the object is not present, even if + `present_at_all_locations` is `true`. + + This can include locations that are deactivated. + image_id: + type: optional + docs: Identifies the `CatalogImage` attached to this `CatalogObject`. source: openapi: openapi/openapi.json - WorkweekConfig: - docs: |- - Sets the day of the week and hour of the day that a business starts a - workweek. This is used to calculate overtime pay. + CatalogObjectSubscriptionPlanVariation: properties: + type: literal<"SUBSCRIPTION_PLAN_VARIATION"> + subscription_plan_variation_data: + type: optional + docs: >- + Structured data for a `CatalogSubscriptionPlanVariation`, set for + CatalogObjects of type `SUBSCRIPTION_PLAN_VARIATION`. id: - type: optional - docs: The UUID for this object. - start_of_week: - type: Weekday - docs: |- - The day of the week on which a business week starts for - compensation purposes. - See [Weekday](#type-weekday) for possible values - start_of_day_local_time: type: string - docs: |- - The local time at which a business week starts. Represented as a - string in `HH:MM` format (`HH:MM:SS` is also accepted, but seconds are - truncated). - validation: - minLength: 1 - version: - type: optional docs: >- - Used for resolving concurrency issues. The request fails if the - version + An identifier to reference this object in the catalog. When a new + `CatalogObject` - provided does not match the server version at the time of the request. - If not provided, + is inserted, the client should set the id to a temporary identifier + starting with - Square executes a blind write; potentially overwriting data from - another + a "`#`" character. Other objects being inserted or updated within the + same request - write. - created_at: - type: optional - docs: A read-only timestamp in RFC 3339 format; presented in UTC. - access: read-only + may use this identifier to refer to the new object. + + + When the server receives the new object, it will supply a unique + identifier that + + replaces the temporary identifier for all future references. + validation: + minLength: 1 updated_at: type: optional - docs: A read-only timestamp in RFC 3339 format; presented in UTC. - access: read-only - source: - openapi: openapi/openapi.json - CatalogObjectItem: - properties: - item_data: - type: optional docs: >- - Structured data for a `CatalogItem`, set for CatalogObjects of type - `ITEM`. - extends: - - CatalogObjectBase - source: - openapi: openapi/openapi.json - CatalogObjectImage: - properties: - image_data: - type: optional - docs: >- - Structured data for a `CatalogImage`, set for CatalogObjects of type - `IMAGE`. - extends: - - CatalogObjectBase - source: - openapi: openapi/openapi.json - CatalogObjectItemVariation: - properties: - item_variation_data: - type: optional - docs: >- - Structured data for a `CatalogItemVariation`, set for CatalogObjects - of type `ITEM_VARIATION`. - extends: - - CatalogObjectBase - source: - openapi: openapi/openapi.json - CatalogObjectTax: - properties: - tax_data: - type: optional - docs: >- - Structured data for a `CatalogTax`, set for CatalogObjects of type - `TAX`. - extends: - - CatalogObjectBase - source: - openapi: openapi/openapi.json - CatalogObjectDiscount: - properties: - discount_data: - type: optional - docs: >- - Structured data for a `CatalogDiscount`, set for CatalogObjects of - type `DISCOUNT`. - extends: - - CatalogObjectBase - source: - openapi: openapi/openapi.json - CatalogObjectModifierList: - properties: - modifier_list_data: - type: optional + Last modification + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + in RFC 3339 format, e.g., `"2016-08-15T23:59:33.123Z"` + + would indicate the UTC time (denoted by `Z`) of August 15, 2016 at + 23:59:33 and 123 milliseconds. + version: + type: optional docs: >- - Structured data for a `CatalogModifierList`, set for CatalogObjects of - type `MODIFIER_LIST`. - extends: - - CatalogObjectBase - source: - openapi: openapi/openapi.json - CatalogObjectModifier: - properties: - modifier_data: - type: optional + The version of the object. When updating an object, the version + supplied + + must match the version in the database, otherwise the write will be + rejected as conflicting. + is_deleted: + type: optional docs: >- - Structured data for a `CatalogModifier`, set for CatalogObjects of - type `MODIFIER`. - extends: - - CatalogObjectBase - source: - openapi: openapi/openapi.json - CatalogObjectPricingRule: - properties: - pricing_rule_data: - type: optional + If `true`, the object has been deleted from the database. Must be + `false` for new objects + + being inserted. When deleted, the `updated_at` field will equal the + deletion time. + custom_attribute_values: + type: optional> docs: >- - Structured data for a `CatalogPricingRule`, set for CatalogObjects of - type `PRICING_RULE`. + A map (key-value pairs) of application-defined custom attribute + values. The value of a key-value pair - A `CatalogPricingRule` object often works with a `CatalogProductSet` - object or a `CatalogTimePeriod` object. - extends: - - CatalogObjectBase - source: - openapi: openapi/openapi.json - CatalogObjectProductSet: - properties: - product_set_data: - type: optional + is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) + object. The key is the `key` attribute + + value defined in the associated + [CatalogCustomAttributeDefinition](entity:CatalogCustomAttributeDefinition) + + object defined by the application making the request. + + + If the `CatalogCustomAttributeDefinition` object is + + defined by another application, the + `CatalogCustomAttributeDefinition`'s key attribute value is prefixed + by + + the defining application ID. For example, if the + `CatalogCustomAttributeDefinition` has a `key` attribute of + + `"cocoa_brand"` and the defining application ID is `"abcd1234"`, the + key in the map is `"abcd1234:cocoa_brand"` + + if the application making the request is different from the + application defining the custom attribute definition. + + Otherwise, the key used in the map is simply `"cocoa_brand"`. + + + Application-defined custom attributes are set at a global + (location-independent) level. + + Custom attribute values are intended to store additional information + about a catalog object + + or associations with an entity in another system. Do not use custom + attributes + + to store any sensitive information (personally identifiable + information, card details, etc.). + catalog_v1_ids: + type: optional> docs: >- - Structured data for a `CatalogProductSet`, set for CatalogObjects of - type `PRODUCT_SET`. - extends: - - CatalogObjectBase - source: - openapi: openapi/openapi.json - CatalogObjectTimePeriod: - properties: - time_period_data: - type: optional + The Connect v1 IDs for this object at each location where it is + present, where they + + differ from the object's Connect V2 ID. The field will only be present + for objects that + + have been created or modified by legacy APIs. + present_at_all_locations: + type: optional docs: >- - Structured data for a `CatalogTimePeriod`, set for CatalogObjects of - type `TIME_PERIOD`. - extends: - - CatalogObjectBase - source: - openapi: openapi/openapi.json - CatalogObjectMeasurementUnit: - properties: - measurement_unit_data: - type: optional + If `true`, this object is present at all locations (including future + locations), except where specified in + + the `absent_at_location_ids` field. If `false`, this object is not + present at any locations (including future locations), + + except where specified in the `present_at_location_ids` field. If not + specified, defaults to `true`. + present_at_location_ids: + type: optional> docs: >- - Structured data for a `CatalogMeasurementUnit`, set for CatalogObjects - of type `MEASUREMENT_UNIT`. - extends: - - CatalogObjectBase - source: - openapi: openapi/openapi.json - CatalogObjectSubscriptionPlanVariation: - properties: - subscription_plan_variation_data: - type: optional + A list of locations where the object is present, even if + `present_at_all_locations` is `false`. + + This can include locations that are deactivated. + absent_at_location_ids: + type: optional> docs: >- - Structured data for a `CatalogSubscriptionPlanVariation`, set for - CatalogObjects of type `SUBSCRIPTION_PLAN_VARIATION`. - extends: - - CatalogObjectBase + A list of locations where the object is not present, even if + `present_at_all_locations` is `true`. + + This can include locations that are deactivated. + image_id: + type: optional + docs: Identifies the `CatalogImage` attached to this `CatalogObject`. source: openapi: openapi/openapi.json CatalogObjectItemOption: properties: + type: literal<"ITEM_OPTION"> item_option_data: type: optional docs: >- Structured data for a `CatalogItemOption`, set for CatalogObjects of type `ITEM_OPTION`. - extends: - - CatalogObjectBase + id: + type: string + docs: >- + An identifier to reference this object in the catalog. When a new + `CatalogObject` + + is inserted, the client should set the id to a temporary identifier + starting with + + a "`#`" character. Other objects being inserted or updated within the + same request + + may use this identifier to refer to the new object. + + + When the server receives the new object, it will supply a unique + identifier that + + replaces the temporary identifier for all future references. + validation: + minLength: 1 + updated_at: + type: optional + docs: >- + Last modification + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + in RFC 3339 format, e.g., `"2016-08-15T23:59:33.123Z"` + + would indicate the UTC time (denoted by `Z`) of August 15, 2016 at + 23:59:33 and 123 milliseconds. + version: + type: optional + docs: >- + The version of the object. When updating an object, the version + supplied + + must match the version in the database, otherwise the write will be + rejected as conflicting. + is_deleted: + type: optional + docs: >- + If `true`, the object has been deleted from the database. Must be + `false` for new objects + + being inserted. When deleted, the `updated_at` field will equal the + deletion time. + custom_attribute_values: + type: optional> + docs: >- + A map (key-value pairs) of application-defined custom attribute + values. The value of a key-value pair + + is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) + object. The key is the `key` attribute + + value defined in the associated + [CatalogCustomAttributeDefinition](entity:CatalogCustomAttributeDefinition) + + object defined by the application making the request. + + + If the `CatalogCustomAttributeDefinition` object is + + defined by another application, the + `CatalogCustomAttributeDefinition`'s key attribute value is prefixed + by + + the defining application ID. For example, if the + `CatalogCustomAttributeDefinition` has a `key` attribute of + + `"cocoa_brand"` and the defining application ID is `"abcd1234"`, the + key in the map is `"abcd1234:cocoa_brand"` + + if the application making the request is different from the + application defining the custom attribute definition. + + Otherwise, the key used in the map is simply `"cocoa_brand"`. + + + Application-defined custom attributes are set at a global + (location-independent) level. + + Custom attribute values are intended to store additional information + about a catalog object + + or associations with an entity in another system. Do not use custom + attributes + + to store any sensitive information (personally identifiable + information, card details, etc.). + catalog_v1_ids: + type: optional> + docs: >- + The Connect v1 IDs for this object at each location where it is + present, where they + + differ from the object's Connect V2 ID. The field will only be present + for objects that + + have been created or modified by legacy APIs. + present_at_all_locations: + type: optional + docs: >- + If `true`, this object is present at all locations (including future + locations), except where specified in + + the `absent_at_location_ids` field. If `false`, this object is not + present at any locations (including future locations), + + except where specified in the `present_at_location_ids` field. If not + specified, defaults to `true`. + present_at_location_ids: + type: optional> + docs: >- + A list of locations where the object is present, even if + `present_at_all_locations` is `false`. + + This can include locations that are deactivated. + absent_at_location_ids: + type: optional> + docs: >- + A list of locations where the object is not present, even if + `present_at_all_locations` is `true`. + + This can include locations that are deactivated. + image_id: + type: optional + docs: Identifies the `CatalogImage` attached to this `CatalogObject`. source: openapi: openapi/openapi.json CatalogObjectItemOptionValue: properties: + type: literal<"ITEM_OPTION_VAL"> item_option_value_data: type: optional docs: >- Structured data for a `CatalogItemOptionValue`, set for CatalogObjects of type `ITEM_OPTION_VAL`. - extends: - - CatalogObjectBase + id: + type: string + docs: >- + An identifier to reference this object in the catalog. When a new + `CatalogObject` + + is inserted, the client should set the id to a temporary identifier + starting with + + a "`#`" character. Other objects being inserted or updated within the + same request + + may use this identifier to refer to the new object. + + + When the server receives the new object, it will supply a unique + identifier that + + replaces the temporary identifier for all future references. + validation: + minLength: 1 + updated_at: + type: optional + docs: >- + Last modification + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + in RFC 3339 format, e.g., `"2016-08-15T23:59:33.123Z"` + + would indicate the UTC time (denoted by `Z`) of August 15, 2016 at + 23:59:33 and 123 milliseconds. + version: + type: optional + docs: >- + The version of the object. When updating an object, the version + supplied + + must match the version in the database, otherwise the write will be + rejected as conflicting. + is_deleted: + type: optional + docs: >- + If `true`, the object has been deleted from the database. Must be + `false` for new objects + + being inserted. When deleted, the `updated_at` field will equal the + deletion time. + custom_attribute_values: + type: optional> + docs: >- + A map (key-value pairs) of application-defined custom attribute + values. The value of a key-value pair + + is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) + object. The key is the `key` attribute + + value defined in the associated + [CatalogCustomAttributeDefinition](entity:CatalogCustomAttributeDefinition) + + object defined by the application making the request. + + + If the `CatalogCustomAttributeDefinition` object is + + defined by another application, the + `CatalogCustomAttributeDefinition`'s key attribute value is prefixed + by + + the defining application ID. For example, if the + `CatalogCustomAttributeDefinition` has a `key` attribute of + + `"cocoa_brand"` and the defining application ID is `"abcd1234"`, the + key in the map is `"abcd1234:cocoa_brand"` + + if the application making the request is different from the + application defining the custom attribute definition. + + Otherwise, the key used in the map is simply `"cocoa_brand"`. + + + Application-defined custom attributes are set at a global + (location-independent) level. + + Custom attribute values are intended to store additional information + about a catalog object + + or associations with an entity in another system. Do not use custom + attributes + + to store any sensitive information (personally identifiable + information, card details, etc.). + catalog_v1_ids: + type: optional> + docs: >- + The Connect v1 IDs for this object at each location where it is + present, where they + + differ from the object's Connect V2 ID. The field will only be present + for objects that + + have been created or modified by legacy APIs. + present_at_all_locations: + type: optional + docs: >- + If `true`, this object is present at all locations (including future + locations), except where specified in + + the `absent_at_location_ids` field. If `false`, this object is not + present at any locations (including future locations), + + except where specified in the `present_at_location_ids` field. If not + specified, defaults to `true`. + present_at_location_ids: + type: optional> + docs: >- + A list of locations where the object is present, even if + `present_at_all_locations` is `false`. + + This can include locations that are deactivated. + absent_at_location_ids: + type: optional> + docs: >- + A list of locations where the object is not present, even if + `present_at_all_locations` is `true`. + + This can include locations that are deactivated. + image_id: + type: optional + docs: Identifies the `CatalogImage` attached to this `CatalogObject`. source: openapi: openapi/openapi.json CatalogObjectCustomAttributeDefinition: properties: + type: literal<"CUSTOM_ATTRIBUTE_DEFINITION"> custom_attribute_definition_data: type: optional docs: >- Structured data for a `CatalogCustomAttributeDefinition`, set for CatalogObjects of type `CUSTOM_ATTRIBUTE_DEFINITION`. - extends: - - CatalogObjectBase + id: + type: string + docs: >- + An identifier to reference this object in the catalog. When a new + `CatalogObject` + + is inserted, the client should set the id to a temporary identifier + starting with + + a "`#`" character. Other objects being inserted or updated within the + same request + + may use this identifier to refer to the new object. + + + When the server receives the new object, it will supply a unique + identifier that + + replaces the temporary identifier for all future references. + validation: + minLength: 1 + updated_at: + type: optional + docs: >- + Last modification + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + in RFC 3339 format, e.g., `"2016-08-15T23:59:33.123Z"` + + would indicate the UTC time (denoted by `Z`) of August 15, 2016 at + 23:59:33 and 123 milliseconds. + version: + type: optional + docs: >- + The version of the object. When updating an object, the version + supplied + + must match the version in the database, otherwise the write will be + rejected as conflicting. + is_deleted: + type: optional + docs: >- + If `true`, the object has been deleted from the database. Must be + `false` for new objects + + being inserted. When deleted, the `updated_at` field will equal the + deletion time. + custom_attribute_values: + type: optional> + docs: >- + A map (key-value pairs) of application-defined custom attribute + values. The value of a key-value pair + + is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) + object. The key is the `key` attribute + + value defined in the associated + [CatalogCustomAttributeDefinition](entity:CatalogCustomAttributeDefinition) + + object defined by the application making the request. + + + If the `CatalogCustomAttributeDefinition` object is + + defined by another application, the + `CatalogCustomAttributeDefinition`'s key attribute value is prefixed + by + + the defining application ID. For example, if the + `CatalogCustomAttributeDefinition` has a `key` attribute of + + `"cocoa_brand"` and the defining application ID is `"abcd1234"`, the + key in the map is `"abcd1234:cocoa_brand"` + + if the application making the request is different from the + application defining the custom attribute definition. + + Otherwise, the key used in the map is simply `"cocoa_brand"`. + + + Application-defined custom attributes are set at a global + (location-independent) level. + + Custom attribute values are intended to store additional information + about a catalog object + + or associations with an entity in another system. Do not use custom + attributes + + to store any sensitive information (personally identifiable + information, card details, etc.). + catalog_v1_ids: + type: optional> + docs: >- + The Connect v1 IDs for this object at each location where it is + present, where they + + differ from the object's Connect V2 ID. The field will only be present + for objects that + + have been created or modified by legacy APIs. + present_at_all_locations: + type: optional + docs: >- + If `true`, this object is present at all locations (including future + locations), except where specified in + + the `absent_at_location_ids` field. If `false`, this object is not + present at any locations (including future locations), + + except where specified in the `present_at_location_ids` field. If not + specified, defaults to `true`. + present_at_location_ids: + type: optional> + docs: >- + A list of locations where the object is present, even if + `present_at_all_locations` is `false`. + + This can include locations that are deactivated. + absent_at_location_ids: + type: optional> + docs: >- + A list of locations where the object is not present, even if + `present_at_all_locations` is `true`. + + This can include locations that are deactivated. + image_id: + type: optional + docs: Identifies the `CatalogImage` attached to this `CatalogObject`. source: openapi: openapi/openapi.json CatalogObjectQuickAmountsSettings: properties: + type: literal<"QUICK_AMOUNTS_SETTINGS"> quick_amounts_settings_data: type: optional docs: >- Structured data for a `CatalogQuickAmountsSettings`, set for CatalogObjects of type `QUICK_AMOUNTS_SETTINGS`. - extends: - - CatalogObjectBase + id: + type: string + docs: >- + An identifier to reference this object in the catalog. When a new + `CatalogObject` + + is inserted, the client should set the id to a temporary identifier + starting with + + a "`#`" character. Other objects being inserted or updated within the + same request + + may use this identifier to refer to the new object. + + + When the server receives the new object, it will supply a unique + identifier that + + replaces the temporary identifier for all future references. + validation: + minLength: 1 + updated_at: + type: optional + docs: >- + Last modification + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + in RFC 3339 format, e.g., `"2016-08-15T23:59:33.123Z"` + + would indicate the UTC time (denoted by `Z`) of August 15, 2016 at + 23:59:33 and 123 milliseconds. + version: + type: optional + docs: >- + The version of the object. When updating an object, the version + supplied + + must match the version in the database, otherwise the write will be + rejected as conflicting. + is_deleted: + type: optional + docs: >- + If `true`, the object has been deleted from the database. Must be + `false` for new objects + + being inserted. When deleted, the `updated_at` field will equal the + deletion time. + custom_attribute_values: + type: optional> + docs: >- + A map (key-value pairs) of application-defined custom attribute + values. The value of a key-value pair + + is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) + object. The key is the `key` attribute + + value defined in the associated + [CatalogCustomAttributeDefinition](entity:CatalogCustomAttributeDefinition) + + object defined by the application making the request. + + + If the `CatalogCustomAttributeDefinition` object is + + defined by another application, the + `CatalogCustomAttributeDefinition`'s key attribute value is prefixed + by + + the defining application ID. For example, if the + `CatalogCustomAttributeDefinition` has a `key` attribute of + + `"cocoa_brand"` and the defining application ID is `"abcd1234"`, the + key in the map is `"abcd1234:cocoa_brand"` + + if the application making the request is different from the + application defining the custom attribute definition. + + Otherwise, the key used in the map is simply `"cocoa_brand"`. + + + Application-defined custom attributes are set at a global + (location-independent) level. + + Custom attribute values are intended to store additional information + about a catalog object + + or associations with an entity in another system. Do not use custom + attributes + + to store any sensitive information (personally identifiable + information, card details, etc.). + catalog_v1_ids: + type: optional> + docs: >- + The Connect v1 IDs for this object at each location where it is + present, where they + + differ from the object's Connect V2 ID. The field will only be present + for objects that + + have been created or modified by legacy APIs. + present_at_all_locations: + type: optional + docs: >- + If `true`, this object is present at all locations (including future + locations), except where specified in + + the `absent_at_location_ids` field. If `false`, this object is not + present at any locations (including future locations), + + except where specified in the `present_at_location_ids` field. If not + specified, defaults to `true`. + present_at_location_ids: + type: optional> + docs: >- + A list of locations where the object is present, even if + `present_at_all_locations` is `false`. + + This can include locations that are deactivated. + absent_at_location_ids: + type: optional> + docs: >- + A list of locations where the object is not present, even if + `present_at_all_locations` is `true`. + + This can include locations that are deactivated. + image_id: + type: optional + docs: Identifies the `CatalogImage` attached to this `CatalogObject`. source: openapi: openapi/openapi.json CatalogObjectSubscriptionPlan: properties: + type: literal<"SUBSCRIPTION_PLAN"> subscription_plan_data: type: optional docs: >- Structured data for a `CatalogSubscriptionPlan`, set for CatalogObjects of type `SUBSCRIPTION_PLAN`. - extends: - - CatalogObjectBase + id: + type: string + docs: >- + An identifier to reference this object in the catalog. When a new + `CatalogObject` + + is inserted, the client should set the id to a temporary identifier + starting with + + a "`#`" character. Other objects being inserted or updated within the + same request + + may use this identifier to refer to the new object. + + + When the server receives the new object, it will supply a unique + identifier that + + replaces the temporary identifier for all future references. + validation: + minLength: 1 + updated_at: + type: optional + docs: >- + Last modification + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + in RFC 3339 format, e.g., `"2016-08-15T23:59:33.123Z"` + + would indicate the UTC time (denoted by `Z`) of August 15, 2016 at + 23:59:33 and 123 milliseconds. + version: + type: optional + docs: >- + The version of the object. When updating an object, the version + supplied + + must match the version in the database, otherwise the write will be + rejected as conflicting. + is_deleted: + type: optional + docs: >- + If `true`, the object has been deleted from the database. Must be + `false` for new objects + + being inserted. When deleted, the `updated_at` field will equal the + deletion time. + custom_attribute_values: + type: optional> + docs: >- + A map (key-value pairs) of application-defined custom attribute + values. The value of a key-value pair + + is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) + object. The key is the `key` attribute + + value defined in the associated + [CatalogCustomAttributeDefinition](entity:CatalogCustomAttributeDefinition) + + object defined by the application making the request. + + + If the `CatalogCustomAttributeDefinition` object is + + defined by another application, the + `CatalogCustomAttributeDefinition`'s key attribute value is prefixed + by + + the defining application ID. For example, if the + `CatalogCustomAttributeDefinition` has a `key` attribute of + + `"cocoa_brand"` and the defining application ID is `"abcd1234"`, the + key in the map is `"abcd1234:cocoa_brand"` + + if the application making the request is different from the + application defining the custom attribute definition. + + Otherwise, the key used in the map is simply `"cocoa_brand"`. + + + Application-defined custom attributes are set at a global + (location-independent) level. + + Custom attribute values are intended to store additional information + about a catalog object + + or associations with an entity in another system. Do not use custom + attributes + + to store any sensitive information (personally identifiable + information, card details, etc.). + catalog_v1_ids: + type: optional> + docs: >- + The Connect v1 IDs for this object at each location where it is + present, where they + + differ from the object's Connect V2 ID. The field will only be present + for objects that + + have been created or modified by legacy APIs. + present_at_all_locations: + type: optional + docs: >- + If `true`, this object is present at all locations (including future + locations), except where specified in + + the `absent_at_location_ids` field. If `false`, this object is not + present at any locations (including future locations), + + except where specified in the `present_at_location_ids` field. If not + specified, defaults to `true`. + present_at_location_ids: + type: optional> + docs: >- + A list of locations where the object is present, even if + `present_at_all_locations` is `false`. + + This can include locations that are deactivated. + absent_at_location_ids: + type: optional> + docs: >- + A list of locations where the object is not present, even if + `present_at_all_locations` is `true`. + + This can include locations that are deactivated. + image_id: + type: optional + docs: Identifies the `CatalogImage` attached to this `CatalogObject`. source: openapi: openapi/openapi.json CatalogObjectAvailabilityPeriod: properties: + type: literal<"AVAILABILITY_PERIOD"> availability_period_data: type: optional docs: >- Structured data for a `CatalogAvailabilityPeriod`, set for CatalogObjects of type `AVAILABILITY_PERIOD`. - extends: - - CatalogObjectBase + id: + type: string + docs: >- + An identifier to reference this object in the catalog. When a new + `CatalogObject` + + is inserted, the client should set the id to a temporary identifier + starting with + + a "`#`" character. Other objects being inserted or updated within the + same request + + may use this identifier to refer to the new object. + + + When the server receives the new object, it will supply a unique + identifier that + + replaces the temporary identifier for all future references. + validation: + minLength: 1 + updated_at: + type: optional + docs: >- + Last modification + [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + in RFC 3339 format, e.g., `"2016-08-15T23:59:33.123Z"` + + would indicate the UTC time (denoted by `Z`) of August 15, 2016 at + 23:59:33 and 123 milliseconds. + version: + type: optional + docs: >- + The version of the object. When updating an object, the version + supplied + + must match the version in the database, otherwise the write will be + rejected as conflicting. + is_deleted: + type: optional + docs: >- + If `true`, the object has been deleted from the database. Must be + `false` for new objects + + being inserted. When deleted, the `updated_at` field will equal the + deletion time. + custom_attribute_values: + type: optional> + docs: >- + A map (key-value pairs) of application-defined custom attribute + values. The value of a key-value pair + + is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) + object. The key is the `key` attribute + + value defined in the associated + [CatalogCustomAttributeDefinition](entity:CatalogCustomAttributeDefinition) + + object defined by the application making the request. + + + If the `CatalogCustomAttributeDefinition` object is + + defined by another application, the + `CatalogCustomAttributeDefinition`'s key attribute value is prefixed + by + + the defining application ID. For example, if the + `CatalogCustomAttributeDefinition` has a `key` attribute of + + `"cocoa_brand"` and the defining application ID is `"abcd1234"`, the + key in the map is `"abcd1234:cocoa_brand"` + + if the application making the request is different from the + application defining the custom attribute definition. + + Otherwise, the key used in the map is simply `"cocoa_brand"`. + + + Application-defined custom attributes are set at a global + (location-independent) level. + + Custom attribute values are intended to store additional information + about a catalog object + + or associations with an entity in another system. Do not use custom + attributes + + to store any sensitive information (personally identifiable + information, card details, etc.). + catalog_v1_ids: + type: optional> + docs: >- + The Connect v1 IDs for this object at each location where it is + present, where they + + differ from the object's Connect V2 ID. The field will only be present + for objects that + + have been created or modified by legacy APIs. + present_at_all_locations: + type: optional + docs: >- + If `true`, this object is present at all locations (including future + locations), except where specified in + + the `absent_at_location_ids` field. If `false`, this object is not + present at any locations (including future locations), + + except where specified in the `present_at_location_ids` field. If not + specified, defaults to `true`. + present_at_location_ids: + type: optional> + docs: >- + A list of locations where the object is present, even if + `present_at_all_locations` is `false`. + + This can include locations that are deactivated. + absent_at_location_ids: + type: optional> + docs: >- + A list of locations where the object is not present, even if + `present_at_all_locations` is `true`. + + This can include locations that are deactivated. + image_id: + type: optional + docs: Identifies the `CatalogImage` attached to this `CatalogObject`. source: openapi: 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 e2b13bab..fdfd69a5 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/catalog.yml b/.mock/definition/catalog.yml index 91e8d86b..9d9feba2 100644 --- a/.mock/definition/catalog.yml +++ b/.mock/definition/catalog.yml @@ -200,10 +200,11 @@ service: detail: detail field: field objects: - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true + - type: ITEM + id: W62UWFY35CWMYGVWK6TWJDNI + updated_at: '2016-11-16T22:25:24.878Z' + version: 1479335124878 + is_deleted: false custom_attribute_values: key: {} catalog_v1_ids: @@ -214,11 +215,20 @@ service: absent_at_location_ids: - absent_at_location_ids image_id: image_id - type: ITEM - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true + item_data: + name: Tea + description: Hot Leaf Juice + tax_ids: + - HURXQOOAIC4IZSI2BEXQRYFY + categories: + - type: CATEGORY + id: BJNQCF2FJ6S6UIDT65ABHLRX + ordinal: 0 + - type: ITEM + id: AA27W3M2GGTF3H6AVPNB77CK + updated_at: '2016-11-16T22:25:24.878Z' + version: 1479335124878 + is_deleted: false custom_attribute_values: key: {} catalog_v1_ids: @@ -229,12 +239,21 @@ service: absent_at_location_ids: - absent_at_location_ids image_id: image_id - type: ITEM + item_data: + name: Coffee + description: Hot Bean Juice + tax_ids: + - HURXQOOAIC4IZSI2BEXQRYFY + categories: + - type: CATEGORY + id: BJNQCF2FJ6S6UIDT65ABHLRX + ordinal: 0 related_objects: - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true + - type: ITEM + id: BJNQCF2FJ6S6UIDT65ABHLRX + updated_at: '2016-11-16T22:25:24.878Z' + version: 1479335124878 + is_deleted: false custom_attribute_values: key: {} catalog_v1_ids: @@ -245,12 +264,11 @@ service: absent_at_location_ids: - absent_at_location_ids image_id: image_id - ordinal: 1000000 - type: CATEGORY - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true + - type: TAX + id: HURXQOOAIC4IZSI2BEXQRYFY + updated_at: '2016-11-16T22:25:24.878Z' + version: 1479335124878 + is_deleted: false custom_attribute_values: key: {} catalog_v1_ids: @@ -261,7 +279,12 @@ service: absent_at_location_ids: - absent_at_location_ids image_id: image_id - type: TAX + tax_data: + name: Sales Tax + calculation_phase: TAX_SUBTOTAL_PHASE + inclusion_type: ADDITIVE + percentage: '5.0' + enabled: true batchUpsert: path: /v2/catalog/batch-upsert method: POST @@ -394,14 +417,25 @@ service: idempotency_key: 789ff020-f723-43a9-b4b5-43b5dc1fa3dc batches: - objects: - - id: id - type: ITEM - - id: id - type: ITEM - - id: id - type: ITEM - - id: id - type: TAX + - type: IMAGE + id: '#Tea' + present_at_all_locations: true + - type: IMAGE + id: '#Coffee' + present_at_all_locations: true + - type: ITEM + id: '#Beverages' + present_at_all_locations: true + - type: TAX + id: '#SalesTax' + present_at_all_locations: true + tax_data: + name: Sales Tax + calculation_phase: TAX_SUBTOTAL_PHASE + inclusion_type: ADDITIVE + percentage: '5.0' + applies_to_custom_amounts: true + enabled: true response: body: errors: @@ -410,10 +444,11 @@ service: detail: detail field: field objects: - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true + - type: ITEM + id: 67GA7XA2FWMRYY2VCONTYZJR + updated_at: '2023-11-30T19:24:35.4Z' + version: 1701372275400 + is_deleted: false custom_attribute_values: key: {} catalog_v1_ids: @@ -424,11 +459,25 @@ service: absent_at_location_ids: - absent_at_location_ids image_id: image_id - type: ITEM - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true + item_data: + name: Tea + description: Hot Leaf Juice + is_taxable: true + tax_ids: + - HP5VNYPKZKTNCKZ2Z5NPUH6A + product_type: REGULAR + categories: + - type: CATEGORY + id: XCS4SCGN4WQYE2VU4U3TKXEH + ordinal: -2251731094208512 + description_html:

Hot Leaf Juice

+ description_plaintext: Hot Leaf Juice + is_archived: false + - type: ITEM + id: MQ4TZKOG3SR2EQI3TWEK4AH7 + updated_at: '2023-11-30T19:24:35.4Z' + version: 1701372275400 + is_deleted: false custom_attribute_values: key: {} catalog_v1_ids: @@ -439,11 +488,25 @@ service: absent_at_location_ids: - absent_at_location_ids image_id: image_id - type: ITEM - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true + item_data: + name: Coffee + description: Hot Bean Juice + is_taxable: true + tax_ids: + - HP5VNYPKZKTNCKZ2Z5NPUH6A + product_type: REGULAR + categories: + - type: CATEGORY + id: XCS4SCGN4WQYE2VU4U3TKXEH + ordinal: -2251662374731776 + description_html:

Hot Bean Juice

+ description_plaintext: Hot Bean Juice + is_archived: false + - type: CATEGORY + id: XCS4SCGN4WQYE2VU4U3TKXEH + updated_at: '2023-11-30T19:24:35.4Z' + version: 1701372275400 + is_deleted: false custom_attribute_values: key: {} catalog_v1_ids: @@ -455,11 +518,16 @@ service: - absent_at_location_ids image_id: image_id ordinal: 1000000 - type: CATEGORY - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true + category_data: + name: Beverages + category_type: REGULAR_CATEGORY + is_top_level: true + online_visibility: true + - type: TAX + id: HP5VNYPKZKTNCKZ2Z5NPUH6A + updated_at: '2023-11-30T19:24:35.4Z' + version: 1701372275400 + is_deleted: false custom_attribute_values: key: {} catalog_v1_ids: @@ -470,7 +538,13 @@ service: absent_at_location_ids: - absent_at_location_ids image_id: image_id - type: TAX + tax_data: + name: Sales Tax + calculation_phase: TAX_SUBTOTAL_PHASE + inclusion_type: ADDITIVE + percentage: '5.0' + applies_to_custom_amounts: true + enabled: true updated_at: updated_at id_mappings: - client_object_id: '#Tea' @@ -628,10 +702,11 @@ service: field: field cursor: cursor objects: - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true + - type: ITEM + id: 5ZYQZZ2IECPVJ2IJ5KQPRDC3 + updated_at: '2017-02-21T14:50:26.495Z' + version: 1487688626495 + is_deleted: false custom_attribute_values: key: {} catalog_v1_ids: @@ -642,12 +717,11 @@ service: absent_at_location_ids: - absent_at_location_ids image_id: image_id - ordinal: 1000000 - type: CATEGORY - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true + - type: TAX + id: L5R47DGBZOOVKCAFIXC56AEN + updated_at: '2017-02-21T14:50:26.495Z' + version: 1487688626495 + is_deleted: false custom_attribute_values: key: {} catalog_v1_ids: @@ -658,7 +732,12 @@ service: absent_at_location_ids: - absent_at_location_ids image_id: image_id - type: TAX + tax_data: + name: Sales Tax + calculation_phase: TAX_SUBTOTAL_PHASE + inclusion_type: ADDITIVE + percentage: '5.0' + enabled: true search: path: /v2/catalog/search method: POST @@ -848,10 +927,11 @@ service: field: field cursor: cursor objects: - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true + - type: ITEM + id: X5DZ5NWWAQ44CKBLKIFQGOWK + updated_at: '2017-10-26T15:41:32.337Z' + version: 1509032492337 + is_deleted: false custom_attribute_values: key: {} catalog_v1_ids: @@ -862,11 +942,21 @@ service: absent_at_location_ids: - absent_at_location_ids image_id: image_id - type: ITEM - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true + item_data: + name: Tea - Black + description: A delicious blend of black tea. + tax_ids: + - ZXITPM6RWHZ7GZ7EIP3YKECM + product_type: REGULAR + categories: + - type: CATEGORY + id: E7CLE5RZZ744BHWVQQEAHI2C + ordinal: 0 + - type: ITEM + id: NNNEM3LA656Q46NXLWCNI7S5 + updated_at: '2017-10-26T15:41:23.232Z' + version: 1509032483232 + is_deleted: false custom_attribute_values: key: {} catalog_v1_ids: @@ -877,9 +967,19 @@ service: absent_at_location_ids: - absent_at_location_ids image_id: image_id - type: ITEM + item_data: + name: Tea - Green + description: Relaxing green herbal tea. + tax_ids: + - ZXITPM6RWHZ7GZ7EIP3YKECM + product_type: REGULAR + categories: + - type: CATEGORY + id: E7CLE5RZZ744BHWVQQEAHI2C + ordinal: 0 related_objects: - - id: id + - type: ITEM + id: id updated_at: updated_at version: 1000000 is_deleted: true @@ -893,7 +993,6 @@ service: absent_at_location_ids: - absent_at_location_ids image_id: image_id - type: ITEM latest_time: latest_time SearchItems: path: /v2/catalog/search-catalog-items @@ -1044,12 +1143,32 @@ service: detail: detail field: field items: - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true + - type: ITEM + id: GPOKJPTV2KDLVKCADJ7I77EZ + updated_at: '2020-06-18T17:55:56.646Z' + version: 1592502956646 + is_deleted: false custom_attribute_values: - key: {} + BRAND: + name: Brand + string_value: Dark Horse + custom_attribute_definition_id: BRAND_DEFINITION_ID + type: STRING + key: BRAND + VARIETAL: + name: Varietal + custom_attribute_definition_id: VARIETAL_DEFINITION_ID + type: SELECTION + selection_uid_values: + - MERLOT_SELECTION_ID + - selection_uid_values + key: VARIETAL + VINTAGE: + name: Vintage + custom_attribute_definition_id: EI7IJQDUKYSHULREPIPH6HNU + type: NUMBER + number_value: number_value + key: VINTAGE catalog_v1_ids: - {} present_at_all_locations: true @@ -1058,7 +1177,11 @@ service: absent_at_location_ids: - absent_at_location_ids image_id: image_id - type: ITEM + item_data: + name: Dark Horse Merlot 2018 + description: A nice red wine + product_type: REGULAR + is_archived: false cursor: cursor matched_variation_ids: - VBJNPHCOKDFECR6VU25WRJUD diff --git a/.mock/definition/catalog/images.yml b/.mock/definition/catalog/images.yml index 4c4ec7bc..35626e67 100644 --- a/.mock/definition/catalog/images.yml +++ b/.mock/definition/catalog/images.yml @@ -51,7 +51,8 @@ service: detail: detail field: field image: - id: id + type: IMAGE + id: KQLFFHA6K6J3YQAQAWDQAL57 updated_at: updated_at version: 1000000 is_deleted: true @@ -67,10 +68,9 @@ service: image_id: image_id image_data: name: name - url: url - caption: caption + url: https://... + caption: A picture of a cup of coffee photo_studio_order_id: photo_studio_order_id - type: IMAGE update: path: /v2/catalog/images/{image_id} method: PUT @@ -120,7 +120,8 @@ service: detail: detail field: field image: - id: id + type: IMAGE + id: L52QOQN2SW3M5QTF9JOCQKNB updated_at: updated_at version: 1000000 is_deleted: true @@ -135,10 +136,9 @@ service: - absent_at_location_ids image_id: image_id image_data: - name: name - url: url - caption: caption + name: Coffee + url: https://... + caption: A picture of a cup of coffee photo_studio_order_id: photo_studio_order_id - type: IMAGE source: openapi: openapi/openapi.json diff --git a/.mock/definition/catalog/object.yml b/.mock/definition/catalog/object.yml index d5819e02..70452634 100644 --- a/.mock/definition/catalog/object.yml +++ b/.mock/definition/catalog/object.yml @@ -72,8 +72,8 @@ service: - request: idempotency_key: af3d1afc-7212-4300-b463-0bfc5314a5ae object: - id: id - type: ITEM + type: IMAGE + id: '#Cocoa' response: body: errors: @@ -82,10 +82,11 @@ service: detail: detail field: field catalog_object: - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true + type: ITEM + id: R2TA2FOBUGCJZNIWJSOSNAI4 + updated_at: '2021-06-14T15:51:39.021Z' + version: 1623685899021 + is_deleted: false custom_attribute_values: key: {} catalog_v1_ids: @@ -97,9 +98,9 @@ service: - absent_at_location_ids image_id: image_id item_data: - name: name - description: description - abbreviation: abbreviation + name: Cocoa + description: Hot Chocolate + abbreviation: Ch label_color: label_color is_taxable: true category_id: category_id @@ -117,13 +118,12 @@ service: image_ids: - image_ids sort_name: sort_name - description_html: description_html - description_plaintext: description_plaintext + description_html:

Hot Chocolate

+ description_plaintext: Hot Chocolate channels: - channels is_archived: true is_alcoholic: true - type: ITEM id_mappings: - client_object_id: '#Cocoa' object_id: R2TA2FOBUGCJZNIWJSOSNAI4 @@ -244,10 +244,11 @@ service: detail: detail field: field object: - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true + type: ITEM + id: W62UWFY35CWMYGVWK6TWJDNI + updated_at: '2016-11-16T22:25:24.878Z' + version: 1479335124878 + is_deleted: false custom_attribute_values: key: {} catalog_v1_ids: @@ -259,14 +260,14 @@ service: - absent_at_location_ids image_id: image_id item_data: - name: name - description: description + name: Tea + description: Hot Leaf Juice abbreviation: abbreviation label_color: label_color is_taxable: true category_id: category_id tax_ids: - - tax_ids + - HURXQOOAIC4IZSI2BEXQRYFY modifier_list_info: - modifier_list_id: modifier_list_id product_type: REGULAR @@ -279,18 +280,22 @@ service: image_ids: - image_ids sort_name: sort_name + categories: + - type: CATEGORY + id: BJNQCF2FJ6S6UIDT65ABHLRX + ordinal: 0 description_html: description_html description_plaintext: description_plaintext channels: - channels is_archived: true is_alcoholic: true - type: ITEM related_objects: - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true + - type: ITEM + id: BJNQCF2FJ6S6UIDT65ABHLRX + updated_at: '2016-11-16T22:25:24.878Z' + version: 1479335124878 + is_deleted: false custom_attribute_values: key: {} catalog_v1_ids: @@ -301,12 +306,11 @@ service: absent_at_location_ids: - absent_at_location_ids image_id: image_id - ordinal: 1000000 - type: CATEGORY - - id: id - updated_at: updated_at - version: 1000000 - is_deleted: true + - type: TAX + id: HURXQOOAIC4IZSI2BEXQRYFY + updated_at: '2016-11-16T22:25:24.878Z' + version: 1479335124878 + is_deleted: false custom_attribute_values: key: {} catalog_v1_ids: @@ -317,7 +321,12 @@ service: absent_at_location_ids: - absent_at_location_ids image_id: image_id - type: TAX + tax_data: + name: Sales Tax + calculation_phase: TAX_SUBTOTAL_PHASE + inclusion_type: ADDITIVE + percentage: '5.0' + enabled: true delete: path: /v2/catalog/object/{object_id} method: DELETE diff --git a/.mock/definition/checkout/paymentLinks.yml b/.mock/definition/checkout/paymentLinks.yml index ed7e6078..6d1431a1 100644 --- a/.mock/definition/checkout/paymentLinks.yml +++ b/.mock/definition/checkout/paymentLinks.yml @@ -275,8 +275,8 @@ service: amount: 0 currency: USD subscription_plans: - - id: id - type: ITEM + - type: ITEM + id: id get: path: /v2/online-checkout/payment-links/{id} method: GET diff --git a/.mock/definition/locations.yml b/.mock/definition/locations.yml index 4c02572d..49d64674 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 1c7846b0..4c61f9ba 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 0ac689c7..eb39d23d 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 eda03149..a39095aa 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 bad38922..becb01f9 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/composer.json b/composer.json index 6b2b6ccc..e0179804 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "square/square", - "version": "42.2.0.20250521", + "version": "43.0.0.20250618", "description": "Use Square APIs to manage and run business including payment, customer, product, inventory, and employee management.", "keywords": [ "square", diff --git a/src/SquareClient.php b/src/SquareClient.php index 7fa70f0c..a05db80b 100644 --- a/src/SquareClient.php +++ b/src/SquareClient.php @@ -247,11 +247,11 @@ public function __construct( $token ??= $this->getFromEnvOrThrow('SQUARE_TOKEN', 'Please pass in token or set the environment variable SQUARE_TOKEN.'); $defaultHeaders = [ 'Authorization' => "Bearer $token", - 'Square-Version' => '2025-05-21', + 'Square-Version' => '2025-06-18', 'X-Fern-Language' => 'PHP', 'X-Fern-SDK-Name' => 'Square', - 'X-Fern-SDK-Version' => '42.2.0.20250521', - 'User-Agent' => 'square/square/42.2.0.20250521', + 'X-Fern-SDK-Version' => '43.0.0.20250618', + 'User-Agent' => 'square/square/43.0.0.20250618', ]; if ($version != null) { $defaultHeaders['Square-Version'] = $version; diff --git a/src/Types/BankAccountCreatedEvent.php b/src/Types/BankAccountCreatedEvent.php new file mode 100644 index 00000000..e3f93d8b --- /dev/null +++ b/src/Types/BankAccountCreatedEvent.php @@ -0,0 +1,181 @@ +merchantId = $values['merchantId'] ?? null; + $this->locationId = $values['locationId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getLocationId(): ?string + { + return $this->locationId; + } + + /** + * @param ?string $value + */ + public function setLocationId(?string $value = null): self + { + $this->locationId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?BankAccountCreatedEventData + */ + public function getData(): ?BankAccountCreatedEventData + { + return $this->data; + } + + /** + * @param ?BankAccountCreatedEventData $value + */ + public function setData(?BankAccountCreatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/BankAccountCreatedEventData.php b/src/Types/BankAccountCreatedEventData.php new file mode 100644 index 00000000..4041f96d --- /dev/null +++ b/src/Types/BankAccountCreatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?BankAccountCreatedEventObject + */ + public function getObject(): ?BankAccountCreatedEventObject + { + return $this->object; + } + + /** + * @param ?BankAccountCreatedEventObject $value + */ + public function setObject(?BankAccountCreatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/BankAccountCreatedEventObject.php b/src/Types/BankAccountCreatedEventObject.php new file mode 100644 index 00000000..722be673 --- /dev/null +++ b/src/Types/BankAccountCreatedEventObject.php @@ -0,0 +1,51 @@ +bankAccount = $values['bankAccount'] ?? null; + } + + /** + * @return ?BankAccount + */ + public function getBankAccount(): ?BankAccount + { + return $this->bankAccount; + } + + /** + * @param ?BankAccount $value + */ + public function setBankAccount(?BankAccount $value = null): self + { + $this->bankAccount = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/BankAccountDisabledEvent.php b/src/Types/BankAccountDisabledEvent.php new file mode 100644 index 00000000..afaacd43 --- /dev/null +++ b/src/Types/BankAccountDisabledEvent.php @@ -0,0 +1,180 @@ +merchantId = $values['merchantId'] ?? null; + $this->locationId = $values['locationId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getLocationId(): ?string + { + return $this->locationId; + } + + /** + * @param ?string $value + */ + public function setLocationId(?string $value = null): self + { + $this->locationId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?BankAccountDisabledEventData + */ + public function getData(): ?BankAccountDisabledEventData + { + return $this->data; + } + + /** + * @param ?BankAccountDisabledEventData $value + */ + public function setData(?BankAccountDisabledEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/BankAccountDisabledEventData.php b/src/Types/BankAccountDisabledEventData.php new file mode 100644 index 00000000..8f4212df --- /dev/null +++ b/src/Types/BankAccountDisabledEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?BankAccountDisabledEventObject + */ + public function getObject(): ?BankAccountDisabledEventObject + { + return $this->object; + } + + /** + * @param ?BankAccountDisabledEventObject $value + */ + public function setObject(?BankAccountDisabledEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/BankAccountDisabledEventObject.php b/src/Types/BankAccountDisabledEventObject.php new file mode 100644 index 00000000..1c288c5c --- /dev/null +++ b/src/Types/BankAccountDisabledEventObject.php @@ -0,0 +1,51 @@ +bankAccount = $values['bankAccount'] ?? null; + } + + /** + * @return ?BankAccount + */ + public function getBankAccount(): ?BankAccount + { + return $this->bankAccount; + } + + /** + * @param ?BankAccount $value + */ + public function setBankAccount(?BankAccount $value = null): self + { + $this->bankAccount = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/BankAccountVerifiedEvent.php b/src/Types/BankAccountVerifiedEvent.php new file mode 100644 index 00000000..d461bc08 --- /dev/null +++ b/src/Types/BankAccountVerifiedEvent.php @@ -0,0 +1,180 @@ +merchantId = $values['merchantId'] ?? null; + $this->locationId = $values['locationId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getLocationId(): ?string + { + return $this->locationId; + } + + /** + * @param ?string $value + */ + public function setLocationId(?string $value = null): self + { + $this->locationId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?BankAccountVerifiedEventData + */ + public function getData(): ?BankAccountVerifiedEventData + { + return $this->data; + } + + /** + * @param ?BankAccountVerifiedEventData $value + */ + public function setData(?BankAccountVerifiedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/BankAccountVerifiedEventData.php b/src/Types/BankAccountVerifiedEventData.php new file mode 100644 index 00000000..b5034d44 --- /dev/null +++ b/src/Types/BankAccountVerifiedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?BankAccountVerifiedEventObject + */ + public function getObject(): ?BankAccountVerifiedEventObject + { + return $this->object; + } + + /** + * @param ?BankAccountVerifiedEventObject $value + */ + public function setObject(?BankAccountVerifiedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/BankAccountVerifiedEventObject.php b/src/Types/BankAccountVerifiedEventObject.php new file mode 100644 index 00000000..71eebb08 --- /dev/null +++ b/src/Types/BankAccountVerifiedEventObject.php @@ -0,0 +1,51 @@ +bankAccount = $values['bankAccount'] ?? null; + } + + /** + * @return ?BankAccount + */ + public function getBankAccount(): ?BankAccount + { + return $this->bankAccount; + } + + /** + * @param ?BankAccount $value + */ + public function setBankAccount(?BankAccount $value = null): self + { + $this->bankAccount = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/BookingCreatedEvent.php b/src/Types/BookingCreatedEvent.php new file mode 100644 index 00000000..bd46be25 --- /dev/null +++ b/src/Types/BookingCreatedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?BookingCreatedEventData + */ + public function getData(): ?BookingCreatedEventData + { + return $this->data; + } + + /** + * @param ?BookingCreatedEventData $value + */ + public function setData(?BookingCreatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/BookingCreatedEventData.php b/src/Types/BookingCreatedEventData.php new file mode 100644 index 00000000..0048ab66 --- /dev/null +++ b/src/Types/BookingCreatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?BookingCreatedEventObject + */ + public function getObject(): ?BookingCreatedEventObject + { + return $this->object; + } + + /** + * @param ?BookingCreatedEventObject $value + */ + public function setObject(?BookingCreatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/BookingCreatedEventObject.php b/src/Types/BookingCreatedEventObject.php new file mode 100644 index 00000000..c2b3a493 --- /dev/null +++ b/src/Types/BookingCreatedEventObject.php @@ -0,0 +1,51 @@ +booking = $values['booking'] ?? null; + } + + /** + * @return ?Booking + */ + public function getBooking(): ?Booking + { + return $this->booking; + } + + /** + * @param ?Booking $value + */ + public function setBooking(?Booking $value = null): self + { + $this->booking = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/BookingCustomAttributeDefinitionOwnedCreatedEvent.php b/src/Types/BookingCustomAttributeDefinitionOwnedCreatedEvent.php new file mode 100644 index 00000000..23d14774 --- /dev/null +++ b/src/Types/BookingCustomAttributeDefinitionOwnedCreatedEvent.php @@ -0,0 +1,156 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/BookingCustomAttributeDefinitionOwnedDeletedEvent.php b/src/Types/BookingCustomAttributeDefinitionOwnedDeletedEvent.php new file mode 100644 index 00000000..1365192e --- /dev/null +++ b/src/Types/BookingCustomAttributeDefinitionOwnedDeletedEvent.php @@ -0,0 +1,156 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/BookingCustomAttributeDefinitionOwnedUpdatedEvent.php b/src/Types/BookingCustomAttributeDefinitionOwnedUpdatedEvent.php new file mode 100644 index 00000000..49c3b2b6 --- /dev/null +++ b/src/Types/BookingCustomAttributeDefinitionOwnedUpdatedEvent.php @@ -0,0 +1,156 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/BookingCustomAttributeDefinitionVisibleCreatedEvent.php b/src/Types/BookingCustomAttributeDefinitionVisibleCreatedEvent.php new file mode 100644 index 00000000..1117f962 --- /dev/null +++ b/src/Types/BookingCustomAttributeDefinitionVisibleCreatedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/BookingCustomAttributeDefinitionVisibleDeletedEvent.php b/src/Types/BookingCustomAttributeDefinitionVisibleDeletedEvent.php new file mode 100644 index 00000000..b11bd277 --- /dev/null +++ b/src/Types/BookingCustomAttributeDefinitionVisibleDeletedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/BookingCustomAttributeDefinitionVisibleUpdatedEvent.php b/src/Types/BookingCustomAttributeDefinitionVisibleUpdatedEvent.php new file mode 100644 index 00000000..e1aadced --- /dev/null +++ b/src/Types/BookingCustomAttributeDefinitionVisibleUpdatedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/BookingCustomAttributeOwnedDeletedEvent.php b/src/Types/BookingCustomAttributeOwnedDeletedEvent.php new file mode 100644 index 00000000..e499c439 --- /dev/null +++ b/src/Types/BookingCustomAttributeOwnedDeletedEvent.php @@ -0,0 +1,158 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeEventData + */ + public function getData(): ?CustomAttributeEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeEventData $value + */ + public function setData(?CustomAttributeEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/BookingCustomAttributeOwnedUpdatedEvent.php b/src/Types/BookingCustomAttributeOwnedUpdatedEvent.php new file mode 100644 index 00000000..788d0cf0 --- /dev/null +++ b/src/Types/BookingCustomAttributeOwnedUpdatedEvent.php @@ -0,0 +1,156 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeEventData + */ + public function getData(): ?CustomAttributeEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeEventData $value + */ + public function setData(?CustomAttributeEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/BookingCustomAttributeVisibleDeletedEvent.php b/src/Types/BookingCustomAttributeVisibleDeletedEvent.php new file mode 100644 index 00000000..9a0d047d --- /dev/null +++ b/src/Types/BookingCustomAttributeVisibleDeletedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeEventData + */ + public function getData(): ?CustomAttributeEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeEventData $value + */ + public function setData(?CustomAttributeEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/BookingCustomAttributeVisibleUpdatedEvent.php b/src/Types/BookingCustomAttributeVisibleUpdatedEvent.php new file mode 100644 index 00000000..f300f208 --- /dev/null +++ b/src/Types/BookingCustomAttributeVisibleUpdatedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeEventData + */ + public function getData(): ?CustomAttributeEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeEventData $value + */ + public function setData(?CustomAttributeEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/BookingUpdatedEvent.php b/src/Types/BookingUpdatedEvent.php new file mode 100644 index 00000000..12d70338 --- /dev/null +++ b/src/Types/BookingUpdatedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?BookingUpdatedEventData + */ + public function getData(): ?BookingUpdatedEventData + { + return $this->data; + } + + /** + * @param ?BookingUpdatedEventData $value + */ + public function setData(?BookingUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/BookingUpdatedEventData.php b/src/Types/BookingUpdatedEventData.php new file mode 100644 index 00000000..0fcbc995 --- /dev/null +++ b/src/Types/BookingUpdatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?BookingUpdatedEventObject + */ + public function getObject(): ?BookingUpdatedEventObject + { + return $this->object; + } + + /** + * @param ?BookingUpdatedEventObject $value + */ + public function setObject(?BookingUpdatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/BookingUpdatedEventObject.php b/src/Types/BookingUpdatedEventObject.php new file mode 100644 index 00000000..169aa055 --- /dev/null +++ b/src/Types/BookingUpdatedEventObject.php @@ -0,0 +1,51 @@ +booking = $values['booking'] ?? null; + } + + /** + * @return ?Booking + */ + public function getBooking(): ?Booking + { + return $this->booking; + } + + /** + * @param ?Booking $value + */ + public function setBooking(?Booking $value = null): self + { + $this->booking = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CardAutomaticallyUpdatedEvent.php b/src/Types/CardAutomaticallyUpdatedEvent.php new file mode 100644 index 00000000..95d70c88 --- /dev/null +++ b/src/Types/CardAutomaticallyUpdatedEvent.php @@ -0,0 +1,155 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CardAutomaticallyUpdatedEventData + */ + public function getData(): ?CardAutomaticallyUpdatedEventData + { + return $this->data; + } + + /** + * @param ?CardAutomaticallyUpdatedEventData $value + */ + public function setData(?CardAutomaticallyUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CardAutomaticallyUpdatedEventData.php b/src/Types/CardAutomaticallyUpdatedEventData.php new file mode 100644 index 00000000..9bc337cb --- /dev/null +++ b/src/Types/CardAutomaticallyUpdatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?CardAutomaticallyUpdatedEventObject + */ + public function getObject(): ?CardAutomaticallyUpdatedEventObject + { + return $this->object; + } + + /** + * @param ?CardAutomaticallyUpdatedEventObject $value + */ + public function setObject(?CardAutomaticallyUpdatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CardAutomaticallyUpdatedEventObject.php b/src/Types/CardAutomaticallyUpdatedEventObject.php new file mode 100644 index 00000000..eb992dcf --- /dev/null +++ b/src/Types/CardAutomaticallyUpdatedEventObject.php @@ -0,0 +1,51 @@ +card = $values['card'] ?? null; + } + + /** + * @return ?Card + */ + public function getCard(): ?Card + { + return $this->card; + } + + /** + * @param ?Card $value + */ + public function setCard(?Card $value = null): self + { + $this->card = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CardCreatedEvent.php b/src/Types/CardCreatedEvent.php new file mode 100644 index 00000000..81de9790 --- /dev/null +++ b/src/Types/CardCreatedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CardCreatedEventData + */ + public function getData(): ?CardCreatedEventData + { + return $this->data; + } + + /** + * @param ?CardCreatedEventData $value + */ + public function setData(?CardCreatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CardCreatedEventData.php b/src/Types/CardCreatedEventData.php new file mode 100644 index 00000000..160d8548 --- /dev/null +++ b/src/Types/CardCreatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?CardCreatedEventObject + */ + public function getObject(): ?CardCreatedEventObject + { + return $this->object; + } + + /** + * @param ?CardCreatedEventObject $value + */ + public function setObject(?CardCreatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CardCreatedEventObject.php b/src/Types/CardCreatedEventObject.php new file mode 100644 index 00000000..9d807df5 --- /dev/null +++ b/src/Types/CardCreatedEventObject.php @@ -0,0 +1,51 @@ +card = $values['card'] ?? null; + } + + /** + * @return ?Card + */ + public function getCard(): ?Card + { + return $this->card; + } + + /** + * @param ?Card $value + */ + public function setCard(?Card $value = null): self + { + $this->card = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CardDisabledEvent.php b/src/Types/CardDisabledEvent.php new file mode 100644 index 00000000..ed7d2304 --- /dev/null +++ b/src/Types/CardDisabledEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CardDisabledEventData + */ + public function getData(): ?CardDisabledEventData + { + return $this->data; + } + + /** + * @param ?CardDisabledEventData $value + */ + public function setData(?CardDisabledEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CardDisabledEventData.php b/src/Types/CardDisabledEventData.php new file mode 100644 index 00000000..e822ce7e --- /dev/null +++ b/src/Types/CardDisabledEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?CardDisabledEventObject + */ + public function getObject(): ?CardDisabledEventObject + { + return $this->object; + } + + /** + * @param ?CardDisabledEventObject $value + */ + public function setObject(?CardDisabledEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CardDisabledEventObject.php b/src/Types/CardDisabledEventObject.php new file mode 100644 index 00000000..62c224c3 --- /dev/null +++ b/src/Types/CardDisabledEventObject.php @@ -0,0 +1,51 @@ +card = $values['card'] ?? null; + } + + /** + * @return ?Card + */ + public function getCard(): ?Card + { + return $this->card; + } + + /** + * @param ?Card $value + */ + public function setCard(?Card $value = null): self + { + $this->card = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CardForgottenEvent.php b/src/Types/CardForgottenEvent.php new file mode 100644 index 00000000..d5206eb1 --- /dev/null +++ b/src/Types/CardForgottenEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CardForgottenEventData + */ + public function getData(): ?CardForgottenEventData + { + return $this->data; + } + + /** + * @param ?CardForgottenEventData $value + */ + public function setData(?CardForgottenEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CardForgottenEventCard.php b/src/Types/CardForgottenEventCard.php new file mode 100644 index 00000000..3b3bfe5f --- /dev/null +++ b/src/Types/CardForgottenEventCard.php @@ -0,0 +1,184 @@ +id = $values['id'] ?? null; + $this->customerId = $values['customerId'] ?? null; + $this->enabled = $values['enabled'] ?? null; + $this->referenceId = $values['referenceId'] ?? null; + $this->version = $values['version'] ?? null; + $this->merchantId = $values['merchantId'] ?? null; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCustomerId(): ?string + { + return $this->customerId; + } + + /** + * @param ?string $value + */ + public function setCustomerId(?string $value = null): self + { + $this->customerId = $value; + return $this; + } + + /** + * @return ?bool + */ + public function getEnabled(): ?bool + { + return $this->enabled; + } + + /** + * @param ?bool $value + */ + public function setEnabled(?bool $value = null): self + { + $this->enabled = $value; + return $this; + } + + /** + * @return ?string + */ + public function getReferenceId(): ?string + { + return $this->referenceId; + } + + /** + * @param ?string $value + */ + public function setReferenceId(?string $value = null): self + { + $this->referenceId = $value; + return $this; + } + + /** + * @return ?int + */ + public function getVersion(): ?int + { + return $this->version; + } + + /** + * @param ?int $value + */ + public function setVersion(?int $value = null): self + { + $this->version = $value; + return $this; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CardForgottenEventData.php b/src/Types/CardForgottenEventData.php new file mode 100644 index 00000000..45876283 --- /dev/null +++ b/src/Types/CardForgottenEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?CardForgottenEventObject + */ + public function getObject(): ?CardForgottenEventObject + { + return $this->object; + } + + /** + * @param ?CardForgottenEventObject $value + */ + public function setObject(?CardForgottenEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CardForgottenEventObject.php b/src/Types/CardForgottenEventObject.php new file mode 100644 index 00000000..beb7fa8e --- /dev/null +++ b/src/Types/CardForgottenEventObject.php @@ -0,0 +1,51 @@ +card = $values['card'] ?? null; + } + + /** + * @return ?CardForgottenEventCard + */ + public function getCard(): ?CardForgottenEventCard + { + return $this->card; + } + + /** + * @param ?CardForgottenEventCard $value + */ + public function setCard(?CardForgottenEventCard $value = null): self + { + $this->card = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CardUpdatedEvent.php b/src/Types/CardUpdatedEvent.php new file mode 100644 index 00000000..a24a9979 --- /dev/null +++ b/src/Types/CardUpdatedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CardUpdatedEventData + */ + public function getData(): ?CardUpdatedEventData + { + return $this->data; + } + + /** + * @param ?CardUpdatedEventData $value + */ + public function setData(?CardUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CardUpdatedEventData.php b/src/Types/CardUpdatedEventData.php new file mode 100644 index 00000000..18f3728b --- /dev/null +++ b/src/Types/CardUpdatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?CardUpdatedEventObject + */ + public function getObject(): ?CardUpdatedEventObject + { + return $this->object; + } + + /** + * @param ?CardUpdatedEventObject $value + */ + public function setObject(?CardUpdatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CardUpdatedEventObject.php b/src/Types/CardUpdatedEventObject.php new file mode 100644 index 00000000..2985cadb --- /dev/null +++ b/src/Types/CardUpdatedEventObject.php @@ -0,0 +1,51 @@ +card = $values['card'] ?? null; + } + + /** + * @return ?Card + */ + public function getCard(): ?Card + { + return $this->card; + } + + /** + * @param ?Card $value + */ + public function setCard(?Card $value = null): self + { + $this->card = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CatalogVersionUpdatedEvent.php b/src/Types/CatalogVersionUpdatedEvent.php new file mode 100644 index 00000000..0c440734 --- /dev/null +++ b/src/Types/CatalogVersionUpdatedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CatalogVersionUpdatedEventData + */ + public function getData(): ?CatalogVersionUpdatedEventData + { + return $this->data; + } + + /** + * @param ?CatalogVersionUpdatedEventData $value + */ + public function setData(?CatalogVersionUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CatalogVersionUpdatedEventCatalogVersion.php b/src/Types/CatalogVersionUpdatedEventCatalogVersion.php new file mode 100644 index 00000000..0add6667 --- /dev/null +++ b/src/Types/CatalogVersionUpdatedEventCatalogVersion.php @@ -0,0 +1,51 @@ +updatedAt = $values['updatedAt'] ?? null; + } + + /** + * @return ?string + */ + public function getUpdatedAt(): ?string + { + return $this->updatedAt; + } + + /** + * @param ?string $value + */ + public function setUpdatedAt(?string $value = null): self + { + $this->updatedAt = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CatalogVersionUpdatedEventData.php b/src/Types/CatalogVersionUpdatedEventData.php new file mode 100644 index 00000000..a4235abf --- /dev/null +++ b/src/Types/CatalogVersionUpdatedEventData.php @@ -0,0 +1,76 @@ +type = $values['type'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?CatalogVersionUpdatedEventObject + */ + public function getObject(): ?CatalogVersionUpdatedEventObject + { + return $this->object; + } + + /** + * @param ?CatalogVersionUpdatedEventObject $value + */ + public function setObject(?CatalogVersionUpdatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CatalogVersionUpdatedEventObject.php b/src/Types/CatalogVersionUpdatedEventObject.php new file mode 100644 index 00000000..c063da8a --- /dev/null +++ b/src/Types/CatalogVersionUpdatedEventObject.php @@ -0,0 +1,51 @@ +catalogVersion = $values['catalogVersion'] ?? null; + } + + /** + * @return ?CatalogVersionUpdatedEventCatalogVersion + */ + public function getCatalogVersion(): ?CatalogVersionUpdatedEventCatalogVersion + { + return $this->catalogVersion; + } + + /** + * @param ?CatalogVersionUpdatedEventCatalogVersion $value + */ + public function setCatalogVersion(?CatalogVersionUpdatedEventCatalogVersion $value = null): self + { + $this->catalogVersion = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomAttributeDefinitionEventData.php b/src/Types/CustomAttributeDefinitionEventData.php new file mode 100644 index 00000000..e9c9d3d3 --- /dev/null +++ b/src/Types/CustomAttributeDefinitionEventData.php @@ -0,0 +1,105 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventDataObject + */ + public function getObject(): ?CustomAttributeDefinitionEventDataObject + { + return $this->object; + } + + /** + * @param ?CustomAttributeDefinitionEventDataObject $value + */ + public function setObject(?CustomAttributeDefinitionEventDataObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomAttributeDefinitionEventDataObject.php b/src/Types/CustomAttributeDefinitionEventDataObject.php new file mode 100644 index 00000000..1517fada --- /dev/null +++ b/src/Types/CustomAttributeDefinitionEventDataObject.php @@ -0,0 +1,51 @@ +customAttributeDefinition = $values['customAttributeDefinition'] ?? null; + } + + /** + * @return ?CustomAttributeDefinition + */ + public function getCustomAttributeDefinition(): ?CustomAttributeDefinition + { + return $this->customAttributeDefinition; + } + + /** + * @param ?CustomAttributeDefinition $value + */ + public function setCustomAttributeDefinition(?CustomAttributeDefinition $value = null): self + { + $this->customAttributeDefinition = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomAttributeEventData.php b/src/Types/CustomAttributeEventData.php new file mode 100644 index 00000000..69de8244 --- /dev/null +++ b/src/Types/CustomAttributeEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?CustomAttributeEventDataObject + */ + public function getObject(): ?CustomAttributeEventDataObject + { + return $this->object; + } + + /** + * @param ?CustomAttributeEventDataObject $value + */ + public function setObject(?CustomAttributeEventDataObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomAttributeEventDataObject.php b/src/Types/CustomAttributeEventDataObject.php new file mode 100644 index 00000000..0d6fcb5b --- /dev/null +++ b/src/Types/CustomAttributeEventDataObject.php @@ -0,0 +1,51 @@ +customAttribute = $values['customAttribute'] ?? null; + } + + /** + * @return ?CustomAttribute + */ + public function getCustomAttribute(): ?CustomAttribute + { + return $this->customAttribute; + } + + /** + * @param ?CustomAttribute $value + */ + public function setCustomAttribute(?CustomAttribute $value = null): self + { + $this->customAttribute = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerCreatedEvent.php b/src/Types/CustomerCreatedEvent.php new file mode 100644 index 00000000..b1823182 --- /dev/null +++ b/src/Types/CustomerCreatedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomerCreatedEventData + */ + public function getData(): ?CustomerCreatedEventData + { + return $this->data; + } + + /** + * @param ?CustomerCreatedEventData $value + */ + public function setData(?CustomerCreatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerCreatedEventData.php b/src/Types/CustomerCreatedEventData.php new file mode 100644 index 00000000..c54f9c65 --- /dev/null +++ b/src/Types/CustomerCreatedEventData.php @@ -0,0 +1,104 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?CustomerCreatedEventObject + */ + public function getObject(): ?CustomerCreatedEventObject + { + return $this->object; + } + + /** + * @param ?CustomerCreatedEventObject $value + */ + public function setObject(?CustomerCreatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerCreatedEventEventContext.php b/src/Types/CustomerCreatedEventEventContext.php new file mode 100644 index 00000000..6f50d463 --- /dev/null +++ b/src/Types/CustomerCreatedEventEventContext.php @@ -0,0 +1,54 @@ +merge = $values['merge'] ?? null; + } + + /** + * @return ?CustomerCreatedEventEventContextMerge + */ + public function getMerge(): ?CustomerCreatedEventEventContextMerge + { + return $this->merge; + } + + /** + * @param ?CustomerCreatedEventEventContextMerge $value + */ + public function setMerge(?CustomerCreatedEventEventContextMerge $value = null): self + { + $this->merge = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerCreatedEventEventContextMerge.php b/src/Types/CustomerCreatedEventEventContextMerge.php new file mode 100644 index 00000000..4bc0f406 --- /dev/null +++ b/src/Types/CustomerCreatedEventEventContextMerge.php @@ -0,0 +1,80 @@ + $fromCustomerIds The IDs of the existing customers that were merged and then deleted. + */ + #[JsonProperty('from_customer_ids'), ArrayType(['string'])] + private ?array $fromCustomerIds; + + /** + * @var ?string $toCustomerId The ID of the new customer created by the merge. + */ + #[JsonProperty('to_customer_id')] + private ?string $toCustomerId; + + /** + * @param array{ + * fromCustomerIds?: ?array, + * toCustomerId?: ?string, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->fromCustomerIds = $values['fromCustomerIds'] ?? null; + $this->toCustomerId = $values['toCustomerId'] ?? null; + } + + /** + * @return ?array + */ + public function getFromCustomerIds(): ?array + { + return $this->fromCustomerIds; + } + + /** + * @param ?array $value + */ + public function setFromCustomerIds(?array $value = null): self + { + $this->fromCustomerIds = $value; + return $this; + } + + /** + * @return ?string + */ + public function getToCustomerId(): ?string + { + return $this->toCustomerId; + } + + /** + * @param ?string $value + */ + public function setToCustomerId(?string $value = null): self + { + $this->toCustomerId = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerCreatedEventObject.php b/src/Types/CustomerCreatedEventObject.php new file mode 100644 index 00000000..305d04ea --- /dev/null +++ b/src/Types/CustomerCreatedEventObject.php @@ -0,0 +1,79 @@ +customer = $values['customer'] ?? null; + $this->eventContext = $values['eventContext'] ?? null; + } + + /** + * @return ?Customer + */ + public function getCustomer(): ?Customer + { + return $this->customer; + } + + /** + * @param ?Customer $value + */ + public function setCustomer(?Customer $value = null): self + { + $this->customer = $value; + return $this; + } + + /** + * @return ?CustomerCreatedEventEventContext + */ + public function getEventContext(): ?CustomerCreatedEventEventContext + { + return $this->eventContext; + } + + /** + * @param ?CustomerCreatedEventEventContext $value + */ + public function setEventContext(?CustomerCreatedEventEventContext $value = null): self + { + $this->eventContext = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerCustomAttributeDefinitionCreatedEvent.php b/src/Types/CustomerCustomAttributeDefinitionCreatedEvent.php new file mode 100644 index 00000000..9793d370 --- /dev/null +++ b/src/Types/CustomerCustomAttributeDefinitionCreatedEvent.php @@ -0,0 +1,158 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerCustomAttributeDefinitionCreatedPublicEvent.php b/src/Types/CustomerCustomAttributeDefinitionCreatedPublicEvent.php new file mode 100644 index 00000000..0a67569a --- /dev/null +++ b/src/Types/CustomerCustomAttributeDefinitionCreatedPublicEvent.php @@ -0,0 +1,160 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerCustomAttributeDefinitionDeletedEvent.php b/src/Types/CustomerCustomAttributeDefinitionDeletedEvent.php new file mode 100644 index 00000000..95c2afae --- /dev/null +++ b/src/Types/CustomerCustomAttributeDefinitionDeletedEvent.php @@ -0,0 +1,159 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerCustomAttributeDefinitionDeletedPublicEvent.php b/src/Types/CustomerCustomAttributeDefinitionDeletedPublicEvent.php new file mode 100644 index 00000000..4587782e --- /dev/null +++ b/src/Types/CustomerCustomAttributeDefinitionDeletedPublicEvent.php @@ -0,0 +1,160 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerCustomAttributeDefinitionOwnedCreatedEvent.php b/src/Types/CustomerCustomAttributeDefinitionOwnedCreatedEvent.php new file mode 100644 index 00000000..e21eb3be --- /dev/null +++ b/src/Types/CustomerCustomAttributeDefinitionOwnedCreatedEvent.php @@ -0,0 +1,155 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerCustomAttributeDefinitionOwnedDeletedEvent.php b/src/Types/CustomerCustomAttributeDefinitionOwnedDeletedEvent.php new file mode 100644 index 00000000..4bb9efbd --- /dev/null +++ b/src/Types/CustomerCustomAttributeDefinitionOwnedDeletedEvent.php @@ -0,0 +1,156 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerCustomAttributeDefinitionOwnedUpdatedEvent.php b/src/Types/CustomerCustomAttributeDefinitionOwnedUpdatedEvent.php new file mode 100644 index 00000000..a52d96dd --- /dev/null +++ b/src/Types/CustomerCustomAttributeDefinitionOwnedUpdatedEvent.php @@ -0,0 +1,156 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerCustomAttributeDefinitionUpdatedEvent.php b/src/Types/CustomerCustomAttributeDefinitionUpdatedEvent.php new file mode 100644 index 00000000..c851b9c9 --- /dev/null +++ b/src/Types/CustomerCustomAttributeDefinitionUpdatedEvent.php @@ -0,0 +1,159 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerCustomAttributeDefinitionUpdatedPublicEvent.php b/src/Types/CustomerCustomAttributeDefinitionUpdatedPublicEvent.php new file mode 100644 index 00000000..f06dd3de --- /dev/null +++ b/src/Types/CustomerCustomAttributeDefinitionUpdatedPublicEvent.php @@ -0,0 +1,160 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerCustomAttributeDefinitionVisibleCreatedEvent.php b/src/Types/CustomerCustomAttributeDefinitionVisibleCreatedEvent.php new file mode 100644 index 00000000..63346ca6 --- /dev/null +++ b/src/Types/CustomerCustomAttributeDefinitionVisibleCreatedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerCustomAttributeDefinitionVisibleDeletedEvent.php b/src/Types/CustomerCustomAttributeDefinitionVisibleDeletedEvent.php new file mode 100644 index 00000000..7754be1e --- /dev/null +++ b/src/Types/CustomerCustomAttributeDefinitionVisibleDeletedEvent.php @@ -0,0 +1,158 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerCustomAttributeDefinitionVisibleUpdatedEvent.php b/src/Types/CustomerCustomAttributeDefinitionVisibleUpdatedEvent.php new file mode 100644 index 00000000..f4a25da3 --- /dev/null +++ b/src/Types/CustomerCustomAttributeDefinitionVisibleUpdatedEvent.php @@ -0,0 +1,158 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerCustomAttributeDeletedEvent.php b/src/Types/CustomerCustomAttributeDeletedEvent.php new file mode 100644 index 00000000..b1e61767 --- /dev/null +++ b/src/Types/CustomerCustomAttributeDeletedEvent.php @@ -0,0 +1,160 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeEventData + */ + public function getData(): ?CustomAttributeEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeEventData $value + */ + public function setData(?CustomAttributeEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerCustomAttributeDeletedPublicEvent.php b/src/Types/CustomerCustomAttributeDeletedPublicEvent.php new file mode 100644 index 00000000..dd784133 --- /dev/null +++ b/src/Types/CustomerCustomAttributeDeletedPublicEvent.php @@ -0,0 +1,160 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeEventData + */ + public function getData(): ?CustomAttributeEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeEventData $value + */ + public function setData(?CustomAttributeEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerCustomAttributeOwnedDeletedEvent.php b/src/Types/CustomerCustomAttributeOwnedDeletedEvent.php new file mode 100644 index 00000000..f2320952 --- /dev/null +++ b/src/Types/CustomerCustomAttributeOwnedDeletedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeEventData + */ + public function getData(): ?CustomAttributeEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeEventData $value + */ + public function setData(?CustomAttributeEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerCustomAttributeOwnedUpdatedEvent.php b/src/Types/CustomerCustomAttributeOwnedUpdatedEvent.php new file mode 100644 index 00000000..06f28358 --- /dev/null +++ b/src/Types/CustomerCustomAttributeOwnedUpdatedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeEventData + */ + public function getData(): ?CustomAttributeEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeEventData $value + */ + public function setData(?CustomAttributeEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerCustomAttributeUpdatedEvent.php b/src/Types/CustomerCustomAttributeUpdatedEvent.php new file mode 100644 index 00000000..bf4a5551 --- /dev/null +++ b/src/Types/CustomerCustomAttributeUpdatedEvent.php @@ -0,0 +1,160 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeEventData + */ + public function getData(): ?CustomAttributeEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeEventData $value + */ + public function setData(?CustomAttributeEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerCustomAttributeUpdatedPublicEvent.php b/src/Types/CustomerCustomAttributeUpdatedPublicEvent.php new file mode 100644 index 00000000..32292619 --- /dev/null +++ b/src/Types/CustomerCustomAttributeUpdatedPublicEvent.php @@ -0,0 +1,160 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeEventData + */ + public function getData(): ?CustomAttributeEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeEventData $value + */ + public function setData(?CustomAttributeEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerCustomAttributeVisibleDeletedEvent.php b/src/Types/CustomerCustomAttributeVisibleDeletedEvent.php new file mode 100644 index 00000000..16d76885 --- /dev/null +++ b/src/Types/CustomerCustomAttributeVisibleDeletedEvent.php @@ -0,0 +1,162 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeEventData + */ + public function getData(): ?CustomAttributeEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeEventData $value + */ + public function setData(?CustomAttributeEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerCustomAttributeVisibleUpdatedEvent.php b/src/Types/CustomerCustomAttributeVisibleUpdatedEvent.php new file mode 100644 index 00000000..0e21b655 --- /dev/null +++ b/src/Types/CustomerCustomAttributeVisibleUpdatedEvent.php @@ -0,0 +1,162 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeEventData + */ + public function getData(): ?CustomAttributeEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeEventData $value + */ + public function setData(?CustomAttributeEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerDeletedEvent.php b/src/Types/CustomerDeletedEvent.php new file mode 100644 index 00000000..f77d2ee5 --- /dev/null +++ b/src/Types/CustomerDeletedEvent.php @@ -0,0 +1,156 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomerDeletedEventData + */ + public function getData(): ?CustomerDeletedEventData + { + return $this->data; + } + + /** + * @param ?CustomerDeletedEventData $value + */ + public function setData(?CustomerDeletedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerDeletedEventData.php b/src/Types/CustomerDeletedEventData.php new file mode 100644 index 00000000..8b0266ff --- /dev/null +++ b/src/Types/CustomerDeletedEventData.php @@ -0,0 +1,104 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?CustomerDeletedEventObject + */ + public function getObject(): ?CustomerDeletedEventObject + { + return $this->object; + } + + /** + * @param ?CustomerDeletedEventObject $value + */ + public function setObject(?CustomerDeletedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerDeletedEventEventContext.php b/src/Types/CustomerDeletedEventEventContext.php new file mode 100644 index 00000000..84455c49 --- /dev/null +++ b/src/Types/CustomerDeletedEventEventContext.php @@ -0,0 +1,54 @@ +merge = $values['merge'] ?? null; + } + + /** + * @return ?CustomerDeletedEventEventContextMerge + */ + public function getMerge(): ?CustomerDeletedEventEventContextMerge + { + return $this->merge; + } + + /** + * @param ?CustomerDeletedEventEventContextMerge $value + */ + public function setMerge(?CustomerDeletedEventEventContextMerge $value = null): self + { + $this->merge = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerDeletedEventEventContextMerge.php b/src/Types/CustomerDeletedEventEventContextMerge.php new file mode 100644 index 00000000..47b0b5fa --- /dev/null +++ b/src/Types/CustomerDeletedEventEventContextMerge.php @@ -0,0 +1,80 @@ + $fromCustomerIds The IDs of the existing customers that were merged and then deleted. + */ + #[JsonProperty('from_customer_ids'), ArrayType(['string'])] + private ?array $fromCustomerIds; + + /** + * @var ?string $toCustomerId The ID of the new customer created by the merge. + */ + #[JsonProperty('to_customer_id')] + private ?string $toCustomerId; + + /** + * @param array{ + * fromCustomerIds?: ?array, + * toCustomerId?: ?string, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->fromCustomerIds = $values['fromCustomerIds'] ?? null; + $this->toCustomerId = $values['toCustomerId'] ?? null; + } + + /** + * @return ?array + */ + public function getFromCustomerIds(): ?array + { + return $this->fromCustomerIds; + } + + /** + * @param ?array $value + */ + public function setFromCustomerIds(?array $value = null): self + { + $this->fromCustomerIds = $value; + return $this; + } + + /** + * @return ?string + */ + public function getToCustomerId(): ?string + { + return $this->toCustomerId; + } + + /** + * @param ?string $value + */ + public function setToCustomerId(?string $value = null): self + { + $this->toCustomerId = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerDeletedEventObject.php b/src/Types/CustomerDeletedEventObject.php new file mode 100644 index 00000000..b384c8eb --- /dev/null +++ b/src/Types/CustomerDeletedEventObject.php @@ -0,0 +1,79 @@ +customer = $values['customer'] ?? null; + $this->eventContext = $values['eventContext'] ?? null; + } + + /** + * @return ?Customer + */ + public function getCustomer(): ?Customer + { + return $this->customer; + } + + /** + * @param ?Customer $value + */ + public function setCustomer(?Customer $value = null): self + { + $this->customer = $value; + return $this; + } + + /** + * @return ?CustomerDeletedEventEventContext + */ + public function getEventContext(): ?CustomerDeletedEventEventContext + { + return $this->eventContext; + } + + /** + * @param ?CustomerDeletedEventEventContext $value + */ + public function setEventContext(?CustomerDeletedEventEventContext $value = null): self + { + $this->eventContext = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerUpdatedEvent.php b/src/Types/CustomerUpdatedEvent.php new file mode 100644 index 00000000..0c9d97b8 --- /dev/null +++ b/src/Types/CustomerUpdatedEvent.php @@ -0,0 +1,156 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomerUpdatedEventData + */ + public function getData(): ?CustomerUpdatedEventData + { + return $this->data; + } + + /** + * @param ?CustomerUpdatedEventData $value + */ + public function setData(?CustomerUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerUpdatedEventData.php b/src/Types/CustomerUpdatedEventData.php new file mode 100644 index 00000000..be690c30 --- /dev/null +++ b/src/Types/CustomerUpdatedEventData.php @@ -0,0 +1,104 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?CustomerUpdatedEventObject + */ + public function getObject(): ?CustomerUpdatedEventObject + { + return $this->object; + } + + /** + * @param ?CustomerUpdatedEventObject $value + */ + public function setObject(?CustomerUpdatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/CustomerUpdatedEventObject.php b/src/Types/CustomerUpdatedEventObject.php new file mode 100644 index 00000000..1d003762 --- /dev/null +++ b/src/Types/CustomerUpdatedEventObject.php @@ -0,0 +1,54 @@ +customer = $values['customer'] ?? null; + } + + /** + * @return ?Customer + */ + public function getCustomer(): ?Customer + { + return $this->customer; + } + + /** + * @param ?Customer $value + */ + public function setCustomer(?Customer $value = null): self + { + $this->customer = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DeviceCodePairedEvent.php b/src/Types/DeviceCodePairedEvent.php new file mode 100644 index 00000000..772e4c50 --- /dev/null +++ b/src/Types/DeviceCodePairedEvent.php @@ -0,0 +1,181 @@ +merchantId = $values['merchantId'] ?? null; + $this->locationId = $values['locationId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getLocationId(): ?string + { + return $this->locationId; + } + + /** + * @param ?string $value + */ + public function setLocationId(?string $value = null): self + { + $this->locationId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?DeviceCodePairedEventData + */ + public function getData(): ?DeviceCodePairedEventData + { + return $this->data; + } + + /** + * @param ?DeviceCodePairedEventData $value + */ + public function setData(?DeviceCodePairedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DeviceCodePairedEventData.php b/src/Types/DeviceCodePairedEventData.php new file mode 100644 index 00000000..152029b9 --- /dev/null +++ b/src/Types/DeviceCodePairedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?DeviceCodePairedEventObject + */ + public function getObject(): ?DeviceCodePairedEventObject + { + return $this->object; + } + + /** + * @param ?DeviceCodePairedEventObject $value + */ + public function setObject(?DeviceCodePairedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DeviceCodePairedEventObject.php b/src/Types/DeviceCodePairedEventObject.php new file mode 100644 index 00000000..197ef485 --- /dev/null +++ b/src/Types/DeviceCodePairedEventObject.php @@ -0,0 +1,51 @@ +deviceCode = $values['deviceCode'] ?? null; + } + + /** + * @return ?DeviceCode + */ + public function getDeviceCode(): ?DeviceCode + { + return $this->deviceCode; + } + + /** + * @param ?DeviceCode $value + */ + public function setDeviceCode(?DeviceCode $value = null): self + { + $this->deviceCode = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DeviceCreatedEvent.php b/src/Types/DeviceCreatedEvent.php new file mode 100644 index 00000000..3fb63668 --- /dev/null +++ b/src/Types/DeviceCreatedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?DeviceCreatedEventData + */ + public function getData(): ?DeviceCreatedEventData + { + return $this->data; + } + + /** + * @param ?DeviceCreatedEventData $value + */ + public function setData(?DeviceCreatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DeviceCreatedEventData.php b/src/Types/DeviceCreatedEventData.php new file mode 100644 index 00000000..45216aea --- /dev/null +++ b/src/Types/DeviceCreatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?DeviceCreatedEventObject + */ + public function getObject(): ?DeviceCreatedEventObject + { + return $this->object; + } + + /** + * @param ?DeviceCreatedEventObject $value + */ + public function setObject(?DeviceCreatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DeviceCreatedEventObject.php b/src/Types/DeviceCreatedEventObject.php new file mode 100644 index 00000000..5e5471af --- /dev/null +++ b/src/Types/DeviceCreatedEventObject.php @@ -0,0 +1,51 @@ +device = $values['device'] ?? null; + } + + /** + * @return ?Device + */ + public function getDevice(): ?Device + { + return $this->device; + } + + /** + * @param ?Device $value + */ + public function setDevice(?Device $value = null): self + { + $this->device = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DisputeCreatedEvent.php b/src/Types/DisputeCreatedEvent.php new file mode 100644 index 00000000..9fef35b5 --- /dev/null +++ b/src/Types/DisputeCreatedEvent.php @@ -0,0 +1,179 @@ +merchantId = $values['merchantId'] ?? null; + $this->locationId = $values['locationId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getLocationId(): ?string + { + return $this->locationId; + } + + /** + * @param ?string $value + */ + public function setLocationId(?string $value = null): self + { + $this->locationId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?DisputeCreatedEventData + */ + public function getData(): ?DisputeCreatedEventData + { + return $this->data; + } + + /** + * @param ?DisputeCreatedEventData $value + */ + public function setData(?DisputeCreatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DisputeCreatedEventData.php b/src/Types/DisputeCreatedEventData.php new file mode 100644 index 00000000..88faa4b4 --- /dev/null +++ b/src/Types/DisputeCreatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?DisputeCreatedEventObject + */ + public function getObject(): ?DisputeCreatedEventObject + { + return $this->object; + } + + /** + * @param ?DisputeCreatedEventObject $value + */ + public function setObject(?DisputeCreatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DisputeCreatedEventObject.php b/src/Types/DisputeCreatedEventObject.php new file mode 100644 index 00000000..9b35c189 --- /dev/null +++ b/src/Types/DisputeCreatedEventObject.php @@ -0,0 +1,51 @@ +object = $values['object'] ?? null; + } + + /** + * @return ?Dispute + */ + public function getObject(): ?Dispute + { + return $this->object; + } + + /** + * @param ?Dispute $value + */ + public function setObject(?Dispute $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DisputeEvidenceAddedEvent.php b/src/Types/DisputeEvidenceAddedEvent.php new file mode 100644 index 00000000..5db64785 --- /dev/null +++ b/src/Types/DisputeEvidenceAddedEvent.php @@ -0,0 +1,181 @@ +merchantId = $values['merchantId'] ?? null; + $this->locationId = $values['locationId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getLocationId(): ?string + { + return $this->locationId; + } + + /** + * @param ?string $value + */ + public function setLocationId(?string $value = null): self + { + $this->locationId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?DisputeEvidenceAddedEventData + */ + public function getData(): ?DisputeEvidenceAddedEventData + { + return $this->data; + } + + /** + * @param ?DisputeEvidenceAddedEventData $value + */ + public function setData(?DisputeEvidenceAddedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DisputeEvidenceAddedEventData.php b/src/Types/DisputeEvidenceAddedEventData.php new file mode 100644 index 00000000..2e2e7a8b --- /dev/null +++ b/src/Types/DisputeEvidenceAddedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?DisputeEvidenceAddedEventObject + */ + public function getObject(): ?DisputeEvidenceAddedEventObject + { + return $this->object; + } + + /** + * @param ?DisputeEvidenceAddedEventObject $value + */ + public function setObject(?DisputeEvidenceAddedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DisputeEvidenceAddedEventObject.php b/src/Types/DisputeEvidenceAddedEventObject.php new file mode 100644 index 00000000..72ea5210 --- /dev/null +++ b/src/Types/DisputeEvidenceAddedEventObject.php @@ -0,0 +1,51 @@ +object = $values['object'] ?? null; + } + + /** + * @return ?Dispute + */ + public function getObject(): ?Dispute + { + return $this->object; + } + + /** + * @param ?Dispute $value + */ + public function setObject(?Dispute $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DisputeEvidenceCreatedEvent.php b/src/Types/DisputeEvidenceCreatedEvent.php new file mode 100644 index 00000000..9ba17948 --- /dev/null +++ b/src/Types/DisputeEvidenceCreatedEvent.php @@ -0,0 +1,181 @@ +merchantId = $values['merchantId'] ?? null; + $this->locationId = $values['locationId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getLocationId(): ?string + { + return $this->locationId; + } + + /** + * @param ?string $value + */ + public function setLocationId(?string $value = null): self + { + $this->locationId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?DisputeEvidenceCreatedEventData + */ + public function getData(): ?DisputeEvidenceCreatedEventData + { + return $this->data; + } + + /** + * @param ?DisputeEvidenceCreatedEventData $value + */ + public function setData(?DisputeEvidenceCreatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DisputeEvidenceCreatedEventData.php b/src/Types/DisputeEvidenceCreatedEventData.php new file mode 100644 index 00000000..eff793bf --- /dev/null +++ b/src/Types/DisputeEvidenceCreatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?DisputeEvidenceCreatedEventObject + */ + public function getObject(): ?DisputeEvidenceCreatedEventObject + { + return $this->object; + } + + /** + * @param ?DisputeEvidenceCreatedEventObject $value + */ + public function setObject(?DisputeEvidenceCreatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DisputeEvidenceCreatedEventObject.php b/src/Types/DisputeEvidenceCreatedEventObject.php new file mode 100644 index 00000000..5390cc44 --- /dev/null +++ b/src/Types/DisputeEvidenceCreatedEventObject.php @@ -0,0 +1,51 @@ +object = $values['object'] ?? null; + } + + /** + * @return ?Dispute + */ + public function getObject(): ?Dispute + { + return $this->object; + } + + /** + * @param ?Dispute $value + */ + public function setObject(?Dispute $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DisputeEvidenceDeletedEvent.php b/src/Types/DisputeEvidenceDeletedEvent.php new file mode 100644 index 00000000..0837a343 --- /dev/null +++ b/src/Types/DisputeEvidenceDeletedEvent.php @@ -0,0 +1,181 @@ +merchantId = $values['merchantId'] ?? null; + $this->locationId = $values['locationId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getLocationId(): ?string + { + return $this->locationId; + } + + /** + * @param ?string $value + */ + public function setLocationId(?string $value = null): self + { + $this->locationId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?DisputeEvidenceDeletedEventData + */ + public function getData(): ?DisputeEvidenceDeletedEventData + { + return $this->data; + } + + /** + * @param ?DisputeEvidenceDeletedEventData $value + */ + public function setData(?DisputeEvidenceDeletedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DisputeEvidenceDeletedEventData.php b/src/Types/DisputeEvidenceDeletedEventData.php new file mode 100644 index 00000000..e5b9c8e1 --- /dev/null +++ b/src/Types/DisputeEvidenceDeletedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?DisputeEvidenceDeletedEventObject + */ + public function getObject(): ?DisputeEvidenceDeletedEventObject + { + return $this->object; + } + + /** + * @param ?DisputeEvidenceDeletedEventObject $value + */ + public function setObject(?DisputeEvidenceDeletedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DisputeEvidenceDeletedEventObject.php b/src/Types/DisputeEvidenceDeletedEventObject.php new file mode 100644 index 00000000..00789139 --- /dev/null +++ b/src/Types/DisputeEvidenceDeletedEventObject.php @@ -0,0 +1,51 @@ +object = $values['object'] ?? null; + } + + /** + * @return ?Dispute + */ + public function getObject(): ?Dispute + { + return $this->object; + } + + /** + * @param ?Dispute $value + */ + public function setObject(?Dispute $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DisputeEvidenceRemovedEvent.php b/src/Types/DisputeEvidenceRemovedEvent.php new file mode 100644 index 00000000..caa3298f --- /dev/null +++ b/src/Types/DisputeEvidenceRemovedEvent.php @@ -0,0 +1,181 @@ +merchantId = $values['merchantId'] ?? null; + $this->locationId = $values['locationId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getLocationId(): ?string + { + return $this->locationId; + } + + /** + * @param ?string $value + */ + public function setLocationId(?string $value = null): self + { + $this->locationId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?DisputeEvidenceRemovedEventData + */ + public function getData(): ?DisputeEvidenceRemovedEventData + { + return $this->data; + } + + /** + * @param ?DisputeEvidenceRemovedEventData $value + */ + public function setData(?DisputeEvidenceRemovedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DisputeEvidenceRemovedEventData.php b/src/Types/DisputeEvidenceRemovedEventData.php new file mode 100644 index 00000000..a0b47c5e --- /dev/null +++ b/src/Types/DisputeEvidenceRemovedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?DisputeEvidenceRemovedEventObject + */ + public function getObject(): ?DisputeEvidenceRemovedEventObject + { + return $this->object; + } + + /** + * @param ?DisputeEvidenceRemovedEventObject $value + */ + public function setObject(?DisputeEvidenceRemovedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DisputeEvidenceRemovedEventObject.php b/src/Types/DisputeEvidenceRemovedEventObject.php new file mode 100644 index 00000000..185fcc2b --- /dev/null +++ b/src/Types/DisputeEvidenceRemovedEventObject.php @@ -0,0 +1,51 @@ +object = $values['object'] ?? null; + } + + /** + * @return ?Dispute + */ + public function getObject(): ?Dispute + { + return $this->object; + } + + /** + * @param ?Dispute $value + */ + public function setObject(?Dispute $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DisputeStateChangedEvent.php b/src/Types/DisputeStateChangedEvent.php new file mode 100644 index 00000000..e340ad26 --- /dev/null +++ b/src/Types/DisputeStateChangedEvent.php @@ -0,0 +1,181 @@ +merchantId = $values['merchantId'] ?? null; + $this->locationId = $values['locationId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getLocationId(): ?string + { + return $this->locationId; + } + + /** + * @param ?string $value + */ + public function setLocationId(?string $value = null): self + { + $this->locationId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?DisputeStateChangedEventData + */ + public function getData(): ?DisputeStateChangedEventData + { + return $this->data; + } + + /** + * @param ?DisputeStateChangedEventData $value + */ + public function setData(?DisputeStateChangedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DisputeStateChangedEventData.php b/src/Types/DisputeStateChangedEventData.php new file mode 100644 index 00000000..9ba1e73f --- /dev/null +++ b/src/Types/DisputeStateChangedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?DisputeStateChangedEventObject + */ + public function getObject(): ?DisputeStateChangedEventObject + { + return $this->object; + } + + /** + * @param ?DisputeStateChangedEventObject $value + */ + public function setObject(?DisputeStateChangedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DisputeStateChangedEventObject.php b/src/Types/DisputeStateChangedEventObject.php new file mode 100644 index 00000000..7a676af6 --- /dev/null +++ b/src/Types/DisputeStateChangedEventObject.php @@ -0,0 +1,51 @@ +object = $values['object'] ?? null; + } + + /** + * @return ?Dispute + */ + public function getObject(): ?Dispute + { + return $this->object; + } + + /** + * @param ?Dispute $value + */ + public function setObject(?Dispute $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DisputeStateUpdatedEvent.php b/src/Types/DisputeStateUpdatedEvent.php new file mode 100644 index 00000000..67c0ae06 --- /dev/null +++ b/src/Types/DisputeStateUpdatedEvent.php @@ -0,0 +1,181 @@ +merchantId = $values['merchantId'] ?? null; + $this->locationId = $values['locationId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getLocationId(): ?string + { + return $this->locationId; + } + + /** + * @param ?string $value + */ + public function setLocationId(?string $value = null): self + { + $this->locationId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?DisputeStateUpdatedEventData + */ + public function getData(): ?DisputeStateUpdatedEventData + { + return $this->data; + } + + /** + * @param ?DisputeStateUpdatedEventData $value + */ + public function setData(?DisputeStateUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DisputeStateUpdatedEventData.php b/src/Types/DisputeStateUpdatedEventData.php new file mode 100644 index 00000000..f115d875 --- /dev/null +++ b/src/Types/DisputeStateUpdatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?DisputeStateUpdatedEventObject + */ + public function getObject(): ?DisputeStateUpdatedEventObject + { + return $this->object; + } + + /** + * @param ?DisputeStateUpdatedEventObject $value + */ + public function setObject(?DisputeStateUpdatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DisputeStateUpdatedEventObject.php b/src/Types/DisputeStateUpdatedEventObject.php new file mode 100644 index 00000000..a5f1c154 --- /dev/null +++ b/src/Types/DisputeStateUpdatedEventObject.php @@ -0,0 +1,51 @@ +object = $values['object'] ?? null; + } + + /** + * @return ?Dispute + */ + public function getObject(): ?Dispute + { + return $this->object; + } + + /** + * @param ?Dispute $value + */ + public function setObject(?Dispute $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/EcomVisibility.php b/src/Types/EcomVisibility.php new file mode 100644 index 00000000..78fa3a49 --- /dev/null +++ b/src/Types/EcomVisibility.php @@ -0,0 +1,11 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?GiftCardActivityCreatedEventData + */ + public function getData(): ?GiftCardActivityCreatedEventData + { + return $this->data; + } + + /** + * @param ?GiftCardActivityCreatedEventData $value + */ + public function setData(?GiftCardActivityCreatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/GiftCardActivityCreatedEventData.php b/src/Types/GiftCardActivityCreatedEventData.php new file mode 100644 index 00000000..170f0ac0 --- /dev/null +++ b/src/Types/GiftCardActivityCreatedEventData.php @@ -0,0 +1,104 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?GiftCardActivityCreatedEventObject + */ + public function getObject(): ?GiftCardActivityCreatedEventObject + { + return $this->object; + } + + /** + * @param ?GiftCardActivityCreatedEventObject $value + */ + public function setObject(?GiftCardActivityCreatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/GiftCardActivityCreatedEventObject.php b/src/Types/GiftCardActivityCreatedEventObject.php new file mode 100644 index 00000000..e26ad017 --- /dev/null +++ b/src/Types/GiftCardActivityCreatedEventObject.php @@ -0,0 +1,55 @@ +giftCardActivity = $values['giftCardActivity'] ?? null; + } + + /** + * @return ?GiftCardActivity + */ + public function getGiftCardActivity(): ?GiftCardActivity + { + return $this->giftCardActivity; + } + + /** + * @param ?GiftCardActivity $value + */ + public function setGiftCardActivity(?GiftCardActivity $value = null): self + { + $this->giftCardActivity = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/GiftCardActivityUpdatedEvent.php b/src/Types/GiftCardActivityUpdatedEvent.php new file mode 100644 index 00000000..d5ccc696 --- /dev/null +++ b/src/Types/GiftCardActivityUpdatedEvent.php @@ -0,0 +1,161 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?GiftCardActivityUpdatedEventData + */ + public function getData(): ?GiftCardActivityUpdatedEventData + { + return $this->data; + } + + /** + * @param ?GiftCardActivityUpdatedEventData $value + */ + public function setData(?GiftCardActivityUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/GiftCardActivityUpdatedEventData.php b/src/Types/GiftCardActivityUpdatedEventData.php new file mode 100644 index 00000000..addbc8e2 --- /dev/null +++ b/src/Types/GiftCardActivityUpdatedEventData.php @@ -0,0 +1,104 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?GiftCardActivityUpdatedEventObject + */ + public function getObject(): ?GiftCardActivityUpdatedEventObject + { + return $this->object; + } + + /** + * @param ?GiftCardActivityUpdatedEventObject $value + */ + public function setObject(?GiftCardActivityUpdatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/GiftCardActivityUpdatedEventObject.php b/src/Types/GiftCardActivityUpdatedEventObject.php new file mode 100644 index 00000000..aa129374 --- /dev/null +++ b/src/Types/GiftCardActivityUpdatedEventObject.php @@ -0,0 +1,55 @@ +giftCardActivity = $values['giftCardActivity'] ?? null; + } + + /** + * @return ?GiftCardActivity + */ + public function getGiftCardActivity(): ?GiftCardActivity + { + return $this->giftCardActivity; + } + + /** + * @param ?GiftCardActivity $value + */ + public function setGiftCardActivity(?GiftCardActivity $value = null): self + { + $this->giftCardActivity = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/GiftCardCreatedEvent.php b/src/Types/GiftCardCreatedEvent.php new file mode 100644 index 00000000..0f6c6d39 --- /dev/null +++ b/src/Types/GiftCardCreatedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?GiftCardCreatedEventData + */ + public function getData(): ?GiftCardCreatedEventData + { + return $this->data; + } + + /** + * @param ?GiftCardCreatedEventData $value + */ + public function setData(?GiftCardCreatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/GiftCardCreatedEventData.php b/src/Types/GiftCardCreatedEventData.php new file mode 100644 index 00000000..4344b70d --- /dev/null +++ b/src/Types/GiftCardCreatedEventData.php @@ -0,0 +1,104 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?GiftCardCreatedEventObject + */ + public function getObject(): ?GiftCardCreatedEventObject + { + return $this->object; + } + + /** + * @param ?GiftCardCreatedEventObject $value + */ + public function setObject(?GiftCardCreatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/GiftCardCreatedEventObject.php b/src/Types/GiftCardCreatedEventObject.php new file mode 100644 index 00000000..4b6c1f53 --- /dev/null +++ b/src/Types/GiftCardCreatedEventObject.php @@ -0,0 +1,54 @@ +giftCard = $values['giftCard'] ?? null; + } + + /** + * @return ?GiftCard + */ + public function getGiftCard(): ?GiftCard + { + return $this->giftCard; + } + + /** + * @param ?GiftCard $value + */ + public function setGiftCard(?GiftCard $value = null): self + { + $this->giftCard = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/GiftCardCustomerLinkedEvent.php b/src/Types/GiftCardCustomerLinkedEvent.php new file mode 100644 index 00000000..2e5733a9 --- /dev/null +++ b/src/Types/GiftCardCustomerLinkedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?GiftCardCustomerLinkedEventData + */ + public function getData(): ?GiftCardCustomerLinkedEventData + { + return $this->data; + } + + /** + * @param ?GiftCardCustomerLinkedEventData $value + */ + public function setData(?GiftCardCustomerLinkedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/GiftCardCustomerLinkedEventData.php b/src/Types/GiftCardCustomerLinkedEventData.php new file mode 100644 index 00000000..b1e8b89d --- /dev/null +++ b/src/Types/GiftCardCustomerLinkedEventData.php @@ -0,0 +1,104 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?GiftCardCustomerLinkedEventObject + */ + public function getObject(): ?GiftCardCustomerLinkedEventObject + { + return $this->object; + } + + /** + * @param ?GiftCardCustomerLinkedEventObject $value + */ + public function setObject(?GiftCardCustomerLinkedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/GiftCardCustomerLinkedEventObject.php b/src/Types/GiftCardCustomerLinkedEventObject.php new file mode 100644 index 00000000..8a49418a --- /dev/null +++ b/src/Types/GiftCardCustomerLinkedEventObject.php @@ -0,0 +1,80 @@ +giftCard = $values['giftCard'] ?? null; + $this->linkedCustomerId = $values['linkedCustomerId'] ?? null; + } + + /** + * @return ?GiftCard + */ + public function getGiftCard(): ?GiftCard + { + return $this->giftCard; + } + + /** + * @param ?GiftCard $value + */ + public function setGiftCard(?GiftCard $value = null): self + { + $this->giftCard = $value; + return $this; + } + + /** + * @return ?string + */ + public function getLinkedCustomerId(): ?string + { + return $this->linkedCustomerId; + } + + /** + * @param ?string $value + */ + public function setLinkedCustomerId(?string $value = null): self + { + $this->linkedCustomerId = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/GiftCardCustomerUnlinkedEvent.php b/src/Types/GiftCardCustomerUnlinkedEvent.php new file mode 100644 index 00000000..08a87797 --- /dev/null +++ b/src/Types/GiftCardCustomerUnlinkedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?GiftCardCustomerUnlinkedEventData + */ + public function getData(): ?GiftCardCustomerUnlinkedEventData + { + return $this->data; + } + + /** + * @param ?GiftCardCustomerUnlinkedEventData $value + */ + public function setData(?GiftCardCustomerUnlinkedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/GiftCardCustomerUnlinkedEventData.php b/src/Types/GiftCardCustomerUnlinkedEventData.php new file mode 100644 index 00000000..8b55e020 --- /dev/null +++ b/src/Types/GiftCardCustomerUnlinkedEventData.php @@ -0,0 +1,104 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?GiftCardCustomerUnlinkedEventObject + */ + public function getObject(): ?GiftCardCustomerUnlinkedEventObject + { + return $this->object; + } + + /** + * @param ?GiftCardCustomerUnlinkedEventObject $value + */ + public function setObject(?GiftCardCustomerUnlinkedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/GiftCardCustomerUnlinkedEventObject.php b/src/Types/GiftCardCustomerUnlinkedEventObject.php new file mode 100644 index 00000000..0b1ab111 --- /dev/null +++ b/src/Types/GiftCardCustomerUnlinkedEventObject.php @@ -0,0 +1,83 @@ +giftCard = $values['giftCard'] ?? null; + $this->unlinkedCustomerId = $values['unlinkedCustomerId'] ?? null; + } + + /** + * @return ?GiftCard + */ + public function getGiftCard(): ?GiftCard + { + return $this->giftCard; + } + + /** + * @param ?GiftCard $value + */ + public function setGiftCard(?GiftCard $value = null): self + { + $this->giftCard = $value; + return $this; + } + + /** + * @return ?string + */ + public function getUnlinkedCustomerId(): ?string + { + return $this->unlinkedCustomerId; + } + + /** + * @param ?string $value + */ + public function setUnlinkedCustomerId(?string $value = null): self + { + $this->unlinkedCustomerId = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/GiftCardUpdatedEvent.php b/src/Types/GiftCardUpdatedEvent.php new file mode 100644 index 00000000..47cc1ea3 --- /dev/null +++ b/src/Types/GiftCardUpdatedEvent.php @@ -0,0 +1,158 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?GiftCardUpdatedEventData + */ + public function getData(): ?GiftCardUpdatedEventData + { + return $this->data; + } + + /** + * @param ?GiftCardUpdatedEventData $value + */ + public function setData(?GiftCardUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/GiftCardUpdatedEventData.php b/src/Types/GiftCardUpdatedEventData.php new file mode 100644 index 00000000..8b02cdf4 --- /dev/null +++ b/src/Types/GiftCardUpdatedEventData.php @@ -0,0 +1,104 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?GiftCardUpdatedEventObject + */ + public function getObject(): ?GiftCardUpdatedEventObject + { + return $this->object; + } + + /** + * @param ?GiftCardUpdatedEventObject $value + */ + public function setObject(?GiftCardUpdatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/GiftCardUpdatedEventObject.php b/src/Types/GiftCardUpdatedEventObject.php new file mode 100644 index 00000000..802c396f --- /dev/null +++ b/src/Types/GiftCardUpdatedEventObject.php @@ -0,0 +1,57 @@ +giftCard = $values['giftCard'] ?? null; + } + + /** + * @return ?GiftCard + */ + public function getGiftCard(): ?GiftCard + { + return $this->giftCard; + } + + /** + * @param ?GiftCard $value + */ + public function setGiftCard(?GiftCard $value = null): self + { + $this->giftCard = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/InventoryCountUpdatedEvent.php b/src/Types/InventoryCountUpdatedEvent.php new file mode 100644 index 00000000..837b8417 --- /dev/null +++ b/src/Types/InventoryCountUpdatedEvent.php @@ -0,0 +1,155 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?InventoryCountUpdatedEventData + */ + public function getData(): ?InventoryCountUpdatedEventData + { + return $this->data; + } + + /** + * @param ?InventoryCountUpdatedEventData $value + */ + public function setData(?InventoryCountUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/InventoryCountUpdatedEventData.php b/src/Types/InventoryCountUpdatedEventData.php new file mode 100644 index 00000000..3df00011 --- /dev/null +++ b/src/Types/InventoryCountUpdatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?InventoryCountUpdatedEventObject + */ + public function getObject(): ?InventoryCountUpdatedEventObject + { + return $this->object; + } + + /** + * @param ?InventoryCountUpdatedEventObject $value + */ + public function setObject(?InventoryCountUpdatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/InventoryCountUpdatedEventObject.php b/src/Types/InventoryCountUpdatedEventObject.php new file mode 100644 index 00000000..0a1d2501 --- /dev/null +++ b/src/Types/InventoryCountUpdatedEventObject.php @@ -0,0 +1,52 @@ + $inventoryCounts The inventory counts. + */ + #[JsonProperty('inventory_counts'), ArrayType([InventoryCount::class])] + private ?array $inventoryCounts; + + /** + * @param array{ + * inventoryCounts?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->inventoryCounts = $values['inventoryCounts'] ?? null; + } + + /** + * @return ?array + */ + public function getInventoryCounts(): ?array + { + return $this->inventoryCounts; + } + + /** + * @param ?array $value + */ + public function setInventoryCounts(?array $value = null): self + { + $this->inventoryCounts = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/InvoiceCanceledEvent.php b/src/Types/InvoiceCanceledEvent.php new file mode 100644 index 00000000..0b9b729a --- /dev/null +++ b/src/Types/InvoiceCanceledEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?InvoiceCanceledEventData + */ + public function getData(): ?InvoiceCanceledEventData + { + return $this->data; + } + + /** + * @param ?InvoiceCanceledEventData $value + */ + public function setData(?InvoiceCanceledEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/InvoiceCanceledEventData.php b/src/Types/InvoiceCanceledEventData.php new file mode 100644 index 00000000..b6c87e66 --- /dev/null +++ b/src/Types/InvoiceCanceledEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?InvoiceCanceledEventObject + */ + public function getObject(): ?InvoiceCanceledEventObject + { + return $this->object; + } + + /** + * @param ?InvoiceCanceledEventObject $value + */ + public function setObject(?InvoiceCanceledEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/InvoiceCanceledEventObject.php b/src/Types/InvoiceCanceledEventObject.php new file mode 100644 index 00000000..c147e6b7 --- /dev/null +++ b/src/Types/InvoiceCanceledEventObject.php @@ -0,0 +1,51 @@ +invoice = $values['invoice'] ?? null; + } + + /** + * @return ?Invoice + */ + public function getInvoice(): ?Invoice + { + return $this->invoice; + } + + /** + * @param ?Invoice $value + */ + public function setInvoice(?Invoice $value = null): self + { + $this->invoice = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/InvoiceCreatedEvent.php b/src/Types/InvoiceCreatedEvent.php new file mode 100644 index 00000000..53872df6 --- /dev/null +++ b/src/Types/InvoiceCreatedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?InvoiceCreatedEventData + */ + public function getData(): ?InvoiceCreatedEventData + { + return $this->data; + } + + /** + * @param ?InvoiceCreatedEventData $value + */ + public function setData(?InvoiceCreatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/InvoiceCreatedEventData.php b/src/Types/InvoiceCreatedEventData.php new file mode 100644 index 00000000..96b91a10 --- /dev/null +++ b/src/Types/InvoiceCreatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?InvoiceCreatedEventObject + */ + public function getObject(): ?InvoiceCreatedEventObject + { + return $this->object; + } + + /** + * @param ?InvoiceCreatedEventObject $value + */ + public function setObject(?InvoiceCreatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/InvoiceCreatedEventObject.php b/src/Types/InvoiceCreatedEventObject.php new file mode 100644 index 00000000..45fdeed1 --- /dev/null +++ b/src/Types/InvoiceCreatedEventObject.php @@ -0,0 +1,51 @@ +invoice = $values['invoice'] ?? null; + } + + /** + * @return ?Invoice + */ + public function getInvoice(): ?Invoice + { + return $this->invoice; + } + + /** + * @param ?Invoice $value + */ + public function setInvoice(?Invoice $value = null): self + { + $this->invoice = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/InvoiceDeletedEvent.php b/src/Types/InvoiceDeletedEvent.php new file mode 100644 index 00000000..af7c9406 --- /dev/null +++ b/src/Types/InvoiceDeletedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?InvoiceDeletedEventData + */ + public function getData(): ?InvoiceDeletedEventData + { + return $this->data; + } + + /** + * @param ?InvoiceDeletedEventData $value + */ + public function setData(?InvoiceDeletedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/InvoiceDeletedEventData.php b/src/Types/InvoiceDeletedEventData.php new file mode 100644 index 00000000..8b6a8da4 --- /dev/null +++ b/src/Types/InvoiceDeletedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->deleted = $values['deleted'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?bool + */ + public function getDeleted(): ?bool + { + return $this->deleted; + } + + /** + * @param ?bool $value + */ + public function setDeleted(?bool $value = null): self + { + $this->deleted = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/InvoicePaymentMadeEvent.php b/src/Types/InvoicePaymentMadeEvent.php new file mode 100644 index 00000000..1fa89c5d --- /dev/null +++ b/src/Types/InvoicePaymentMadeEvent.php @@ -0,0 +1,155 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?InvoicePaymentMadeEventData + */ + public function getData(): ?InvoicePaymentMadeEventData + { + return $this->data; + } + + /** + * @param ?InvoicePaymentMadeEventData $value + */ + public function setData(?InvoicePaymentMadeEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/InvoicePaymentMadeEventData.php b/src/Types/InvoicePaymentMadeEventData.php new file mode 100644 index 00000000..554c2546 --- /dev/null +++ b/src/Types/InvoicePaymentMadeEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?InvoicePaymentMadeEventObject + */ + public function getObject(): ?InvoicePaymentMadeEventObject + { + return $this->object; + } + + /** + * @param ?InvoicePaymentMadeEventObject $value + */ + public function setObject(?InvoicePaymentMadeEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/InvoicePaymentMadeEventObject.php b/src/Types/InvoicePaymentMadeEventObject.php new file mode 100644 index 00000000..a94c06ff --- /dev/null +++ b/src/Types/InvoicePaymentMadeEventObject.php @@ -0,0 +1,51 @@ +invoice = $values['invoice'] ?? null; + } + + /** + * @return ?Invoice + */ + public function getInvoice(): ?Invoice + { + return $this->invoice; + } + + /** + * @param ?Invoice $value + */ + public function setInvoice(?Invoice $value = null): self + { + $this->invoice = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/InvoicePublishedEvent.php b/src/Types/InvoicePublishedEvent.php new file mode 100644 index 00000000..c59a4948 --- /dev/null +++ b/src/Types/InvoicePublishedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?InvoicePublishedEventData + */ + public function getData(): ?InvoicePublishedEventData + { + return $this->data; + } + + /** + * @param ?InvoicePublishedEventData $value + */ + public function setData(?InvoicePublishedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/InvoicePublishedEventData.php b/src/Types/InvoicePublishedEventData.php new file mode 100644 index 00000000..79bdc5e3 --- /dev/null +++ b/src/Types/InvoicePublishedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?InvoicePublishedEventObject + */ + public function getObject(): ?InvoicePublishedEventObject + { + return $this->object; + } + + /** + * @param ?InvoicePublishedEventObject $value + */ + public function setObject(?InvoicePublishedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/InvoicePublishedEventObject.php b/src/Types/InvoicePublishedEventObject.php new file mode 100644 index 00000000..1c4c6bd6 --- /dev/null +++ b/src/Types/InvoicePublishedEventObject.php @@ -0,0 +1,51 @@ +invoice = $values['invoice'] ?? null; + } + + /** + * @return ?Invoice + */ + public function getInvoice(): ?Invoice + { + return $this->invoice; + } + + /** + * @param ?Invoice $value + */ + public function setInvoice(?Invoice $value = null): self + { + $this->invoice = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/InvoiceRefundedEvent.php b/src/Types/InvoiceRefundedEvent.php new file mode 100644 index 00000000..e3fbb515 --- /dev/null +++ b/src/Types/InvoiceRefundedEvent.php @@ -0,0 +1,155 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?InvoiceRefundedEventData + */ + public function getData(): ?InvoiceRefundedEventData + { + return $this->data; + } + + /** + * @param ?InvoiceRefundedEventData $value + */ + public function setData(?InvoiceRefundedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/InvoiceRefundedEventData.php b/src/Types/InvoiceRefundedEventData.php new file mode 100644 index 00000000..8314fd46 --- /dev/null +++ b/src/Types/InvoiceRefundedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?InvoiceRefundedEventObject + */ + public function getObject(): ?InvoiceRefundedEventObject + { + return $this->object; + } + + /** + * @param ?InvoiceRefundedEventObject $value + */ + public function setObject(?InvoiceRefundedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/InvoiceRefundedEventObject.php b/src/Types/InvoiceRefundedEventObject.php new file mode 100644 index 00000000..41c14d2d --- /dev/null +++ b/src/Types/InvoiceRefundedEventObject.php @@ -0,0 +1,51 @@ +invoice = $values['invoice'] ?? null; + } + + /** + * @return ?Invoice + */ + public function getInvoice(): ?Invoice + { + return $this->invoice; + } + + /** + * @param ?Invoice $value + */ + public function setInvoice(?Invoice $value = null): self + { + $this->invoice = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/InvoiceScheduledChargeFailedEvent.php b/src/Types/InvoiceScheduledChargeFailedEvent.php new file mode 100644 index 00000000..de4c6c36 --- /dev/null +++ b/src/Types/InvoiceScheduledChargeFailedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?InvoiceScheduledChargeFailedEventData + */ + public function getData(): ?InvoiceScheduledChargeFailedEventData + { + return $this->data; + } + + /** + * @param ?InvoiceScheduledChargeFailedEventData $value + */ + public function setData(?InvoiceScheduledChargeFailedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/InvoiceScheduledChargeFailedEventData.php b/src/Types/InvoiceScheduledChargeFailedEventData.php new file mode 100644 index 00000000..72b1e2a1 --- /dev/null +++ b/src/Types/InvoiceScheduledChargeFailedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?InvoiceScheduledChargeFailedEventObject + */ + public function getObject(): ?InvoiceScheduledChargeFailedEventObject + { + return $this->object; + } + + /** + * @param ?InvoiceScheduledChargeFailedEventObject $value + */ + public function setObject(?InvoiceScheduledChargeFailedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/InvoiceScheduledChargeFailedEventObject.php b/src/Types/InvoiceScheduledChargeFailedEventObject.php new file mode 100644 index 00000000..5f148129 --- /dev/null +++ b/src/Types/InvoiceScheduledChargeFailedEventObject.php @@ -0,0 +1,51 @@ +invoice = $values['invoice'] ?? null; + } + + /** + * @return ?Invoice + */ + public function getInvoice(): ?Invoice + { + return $this->invoice; + } + + /** + * @param ?Invoice $value + */ + public function setInvoice(?Invoice $value = null): self + { + $this->invoice = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/InvoiceUpdatedEvent.php b/src/Types/InvoiceUpdatedEvent.php new file mode 100644 index 00000000..f3c8325d --- /dev/null +++ b/src/Types/InvoiceUpdatedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?InvoiceUpdatedEventData + */ + public function getData(): ?InvoiceUpdatedEventData + { + return $this->data; + } + + /** + * @param ?InvoiceUpdatedEventData $value + */ + public function setData(?InvoiceUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/InvoiceUpdatedEventData.php b/src/Types/InvoiceUpdatedEventData.php new file mode 100644 index 00000000..57ea4642 --- /dev/null +++ b/src/Types/InvoiceUpdatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?InvoiceUpdatedEventObject + */ + public function getObject(): ?InvoiceUpdatedEventObject + { + return $this->object; + } + + /** + * @param ?InvoiceUpdatedEventObject $value + */ + public function setObject(?InvoiceUpdatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/InvoiceUpdatedEventObject.php b/src/Types/InvoiceUpdatedEventObject.php new file mode 100644 index 00000000..b9c243f0 --- /dev/null +++ b/src/Types/InvoiceUpdatedEventObject.php @@ -0,0 +1,51 @@ +invoice = $values['invoice'] ?? null; + } + + /** + * @return ?Invoice + */ + public function getInvoice(): ?Invoice + { + return $this->invoice; + } + + /** + * @param ?Invoice $value + */ + public function setInvoice(?Invoice $value = null): self + { + $this->invoice = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/JobCreatedEvent.php b/src/Types/JobCreatedEvent.php new file mode 100644 index 00000000..7598d90c --- /dev/null +++ b/src/Types/JobCreatedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?JobCreatedEventData + */ + public function getData(): ?JobCreatedEventData + { + return $this->data; + } + + /** + * @param ?JobCreatedEventData $value + */ + public function setData(?JobCreatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/JobCreatedEventData.php b/src/Types/JobCreatedEventData.php new file mode 100644 index 00000000..ba44f8d2 --- /dev/null +++ b/src/Types/JobCreatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?JobCreatedEventObject + */ + public function getObject(): ?JobCreatedEventObject + { + return $this->object; + } + + /** + * @param ?JobCreatedEventObject $value + */ + public function setObject(?JobCreatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/JobCreatedEventObject.php b/src/Types/JobCreatedEventObject.php new file mode 100644 index 00000000..8eaff6ee --- /dev/null +++ b/src/Types/JobCreatedEventObject.php @@ -0,0 +1,51 @@ +job = $values['job'] ?? null; + } + + /** + * @return ?Job + */ + public function getJob(): ?Job + { + return $this->job; + } + + /** + * @param ?Job $value + */ + public function setJob(?Job $value = null): self + { + $this->job = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/JobUpdatedEvent.php b/src/Types/JobUpdatedEvent.php new file mode 100644 index 00000000..1b9c500b --- /dev/null +++ b/src/Types/JobUpdatedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?JobUpdatedEventData + */ + public function getData(): ?JobUpdatedEventData + { + return $this->data; + } + + /** + * @param ?JobUpdatedEventData $value + */ + public function setData(?JobUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/JobUpdatedEventData.php b/src/Types/JobUpdatedEventData.php new file mode 100644 index 00000000..eb05633e --- /dev/null +++ b/src/Types/JobUpdatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?JobUpdatedEventObject + */ + public function getObject(): ?JobUpdatedEventObject + { + return $this->object; + } + + /** + * @param ?JobUpdatedEventObject $value + */ + public function setObject(?JobUpdatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/JobUpdatedEventObject.php b/src/Types/JobUpdatedEventObject.php new file mode 100644 index 00000000..22411033 --- /dev/null +++ b/src/Types/JobUpdatedEventObject.php @@ -0,0 +1,51 @@ +job = $values['job'] ?? null; + } + + /** + * @return ?Job + */ + public function getJob(): ?Job + { + return $this->job; + } + + /** + * @param ?Job $value + */ + public function setJob(?Job $value = null): self + { + $this->job = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LaborScheduledShiftCreatedEvent.php b/src/Types/LaborScheduledShiftCreatedEvent.php new file mode 100644 index 00000000..b8963f79 --- /dev/null +++ b/src/Types/LaborScheduledShiftCreatedEvent.php @@ -0,0 +1,179 @@ +merchantId = $values['merchantId'] ?? null; + $this->locationId = $values['locationId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getLocationId(): ?string + { + return $this->locationId; + } + + /** + * @param ?string $value + */ + public function setLocationId(?string $value = null): self + { + $this->locationId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?LaborScheduledShiftCreatedEventData + */ + public function getData(): ?LaborScheduledShiftCreatedEventData + { + return $this->data; + } + + /** + * @param ?LaborScheduledShiftCreatedEventData $value + */ + public function setData(?LaborScheduledShiftCreatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LaborScheduledShiftCreatedEventData.php b/src/Types/LaborScheduledShiftCreatedEventData.php new file mode 100644 index 00000000..b13ccc2b --- /dev/null +++ b/src/Types/LaborScheduledShiftCreatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?LaborScheduledShiftCreatedEventObject + */ + public function getObject(): ?LaborScheduledShiftCreatedEventObject + { + return $this->object; + } + + /** + * @param ?LaborScheduledShiftCreatedEventObject $value + */ + public function setObject(?LaborScheduledShiftCreatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LaborScheduledShiftCreatedEventObject.php b/src/Types/LaborScheduledShiftCreatedEventObject.php new file mode 100644 index 00000000..9383f310 --- /dev/null +++ b/src/Types/LaborScheduledShiftCreatedEventObject.php @@ -0,0 +1,51 @@ +scheduledShift = $values['scheduledShift'] ?? null; + } + + /** + * @return ?ScheduledShift + */ + public function getScheduledShift(): ?ScheduledShift + { + return $this->scheduledShift; + } + + /** + * @param ?ScheduledShift $value + */ + public function setScheduledShift(?ScheduledShift $value = null): self + { + $this->scheduledShift = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LaborScheduledShiftDeletedEvent.php b/src/Types/LaborScheduledShiftDeletedEvent.php new file mode 100644 index 00000000..59be22c2 --- /dev/null +++ b/src/Types/LaborScheduledShiftDeletedEvent.php @@ -0,0 +1,179 @@ +merchantId = $values['merchantId'] ?? null; + $this->locationId = $values['locationId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getLocationId(): ?string + { + return $this->locationId; + } + + /** + * @param ?string $value + */ + public function setLocationId(?string $value = null): self + { + $this->locationId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?LaborScheduledShiftDeletedEventData + */ + public function getData(): ?LaborScheduledShiftDeletedEventData + { + return $this->data; + } + + /** + * @param ?LaborScheduledShiftDeletedEventData $value + */ + public function setData(?LaborScheduledShiftDeletedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LaborScheduledShiftDeletedEventData.php b/src/Types/LaborScheduledShiftDeletedEventData.php new file mode 100644 index 00000000..b14909d1 --- /dev/null +++ b/src/Types/LaborScheduledShiftDeletedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->deleted = $values['deleted'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?bool + */ + public function getDeleted(): ?bool + { + return $this->deleted; + } + + /** + * @param ?bool $value + */ + public function setDeleted(?bool $value = null): self + { + $this->deleted = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LaborScheduledShiftPublishedEvent.php b/src/Types/LaborScheduledShiftPublishedEvent.php new file mode 100644 index 00000000..ba772046 --- /dev/null +++ b/src/Types/LaborScheduledShiftPublishedEvent.php @@ -0,0 +1,179 @@ +merchantId = $values['merchantId'] ?? null; + $this->locationId = $values['locationId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getLocationId(): ?string + { + return $this->locationId; + } + + /** + * @param ?string $value + */ + public function setLocationId(?string $value = null): self + { + $this->locationId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?LaborScheduledShiftPublishedEventData + */ + public function getData(): ?LaborScheduledShiftPublishedEventData + { + return $this->data; + } + + /** + * @param ?LaborScheduledShiftPublishedEventData $value + */ + public function setData(?LaborScheduledShiftPublishedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LaborScheduledShiftPublishedEventData.php b/src/Types/LaborScheduledShiftPublishedEventData.php new file mode 100644 index 00000000..219c3f61 --- /dev/null +++ b/src/Types/LaborScheduledShiftPublishedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?LaborScheduledShiftPublishedEventObject + */ + public function getObject(): ?LaborScheduledShiftPublishedEventObject + { + return $this->object; + } + + /** + * @param ?LaborScheduledShiftPublishedEventObject $value + */ + public function setObject(?LaborScheduledShiftPublishedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LaborScheduledShiftPublishedEventObject.php b/src/Types/LaborScheduledShiftPublishedEventObject.php new file mode 100644 index 00000000..a9ee6ba6 --- /dev/null +++ b/src/Types/LaborScheduledShiftPublishedEventObject.php @@ -0,0 +1,51 @@ +scheduledShift = $values['scheduledShift'] ?? null; + } + + /** + * @return ?ScheduledShift + */ + public function getScheduledShift(): ?ScheduledShift + { + return $this->scheduledShift; + } + + /** + * @param ?ScheduledShift $value + */ + public function setScheduledShift(?ScheduledShift $value = null): self + { + $this->scheduledShift = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LaborScheduledShiftUpdatedEvent.php b/src/Types/LaborScheduledShiftUpdatedEvent.php new file mode 100644 index 00000000..4f58312b --- /dev/null +++ b/src/Types/LaborScheduledShiftUpdatedEvent.php @@ -0,0 +1,179 @@ +merchantId = $values['merchantId'] ?? null; + $this->locationId = $values['locationId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getLocationId(): ?string + { + return $this->locationId; + } + + /** + * @param ?string $value + */ + public function setLocationId(?string $value = null): self + { + $this->locationId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?LaborScheduledShiftUpdatedEventData + */ + public function getData(): ?LaborScheduledShiftUpdatedEventData + { + return $this->data; + } + + /** + * @param ?LaborScheduledShiftUpdatedEventData $value + */ + public function setData(?LaborScheduledShiftUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LaborScheduledShiftUpdatedEventData.php b/src/Types/LaborScheduledShiftUpdatedEventData.php new file mode 100644 index 00000000..7e5b4741 --- /dev/null +++ b/src/Types/LaborScheduledShiftUpdatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?LaborScheduledShiftUpdatedEventObject + */ + public function getObject(): ?LaborScheduledShiftUpdatedEventObject + { + return $this->object; + } + + /** + * @param ?LaborScheduledShiftUpdatedEventObject $value + */ + public function setObject(?LaborScheduledShiftUpdatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LaborScheduledShiftUpdatedEventObject.php b/src/Types/LaborScheduledShiftUpdatedEventObject.php new file mode 100644 index 00000000..7fe2f843 --- /dev/null +++ b/src/Types/LaborScheduledShiftUpdatedEventObject.php @@ -0,0 +1,51 @@ +scheduledShift = $values['scheduledShift'] ?? null; + } + + /** + * @return ?ScheduledShift + */ + public function getScheduledShift(): ?ScheduledShift + { + return $this->scheduledShift; + } + + /** + * @param ?ScheduledShift $value + */ + public function setScheduledShift(?ScheduledShift $value = null): self + { + $this->scheduledShift = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LaborShiftCreatedEvent.php b/src/Types/LaborShiftCreatedEvent.php new file mode 100644 index 00000000..81aa5c57 --- /dev/null +++ b/src/Types/LaborShiftCreatedEvent.php @@ -0,0 +1,156 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?LaborShiftCreatedEventData + */ + public function getData(): ?LaborShiftCreatedEventData + { + return $this->data; + } + + /** + * @param ?LaborShiftCreatedEventData $value + */ + public function setData(?LaborShiftCreatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LaborShiftCreatedEventData.php b/src/Types/LaborShiftCreatedEventData.php new file mode 100644 index 00000000..33a8c50a --- /dev/null +++ b/src/Types/LaborShiftCreatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?LaborShiftCreatedEventObject + */ + public function getObject(): ?LaborShiftCreatedEventObject + { + return $this->object; + } + + /** + * @param ?LaborShiftCreatedEventObject $value + */ + public function setObject(?LaborShiftCreatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LaborShiftCreatedEventObject.php b/src/Types/LaborShiftCreatedEventObject.php new file mode 100644 index 00000000..e5e9f4d6 --- /dev/null +++ b/src/Types/LaborShiftCreatedEventObject.php @@ -0,0 +1,51 @@ +shift = $values['shift'] ?? null; + } + + /** + * @return ?Shift + */ + public function getShift(): ?Shift + { + return $this->shift; + } + + /** + * @param ?Shift $value + */ + public function setShift(?Shift $value = null): self + { + $this->shift = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LaborShiftDeletedEvent.php b/src/Types/LaborShiftDeletedEvent.php new file mode 100644 index 00000000..e17b86f7 --- /dev/null +++ b/src/Types/LaborShiftDeletedEvent.php @@ -0,0 +1,156 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?LaborShiftDeletedEventData + */ + public function getData(): ?LaborShiftDeletedEventData + { + return $this->data; + } + + /** + * @param ?LaborShiftDeletedEventData $value + */ + public function setData(?LaborShiftDeletedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LaborShiftDeletedEventData.php b/src/Types/LaborShiftDeletedEventData.php new file mode 100644 index 00000000..61da9a62 --- /dev/null +++ b/src/Types/LaborShiftDeletedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->deleted = $values['deleted'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?bool + */ + public function getDeleted(): ?bool + { + return $this->deleted; + } + + /** + * @param ?bool $value + */ + public function setDeleted(?bool $value = null): self + { + $this->deleted = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LaborShiftUpdatedEvent.php b/src/Types/LaborShiftUpdatedEvent.php new file mode 100644 index 00000000..e7533f49 --- /dev/null +++ b/src/Types/LaborShiftUpdatedEvent.php @@ -0,0 +1,156 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?LaborShiftUpdatedEventData + */ + public function getData(): ?LaborShiftUpdatedEventData + { + return $this->data; + } + + /** + * @param ?LaborShiftUpdatedEventData $value + */ + public function setData(?LaborShiftUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LaborShiftUpdatedEventData.php b/src/Types/LaborShiftUpdatedEventData.php new file mode 100644 index 00000000..b62e29e3 --- /dev/null +++ b/src/Types/LaborShiftUpdatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?LaborShiftUpdatedEventObject + */ + public function getObject(): ?LaborShiftUpdatedEventObject + { + return $this->object; + } + + /** + * @param ?LaborShiftUpdatedEventObject $value + */ + public function setObject(?LaborShiftUpdatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LaborShiftUpdatedEventObject.php b/src/Types/LaborShiftUpdatedEventObject.php new file mode 100644 index 00000000..035ed41c --- /dev/null +++ b/src/Types/LaborShiftUpdatedEventObject.php @@ -0,0 +1,51 @@ +shift = $values['shift'] ?? null; + } + + /** + * @return ?Shift + */ + public function getShift(): ?Shift + { + return $this->shift; + } + + /** + * @param ?Shift $value + */ + public function setShift(?Shift $value = null): self + { + $this->shift = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LaborTimecardCreatedEvent.php b/src/Types/LaborTimecardCreatedEvent.php new file mode 100644 index 00000000..ade3e920 --- /dev/null +++ b/src/Types/LaborTimecardCreatedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?LaborTimecardCreatedEventData + */ + public function getData(): ?LaborTimecardCreatedEventData + { + return $this->data; + } + + /** + * @param ?LaborTimecardCreatedEventData $value + */ + public function setData(?LaborTimecardCreatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LaborTimecardCreatedEventData.php b/src/Types/LaborTimecardCreatedEventData.php new file mode 100644 index 00000000..5dbad93a --- /dev/null +++ b/src/Types/LaborTimecardCreatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?LaborTimecardCreatedEventObject + */ + public function getObject(): ?LaborTimecardCreatedEventObject + { + return $this->object; + } + + /** + * @param ?LaborTimecardCreatedEventObject $value + */ + public function setObject(?LaborTimecardCreatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LaborTimecardCreatedEventObject.php b/src/Types/LaborTimecardCreatedEventObject.php new file mode 100644 index 00000000..7a613b52 --- /dev/null +++ b/src/Types/LaborTimecardCreatedEventObject.php @@ -0,0 +1,51 @@ +timecard = $values['timecard'] ?? null; + } + + /** + * @return ?Timecard + */ + public function getTimecard(): ?Timecard + { + return $this->timecard; + } + + /** + * @param ?Timecard $value + */ + public function setTimecard(?Timecard $value = null): self + { + $this->timecard = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LaborTimecardDeletedEvent.php b/src/Types/LaborTimecardDeletedEvent.php new file mode 100644 index 00000000..01d39355 --- /dev/null +++ b/src/Types/LaborTimecardDeletedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?LaborTimecardDeletedEventData + */ + public function getData(): ?LaborTimecardDeletedEventData + { + return $this->data; + } + + /** + * @param ?LaborTimecardDeletedEventData $value + */ + public function setData(?LaborTimecardDeletedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LaborTimecardDeletedEventData.php b/src/Types/LaborTimecardDeletedEventData.php new file mode 100644 index 00000000..bfca382a --- /dev/null +++ b/src/Types/LaborTimecardDeletedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->deleted = $values['deleted'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?bool + */ + public function getDeleted(): ?bool + { + return $this->deleted; + } + + /** + * @param ?bool $value + */ + public function setDeleted(?bool $value = null): self + { + $this->deleted = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LaborTimecardUpdatedEvent.php b/src/Types/LaborTimecardUpdatedEvent.php new file mode 100644 index 00000000..b695d439 --- /dev/null +++ b/src/Types/LaborTimecardUpdatedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?LaborTimecardUpdatedEventData + */ + public function getData(): ?LaborTimecardUpdatedEventData + { + return $this->data; + } + + /** + * @param ?LaborTimecardUpdatedEventData $value + */ + public function setData(?LaborTimecardUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LaborTimecardUpdatedEventData.php b/src/Types/LaborTimecardUpdatedEventData.php new file mode 100644 index 00000000..9b8f81b0 --- /dev/null +++ b/src/Types/LaborTimecardUpdatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?LaborTimecardUpdatedEventObject + */ + public function getObject(): ?LaborTimecardUpdatedEventObject + { + return $this->object; + } + + /** + * @param ?LaborTimecardUpdatedEventObject $value + */ + public function setObject(?LaborTimecardUpdatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LaborTimecardUpdatedEventObject.php b/src/Types/LaborTimecardUpdatedEventObject.php new file mode 100644 index 00000000..0d99dc65 --- /dev/null +++ b/src/Types/LaborTimecardUpdatedEventObject.php @@ -0,0 +1,51 @@ +timecard = $values['timecard'] ?? null; + } + + /** + * @return ?Timecard + */ + public function getTimecard(): ?Timecard + { + return $this->timecard; + } + + /** + * @param ?Timecard $value + */ + public function setTimecard(?Timecard $value = null): self + { + $this->timecard = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LocationCreatedEvent.php b/src/Types/LocationCreatedEvent.php new file mode 100644 index 00000000..78e60f9d --- /dev/null +++ b/src/Types/LocationCreatedEvent.php @@ -0,0 +1,179 @@ +merchantId = $values['merchantId'] ?? null; + $this->locationId = $values['locationId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getLocationId(): ?string + { + return $this->locationId; + } + + /** + * @param ?string $value + */ + public function setLocationId(?string $value = null): self + { + $this->locationId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?LocationCreatedEventData + */ + public function getData(): ?LocationCreatedEventData + { + return $this->data; + } + + /** + * @param ?LocationCreatedEventData $value + */ + public function setData(?LocationCreatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LocationCreatedEventData.php b/src/Types/LocationCreatedEventData.php new file mode 100644 index 00000000..5f25d540 --- /dev/null +++ b/src/Types/LocationCreatedEventData.php @@ -0,0 +1,76 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LocationCustomAttributeDefinitionOwnedCreatedEvent.php b/src/Types/LocationCustomAttributeDefinitionOwnedCreatedEvent.php new file mode 100644 index 00000000..de1e6c83 --- /dev/null +++ b/src/Types/LocationCustomAttributeDefinitionOwnedCreatedEvent.php @@ -0,0 +1,155 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LocationCustomAttributeDefinitionOwnedDeletedEvent.php b/src/Types/LocationCustomAttributeDefinitionOwnedDeletedEvent.php new file mode 100644 index 00000000..5ac1efab --- /dev/null +++ b/src/Types/LocationCustomAttributeDefinitionOwnedDeletedEvent.php @@ -0,0 +1,156 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LocationCustomAttributeDefinitionOwnedUpdatedEvent.php b/src/Types/LocationCustomAttributeDefinitionOwnedUpdatedEvent.php new file mode 100644 index 00000000..7c8458fc --- /dev/null +++ b/src/Types/LocationCustomAttributeDefinitionOwnedUpdatedEvent.php @@ -0,0 +1,156 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LocationCustomAttributeDefinitionVisibleCreatedEvent.php b/src/Types/LocationCustomAttributeDefinitionVisibleCreatedEvent.php new file mode 100644 index 00000000..9565c336 --- /dev/null +++ b/src/Types/LocationCustomAttributeDefinitionVisibleCreatedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LocationCustomAttributeDefinitionVisibleDeletedEvent.php b/src/Types/LocationCustomAttributeDefinitionVisibleDeletedEvent.php new file mode 100644 index 00000000..582746e5 --- /dev/null +++ b/src/Types/LocationCustomAttributeDefinitionVisibleDeletedEvent.php @@ -0,0 +1,158 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LocationCustomAttributeDefinitionVisibleUpdatedEvent.php b/src/Types/LocationCustomAttributeDefinitionVisibleUpdatedEvent.php new file mode 100644 index 00000000..d1914c3a --- /dev/null +++ b/src/Types/LocationCustomAttributeDefinitionVisibleUpdatedEvent.php @@ -0,0 +1,158 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LocationCustomAttributeOwnedDeletedEvent.php b/src/Types/LocationCustomAttributeOwnedDeletedEvent.php new file mode 100644 index 00000000..36a65a44 --- /dev/null +++ b/src/Types/LocationCustomAttributeOwnedDeletedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeEventData + */ + public function getData(): ?CustomAttributeEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeEventData $value + */ + public function setData(?CustomAttributeEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LocationCustomAttributeOwnedUpdatedEvent.php b/src/Types/LocationCustomAttributeOwnedUpdatedEvent.php new file mode 100644 index 00000000..b966ea02 --- /dev/null +++ b/src/Types/LocationCustomAttributeOwnedUpdatedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeEventData + */ + public function getData(): ?CustomAttributeEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeEventData $value + */ + public function setData(?CustomAttributeEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LocationCustomAttributeVisibleDeletedEvent.php b/src/Types/LocationCustomAttributeVisibleDeletedEvent.php new file mode 100644 index 00000000..286623fc --- /dev/null +++ b/src/Types/LocationCustomAttributeVisibleDeletedEvent.php @@ -0,0 +1,162 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeEventData + */ + public function getData(): ?CustomAttributeEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeEventData $value + */ + public function setData(?CustomAttributeEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LocationCustomAttributeVisibleUpdatedEvent.php b/src/Types/LocationCustomAttributeVisibleUpdatedEvent.php new file mode 100644 index 00000000..6712b49b --- /dev/null +++ b/src/Types/LocationCustomAttributeVisibleUpdatedEvent.php @@ -0,0 +1,162 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeEventData + */ + public function getData(): ?CustomAttributeEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeEventData $value + */ + public function setData(?CustomAttributeEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LocationSettingsUpdatedEvent.php b/src/Types/LocationSettingsUpdatedEvent.php new file mode 100644 index 00000000..bc6a532f --- /dev/null +++ b/src/Types/LocationSettingsUpdatedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?LocationSettingsUpdatedEventData + */ + public function getData(): ?LocationSettingsUpdatedEventData + { + return $this->data; + } + + /** + * @param ?LocationSettingsUpdatedEventData $value + */ + public function setData(?LocationSettingsUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LocationSettingsUpdatedEventData.php b/src/Types/LocationSettingsUpdatedEventData.php new file mode 100644 index 00000000..fb15bd7f --- /dev/null +++ b/src/Types/LocationSettingsUpdatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?LocationSettingsUpdatedEventObject + */ + public function getObject(): ?LocationSettingsUpdatedEventObject + { + return $this->object; + } + + /** + * @param ?LocationSettingsUpdatedEventObject $value + */ + public function setObject(?LocationSettingsUpdatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LocationSettingsUpdatedEventObject.php b/src/Types/LocationSettingsUpdatedEventObject.php new file mode 100644 index 00000000..529c6c61 --- /dev/null +++ b/src/Types/LocationSettingsUpdatedEventObject.php @@ -0,0 +1,51 @@ +locationSettings = $values['locationSettings'] ?? null; + } + + /** + * @return ?CheckoutLocationSettings + */ + public function getLocationSettings(): ?CheckoutLocationSettings + { + return $this->locationSettings; + } + + /** + * @param ?CheckoutLocationSettings $value + */ + public function setLocationSettings(?CheckoutLocationSettings $value = null): self + { + $this->locationSettings = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LocationUpdatedEvent.php b/src/Types/LocationUpdatedEvent.php new file mode 100644 index 00000000..475149a1 --- /dev/null +++ b/src/Types/LocationUpdatedEvent.php @@ -0,0 +1,179 @@ +merchantId = $values['merchantId'] ?? null; + $this->locationId = $values['locationId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getLocationId(): ?string + { + return $this->locationId; + } + + /** + * @param ?string $value + */ + public function setLocationId(?string $value = null): self + { + $this->locationId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?LocationUpdatedEventData + */ + public function getData(): ?LocationUpdatedEventData + { + return $this->data; + } + + /** + * @param ?LocationUpdatedEventData $value + */ + public function setData(?LocationUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LocationUpdatedEventData.php b/src/Types/LocationUpdatedEventData.php new file mode 100644 index 00000000..5b091f25 --- /dev/null +++ b/src/Types/LocationUpdatedEventData.php @@ -0,0 +1,76 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LoyaltyAccountCreatedEvent.php b/src/Types/LoyaltyAccountCreatedEvent.php new file mode 100644 index 00000000..383857f0 --- /dev/null +++ b/src/Types/LoyaltyAccountCreatedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?LoyaltyAccountCreatedEventData + */ + public function getData(): ?LoyaltyAccountCreatedEventData + { + return $this->data; + } + + /** + * @param ?LoyaltyAccountCreatedEventData $value + */ + public function setData(?LoyaltyAccountCreatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LoyaltyAccountCreatedEventData.php b/src/Types/LoyaltyAccountCreatedEventData.php new file mode 100644 index 00000000..8621867f --- /dev/null +++ b/src/Types/LoyaltyAccountCreatedEventData.php @@ -0,0 +1,104 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?LoyaltyAccountCreatedEventObject + */ + public function getObject(): ?LoyaltyAccountCreatedEventObject + { + return $this->object; + } + + /** + * @param ?LoyaltyAccountCreatedEventObject $value + */ + public function setObject(?LoyaltyAccountCreatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LoyaltyAccountCreatedEventObject.php b/src/Types/LoyaltyAccountCreatedEventObject.php new file mode 100644 index 00000000..51de648f --- /dev/null +++ b/src/Types/LoyaltyAccountCreatedEventObject.php @@ -0,0 +1,51 @@ +loyaltyAccount = $values['loyaltyAccount'] ?? null; + } + + /** + * @return ?LoyaltyAccount + */ + public function getLoyaltyAccount(): ?LoyaltyAccount + { + return $this->loyaltyAccount; + } + + /** + * @param ?LoyaltyAccount $value + */ + public function setLoyaltyAccount(?LoyaltyAccount $value = null): self + { + $this->loyaltyAccount = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LoyaltyAccountDeletedEvent.php b/src/Types/LoyaltyAccountDeletedEvent.php new file mode 100644 index 00000000..ed14677a --- /dev/null +++ b/src/Types/LoyaltyAccountDeletedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?LoyaltyAccountDeletedEventData + */ + public function getData(): ?LoyaltyAccountDeletedEventData + { + return $this->data; + } + + /** + * @param ?LoyaltyAccountDeletedEventData $value + */ + public function setData(?LoyaltyAccountDeletedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LoyaltyAccountDeletedEventData.php b/src/Types/LoyaltyAccountDeletedEventData.php new file mode 100644 index 00000000..babd8a67 --- /dev/null +++ b/src/Types/LoyaltyAccountDeletedEventData.php @@ -0,0 +1,104 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?LoyaltyAccountDeletedEventObject + */ + public function getObject(): ?LoyaltyAccountDeletedEventObject + { + return $this->object; + } + + /** + * @param ?LoyaltyAccountDeletedEventObject $value + */ + public function setObject(?LoyaltyAccountDeletedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LoyaltyAccountDeletedEventObject.php b/src/Types/LoyaltyAccountDeletedEventObject.php new file mode 100644 index 00000000..ea01b789 --- /dev/null +++ b/src/Types/LoyaltyAccountDeletedEventObject.php @@ -0,0 +1,51 @@ +loyaltyAccount = $values['loyaltyAccount'] ?? null; + } + + /** + * @return ?LoyaltyAccount + */ + public function getLoyaltyAccount(): ?LoyaltyAccount + { + return $this->loyaltyAccount; + } + + /** + * @param ?LoyaltyAccount $value + */ + public function setLoyaltyAccount(?LoyaltyAccount $value = null): self + { + $this->loyaltyAccount = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LoyaltyAccountUpdatedEvent.php b/src/Types/LoyaltyAccountUpdatedEvent.php new file mode 100644 index 00000000..38d36dd6 --- /dev/null +++ b/src/Types/LoyaltyAccountUpdatedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?LoyaltyAccountUpdatedEventData + */ + public function getData(): ?LoyaltyAccountUpdatedEventData + { + return $this->data; + } + + /** + * @param ?LoyaltyAccountUpdatedEventData $value + */ + public function setData(?LoyaltyAccountUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LoyaltyAccountUpdatedEventData.php b/src/Types/LoyaltyAccountUpdatedEventData.php new file mode 100644 index 00000000..e4fa332f --- /dev/null +++ b/src/Types/LoyaltyAccountUpdatedEventData.php @@ -0,0 +1,104 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?LoyaltyAccountUpdatedEventObject + */ + public function getObject(): ?LoyaltyAccountUpdatedEventObject + { + return $this->object; + } + + /** + * @param ?LoyaltyAccountUpdatedEventObject $value + */ + public function setObject(?LoyaltyAccountUpdatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LoyaltyAccountUpdatedEventObject.php b/src/Types/LoyaltyAccountUpdatedEventObject.php new file mode 100644 index 00000000..1f4aafcb --- /dev/null +++ b/src/Types/LoyaltyAccountUpdatedEventObject.php @@ -0,0 +1,51 @@ +loyaltyAccount = $values['loyaltyAccount'] ?? null; + } + + /** + * @return ?LoyaltyAccount + */ + public function getLoyaltyAccount(): ?LoyaltyAccount + { + return $this->loyaltyAccount; + } + + /** + * @param ?LoyaltyAccount $value + */ + public function setLoyaltyAccount(?LoyaltyAccount $value = null): self + { + $this->loyaltyAccount = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LoyaltyEventCreatedEvent.php b/src/Types/LoyaltyEventCreatedEvent.php new file mode 100644 index 00000000..c66e2d68 --- /dev/null +++ b/src/Types/LoyaltyEventCreatedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?LoyaltyEventCreatedEventData + */ + public function getData(): ?LoyaltyEventCreatedEventData + { + return $this->data; + } + + /** + * @param ?LoyaltyEventCreatedEventData $value + */ + public function setData(?LoyaltyEventCreatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LoyaltyEventCreatedEventData.php b/src/Types/LoyaltyEventCreatedEventData.php new file mode 100644 index 00000000..c1a8a9e7 --- /dev/null +++ b/src/Types/LoyaltyEventCreatedEventData.php @@ -0,0 +1,104 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?LoyaltyEventCreatedEventObject + */ + public function getObject(): ?LoyaltyEventCreatedEventObject + { + return $this->object; + } + + /** + * @param ?LoyaltyEventCreatedEventObject $value + */ + public function setObject(?LoyaltyEventCreatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LoyaltyEventCreatedEventObject.php b/src/Types/LoyaltyEventCreatedEventObject.php new file mode 100644 index 00000000..a1a9b02a --- /dev/null +++ b/src/Types/LoyaltyEventCreatedEventObject.php @@ -0,0 +1,51 @@ +loyaltyEvent = $values['loyaltyEvent'] ?? null; + } + + /** + * @return ?LoyaltyEvent + */ + public function getLoyaltyEvent(): ?LoyaltyEvent + { + return $this->loyaltyEvent; + } + + /** + * @param ?LoyaltyEvent $value + */ + public function setLoyaltyEvent(?LoyaltyEvent $value = null): self + { + $this->loyaltyEvent = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LoyaltyProgramCreatedEvent.php b/src/Types/LoyaltyProgramCreatedEvent.php new file mode 100644 index 00000000..7dc81d60 --- /dev/null +++ b/src/Types/LoyaltyProgramCreatedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?LoyaltyProgramCreatedEventData + */ + public function getData(): ?LoyaltyProgramCreatedEventData + { + return $this->data; + } + + /** + * @param ?LoyaltyProgramCreatedEventData $value + */ + public function setData(?LoyaltyProgramCreatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LoyaltyProgramCreatedEventData.php b/src/Types/LoyaltyProgramCreatedEventData.php new file mode 100644 index 00000000..bb628bee --- /dev/null +++ b/src/Types/LoyaltyProgramCreatedEventData.php @@ -0,0 +1,104 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?LoyaltyProgramCreatedEventObject + */ + public function getObject(): ?LoyaltyProgramCreatedEventObject + { + return $this->object; + } + + /** + * @param ?LoyaltyProgramCreatedEventObject $value + */ + public function setObject(?LoyaltyProgramCreatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LoyaltyProgramCreatedEventObject.php b/src/Types/LoyaltyProgramCreatedEventObject.php new file mode 100644 index 00000000..c2679cfd --- /dev/null +++ b/src/Types/LoyaltyProgramCreatedEventObject.php @@ -0,0 +1,54 @@ +loyaltyProgram = $values['loyaltyProgram'] ?? null; + } + + /** + * @return ?LoyaltyProgram + */ + public function getLoyaltyProgram(): ?LoyaltyProgram + { + return $this->loyaltyProgram; + } + + /** + * @param ?LoyaltyProgram $value + */ + public function setLoyaltyProgram(?LoyaltyProgram $value = null): self + { + $this->loyaltyProgram = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LoyaltyProgramRewardDefinition.php b/src/Types/LoyaltyProgramRewardDefinition.php deleted file mode 100644 index 57a00664..00000000 --- a/src/Types/LoyaltyProgramRewardDefinition.php +++ /dev/null @@ -1,208 +0,0 @@ - $scope - */ - #[JsonProperty('scope')] - private string $scope; - - /** - * 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 - * - * @var value-of $discountType - */ - #[JsonProperty('discount_type')] - private string $discountType; - - /** - * 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. - * - * @var ?string $percentageDiscount - */ - #[JsonProperty('percentage_discount')] - private ?string $percentageDiscount; - - /** - * 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. - * - * @var ?array $catalogObjectIds - */ - #[JsonProperty('catalog_object_ids'), ArrayType(['string'])] - private ?array $catalogObjectIds; - - /** - * 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. - * - * @var ?Money $fixedDiscountMoney - */ - #[JsonProperty('fixed_discount_money')] - private ?Money $fixedDiscountMoney; - - /** - * 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. - * - * @var ?Money $maxDiscountMoney - */ - #[JsonProperty('max_discount_money')] - private ?Money $maxDiscountMoney; - - /** - * @param array{ - * scope: value-of, - * discountType: value-of, - * percentageDiscount?: ?string, - * catalogObjectIds?: ?array, - * fixedDiscountMoney?: ?Money, - * maxDiscountMoney?: ?Money, - * } $values - */ - public function __construct( - array $values, - ) { - $this->scope = $values['scope']; - $this->discountType = $values['discountType']; - $this->percentageDiscount = $values['percentageDiscount'] ?? null; - $this->catalogObjectIds = $values['catalogObjectIds'] ?? null; - $this->fixedDiscountMoney = $values['fixedDiscountMoney'] ?? null; - $this->maxDiscountMoney = $values['maxDiscountMoney'] ?? null; - } - - /** - * @return value-of - */ - public function getScope(): string - { - return $this->scope; - } - - /** - * @param value-of $value - */ - public function setScope(string $value): self - { - $this->scope = $value; - return $this; - } - - /** - * @return value-of - */ - public function getDiscountType(): string - { - return $this->discountType; - } - - /** - * @param value-of $value - */ - public function setDiscountType(string $value): self - { - $this->discountType = $value; - return $this; - } - - /** - * @return ?string - */ - public function getPercentageDiscount(): ?string - { - return $this->percentageDiscount; - } - - /** - * @param ?string $value - */ - public function setPercentageDiscount(?string $value = null): self - { - $this->percentageDiscount = $value; - return $this; - } - - /** - * @return ?array - */ - public function getCatalogObjectIds(): ?array - { - return $this->catalogObjectIds; - } - - /** - * @param ?array $value - */ - public function setCatalogObjectIds(?array $value = null): self - { - $this->catalogObjectIds = $value; - return $this; - } - - /** - * @return ?Money - */ - public function getFixedDiscountMoney(): ?Money - { - return $this->fixedDiscountMoney; - } - - /** - * @param ?Money $value - */ - public function setFixedDiscountMoney(?Money $value = null): self - { - $this->fixedDiscountMoney = $value; - return $this; - } - - /** - * @return ?Money - */ - public function getMaxDiscountMoney(): ?Money - { - return $this->maxDiscountMoney; - } - - /** - * @param ?Money $value - */ - public function setMaxDiscountMoney(?Money $value = null): self - { - $this->maxDiscountMoney = $value; - return $this; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/LoyaltyProgramRewardDefinitionScope.php b/src/Types/LoyaltyProgramRewardDefinitionScope.php deleted file mode 100644 index 8b75c477..00000000 --- a/src/Types/LoyaltyProgramRewardDefinitionScope.php +++ /dev/null @@ -1,10 +0,0 @@ -id = $values['id'] ?? null; $this->points = $values['points']; $this->name = $values['name'] ?? null; - $this->definition = $values['definition'] ?? null; $this->createdAt = $values['createdAt'] ?? null; $this->pricingRuleReference = $values['pricingRuleReference']; } @@ -127,23 +116,6 @@ public function setName(?string $value = null): self return $this; } - /** - * @return ?LoyaltyProgramRewardDefinition - */ - public function getDefinition(): ?LoyaltyProgramRewardDefinition - { - return $this->definition; - } - - /** - * @param ?LoyaltyProgramRewardDefinition $value - */ - public function setDefinition(?LoyaltyProgramRewardDefinition $value = null): self - { - $this->definition = $value; - return $this; - } - /** * @return ?string */ diff --git a/src/Types/LoyaltyProgramUpdatedEvent.php b/src/Types/LoyaltyProgramUpdatedEvent.php new file mode 100644 index 00000000..c88d5d68 --- /dev/null +++ b/src/Types/LoyaltyProgramUpdatedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?LoyaltyProgramUpdatedEventData + */ + public function getData(): ?LoyaltyProgramUpdatedEventData + { + return $this->data; + } + + /** + * @param ?LoyaltyProgramUpdatedEventData $value + */ + public function setData(?LoyaltyProgramUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LoyaltyProgramUpdatedEventData.php b/src/Types/LoyaltyProgramUpdatedEventData.php new file mode 100644 index 00000000..3b4874c7 --- /dev/null +++ b/src/Types/LoyaltyProgramUpdatedEventData.php @@ -0,0 +1,104 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?LoyaltyProgramUpdatedEventObject + */ + public function getObject(): ?LoyaltyProgramUpdatedEventObject + { + return $this->object; + } + + /** + * @param ?LoyaltyProgramUpdatedEventObject $value + */ + public function setObject(?LoyaltyProgramUpdatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LoyaltyProgramUpdatedEventObject.php b/src/Types/LoyaltyProgramUpdatedEventObject.php new file mode 100644 index 00000000..70bc2f66 --- /dev/null +++ b/src/Types/LoyaltyProgramUpdatedEventObject.php @@ -0,0 +1,54 @@ +loyaltyProgram = $values['loyaltyProgram'] ?? null; + } + + /** + * @return ?LoyaltyProgram + */ + public function getLoyaltyProgram(): ?LoyaltyProgram + { + return $this->loyaltyProgram; + } + + /** + * @param ?LoyaltyProgram $value + */ + public function setLoyaltyProgram(?LoyaltyProgram $value = null): self + { + $this->loyaltyProgram = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LoyaltyPromotionCreatedEvent.php b/src/Types/LoyaltyPromotionCreatedEvent.php new file mode 100644 index 00000000..97e3d2ff --- /dev/null +++ b/src/Types/LoyaltyPromotionCreatedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?LoyaltyPromotionCreatedEventData + */ + public function getData(): ?LoyaltyPromotionCreatedEventData + { + return $this->data; + } + + /** + * @param ?LoyaltyPromotionCreatedEventData $value + */ + public function setData(?LoyaltyPromotionCreatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LoyaltyPromotionCreatedEventData.php b/src/Types/LoyaltyPromotionCreatedEventData.php new file mode 100644 index 00000000..5b49cc84 --- /dev/null +++ b/src/Types/LoyaltyPromotionCreatedEventData.php @@ -0,0 +1,104 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?LoyaltyPromotionCreatedEventObject + */ + public function getObject(): ?LoyaltyPromotionCreatedEventObject + { + return $this->object; + } + + /** + * @param ?LoyaltyPromotionCreatedEventObject $value + */ + public function setObject(?LoyaltyPromotionCreatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LoyaltyPromotionCreatedEventObject.php b/src/Types/LoyaltyPromotionCreatedEventObject.php new file mode 100644 index 00000000..4fec04f1 --- /dev/null +++ b/src/Types/LoyaltyPromotionCreatedEventObject.php @@ -0,0 +1,54 @@ +loyaltyPromotion = $values['loyaltyPromotion'] ?? null; + } + + /** + * @return ?LoyaltyPromotion + */ + public function getLoyaltyPromotion(): ?LoyaltyPromotion + { + return $this->loyaltyPromotion; + } + + /** + * @param ?LoyaltyPromotion $value + */ + public function setLoyaltyPromotion(?LoyaltyPromotion $value = null): self + { + $this->loyaltyPromotion = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LoyaltyPromotionUpdatedEvent.php b/src/Types/LoyaltyPromotionUpdatedEvent.php new file mode 100644 index 00000000..5979a2ad --- /dev/null +++ b/src/Types/LoyaltyPromotionUpdatedEvent.php @@ -0,0 +1,158 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?LoyaltyPromotionUpdatedEventData + */ + public function getData(): ?LoyaltyPromotionUpdatedEventData + { + return $this->data; + } + + /** + * @param ?LoyaltyPromotionUpdatedEventData $value + */ + public function setData(?LoyaltyPromotionUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LoyaltyPromotionUpdatedEventData.php b/src/Types/LoyaltyPromotionUpdatedEventData.php new file mode 100644 index 00000000..f66254ba --- /dev/null +++ b/src/Types/LoyaltyPromotionUpdatedEventData.php @@ -0,0 +1,104 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?LoyaltyPromotionUpdatedEventObject + */ + public function getObject(): ?LoyaltyPromotionUpdatedEventObject + { + return $this->object; + } + + /** + * @param ?LoyaltyPromotionUpdatedEventObject $value + */ + public function setObject(?LoyaltyPromotionUpdatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/LoyaltyPromotionUpdatedEventObject.php b/src/Types/LoyaltyPromotionUpdatedEventObject.php new file mode 100644 index 00000000..2a4f29ba --- /dev/null +++ b/src/Types/LoyaltyPromotionUpdatedEventObject.php @@ -0,0 +1,54 @@ +loyaltyPromotion = $values['loyaltyPromotion'] ?? null; + } + + /** + * @return ?LoyaltyPromotion + */ + public function getLoyaltyPromotion(): ?LoyaltyPromotion + { + return $this->loyaltyPromotion; + } + + /** + * @param ?LoyaltyPromotion $value + */ + public function setLoyaltyPromotion(?LoyaltyPromotion $value = null): self + { + $this->loyaltyPromotion = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/MerchantCustomAttributeDefinitionOwnedCreatedEvent.php b/src/Types/MerchantCustomAttributeDefinitionOwnedCreatedEvent.php new file mode 100644 index 00000000..647e8d03 --- /dev/null +++ b/src/Types/MerchantCustomAttributeDefinitionOwnedCreatedEvent.php @@ -0,0 +1,156 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/MerchantCustomAttributeDefinitionOwnedDeletedEvent.php b/src/Types/MerchantCustomAttributeDefinitionOwnedDeletedEvent.php new file mode 100644 index 00000000..7793bbc8 --- /dev/null +++ b/src/Types/MerchantCustomAttributeDefinitionOwnedDeletedEvent.php @@ -0,0 +1,156 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/MerchantCustomAttributeDefinitionOwnedUpdatedEvent.php b/src/Types/MerchantCustomAttributeDefinitionOwnedUpdatedEvent.php new file mode 100644 index 00000000..7b6acb06 --- /dev/null +++ b/src/Types/MerchantCustomAttributeDefinitionOwnedUpdatedEvent.php @@ -0,0 +1,156 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/MerchantCustomAttributeDefinitionVisibleCreatedEvent.php b/src/Types/MerchantCustomAttributeDefinitionVisibleCreatedEvent.php new file mode 100644 index 00000000..471db026 --- /dev/null +++ b/src/Types/MerchantCustomAttributeDefinitionVisibleCreatedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/MerchantCustomAttributeDefinitionVisibleDeletedEvent.php b/src/Types/MerchantCustomAttributeDefinitionVisibleDeletedEvent.php new file mode 100644 index 00000000..dbcefe89 --- /dev/null +++ b/src/Types/MerchantCustomAttributeDefinitionVisibleDeletedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/MerchantCustomAttributeDefinitionVisibleUpdatedEvent.php b/src/Types/MerchantCustomAttributeDefinitionVisibleUpdatedEvent.php new file mode 100644 index 00000000..7095adda --- /dev/null +++ b/src/Types/MerchantCustomAttributeDefinitionVisibleUpdatedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/MerchantCustomAttributeOwnedDeletedEvent.php b/src/Types/MerchantCustomAttributeOwnedDeletedEvent.php new file mode 100644 index 00000000..58d4b3d9 --- /dev/null +++ b/src/Types/MerchantCustomAttributeOwnedDeletedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeEventData + */ + public function getData(): ?CustomAttributeEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeEventData $value + */ + public function setData(?CustomAttributeEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/MerchantCustomAttributeOwnedUpdatedEvent.php b/src/Types/MerchantCustomAttributeOwnedUpdatedEvent.php new file mode 100644 index 00000000..44bba9a5 --- /dev/null +++ b/src/Types/MerchantCustomAttributeOwnedUpdatedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeEventData + */ + public function getData(): ?CustomAttributeEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeEventData $value + */ + public function setData(?CustomAttributeEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/MerchantCustomAttributeVisibleDeletedEvent.php b/src/Types/MerchantCustomAttributeVisibleDeletedEvent.php new file mode 100644 index 00000000..782686c3 --- /dev/null +++ b/src/Types/MerchantCustomAttributeVisibleDeletedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeEventData + */ + public function getData(): ?CustomAttributeEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeEventData $value + */ + public function setData(?CustomAttributeEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/MerchantCustomAttributeVisibleUpdatedEvent.php b/src/Types/MerchantCustomAttributeVisibleUpdatedEvent.php new file mode 100644 index 00000000..57db650e --- /dev/null +++ b/src/Types/MerchantCustomAttributeVisibleUpdatedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeEventData + */ + public function getData(): ?CustomAttributeEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeEventData $value + */ + public function setData(?CustomAttributeEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/MerchantSettingsUpdatedEvent.php b/src/Types/MerchantSettingsUpdatedEvent.php new file mode 100644 index 00000000..6f7ea355 --- /dev/null +++ b/src/Types/MerchantSettingsUpdatedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?MerchantSettingsUpdatedEventData + */ + public function getData(): ?MerchantSettingsUpdatedEventData + { + return $this->data; + } + + /** + * @param ?MerchantSettingsUpdatedEventData $value + */ + public function setData(?MerchantSettingsUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/MerchantSettingsUpdatedEventData.php b/src/Types/MerchantSettingsUpdatedEventData.php new file mode 100644 index 00000000..7c25993e --- /dev/null +++ b/src/Types/MerchantSettingsUpdatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?MerchantSettingsUpdatedEventObject + */ + public function getObject(): ?MerchantSettingsUpdatedEventObject + { + return $this->object; + } + + /** + * @param ?MerchantSettingsUpdatedEventObject $value + */ + public function setObject(?MerchantSettingsUpdatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/MerchantSettingsUpdatedEventObject.php b/src/Types/MerchantSettingsUpdatedEventObject.php new file mode 100644 index 00000000..89beca8f --- /dev/null +++ b/src/Types/MerchantSettingsUpdatedEventObject.php @@ -0,0 +1,51 @@ +merchantSettings = $values['merchantSettings'] ?? null; + } + + /** + * @return ?CheckoutMerchantSettings + */ + public function getMerchantSettings(): ?CheckoutMerchantSettings + { + return $this->merchantSettings; + } + + /** + * @param ?CheckoutMerchantSettings $value + */ + public function setMerchantSettings(?CheckoutMerchantSettings $value = null): self + { + $this->merchantSettings = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/OauthAuthorizationRevokedEvent.php b/src/Types/OauthAuthorizationRevokedEvent.php new file mode 100644 index 00000000..d218a719 --- /dev/null +++ b/src/Types/OauthAuthorizationRevokedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?OauthAuthorizationRevokedEventData + */ + public function getData(): ?OauthAuthorizationRevokedEventData + { + return $this->data; + } + + /** + * @param ?OauthAuthorizationRevokedEventData $value + */ + public function setData(?OauthAuthorizationRevokedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/OauthAuthorizationRevokedEventData.php b/src/Types/OauthAuthorizationRevokedEventData.php new file mode 100644 index 00000000..15194a24 --- /dev/null +++ b/src/Types/OauthAuthorizationRevokedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?OauthAuthorizationRevokedEventObject + */ + public function getObject(): ?OauthAuthorizationRevokedEventObject + { + return $this->object; + } + + /** + * @param ?OauthAuthorizationRevokedEventObject $value + */ + public function setObject(?OauthAuthorizationRevokedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/OauthAuthorizationRevokedEventObject.php b/src/Types/OauthAuthorizationRevokedEventObject.php new file mode 100644 index 00000000..5ddd9bbc --- /dev/null +++ b/src/Types/OauthAuthorizationRevokedEventObject.php @@ -0,0 +1,51 @@ +revocation = $values['revocation'] ?? null; + } + + /** + * @return ?OauthAuthorizationRevokedEventRevocationObject + */ + public function getRevocation(): ?OauthAuthorizationRevokedEventRevocationObject + { + return $this->revocation; + } + + /** + * @param ?OauthAuthorizationRevokedEventRevocationObject $value + */ + public function setRevocation(?OauthAuthorizationRevokedEventRevocationObject $value = null): self + { + $this->revocation = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/OauthAuthorizationRevokedEventRevocationObject.php b/src/Types/OauthAuthorizationRevokedEventRevocationObject.php new file mode 100644 index 00000000..1c01a61b --- /dev/null +++ b/src/Types/OauthAuthorizationRevokedEventRevocationObject.php @@ -0,0 +1,79 @@ + $revokerType + */ + #[JsonProperty('revoker_type')] + private ?string $revokerType; + + /** + * @param array{ + * revokedAt?: ?string, + * revokerType?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->revokedAt = $values['revokedAt'] ?? null; + $this->revokerType = $values['revokerType'] ?? null; + } + + /** + * @return ?string + */ + public function getRevokedAt(): ?string + { + return $this->revokedAt; + } + + /** + * @param ?string $value + */ + public function setRevokedAt(?string $value = null): self + { + $this->revokedAt = $value; + return $this; + } + + /** + * @return ?value-of + */ + public function getRevokerType(): ?string + { + return $this->revokerType; + } + + /** + * @param ?value-of $value + */ + public function setRevokerType(?string $value = null): self + { + $this->revokerType = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/OauthAuthorizationRevokedEventRevokerType.php b/src/Types/OauthAuthorizationRevokedEventRevokerType.php new file mode 100644 index 00000000..0867e0ce --- /dev/null +++ b/src/Types/OauthAuthorizationRevokedEventRevokerType.php @@ -0,0 +1,10 @@ + $state + */ + #[JsonProperty('state')] + private ?string $state; + + /** + * @var ?string $createdAt The timestamp for when the order was created, in RFC 3339 format. + */ + #[JsonProperty('created_at')] + private ?string $createdAt; + + /** + * @param array{ + * orderId?: ?string, + * version?: ?int, + * locationId?: ?string, + * state?: ?value-of, + * createdAt?: ?string, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->orderId = $values['orderId'] ?? null; + $this->version = $values['version'] ?? null; + $this->locationId = $values['locationId'] ?? null; + $this->state = $values['state'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + } + + /** + * @return ?string + */ + public function getOrderId(): ?string + { + return $this->orderId; + } + + /** + * @param ?string $value + */ + public function setOrderId(?string $value = null): self + { + $this->orderId = $value; + return $this; + } + + /** + * @return ?int + */ + public function getVersion(): ?int + { + return $this->version; + } + + /** + * @param ?int $value + */ + public function setVersion(?int $value = null): self + { + $this->version = $value; + return $this; + } + + /** + * @return ?string + */ + public function getLocationId(): ?string + { + return $this->locationId; + } + + /** + * @param ?string $value + */ + public function setLocationId(?string $value = null): self + { + $this->locationId = $value; + return $this; + } + + /** + * @return ?value-of + */ + public function getState(): ?string + { + return $this->state; + } + + /** + * @param ?value-of $value + */ + public function setState(?string $value = null): self + { + $this->state = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/OrderCreatedEvent.php b/src/Types/OrderCreatedEvent.php new file mode 100644 index 00000000..c6019714 --- /dev/null +++ b/src/Types/OrderCreatedEvent.php @@ -0,0 +1,157 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?OrderCreatedEventData + */ + public function getData(): ?OrderCreatedEventData + { + return $this->data; + } + + /** + * @param ?OrderCreatedEventData $value + */ + public function setData(?OrderCreatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/OrderCreatedEventData.php b/src/Types/OrderCreatedEventData.php new file mode 100644 index 00000000..8ababe91 --- /dev/null +++ b/src/Types/OrderCreatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?OrderCreatedObject + */ + public function getObject(): ?OrderCreatedObject + { + return $this->object; + } + + /** + * @param ?OrderCreatedObject $value + */ + public function setObject(?OrderCreatedObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/OrderCreatedObject.php b/src/Types/OrderCreatedObject.php new file mode 100644 index 00000000..ef1f582c --- /dev/null +++ b/src/Types/OrderCreatedObject.php @@ -0,0 +1,51 @@ +orderCreated = $values['orderCreated'] ?? null; + } + + /** + * @return ?OrderCreated + */ + public function getOrderCreated(): ?OrderCreated + { + return $this->orderCreated; + } + + /** + * @param ?OrderCreated $value + */ + public function setOrderCreated(?OrderCreated $value = null): self + { + $this->orderCreated = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/OrderCustomAttributeDefinitionOwnedCreatedEvent.php b/src/Types/OrderCustomAttributeDefinitionOwnedCreatedEvent.php new file mode 100644 index 00000000..c5376c6e --- /dev/null +++ b/src/Types/OrderCustomAttributeDefinitionOwnedCreatedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/OrderCustomAttributeDefinitionOwnedDeletedEvent.php b/src/Types/OrderCustomAttributeDefinitionOwnedDeletedEvent.php new file mode 100644 index 00000000..aa26456e --- /dev/null +++ b/src/Types/OrderCustomAttributeDefinitionOwnedDeletedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/OrderCustomAttributeDefinitionOwnedUpdatedEvent.php b/src/Types/OrderCustomAttributeDefinitionOwnedUpdatedEvent.php new file mode 100644 index 00000000..3b2e57c1 --- /dev/null +++ b/src/Types/OrderCustomAttributeDefinitionOwnedUpdatedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/OrderCustomAttributeDefinitionVisibleCreatedEvent.php b/src/Types/OrderCustomAttributeDefinitionVisibleCreatedEvent.php new file mode 100644 index 00000000..bdd18ba0 --- /dev/null +++ b/src/Types/OrderCustomAttributeDefinitionVisibleCreatedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/OrderCustomAttributeDefinitionVisibleDeletedEvent.php b/src/Types/OrderCustomAttributeDefinitionVisibleDeletedEvent.php new file mode 100644 index 00000000..f06bcec0 --- /dev/null +++ b/src/Types/OrderCustomAttributeDefinitionVisibleDeletedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/OrderCustomAttributeDefinitionVisibleUpdatedEvent.php b/src/Types/OrderCustomAttributeDefinitionVisibleUpdatedEvent.php new file mode 100644 index 00000000..09d657c7 --- /dev/null +++ b/src/Types/OrderCustomAttributeDefinitionVisibleUpdatedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeDefinitionEventData + */ + public function getData(): ?CustomAttributeDefinitionEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeDefinitionEventData $value + */ + public function setData(?CustomAttributeDefinitionEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/OrderCustomAttributeOwnedDeletedEvent.php b/src/Types/OrderCustomAttributeOwnedDeletedEvent.php new file mode 100644 index 00000000..8852c7c4 --- /dev/null +++ b/src/Types/OrderCustomAttributeOwnedDeletedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeEventData + */ + public function getData(): ?CustomAttributeEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeEventData $value + */ + public function setData(?CustomAttributeEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/OrderCustomAttributeOwnedUpdatedEvent.php b/src/Types/OrderCustomAttributeOwnedUpdatedEvent.php new file mode 100644 index 00000000..a27037fc --- /dev/null +++ b/src/Types/OrderCustomAttributeOwnedUpdatedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeEventData + */ + public function getData(): ?CustomAttributeEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeEventData $value + */ + public function setData(?CustomAttributeEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/OrderCustomAttributeVisibleDeletedEvent.php b/src/Types/OrderCustomAttributeVisibleDeletedEvent.php new file mode 100644 index 00000000..ab726d31 --- /dev/null +++ b/src/Types/OrderCustomAttributeVisibleDeletedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeEventData + */ + public function getData(): ?CustomAttributeEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeEventData $value + */ + public function setData(?CustomAttributeEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/OrderCustomAttributeVisibleUpdatedEvent.php b/src/Types/OrderCustomAttributeVisibleUpdatedEvent.php new file mode 100644 index 00000000..96061ad1 --- /dev/null +++ b/src/Types/OrderCustomAttributeVisibleUpdatedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?CustomAttributeEventData + */ + public function getData(): ?CustomAttributeEventData + { + return $this->data; + } + + /** + * @param ?CustomAttributeEventData $value + */ + public function setData(?CustomAttributeEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/OrderFulfillmentDeliveryDetailsScheduleType.php b/src/Types/OrderFulfillmentDeliveryDetailsScheduleType.php new file mode 100644 index 00000000..02d8cd47 --- /dev/null +++ b/src/Types/OrderFulfillmentDeliveryDetailsScheduleType.php @@ -0,0 +1,9 @@ + $state + */ + #[JsonProperty('state')] + private ?string $state; + + /** + * @var ?string $createdAt The timestamp for when the order was created, in RFC 3339 format. + */ + #[JsonProperty('created_at')] + private ?string $createdAt; + + /** + * @var ?string $updatedAt The timestamp for when the order was last updated, in RFC 3339 format. + */ + #[JsonProperty('updated_at')] + private ?string $updatedAt; + + /** + * @var ?array $fulfillmentUpdate The fulfillments that were updated with this version change. + */ + #[JsonProperty('fulfillment_update'), ArrayType([OrderFulfillmentUpdatedUpdate::class])] + private ?array $fulfillmentUpdate; + + /** + * @param array{ + * orderId?: ?string, + * version?: ?int, + * locationId?: ?string, + * state?: ?value-of, + * createdAt?: ?string, + * updatedAt?: ?string, + * fulfillmentUpdate?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->orderId = $values['orderId'] ?? null; + $this->version = $values['version'] ?? null; + $this->locationId = $values['locationId'] ?? null; + $this->state = $values['state'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->updatedAt = $values['updatedAt'] ?? null; + $this->fulfillmentUpdate = $values['fulfillmentUpdate'] ?? null; + } + + /** + * @return ?string + */ + public function getOrderId(): ?string + { + return $this->orderId; + } + + /** + * @param ?string $value + */ + public function setOrderId(?string $value = null): self + { + $this->orderId = $value; + return $this; + } + + /** + * @return ?int + */ + public function getVersion(): ?int + { + return $this->version; + } + + /** + * @param ?int $value + */ + public function setVersion(?int $value = null): self + { + $this->version = $value; + return $this; + } + + /** + * @return ?string + */ + public function getLocationId(): ?string + { + return $this->locationId; + } + + /** + * @param ?string $value + */ + public function setLocationId(?string $value = null): self + { + $this->locationId = $value; + return $this; + } + + /** + * @return ?value-of + */ + public function getState(): ?string + { + return $this->state; + } + + /** + * @param ?value-of $value + */ + public function setState(?string $value = null): self + { + $this->state = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?string + */ + public function getUpdatedAt(): ?string + { + return $this->updatedAt; + } + + /** + * @param ?string $value + */ + public function setUpdatedAt(?string $value = null): self + { + $this->updatedAt = $value; + return $this; + } + + /** + * @return ?array + */ + public function getFulfillmentUpdate(): ?array + { + return $this->fulfillmentUpdate; + } + + /** + * @param ?array $value + */ + public function setFulfillmentUpdate(?array $value = null): self + { + $this->fulfillmentUpdate = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/OrderFulfillmentUpdatedEvent.php b/src/Types/OrderFulfillmentUpdatedEvent.php new file mode 100644 index 00000000..24b1d267 --- /dev/null +++ b/src/Types/OrderFulfillmentUpdatedEvent.php @@ -0,0 +1,156 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?OrderFulfillmentUpdatedEventData + */ + public function getData(): ?OrderFulfillmentUpdatedEventData + { + return $this->data; + } + + /** + * @param ?OrderFulfillmentUpdatedEventData $value + */ + public function setData(?OrderFulfillmentUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/OrderFulfillmentUpdatedEventData.php b/src/Types/OrderFulfillmentUpdatedEventData.php new file mode 100644 index 00000000..faefec77 --- /dev/null +++ b/src/Types/OrderFulfillmentUpdatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?OrderFulfillmentUpdatedObject + */ + public function getObject(): ?OrderFulfillmentUpdatedObject + { + return $this->object; + } + + /** + * @param ?OrderFulfillmentUpdatedObject $value + */ + public function setObject(?OrderFulfillmentUpdatedObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/OrderFulfillmentUpdatedObject.php b/src/Types/OrderFulfillmentUpdatedObject.php new file mode 100644 index 00000000..6911f8a6 --- /dev/null +++ b/src/Types/OrderFulfillmentUpdatedObject.php @@ -0,0 +1,51 @@ +orderFulfillmentUpdated = $values['orderFulfillmentUpdated'] ?? null; + } + + /** + * @return ?OrderFulfillmentUpdated + */ + public function getOrderFulfillmentUpdated(): ?OrderFulfillmentUpdated + { + return $this->orderFulfillmentUpdated; + } + + /** + * @param ?OrderFulfillmentUpdated $value + */ + public function setOrderFulfillmentUpdated(?OrderFulfillmentUpdated $value = null): self + { + $this->orderFulfillmentUpdated = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/OrderFulfillmentUpdatedUpdate.php b/src/Types/OrderFulfillmentUpdatedUpdate.php new file mode 100644 index 00000000..32d71c74 --- /dev/null +++ b/src/Types/OrderFulfillmentUpdatedUpdate.php @@ -0,0 +1,110 @@ + $oldState + */ + #[JsonProperty('old_state')] + private ?string $oldState; + + /** + * 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). + * + * @var ?value-of $newState + */ + #[JsonProperty('new_state')] + private ?string $newState; + + /** + * @param array{ + * fulfillmentUid?: ?string, + * oldState?: ?value-of, + * newState?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->fulfillmentUid = $values['fulfillmentUid'] ?? null; + $this->oldState = $values['oldState'] ?? null; + $this->newState = $values['newState'] ?? null; + } + + /** + * @return ?string + */ + public function getFulfillmentUid(): ?string + { + return $this->fulfillmentUid; + } + + /** + * @param ?string $value + */ + public function setFulfillmentUid(?string $value = null): self + { + $this->fulfillmentUid = $value; + return $this; + } + + /** + * @return ?value-of + */ + public function getOldState(): ?string + { + return $this->oldState; + } + + /** + * @param ?value-of $value + */ + public function setOldState(?string $value = null): self + { + $this->oldState = $value; + return $this; + } + + /** + * @return ?value-of + */ + public function getNewState(): ?string + { + return $this->newState; + } + + /** + * @param ?value-of $value + */ + public function setNewState(?string $value = null): self + { + $this->newState = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/OrderUpdated.php b/src/Types/OrderUpdated.php new file mode 100644 index 00000000..8fd4a347 --- /dev/null +++ b/src/Types/OrderUpdated.php @@ -0,0 +1,185 @@ + $state + */ + #[JsonProperty('state')] + private ?string $state; + + /** + * @var ?string $createdAt The timestamp for when the order was created, in RFC 3339 format. + */ + #[JsonProperty('created_at')] + private ?string $createdAt; + + /** + * @var ?string $updatedAt The timestamp for when the order was last updated, in RFC 3339 format. + */ + #[JsonProperty('updated_at')] + private ?string $updatedAt; + + /** + * @param array{ + * orderId?: ?string, + * version?: ?int, + * locationId?: ?string, + * state?: ?value-of, + * createdAt?: ?string, + * updatedAt?: ?string, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->orderId = $values['orderId'] ?? null; + $this->version = $values['version'] ?? null; + $this->locationId = $values['locationId'] ?? null; + $this->state = $values['state'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->updatedAt = $values['updatedAt'] ?? null; + } + + /** + * @return ?string + */ + public function getOrderId(): ?string + { + return $this->orderId; + } + + /** + * @param ?string $value + */ + public function setOrderId(?string $value = null): self + { + $this->orderId = $value; + return $this; + } + + /** + * @return ?int + */ + public function getVersion(): ?int + { + return $this->version; + } + + /** + * @param ?int $value + */ + public function setVersion(?int $value = null): self + { + $this->version = $value; + return $this; + } + + /** + * @return ?string + */ + public function getLocationId(): ?string + { + return $this->locationId; + } + + /** + * @param ?string $value + */ + public function setLocationId(?string $value = null): self + { + $this->locationId = $value; + return $this; + } + + /** + * @return ?value-of + */ + public function getState(): ?string + { + return $this->state; + } + + /** + * @param ?value-of $value + */ + public function setState(?string $value = null): self + { + $this->state = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?string + */ + public function getUpdatedAt(): ?string + { + return $this->updatedAt; + } + + /** + * @param ?string $value + */ + public function setUpdatedAt(?string $value = null): self + { + $this->updatedAt = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/OrderUpdatedEvent.php b/src/Types/OrderUpdatedEvent.php new file mode 100644 index 00000000..cd87eb0b --- /dev/null +++ b/src/Types/OrderUpdatedEvent.php @@ -0,0 +1,156 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?OrderUpdatedEventData + */ + public function getData(): ?OrderUpdatedEventData + { + return $this->data; + } + + /** + * @param ?OrderUpdatedEventData $value + */ + public function setData(?OrderUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/OrderUpdatedEventData.php b/src/Types/OrderUpdatedEventData.php new file mode 100644 index 00000000..37c73117 --- /dev/null +++ b/src/Types/OrderUpdatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?OrderUpdatedObject + */ + public function getObject(): ?OrderUpdatedObject + { + return $this->object; + } + + /** + * @param ?OrderUpdatedObject $value + */ + public function setObject(?OrderUpdatedObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/OrderUpdatedObject.php b/src/Types/OrderUpdatedObject.php new file mode 100644 index 00000000..40d7dd5a --- /dev/null +++ b/src/Types/OrderUpdatedObject.php @@ -0,0 +1,51 @@ +orderUpdated = $values['orderUpdated'] ?? null; + } + + /** + * @return ?OrderUpdated + */ + public function getOrderUpdated(): ?OrderUpdated + { + return $this->orderUpdated; + } + + /** + * @param ?OrderUpdated $value + */ + public function setOrderUpdated(?OrderUpdated $value = null): self + { + $this->orderUpdated = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/PaymentCreatedEvent.php b/src/Types/PaymentCreatedEvent.php new file mode 100644 index 00000000..60e0dd33 --- /dev/null +++ b/src/Types/PaymentCreatedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?PaymentCreatedEventData + */ + public function getData(): ?PaymentCreatedEventData + { + return $this->data; + } + + /** + * @param ?PaymentCreatedEventData $value + */ + public function setData(?PaymentCreatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/PaymentCreatedEventData.php b/src/Types/PaymentCreatedEventData.php new file mode 100644 index 00000000..2456f333 --- /dev/null +++ b/src/Types/PaymentCreatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?PaymentCreatedEventObject + */ + public function getObject(): ?PaymentCreatedEventObject + { + return $this->object; + } + + /** + * @param ?PaymentCreatedEventObject $value + */ + public function setObject(?PaymentCreatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/PaymentCreatedEventObject.php b/src/Types/PaymentCreatedEventObject.php new file mode 100644 index 00000000..eb3bfe4a --- /dev/null +++ b/src/Types/PaymentCreatedEventObject.php @@ -0,0 +1,51 @@ +payment = $values['payment'] ?? null; + } + + /** + * @return ?Payment + */ + public function getPayment(): ?Payment + { + return $this->payment; + } + + /** + * @param ?Payment $value + */ + public function setPayment(?Payment $value = null): self + { + $this->payment = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/PaymentUpdatedEvent.php b/src/Types/PaymentUpdatedEvent.php new file mode 100644 index 00000000..6abc3782 --- /dev/null +++ b/src/Types/PaymentUpdatedEvent.php @@ -0,0 +1,156 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?PaymentUpdatedEventData + */ + public function getData(): ?PaymentUpdatedEventData + { + return $this->data; + } + + /** + * @param ?PaymentUpdatedEventData $value + */ + public function setData(?PaymentUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/PaymentUpdatedEventData.php b/src/Types/PaymentUpdatedEventData.php new file mode 100644 index 00000000..96eed867 --- /dev/null +++ b/src/Types/PaymentUpdatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?PaymentUpdatedEventObject + */ + public function getObject(): ?PaymentUpdatedEventObject + { + return $this->object; + } + + /** + * @param ?PaymentUpdatedEventObject $value + */ + public function setObject(?PaymentUpdatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/PaymentUpdatedEventObject.php b/src/Types/PaymentUpdatedEventObject.php new file mode 100644 index 00000000..72a23b11 --- /dev/null +++ b/src/Types/PaymentUpdatedEventObject.php @@ -0,0 +1,51 @@ +payment = $values['payment'] ?? null; + } + + /** + * @return ?Payment + */ + public function getPayment(): ?Payment + { + return $this->payment; + } + + /** + * @param ?Payment $value + */ + public function setPayment(?Payment $value = null): self + { + $this->payment = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/PayoutFailedEvent.php b/src/Types/PayoutFailedEvent.php new file mode 100644 index 00000000..796f87d6 --- /dev/null +++ b/src/Types/PayoutFailedEvent.php @@ -0,0 +1,179 @@ +merchantId = $values['merchantId'] ?? null; + $this->locationId = $values['locationId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getLocationId(): ?string + { + return $this->locationId; + } + + /** + * @param ?string $value + */ + public function setLocationId(?string $value = null): self + { + $this->locationId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?PayoutFailedEventData + */ + public function getData(): ?PayoutFailedEventData + { + return $this->data; + } + + /** + * @param ?PayoutFailedEventData $value + */ + public function setData(?PayoutFailedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/PayoutFailedEventData.php b/src/Types/PayoutFailedEventData.php new file mode 100644 index 00000000..195480bd --- /dev/null +++ b/src/Types/PayoutFailedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?PayoutFailedEventObject + */ + public function getObject(): ?PayoutFailedEventObject + { + return $this->object; + } + + /** + * @param ?PayoutFailedEventObject $value + */ + public function setObject(?PayoutFailedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/PayoutFailedEventObject.php b/src/Types/PayoutFailedEventObject.php new file mode 100644 index 00000000..0dac3bd4 --- /dev/null +++ b/src/Types/PayoutFailedEventObject.php @@ -0,0 +1,51 @@ +payout = $values['payout'] ?? null; + } + + /** + * @return ?Payout + */ + public function getPayout(): ?Payout + { + return $this->payout; + } + + /** + * @param ?Payout $value + */ + public function setPayout(?Payout $value = null): self + { + $this->payout = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/PayoutPaidEvent.php b/src/Types/PayoutPaidEvent.php new file mode 100644 index 00000000..2c284874 --- /dev/null +++ b/src/Types/PayoutPaidEvent.php @@ -0,0 +1,179 @@ +merchantId = $values['merchantId'] ?? null; + $this->locationId = $values['locationId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getLocationId(): ?string + { + return $this->locationId; + } + + /** + * @param ?string $value + */ + public function setLocationId(?string $value = null): self + { + $this->locationId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?PayoutPaidEventData + */ + public function getData(): ?PayoutPaidEventData + { + return $this->data; + } + + /** + * @param ?PayoutPaidEventData $value + */ + public function setData(?PayoutPaidEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/PayoutPaidEventData.php b/src/Types/PayoutPaidEventData.php new file mode 100644 index 00000000..70502d6f --- /dev/null +++ b/src/Types/PayoutPaidEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?PayoutPaidEventObject + */ + public function getObject(): ?PayoutPaidEventObject + { + return $this->object; + } + + /** + * @param ?PayoutPaidEventObject $value + */ + public function setObject(?PayoutPaidEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/PayoutPaidEventObject.php b/src/Types/PayoutPaidEventObject.php new file mode 100644 index 00000000..0b311af0 --- /dev/null +++ b/src/Types/PayoutPaidEventObject.php @@ -0,0 +1,51 @@ +payout = $values['payout'] ?? null; + } + + /** + * @return ?Payout + */ + public function getPayout(): ?Payout + { + return $this->payout; + } + + /** + * @param ?Payout $value + */ + public function setPayout(?Payout $value = null): self + { + $this->payout = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/PayoutSentEvent.php b/src/Types/PayoutSentEvent.php new file mode 100644 index 00000000..3934b954 --- /dev/null +++ b/src/Types/PayoutSentEvent.php @@ -0,0 +1,179 @@ +merchantId = $values['merchantId'] ?? null; + $this->locationId = $values['locationId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getLocationId(): ?string + { + return $this->locationId; + } + + /** + * @param ?string $value + */ + public function setLocationId(?string $value = null): self + { + $this->locationId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?PayoutSentEventData + */ + public function getData(): ?PayoutSentEventData + { + return $this->data; + } + + /** + * @param ?PayoutSentEventData $value + */ + public function setData(?PayoutSentEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/PayoutSentEventData.php b/src/Types/PayoutSentEventData.php new file mode 100644 index 00000000..fff77168 --- /dev/null +++ b/src/Types/PayoutSentEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?PayoutSentEventObject + */ + public function getObject(): ?PayoutSentEventObject + { + return $this->object; + } + + /** + * @param ?PayoutSentEventObject $value + */ + public function setObject(?PayoutSentEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/PayoutSentEventObject.php b/src/Types/PayoutSentEventObject.php new file mode 100644 index 00000000..6c61374a --- /dev/null +++ b/src/Types/PayoutSentEventObject.php @@ -0,0 +1,51 @@ +payout = $values['payout'] ?? null; + } + + /** + * @return ?Payout + */ + public function getPayout(): ?Payout + { + return $this->payout; + } + + /** + * @param ?Payout $value + */ + public function setPayout(?Payout $value = null): self + { + $this->payout = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/Refund.php b/src/Types/Refund.php index e77cf1e2..5f505cc9 100644 --- a/src/Types/Refund.php +++ b/src/Types/Refund.php @@ -30,10 +30,10 @@ class Refund extends JsonSerializableType private ?string $transactionId; /** - * @var string $tenderId The ID of the refunded tender. + * @var ?string $tenderId The ID of the refunded tender. */ #[JsonProperty('tender_id')] - private string $tenderId; + private ?string $tenderId; /** * @var ?string $createdAt The timestamp for when the refund was created, in RFC 3339 format. @@ -82,11 +82,11 @@ class Refund extends JsonSerializableType * @param array{ * id: string, * locationId: string, - * tenderId: string, * reason: string, * amountMoney: Money, * status: value-of, * transactionId?: ?string, + * tenderId?: ?string, * createdAt?: ?string, * processingFeeMoney?: ?Money, * additionalRecipients?: ?array, @@ -98,7 +98,7 @@ public function __construct( $this->id = $values['id']; $this->locationId = $values['locationId']; $this->transactionId = $values['transactionId'] ?? null; - $this->tenderId = $values['tenderId']; + $this->tenderId = $values['tenderId'] ?? null; $this->createdAt = $values['createdAt'] ?? null; $this->reason = $values['reason']; $this->amountMoney = $values['amountMoney']; @@ -159,17 +159,17 @@ public function setTransactionId(?string $value = null): self } /** - * @return string + * @return ?string */ - public function getTenderId(): string + public function getTenderId(): ?string { return $this->tenderId; } /** - * @param string $value + * @param ?string $value */ - public function setTenderId(string $value): self + public function setTenderId(?string $value = null): self { $this->tenderId = $value; return $this; diff --git a/src/Types/RefundCreatedEvent.php b/src/Types/RefundCreatedEvent.php new file mode 100644 index 00000000..0a3ccc29 --- /dev/null +++ b/src/Types/RefundCreatedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?RefundCreatedEventData + */ + public function getData(): ?RefundCreatedEventData + { + return $this->data; + } + + /** + * @param ?RefundCreatedEventData $value + */ + public function setData(?RefundCreatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/RefundCreatedEventData.php b/src/Types/RefundCreatedEventData.php new file mode 100644 index 00000000..32ab6515 --- /dev/null +++ b/src/Types/RefundCreatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?RefundCreatedEventObject + */ + public function getObject(): ?RefundCreatedEventObject + { + return $this->object; + } + + /** + * @param ?RefundCreatedEventObject $value + */ + public function setObject(?RefundCreatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/RefundCreatedEventObject.php b/src/Types/RefundCreatedEventObject.php new file mode 100644 index 00000000..296e6c45 --- /dev/null +++ b/src/Types/RefundCreatedEventObject.php @@ -0,0 +1,51 @@ +refund = $values['refund'] ?? null; + } + + /** + * @return ?PaymentRefund + */ + public function getRefund(): ?PaymentRefund + { + return $this->refund; + } + + /** + * @param ?PaymentRefund $value + */ + public function setRefund(?PaymentRefund $value = null): self + { + $this->refund = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/RefundUpdatedEvent.php b/src/Types/RefundUpdatedEvent.php new file mode 100644 index 00000000..27284d8c --- /dev/null +++ b/src/Types/RefundUpdatedEvent.php @@ -0,0 +1,155 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?RefundUpdatedEventData + */ + public function getData(): ?RefundUpdatedEventData + { + return $this->data; + } + + /** + * @param ?RefundUpdatedEventData $value + */ + public function setData(?RefundUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/RefundUpdatedEventData.php b/src/Types/RefundUpdatedEventData.php new file mode 100644 index 00000000..bbead354 --- /dev/null +++ b/src/Types/RefundUpdatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?RefundUpdatedEventObject + */ + public function getObject(): ?RefundUpdatedEventObject + { + return $this->object; + } + + /** + * @param ?RefundUpdatedEventObject $value + */ + public function setObject(?RefundUpdatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/RefundUpdatedEventObject.php b/src/Types/RefundUpdatedEventObject.php new file mode 100644 index 00000000..6d47328a --- /dev/null +++ b/src/Types/RefundUpdatedEventObject.php @@ -0,0 +1,51 @@ +refund = $values['refund'] ?? null; + } + + /** + * @return ?PaymentRefund + */ + public function getRefund(): ?PaymentRefund + { + return $this->refund; + } + + /** + * @param ?PaymentRefund $value + */ + public function setRefund(?PaymentRefund $value = null): self + { + $this->refund = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/SubscriptionCreatedEvent.php b/src/Types/SubscriptionCreatedEvent.php new file mode 100644 index 00000000..6e586695 --- /dev/null +++ b/src/Types/SubscriptionCreatedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?SubscriptionCreatedEventData + */ + public function getData(): ?SubscriptionCreatedEventData + { + return $this->data; + } + + /** + * @param ?SubscriptionCreatedEventData $value + */ + public function setData(?SubscriptionCreatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/SubscriptionCreatedEventData.php b/src/Types/SubscriptionCreatedEventData.php new file mode 100644 index 00000000..0f1a4dee --- /dev/null +++ b/src/Types/SubscriptionCreatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?SubscriptionCreatedEventObject + */ + public function getObject(): ?SubscriptionCreatedEventObject + { + return $this->object; + } + + /** + * @param ?SubscriptionCreatedEventObject $value + */ + public function setObject(?SubscriptionCreatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/SubscriptionCreatedEventObject.php b/src/Types/SubscriptionCreatedEventObject.php new file mode 100644 index 00000000..08a421d2 --- /dev/null +++ b/src/Types/SubscriptionCreatedEventObject.php @@ -0,0 +1,51 @@ +subscription = $values['subscription'] ?? null; + } + + /** + * @return ?Subscription + */ + public function getSubscription(): ?Subscription + { + return $this->subscription; + } + + /** + * @param ?Subscription $value + */ + public function setSubscription(?Subscription $value = null): self + { + $this->subscription = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/SubscriptionUpdatedEvent.php b/src/Types/SubscriptionUpdatedEvent.php new file mode 100644 index 00000000..0b48cd96 --- /dev/null +++ b/src/Types/SubscriptionUpdatedEvent.php @@ -0,0 +1,156 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?SubscriptionUpdatedEventData + */ + public function getData(): ?SubscriptionUpdatedEventData + { + return $this->data; + } + + /** + * @param ?SubscriptionUpdatedEventData $value + */ + public function setData(?SubscriptionUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/SubscriptionUpdatedEventData.php b/src/Types/SubscriptionUpdatedEventData.php new file mode 100644 index 00000000..f3987ee9 --- /dev/null +++ b/src/Types/SubscriptionUpdatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?SubscriptionUpdatedEventObject + */ + public function getObject(): ?SubscriptionUpdatedEventObject + { + return $this->object; + } + + /** + * @param ?SubscriptionUpdatedEventObject $value + */ + public function setObject(?SubscriptionUpdatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/SubscriptionUpdatedEventObject.php b/src/Types/SubscriptionUpdatedEventObject.php new file mode 100644 index 00000000..ddee0f1a --- /dev/null +++ b/src/Types/SubscriptionUpdatedEventObject.php @@ -0,0 +1,51 @@ +subscription = $values['subscription'] ?? null; + } + + /** + * @return ?Subscription + */ + public function getSubscription(): ?Subscription + { + return $this->subscription; + } + + /** + * @param ?Subscription $value + */ + public function setSubscription(?Subscription $value = null): self + { + $this->subscription = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/TeamMemberCreatedEvent.php b/src/Types/TeamMemberCreatedEvent.php new file mode 100644 index 00000000..847edb12 --- /dev/null +++ b/src/Types/TeamMemberCreatedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?TeamMemberCreatedEventData + */ + public function getData(): ?TeamMemberCreatedEventData + { + return $this->data; + } + + /** + * @param ?TeamMemberCreatedEventData $value + */ + public function setData(?TeamMemberCreatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/TeamMemberCreatedEventData.php b/src/Types/TeamMemberCreatedEventData.php new file mode 100644 index 00000000..5cb12571 --- /dev/null +++ b/src/Types/TeamMemberCreatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?TeamMemberCreatedEventObject + */ + public function getObject(): ?TeamMemberCreatedEventObject + { + return $this->object; + } + + /** + * @param ?TeamMemberCreatedEventObject $value + */ + public function setObject(?TeamMemberCreatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/TeamMemberCreatedEventObject.php b/src/Types/TeamMemberCreatedEventObject.php new file mode 100644 index 00000000..cbb827af --- /dev/null +++ b/src/Types/TeamMemberCreatedEventObject.php @@ -0,0 +1,51 @@ +teamMember = $values['teamMember'] ?? null; + } + + /** + * @return ?TeamMember + */ + public function getTeamMember(): ?TeamMember + { + return $this->teamMember; + } + + /** + * @param ?TeamMember $value + */ + public function setTeamMember(?TeamMember $value = null): self + { + $this->teamMember = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/TeamMemberInvitationStatus.php b/src/Types/TeamMemberInvitationStatus.php new file mode 100644 index 00000000..afa6ef5a --- /dev/null +++ b/src/Types/TeamMemberInvitationStatus.php @@ -0,0 +1,10 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?TeamMemberUpdatedEventData + */ + public function getData(): ?TeamMemberUpdatedEventData + { + return $this->data; + } + + /** + * @param ?TeamMemberUpdatedEventData $value + */ + public function setData(?TeamMemberUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/TeamMemberUpdatedEventData.php b/src/Types/TeamMemberUpdatedEventData.php new file mode 100644 index 00000000..20b9925b --- /dev/null +++ b/src/Types/TeamMemberUpdatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?TeamMemberUpdatedEventObject + */ + public function getObject(): ?TeamMemberUpdatedEventObject + { + return $this->object; + } + + /** + * @param ?TeamMemberUpdatedEventObject $value + */ + public function setObject(?TeamMemberUpdatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/TeamMemberUpdatedEventObject.php b/src/Types/TeamMemberUpdatedEventObject.php new file mode 100644 index 00000000..664eb8b9 --- /dev/null +++ b/src/Types/TeamMemberUpdatedEventObject.php @@ -0,0 +1,51 @@ +teamMember = $values['teamMember'] ?? null; + } + + /** + * @return ?TeamMember + */ + public function getTeamMember(): ?TeamMember + { + return $this->teamMember; + } + + /** + * @param ?TeamMember $value + */ + public function setTeamMember(?TeamMember $value = null): self + { + $this->teamMember = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/TeamMemberWageSettingUpdatedEvent.php b/src/Types/TeamMemberWageSettingUpdatedEvent.php new file mode 100644 index 00000000..cf5575b0 --- /dev/null +++ b/src/Types/TeamMemberWageSettingUpdatedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?TeamMemberWageSettingUpdatedEventData + */ + public function getData(): ?TeamMemberWageSettingUpdatedEventData + { + return $this->data; + } + + /** + * @param ?TeamMemberWageSettingUpdatedEventData $value + */ + public function setData(?TeamMemberWageSettingUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/TeamMemberWageSettingUpdatedEventData.php b/src/Types/TeamMemberWageSettingUpdatedEventData.php new file mode 100644 index 00000000..c25ac19a --- /dev/null +++ b/src/Types/TeamMemberWageSettingUpdatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?TeamMemberWageSettingUpdatedEventObject + */ + public function getObject(): ?TeamMemberWageSettingUpdatedEventObject + { + return $this->object; + } + + /** + * @param ?TeamMemberWageSettingUpdatedEventObject $value + */ + public function setObject(?TeamMemberWageSettingUpdatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/TeamMemberWageSettingUpdatedEventObject.php b/src/Types/TeamMemberWageSettingUpdatedEventObject.php new file mode 100644 index 00000000..c91bf963 --- /dev/null +++ b/src/Types/TeamMemberWageSettingUpdatedEventObject.php @@ -0,0 +1,51 @@ +wageSetting = $values['wageSetting'] ?? null; + } + + /** + * @return ?WageSetting + */ + public function getWageSetting(): ?WageSetting + { + return $this->wageSetting; + } + + /** + * @param ?WageSetting $value + */ + public function setWageSetting(?WageSetting $value = null): self + { + $this->wageSetting = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/TerminalActionCreatedEvent.php b/src/Types/TerminalActionCreatedEvent.php new file mode 100644 index 00000000..386bb053 --- /dev/null +++ b/src/Types/TerminalActionCreatedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?TerminalActionCreatedEventData + */ + public function getData(): ?TerminalActionCreatedEventData + { + return $this->data; + } + + /** + * @param ?TerminalActionCreatedEventData $value + */ + public function setData(?TerminalActionCreatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/TerminalActionCreatedEventData.php b/src/Types/TerminalActionCreatedEventData.php new file mode 100644 index 00000000..8a4113f3 --- /dev/null +++ b/src/Types/TerminalActionCreatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?TerminalActionCreatedEventObject + */ + public function getObject(): ?TerminalActionCreatedEventObject + { + return $this->object; + } + + /** + * @param ?TerminalActionCreatedEventObject $value + */ + public function setObject(?TerminalActionCreatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/TerminalActionCreatedEventObject.php b/src/Types/TerminalActionCreatedEventObject.php new file mode 100644 index 00000000..1cbd75f1 --- /dev/null +++ b/src/Types/TerminalActionCreatedEventObject.php @@ -0,0 +1,51 @@ +action = $values['action'] ?? null; + } + + /** + * @return ?TerminalAction + */ + public function getAction(): ?TerminalAction + { + return $this->action; + } + + /** + * @param ?TerminalAction $value + */ + public function setAction(?TerminalAction $value = null): self + { + $this->action = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/TerminalActionUpdatedEvent.php b/src/Types/TerminalActionUpdatedEvent.php new file mode 100644 index 00000000..3442dc8b --- /dev/null +++ b/src/Types/TerminalActionUpdatedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?TerminalActionUpdatedEventData + */ + public function getData(): ?TerminalActionUpdatedEventData + { + return $this->data; + } + + /** + * @param ?TerminalActionUpdatedEventData $value + */ + public function setData(?TerminalActionUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/TerminalActionUpdatedEventData.php b/src/Types/TerminalActionUpdatedEventData.php new file mode 100644 index 00000000..90921131 --- /dev/null +++ b/src/Types/TerminalActionUpdatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?TerminalActionUpdatedEventObject + */ + public function getObject(): ?TerminalActionUpdatedEventObject + { + return $this->object; + } + + /** + * @param ?TerminalActionUpdatedEventObject $value + */ + public function setObject(?TerminalActionUpdatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/TerminalActionUpdatedEventObject.php b/src/Types/TerminalActionUpdatedEventObject.php new file mode 100644 index 00000000..4002ccec --- /dev/null +++ b/src/Types/TerminalActionUpdatedEventObject.php @@ -0,0 +1,51 @@ +action = $values['action'] ?? null; + } + + /** + * @return ?TerminalAction + */ + public function getAction(): ?TerminalAction + { + return $this->action; + } + + /** + * @param ?TerminalAction $value + */ + public function setAction(?TerminalAction $value = null): self + { + $this->action = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/TerminalCheckoutCreatedEvent.php b/src/Types/TerminalCheckoutCreatedEvent.php new file mode 100644 index 00000000..7a782733 --- /dev/null +++ b/src/Types/TerminalCheckoutCreatedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?TerminalCheckoutCreatedEventData + */ + public function getData(): ?TerminalCheckoutCreatedEventData + { + return $this->data; + } + + /** + * @param ?TerminalCheckoutCreatedEventData $value + */ + public function setData(?TerminalCheckoutCreatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/TerminalCheckoutCreatedEventData.php b/src/Types/TerminalCheckoutCreatedEventData.php new file mode 100644 index 00000000..c867b71b --- /dev/null +++ b/src/Types/TerminalCheckoutCreatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?TerminalCheckoutCreatedEventObject + */ + public function getObject(): ?TerminalCheckoutCreatedEventObject + { + return $this->object; + } + + /** + * @param ?TerminalCheckoutCreatedEventObject $value + */ + public function setObject(?TerminalCheckoutCreatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/TerminalCheckoutCreatedEventObject.php b/src/Types/TerminalCheckoutCreatedEventObject.php new file mode 100644 index 00000000..e77f0d70 --- /dev/null +++ b/src/Types/TerminalCheckoutCreatedEventObject.php @@ -0,0 +1,51 @@ +checkout = $values['checkout'] ?? null; + } + + /** + * @return ?TerminalCheckout + */ + public function getCheckout(): ?TerminalCheckout + { + return $this->checkout; + } + + /** + * @param ?TerminalCheckout $value + */ + public function setCheckout(?TerminalCheckout $value = null): self + { + $this->checkout = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/TerminalCheckoutUpdatedEvent.php b/src/Types/TerminalCheckoutUpdatedEvent.php new file mode 100644 index 00000000..d37104fc --- /dev/null +++ b/src/Types/TerminalCheckoutUpdatedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?TerminalCheckoutUpdatedEventData + */ + public function getData(): ?TerminalCheckoutUpdatedEventData + { + return $this->data; + } + + /** + * @param ?TerminalCheckoutUpdatedEventData $value + */ + public function setData(?TerminalCheckoutUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/TerminalCheckoutUpdatedEventData.php b/src/Types/TerminalCheckoutUpdatedEventData.php new file mode 100644 index 00000000..4617f6cf --- /dev/null +++ b/src/Types/TerminalCheckoutUpdatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?TerminalCheckoutUpdatedEventObject + */ + public function getObject(): ?TerminalCheckoutUpdatedEventObject + { + return $this->object; + } + + /** + * @param ?TerminalCheckoutUpdatedEventObject $value + */ + public function setObject(?TerminalCheckoutUpdatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/TerminalCheckoutUpdatedEventObject.php b/src/Types/TerminalCheckoutUpdatedEventObject.php new file mode 100644 index 00000000..d60d1de8 --- /dev/null +++ b/src/Types/TerminalCheckoutUpdatedEventObject.php @@ -0,0 +1,51 @@ +checkout = $values['checkout'] ?? null; + } + + /** + * @return ?TerminalCheckout + */ + public function getCheckout(): ?TerminalCheckout + { + return $this->checkout; + } + + /** + * @param ?TerminalCheckout $value + */ + public function setCheckout(?TerminalCheckout $value = null): self + { + $this->checkout = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/TerminalRefundCreatedEvent.php b/src/Types/TerminalRefundCreatedEvent.php new file mode 100644 index 00000000..57b068cd --- /dev/null +++ b/src/Types/TerminalRefundCreatedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?TerminalRefundCreatedEventData + */ + public function getData(): ?TerminalRefundCreatedEventData + { + return $this->data; + } + + /** + * @param ?TerminalRefundCreatedEventData $value + */ + public function setData(?TerminalRefundCreatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/TerminalRefundCreatedEventData.php b/src/Types/TerminalRefundCreatedEventData.php new file mode 100644 index 00000000..54b00d89 --- /dev/null +++ b/src/Types/TerminalRefundCreatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?TerminalRefundCreatedEventObject + */ + public function getObject(): ?TerminalRefundCreatedEventObject + { + return $this->object; + } + + /** + * @param ?TerminalRefundCreatedEventObject $value + */ + public function setObject(?TerminalRefundCreatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/TerminalRefundCreatedEventObject.php b/src/Types/TerminalRefundCreatedEventObject.php new file mode 100644 index 00000000..5f796bcd --- /dev/null +++ b/src/Types/TerminalRefundCreatedEventObject.php @@ -0,0 +1,51 @@ +refund = $values['refund'] ?? null; + } + + /** + * @return ?TerminalRefund + */ + public function getRefund(): ?TerminalRefund + { + return $this->refund; + } + + /** + * @param ?TerminalRefund $value + */ + public function setRefund(?TerminalRefund $value = null): self + { + $this->refund = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/TerminalRefundUpdatedEvent.php b/src/Types/TerminalRefundUpdatedEvent.php new file mode 100644 index 00000000..c2a25516 --- /dev/null +++ b/src/Types/TerminalRefundUpdatedEvent.php @@ -0,0 +1,154 @@ +merchantId = $values['merchantId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?TerminalRefundUpdatedEventData + */ + public function getData(): ?TerminalRefundUpdatedEventData + { + return $this->data; + } + + /** + * @param ?TerminalRefundUpdatedEventData $value + */ + public function setData(?TerminalRefundUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/TerminalRefundUpdatedEventData.php b/src/Types/TerminalRefundUpdatedEventData.php new file mode 100644 index 00000000..beedbb27 --- /dev/null +++ b/src/Types/TerminalRefundUpdatedEventData.php @@ -0,0 +1,101 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?TerminalRefundUpdatedEventObject + */ + public function getObject(): ?TerminalRefundUpdatedEventObject + { + return $this->object; + } + + /** + * @param ?TerminalRefundUpdatedEventObject $value + */ + public function setObject(?TerminalRefundUpdatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/TerminalRefundUpdatedEventObject.php b/src/Types/TerminalRefundUpdatedEventObject.php new file mode 100644 index 00000000..8a3c0bc1 --- /dev/null +++ b/src/Types/TerminalRefundUpdatedEventObject.php @@ -0,0 +1,51 @@ +refund = $values['refund'] ?? null; + } + + /** + * @return ?TerminalRefund + */ + public function getRefund(): ?TerminalRefund + { + return $this->refund; + } + + /** + * @param ?TerminalRefund $value + */ + public function setRefund(?TerminalRefund $value = null): self + { + $this->refund = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/TransactionType.php b/src/Types/TransactionType.php new file mode 100644 index 00000000..a7a58ead --- /dev/null +++ b/src/Types/TransactionType.php @@ -0,0 +1,9 @@ +merchantId = $values['merchantId'] ?? null; + $this->locationId = $values['locationId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getLocationId(): ?string + { + return $this->locationId; + } + + /** + * @param ?string $value + */ + public function setLocationId(?string $value = null): self + { + $this->locationId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?VendorCreatedEventData + */ + public function getData(): ?VendorCreatedEventData + { + return $this->data; + } + + /** + * @param ?VendorCreatedEventData $value + */ + public function setData(?VendorCreatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/VendorCreatedEventData.php b/src/Types/VendorCreatedEventData.php new file mode 100644 index 00000000..829b57e6 --- /dev/null +++ b/src/Types/VendorCreatedEventData.php @@ -0,0 +1,104 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?VendorCreatedEventObject + */ + public function getObject(): ?VendorCreatedEventObject + { + return $this->object; + } + + /** + * @param ?VendorCreatedEventObject $value + */ + public function setObject(?VendorCreatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/VendorCreatedEventObject.php b/src/Types/VendorCreatedEventObject.php new file mode 100644 index 00000000..dec3e3ab --- /dev/null +++ b/src/Types/VendorCreatedEventObject.php @@ -0,0 +1,79 @@ +operation = $values['operation'] ?? null; + $this->vendor = $values['vendor'] ?? null; + } + + /** + * @return ?'CREATED' + */ + public function getOperation(): ?string + { + return $this->operation; + } + + /** + * @param ?'CREATED' $value + */ + public function setOperation(?string $value = null): self + { + $this->operation = $value; + return $this; + } + + /** + * @return ?Vendor + */ + public function getVendor(): ?Vendor + { + return $this->vendor; + } + + /** + * @param ?Vendor $value + */ + public function setVendor(?Vendor $value = null): self + { + $this->vendor = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/VendorUpdatedEvent.php b/src/Types/VendorUpdatedEvent.php new file mode 100644 index 00000000..b821692a --- /dev/null +++ b/src/Types/VendorUpdatedEvent.php @@ -0,0 +1,179 @@ +merchantId = $values['merchantId'] ?? null; + $this->locationId = $values['locationId'] ?? null; + $this->type = $values['type'] ?? null; + $this->eventId = $values['eventId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->data = $values['data'] ?? null; + } + + /** + * @return ?string + */ + public function getMerchantId(): ?string + { + return $this->merchantId; + } + + /** + * @param ?string $value + */ + public function setMerchantId(?string $value = null): self + { + $this->merchantId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getLocationId(): ?string + { + return $this->locationId; + } + + /** + * @param ?string $value + */ + public function setLocationId(?string $value = null): self + { + $this->locationId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getEventId(): ?string + { + return $this->eventId; + } + + /** + * @param ?string $value + */ + public function setEventId(?string $value = null): self + { + $this->eventId = $value; + return $this; + } + + /** + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + + /** + * @param ?string $value + */ + public function setCreatedAt(?string $value = null): self + { + $this->createdAt = $value; + return $this; + } + + /** + * @return ?VendorUpdatedEventData + */ + public function getData(): ?VendorUpdatedEventData + { + return $this->data; + } + + /** + * @param ?VendorUpdatedEventData $value + */ + public function setData(?VendorUpdatedEventData $value = null): self + { + $this->data = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/VendorUpdatedEventData.php b/src/Types/VendorUpdatedEventData.php new file mode 100644 index 00000000..573074bc --- /dev/null +++ b/src/Types/VendorUpdatedEventData.php @@ -0,0 +1,104 @@ +type = $values['type'] ?? null; + $this->id = $values['id'] ?? null; + $this->object = $values['object'] ?? null; + } + + /** + * @return ?string + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * @param ?string $value + */ + public function setType(?string $value = null): self + { + $this->type = $value; + return $this; + } + + /** + * @return ?string + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * @param ?string $value + */ + public function setId(?string $value = null): self + { + $this->id = $value; + return $this; + } + + /** + * @return ?VendorUpdatedEventObject + */ + public function getObject(): ?VendorUpdatedEventObject + { + return $this->object; + } + + /** + * @param ?VendorUpdatedEventObject $value + */ + public function setObject(?VendorUpdatedEventObject $value = null): self + { + $this->object = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/VendorUpdatedEventObject.php b/src/Types/VendorUpdatedEventObject.php new file mode 100644 index 00000000..a40948f6 --- /dev/null +++ b/src/Types/VendorUpdatedEventObject.php @@ -0,0 +1,79 @@ +operation = $values['operation'] ?? null; + $this->vendor = $values['vendor'] ?? null; + } + + /** + * @return ?'UPDATED' + */ + public function getOperation(): ?string + { + return $this->operation; + } + + /** + * @param ?'UPDATED' $value + */ + public function setOperation(?string $value = null): self + { + $this->operation = $value; + return $this; + } + + /** + * @return ?Vendor + */ + public function getVendor(): ?Vendor + { + return $this->vendor; + } + + /** + * @param ?Vendor $value + */ + public function setVendor(?Vendor $value = null): self + { + $this->vendor = $value; + return $this; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +}