diff --git a/.mock/definition/__package__.yml b/.mock/definition/__package__.yml index 73458f1c..36a8cc55 100644 --- a/.mock/definition/__package__.yml +++ b/.mock/definition/__package__.yml @@ -11192,7 +11192,7 @@ types: maxLength: 255 access: read-only name: - type: string + type: optional docs: The name of the segment. access: read-only created_at: @@ -20678,7 +20678,7 @@ types: Events](https://developer.squareup.com/docs/loyalty-api/loyalty-events). properties: id: - type: string + type: optional docs: The Square-assigned ID of the loyalty event. validation: minLength: 1 @@ -20689,7 +20689,7 @@ types: The type of the loyalty event. See [LoyaltyEventType](#type-loyaltyeventtype) for possible values created_at: - type: string + type: optional docs: The timestamp when the event was created, in RFC 3339 format. validation: minLength: 1 @@ -20710,7 +20710,7 @@ types: type: optional docs: Provides metadata when the event `type` is `ADJUST_POINTS`. loyalty_account_id: - type: string + type: optional docs: >- The ID of the [loyalty account](entity:LoyaltyAccount) associated with the event. @@ -20785,11 +20785,11 @@ types: maxLength: 255 access: read-only points: - type: integer + type: optional docs: The number of points earned by the event. access: read-only order_id: - type: string + type: optional docs: >- The ID of the [order](entity:Order) for which the buyer earned the promotion points. @@ -20826,7 +20826,7 @@ types: docs: Provides metadata when the event `type` is `CREATE_REWARD`. properties: loyalty_program_id: - type: string + type: optional docs: The ID of the [loyalty program](entity:LoyaltyProgram). validation: minLength: 1 @@ -20843,7 +20843,7 @@ types: maxLength: 36 access: read-only points: - type: integer + type: optional docs: The loyalty points used to create the reward. access: read-only source: @@ -20910,7 +20910,7 @@ types: docs: Provides metadata when the event `type` is `DELETE_REWARD`. properties: loyalty_program_id: - type: string + type: optional docs: The ID of the [loyalty program](entity:LoyaltyProgram). validation: minLength: 1 @@ -20925,7 +20925,7 @@ types: maxLength: 36 access: read-only points: - type: integer + type: optional docs: The number of points returned to the loyalty account. access: read-only source: @@ -20934,7 +20934,7 @@ types: docs: Provides metadata when the event `type` is `EXPIRE_POINTS`. properties: loyalty_program_id: - type: string + type: optional docs: >- The Square-assigned ID of the [loyalty program](entity:LoyaltyProgram). @@ -21009,7 +21009,7 @@ types: docs: Provides metadata when the event `type` is `OTHER`. properties: loyalty_program_id: - type: string + type: optional docs: >- The Square-assigned ID of the [loyalty program](entity:LoyaltyProgram). @@ -21034,7 +21034,7 @@ types: docs: Provides metadata when the event `type` is `REDEEM_REWARD`. properties: loyalty_program_id: - type: string + type: optional docs: The ID of the [loyalty program](entity:LoyaltyProgram). validation: minLength: 1 diff --git a/.mock/definition/api.yml b/.mock/definition/api.yml index fdfd69a5..4f0fe636 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-06-18"> + type: literal<"2025-07-16"> auth-schemes: Bearer: scheme: bearer diff --git a/.mock/definition/applePay.yml b/.mock/definition/applePay.yml index 9418353c..8470c702 100644 --- a/.mock/definition/applePay.yml +++ b/.mock/definition/applePay.yml @@ -64,7 +64,9 @@ service: type: root.RegisterDomainResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: domain_name: example.com response: body: diff --git a/.mock/definition/bankAccounts.yml b/.mock/definition/bankAccounts.yml index 0981f46c..20bc52f6 100644 --- a/.mock/definition/bankAccounts.yml +++ b/.mock/definition/bankAccounts.yml @@ -58,7 +58,9 @@ service: type: root.ListBankAccountsResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: errors: - category: API_ERROR @@ -129,6 +131,8 @@ service: examples: - path-parameters: v1_bank_account_id: v1_bank_account_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -177,6 +181,8 @@ service: examples: - path-parameters: bank_account_id: bank_account_id + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/bookings.yml b/.mock/definition/bookings.yml index a0167d2d..2898d325 100644 --- a/.mock/definition/bookings.yml +++ b/.mock/definition/bookings.yml @@ -68,7 +68,9 @@ service: type: root.ListBookingsResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: bookings: - id: zkras0xv0xwswx @@ -148,7 +150,9 @@ service: type: root.CreateBookingResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: booking: {} response: body: @@ -227,7 +231,9 @@ service: type: root.SearchAvailabilityResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: query: filter: start_at_range: {} @@ -396,7 +402,9 @@ service: type: root.BulkRetrieveBookingsResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: booking_ids: - booking_ids response: @@ -466,7 +474,9 @@ service: type: root.GetBusinessBookingProfileResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: business_booking_profile: seller_id: MLJQYZZRM0D3Y @@ -518,6 +528,8 @@ service: examples: - path-parameters: location_id: location_id + headers: + Square-Version: '2025-07-16' response: body: location_booking_profile: @@ -552,7 +564,9 @@ service: type: root.BulkRetrieveTeamMemberBookingProfilesResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: team_member_ids: - team_member_ids response: @@ -615,6 +629,8 @@ service: examples: - path-parameters: booking_id: booking_id + headers: + Square-Version: '2025-07-16' response: body: booking: @@ -712,6 +728,8 @@ service: examples: - path-parameters: booking_id: booking_id + headers: + Square-Version: '2025-07-16' request: booking: {} response: @@ -810,6 +828,8 @@ service: examples: - path-parameters: booking_id: booking_id + headers: + Square-Version: '2025-07-16' request: {} response: body: diff --git a/.mock/definition/bookings/customAttributeDefinitions.yml b/.mock/definition/bookings/customAttributeDefinitions.yml index 0a5fc3dc..89c8024a 100644 --- a/.mock/definition/bookings/customAttributeDefinitions.yml +++ b/.mock/definition/bookings/customAttributeDefinitions.yml @@ -54,7 +54,9 @@ service: type: root.ListBookingCustomAttributeDefinitionsResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: custom_attribute_definitions: - key: favoriteShampoo @@ -159,7 +161,9 @@ service: type: root.CreateBookingCustomAttributeDefinitionResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: custom_attribute_definition: {} response: body: @@ -227,6 +231,8 @@ service: examples: - path-parameters: key: key + headers: + Square-Version: '2025-07-16' response: body: custom_attribute_definition: @@ -322,6 +328,8 @@ service: examples: - path-parameters: key: key + headers: + Square-Version: '2025-07-16' request: custom_attribute_definition: {} response: @@ -377,6 +385,8 @@ service: examples: - path-parameters: key: key + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/bookings/customAttributes.yml b/.mock/definition/bookings/customAttributes.yml index 784d640e..d1ea704f 100644 --- a/.mock/definition/bookings/customAttributes.yml +++ b/.mock/definition/bookings/customAttributes.yml @@ -46,7 +46,9 @@ service: type: root.BulkDeleteBookingCustomAttributesResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: values: key: booking_id: booking_id @@ -116,7 +118,9 @@ service: type: root.BulkUpsertBookingCustomAttributesResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: values: key: booking_id: booking_id @@ -258,6 +262,8 @@ service: examples: - path-parameters: booking_id: booking_id + headers: + Square-Version: '2025-07-16' response: body: custom_attributes: @@ -347,6 +353,8 @@ service: - path-parameters: booking_id: booking_id key: key + headers: + Square-Version: '2025-07-16' response: body: custom_attribute: @@ -451,6 +459,8 @@ service: - path-parameters: booking_id: booking_id key: key + headers: + Square-Version: '2025-07-16' request: custom_attribute: {} response: @@ -523,6 +533,8 @@ service: - path-parameters: booking_id: booking_id key: key + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/bookings/locationProfiles.yml b/.mock/definition/bookings/locationProfiles.yml index 6cb3741f..7455845a 100644 --- a/.mock/definition/bookings/locationProfiles.yml +++ b/.mock/definition/bookings/locationProfiles.yml @@ -33,7 +33,9 @@ service: type: root.ListLocationBookingProfilesResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: location_booking_profiles: - location_id: LY6WNBPVM6VGV diff --git a/.mock/definition/bookings/teamMemberProfiles.yml b/.mock/definition/bookings/teamMemberProfiles.yml index 430a3806..3e00df86 100644 --- a/.mock/definition/bookings/teamMemberProfiles.yml +++ b/.mock/definition/bookings/teamMemberProfiles.yml @@ -44,7 +44,9 @@ service: type: root.ListTeamMemberBookingProfilesResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: team_member_booking_profiles: - team_member_id: TMXUrsBWWcHTt79t @@ -84,6 +86,8 @@ service: examples: - path-parameters: team_member_id: team_member_id + headers: + Square-Version: '2025-07-16' response: body: team_member_booking_profile: diff --git a/.mock/definition/cards.yml b/.mock/definition/cards.yml index ec98df09..b8ed07f2 100644 --- a/.mock/definition/cards.yml +++ b/.mock/definition/cards.yml @@ -59,7 +59,9 @@ service: type: root.ListCardsResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: errors: - category: API_ERROR @@ -156,7 +158,9 @@ service: type: root.CreateCardResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: idempotency_key: 4935a656-a929-4792-b97c-8848be85c27c source_id: cnon:uIbfJXhXETSP197M3GB card: @@ -234,6 +238,8 @@ service: examples: - path-parameters: card_id: card_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -300,6 +306,8 @@ service: examples: - path-parameters: card_id: card_id + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/cashDrawers/shifts.yml b/.mock/definition/cashDrawers/shifts.yml index a692d098..eb17d5ba 100644 --- a/.mock/definition/cashDrawers/shifts.yml +++ b/.mock/definition/cashDrawers/shifts.yml @@ -54,6 +54,8 @@ service: examples: - query-parameters: location_id: location_id + headers: + Square-Version: '2025-07-16' response: body: cursor: cursor @@ -112,6 +114,8 @@ service: shift_id: shift_id query-parameters: location_id: location_id + headers: + Square-Version: '2025-07-16' response: body: cash_drawer_shift: @@ -197,6 +201,8 @@ service: shift_id: shift_id query-parameters: location_id: location_id + headers: + Square-Version: '2025-07-16' response: body: cursor: cursor diff --git a/.mock/definition/catalog.yml b/.mock/definition/catalog.yml index 9d9feba2..2d7de942 100644 --- a/.mock/definition/catalog.yml +++ b/.mock/definition/catalog.yml @@ -64,7 +64,9 @@ service: type: root.BatchDeleteCatalogObjectsResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: object_ids: - W62UWFY35CWMYGVWK6TWJDNI - AA27W3M2GGTF3H6AVPNB77CK @@ -187,7 +189,9 @@ service: type: root.BatchGetCatalogObjectsResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: object_ids: - W62UWFY35CWMYGVWK6TWJDNI - AA27W3M2GGTF3H6AVPNB77CK @@ -413,7 +417,9 @@ service: type: root.BatchUpsertCatalogObjectsResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: idempotency_key: 789ff020-f723-43a9-b4b5-43b5dc1fa3dc batches: - objects: @@ -576,7 +582,9 @@ service: type: root.CatalogInfoResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: errors: - category: API_ERROR @@ -693,7 +701,9 @@ service: type: root.ListCatalogResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: errors: - category: API_ERROR @@ -910,7 +920,9 @@ service: type: root.SearchCatalogObjectsResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: object_types: - ITEM query: @@ -1112,7 +1124,9 @@ service: type: root.SearchCatalogItemsResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: text_filter: red category_ids: - WINE_CATEGORY_ID @@ -1230,7 +1244,9 @@ service: type: root.UpdateItemModifierListsResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: item_ids: - H42BRLUJ5KTZTTMPVSLFAACQ - 2JXOBJIHCWBQ4NZ3RIXQGJA6 @@ -1289,7 +1305,9 @@ service: type: root.UpdateItemTaxesResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: item_ids: - H42BRLUJ5KTZTTMPVSLFAACQ - 2JXOBJIHCWBQ4NZ3RIXQGJA6 diff --git a/.mock/definition/catalog/images.yml b/.mock/definition/catalog/images.yml index 35626e67..3b1c0f83 100644 --- a/.mock/definition/catalog/images.yml +++ b/.mock/definition/catalog/images.yml @@ -42,7 +42,9 @@ service: type: root.CreateCatalogImageResponse status-code: 200 examples: - - request: {} + - headers: + Square-Version: '2025-07-16' + request: {} response: body: errors: @@ -111,6 +113,8 @@ service: examples: - path-parameters: image_id: image_id + headers: + Square-Version: '2025-07-16' request: {} response: body: diff --git a/.mock/definition/catalog/object.yml b/.mock/definition/catalog/object.yml index 70452634..86eec851 100644 --- a/.mock/definition/catalog/object.yml +++ b/.mock/definition/catalog/object.yml @@ -69,7 +69,9 @@ service: type: root.UpsertCatalogObjectResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: idempotency_key: af3d1afc-7212-4300-b463-0bfc5314a5ae object: type: IMAGE @@ -236,6 +238,8 @@ service: examples: - path-parameters: object_id: object_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -378,6 +382,8 @@ service: examples: - path-parameters: object_id: object_id + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/checkout.yml b/.mock/definition/checkout.yml index 4bff83e2..068007e2 100644 --- a/.mock/definition/checkout.yml +++ b/.mock/definition/checkout.yml @@ -25,6 +25,8 @@ service: examples: - path-parameters: location_id: location_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -84,6 +86,8 @@ service: examples: - path-parameters: location_id: location_id + headers: + Square-Version: '2025-07-16' request: location_settings: {} response: @@ -132,7 +136,9 @@ service: type: root.RetrieveMerchantSettingsResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: errors: - category: API_ERROR @@ -185,7 +191,9 @@ service: type: root.UpdateMerchantSettingsResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: merchant_settings: {} response: body: diff --git a/.mock/definition/checkout/paymentLinks.yml b/.mock/definition/checkout/paymentLinks.yml index 6d1431a1..8eb945be 100644 --- a/.mock/definition/checkout/paymentLinks.yml +++ b/.mock/definition/checkout/paymentLinks.yml @@ -50,7 +50,9 @@ service: type: root.ListPaymentLinksResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: errors: - category: API_ERROR @@ -166,7 +168,9 @@ service: type: root.CreatePaymentLinkResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: idempotency_key: cd9e25dc-d9f2-4430-aedb-61605070e95f quick_pay: name: Auto Detailing @@ -298,6 +302,8 @@ service: examples: - path-parameters: id: id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -367,6 +373,8 @@ service: examples: - path-parameters: id: id + headers: + Square-Version: '2025-07-16' request: payment_link: version: 1 @@ -425,6 +433,8 @@ service: examples: - path-parameters: id: id + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/customers.yml b/.mock/definition/customers.yml index f9644a82..0352c81e 100644 --- a/.mock/definition/customers.yml +++ b/.mock/definition/customers.yml @@ -85,7 +85,9 @@ service: type: root.ListCustomersResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: errors: - category: API_ERROR @@ -251,7 +253,9 @@ service: type: root.CreateCustomerResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: given_name: Amelia family_name: Earhart email_address: Amelia.Earhart@example.com @@ -364,7 +368,9 @@ service: type: root.BulkCreateCustomersResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: customers: 8bb76c4f-e35d-4c5b-90de-1194cd9179f0: given_name: Amelia @@ -478,7 +484,9 @@ service: type: root.BulkDeleteCustomersResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: customer_ids: - 8DDA5NZVBZFGAX0V3HPF81HHE0 - N18CPRVXR5214XPBBA6BZQWF3C @@ -530,7 +538,9 @@ service: type: root.BulkRetrieveCustomersResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: customer_ids: - 8DDA5NZVBZFGAX0V3HPF81HHE0 - N18CPRVXR5214XPBBA6BZQWF3C @@ -623,7 +633,9 @@ service: type: root.BulkUpdateCustomersResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: customers: 8DDA5NZVBZFGAX0V3HPF81HHE0: email_address: New.Amelia.Earhart@example.com @@ -750,7 +762,9 @@ service: type: root.SearchCustomersResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: limit: 2 query: filter: @@ -854,6 +868,8 @@ service: examples: - path-parameters: customer_id: customer_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -1034,6 +1050,8 @@ service: examples: - path-parameters: customer_id: customer_id + headers: + Square-Version: '2025-07-16' request: email_address: New.Amelia.Earhart@example.com note: updated customer note @@ -1121,6 +1139,8 @@ service: examples: - path-parameters: customer_id: customer_id + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/customers/cards.yml b/.mock/definition/customers/cards.yml index 9d96df61..733e3be5 100644 --- a/.mock/definition/customers/cards.yml +++ b/.mock/definition/customers/cards.yml @@ -84,6 +84,8 @@ service: examples: - path-parameters: customer_id: customer_id + headers: + Square-Version: '2025-07-16' request: card_nonce: YOUR_CARD_NONCE billing_address: @@ -162,6 +164,8 @@ service: - path-parameters: customer_id: customer_id card_id: card_id + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/customers/customAttributeDefinitions.yml b/.mock/definition/customers/customAttributeDefinitions.yml index fb23e471..efc70840 100644 --- a/.mock/definition/customers/customAttributeDefinitions.yml +++ b/.mock/definition/customers/customAttributeDefinitions.yml @@ -62,7 +62,9 @@ service: type: root.ListCustomerCustomAttributeDefinitionsResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: custom_attribute_definitions: - key: favoritemovie @@ -166,7 +168,9 @@ service: type: root.CreateCustomerCustomAttributeDefinitionResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: custom_attribute_definition: key: favoritemovie schema: @@ -247,6 +251,8 @@ service: examples: - path-parameters: key: key + headers: + Square-Version: '2025-07-16' response: body: custom_attribute_definition: @@ -350,6 +356,8 @@ service: examples: - path-parameters: key: key + headers: + Square-Version: '2025-07-16' request: custom_attribute_definition: description: Update the description as desired. @@ -405,6 +413,8 @@ service: examples: - path-parameters: key: key + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -477,7 +487,9 @@ service: type: root.BatchUpsertCustomerCustomAttributesResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: values: id1: customer_id: N3NCVYY3WS27HF0HKANA3R9FP8 diff --git a/.mock/definition/customers/customAttributes.yml b/.mock/definition/customers/customAttributes.yml index 63602844..306c5d63 100644 --- a/.mock/definition/customers/customAttributes.yml +++ b/.mock/definition/customers/customAttributes.yml @@ -82,6 +82,8 @@ service: examples: - path-parameters: customer_id: customer_id + headers: + Square-Version: '2025-07-16' response: body: custom_attributes: @@ -181,6 +183,8 @@ service: - path-parameters: customer_id: customer_id key: key + headers: + Square-Version: '2025-07-16' response: body: custom_attribute: @@ -294,6 +298,8 @@ service: - path-parameters: customer_id: customer_id key: key + headers: + Square-Version: '2025-07-16' request: custom_attribute: value: Dune @@ -365,6 +371,8 @@ service: - path-parameters: customer_id: customer_id key: key + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/customers/groups.yml b/.mock/definition/customers/groups.yml index 122e9592..eef6fca7 100644 --- a/.mock/definition/customers/groups.yml +++ b/.mock/definition/customers/groups.yml @@ -49,7 +49,9 @@ service: type: root.ListCustomerGroupsResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: errors: - category: API_ERROR @@ -95,7 +97,9 @@ service: type: root.CreateCustomerGroupResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: group: name: Loyal Customers response: @@ -133,6 +137,8 @@ service: examples: - path-parameters: group_id: group_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -174,6 +180,8 @@ service: examples: - path-parameters: group_id: group_id + headers: + Square-Version: '2025-07-16' request: group: name: Loyal Customers @@ -210,6 +218,8 @@ service: examples: - path-parameters: group_id: group_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -246,6 +256,8 @@ service: - path-parameters: customer_id: customer_id group_id: group_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -282,6 +294,8 @@ service: - path-parameters: customer_id: customer_id group_id: group_id + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/customers/segments.yml b/.mock/definition/customers/segments.yml index c79477c3..d86fea43 100644 --- a/.mock/definition/customers/segments.yml +++ b/.mock/definition/customers/segments.yml @@ -49,7 +49,9 @@ service: type: root.ListCustomerSegmentsResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: errors: - category: API_ERROR @@ -97,6 +99,8 @@ service: examples: - path-parameters: segment_id: segment_id + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/devices.yml b/.mock/definition/devices.yml index c84d268c..bf4f3a03 100644 --- a/.mock/definition/devices.yml +++ b/.mock/definition/devices.yml @@ -49,7 +49,9 @@ service: type: root.ListDevicesResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: errors: - category: API_ERROR @@ -151,6 +153,8 @@ service: examples: - path-parameters: device_id: device_id + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/devices/codes.yml b/.mock/definition/devices/codes.yml index a156bb54..ea819916 100644 --- a/.mock/definition/devices/codes.yml +++ b/.mock/definition/devices/codes.yml @@ -53,7 +53,9 @@ service: type: root.ListDeviceCodesResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: errors: - category: API_ERROR @@ -125,7 +127,9 @@ service: type: root.CreateDeviceCodeResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: idempotency_key: 01bb00a6-0c86-4770-94ed-f5fca973cd56 device_code: name: Counter 1 @@ -171,6 +175,8 @@ service: examples: - path-parameters: id: id + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/disputes.yml b/.mock/definition/disputes.yml index 99824953..506e05ad 100644 --- a/.mock/definition/disputes.yml +++ b/.mock/definition/disputes.yml @@ -46,7 +46,9 @@ service: type: root.ListDisputesResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: errors: - category: API_ERROR @@ -116,6 +118,8 @@ service: examples: - path-parameters: dispute_id: dispute_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -176,6 +180,8 @@ service: examples: - path-parameters: dispute_id: dispute_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -239,6 +245,8 @@ service: examples: - path-parameters: dispute_id: dispute_id + headers: + Square-Version: '2025-07-16' request: {} response: body: @@ -302,6 +310,8 @@ service: examples: - path-parameters: dispute_id: dispute_id + headers: + Square-Version: '2025-07-16' request: idempotency_key: ed3ee3933d946f1514d505d173c82648 evidence_type: TRACKING_NUMBER @@ -362,6 +372,8 @@ service: examples: - path-parameters: dispute_id: dispute_id + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/disputes/evidence.yml b/.mock/definition/disputes/evidence.yml index 8b962c77..70ab4161 100644 --- a/.mock/definition/disputes/evidence.yml +++ b/.mock/definition/disputes/evidence.yml @@ -40,6 +40,8 @@ service: examples: - path-parameters: dispute_id: dispute_id + headers: + Square-Version: '2025-07-16' response: body: evidence: @@ -99,6 +101,8 @@ service: - path-parameters: dispute_id: dispute_id evidence_id: evidence_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -143,6 +147,8 @@ service: - path-parameters: dispute_id: dispute_id evidence_id: evidence_id + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/employees.yml b/.mock/definition/employees.yml index 9d2768d0..7a686473 100644 --- a/.mock/definition/employees.yml +++ b/.mock/definition/employees.yml @@ -37,7 +37,9 @@ service: status-code: 200 availability: deprecated examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: employees: - id: id @@ -79,6 +81,8 @@ service: examples: - path-parameters: id: id + headers: + Square-Version: '2025-07-16' response: body: employee: diff --git a/.mock/definition/events.yml b/.mock/definition/events.yml index ffd7fac8..54b157dc 100644 --- a/.mock/definition/events.yml +++ b/.mock/definition/events.yml @@ -56,7 +56,9 @@ service: type: root.SearchEventsResponse status-code: 200 examples: - - request: {} + - headers: + Square-Version: '2025-07-16' + request: {} response: body: errors: @@ -115,7 +117,9 @@ service: type: root.DisableEventsResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: errors: - category: API_ERROR @@ -137,7 +141,9 @@ service: type: root.EnableEventsResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: errors: - category: API_ERROR @@ -167,7 +173,9 @@ service: type: root.ListEventTypesResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: errors: - category: API_ERROR diff --git a/.mock/definition/giftCards.yml b/.mock/definition/giftCards.yml index c2151932..0613ec05 100644 --- a/.mock/definition/giftCards.yml +++ b/.mock/definition/giftCards.yml @@ -70,7 +70,9 @@ service: type: root.ListGiftCardsResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: errors: - category: API_ERROR @@ -193,7 +195,9 @@ service: type: root.CreateGiftCardResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: idempotency_key: NC9Tm69EjbjtConu location_id: 81FN9BNFZTKS4 gift_card: @@ -247,7 +251,9 @@ service: type: root.GetGiftCardFromGANResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: gan: '7783320001001635' response: body: @@ -297,7 +303,9 @@ service: type: root.GetGiftCardFromNonceResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: nonce: cnon:7783322135245171 response: body: @@ -350,6 +358,8 @@ service: examples: - path-parameters: gift_card_id: gift_card_id + headers: + Square-Version: '2025-07-16' request: customer_id: GKY0FZ3V717AH8Q2D821PNT2ZW response: @@ -403,6 +413,8 @@ service: examples: - path-parameters: gift_card_id: gift_card_id + headers: + Square-Version: '2025-07-16' request: customer_id: GKY0FZ3V717AH8Q2D821PNT2ZW response: @@ -445,6 +457,8 @@ service: examples: - path-parameters: id: id + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/giftCards/activities.yml b/.mock/definition/giftCards/activities.yml index eeb6f12c..a4457bc6 100644 --- a/.mock/definition/giftCards/activities.yml +++ b/.mock/definition/giftCards/activities.yml @@ -107,7 +107,9 @@ service: type: root.ListGiftCardActivitiesResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: errors: - category: API_ERROR @@ -238,7 +240,9 @@ service: type: root.CreateGiftCardActivityResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: idempotency_key: U16kfr-kA70er-q4Rsym-7U7NnY gift_card_activity: type: ACTIVATE diff --git a/.mock/definition/inventory.yml b/.mock/definition/inventory.yml index 3f7460eb..7aa982a3 100644 --- a/.mock/definition/inventory.yml +++ b/.mock/definition/inventory.yml @@ -33,6 +33,8 @@ service: examples: - path-parameters: adjustment_id: adjustment_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -94,6 +96,8 @@ service: examples: - path-parameters: adjustment_id: adjustment_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -152,7 +156,9 @@ service: status-code: 200 availability: deprecated examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: idempotency_key: 8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe changes: - type: PHYSICAL_COUNT @@ -205,7 +211,9 @@ service: status-code: 200 availability: deprecated examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: catalog_object_ids: - W62UWFY35CWMYGVWK6TWJDNI location_ids: @@ -264,7 +272,9 @@ service: status-code: 200 availability: deprecated examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: catalog_object_ids: - W62UWFY35CWMYGVWK6TWJDNI location_ids: @@ -307,7 +317,9 @@ service: type: root.BatchChangeInventoryResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: idempotency_key: 8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe changes: - type: PHYSICAL_COUNT @@ -366,7 +378,9 @@ service: type: root.BatchGetInventoryChangesResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: catalog_object_ids: - W62UWFY35CWMYGVWK6TWJDNI location_ids: @@ -443,7 +457,9 @@ service: type: root.BatchGetInventoryCountsResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: catalog_object_ids: - W62UWFY35CWMYGVWK6TWJDNI location_ids: @@ -496,6 +512,8 @@ service: examples: - path-parameters: physical_count_id: physical_count_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -546,6 +564,8 @@ service: examples: - path-parameters: physical_count_id: physical_count_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -594,6 +614,8 @@ service: examples: - path-parameters: transfer_id: transfer_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -667,6 +689,8 @@ service: examples: - path-parameters: catalog_object_id: catalog_object_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -754,6 +778,8 @@ service: examples: - path-parameters: catalog_object_id: catalog_object_id + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/invoices.yml b/.mock/definition/invoices.yml index 4ca40bd9..c3a31966 100644 --- a/.mock/definition/invoices.yml +++ b/.mock/definition/invoices.yml @@ -53,6 +53,8 @@ service: examples: - query-parameters: location_id: location_id + headers: + Square-Version: '2025-07-16' response: body: invoices: @@ -236,7 +238,9 @@ service: type: root.CreateInvoiceResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: invoice: location_id: ES0RJRZYEC39A order_id: CAISENgvlJ6jLWAzERDzjyHVybY @@ -397,7 +401,9 @@ service: type: root.SearchInvoicesResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: query: filter: location_ids: @@ -560,6 +566,8 @@ service: examples: - path-parameters: invoice_id: invoice_id + headers: + Square-Version: '2025-07-16' response: body: invoice: @@ -704,6 +712,8 @@ service: examples: - path-parameters: invoice_id: invoice_id + headers: + Square-Version: '2025-07-16' request: invoice: version: 1 @@ -813,6 +823,8 @@ service: examples: - path-parameters: invoice_id: invoice_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -867,6 +879,8 @@ service: examples: - path-parameters: invoice_id: invoice_id + headers: + Square-Version: '2025-07-16' request: {} response: body: @@ -915,6 +929,8 @@ service: - path-parameters: invoice_id: invoice_id attachment_id: attachment_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -962,6 +978,8 @@ service: examples: - path-parameters: invoice_id: invoice_id + headers: + Square-Version: '2025-07-16' request: version: 0 response: @@ -1110,6 +1128,8 @@ service: examples: - path-parameters: invoice_id: invoice_id + headers: + Square-Version: '2025-07-16' request: version: 1 idempotency_key: 32da42d0-1997-41b0-826b-f09464fc2c2e diff --git a/.mock/definition/labor.yml b/.mock/definition/labor.yml index 824f6c0e..e259a438 100644 --- a/.mock/definition/labor.yml +++ b/.mock/definition/labor.yml @@ -68,7 +68,9 @@ service: type: root.CreateScheduledShiftResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: idempotency_key: HIDSNG5KS478L scheduled_shift: draft_shift_details: @@ -169,7 +171,9 @@ service: type: root.BulkPublishScheduledShiftsResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: scheduled_shifts: key: {} scheduled_shift_notification_audience: AFFECTED @@ -258,7 +262,9 @@ service: type: root.SearchScheduledShiftsResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: query: filter: assignment_status: ASSIGNED @@ -310,6 +316,8 @@ service: examples: - path-parameters: id: id + headers: + Square-Version: '2025-07-16' response: body: scheduled_shift: @@ -423,6 +431,8 @@ service: examples: - path-parameters: id: id + headers: + Square-Version: '2025-07-16' request: scheduled_shift: draft_shift_details: @@ -529,6 +539,8 @@ service: examples: - path-parameters: id: id + headers: + Square-Version: '2025-07-16' request: idempotency_key: HIDSNG5KS478L version: 2 @@ -626,7 +638,9 @@ service: type: root.CreateTimecardResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: idempotency_key: HIDSNG5KS478L timecard: location_id: PAA1RJZZKXBFG @@ -729,7 +743,9 @@ service: type: root.SearchTimecardsResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: query: filter: workday: @@ -832,6 +848,8 @@ service: examples: - path-parameters: id: id + headers: + Square-Version: '2025-07-16' response: body: timecard: @@ -908,6 +926,8 @@ service: examples: - path-parameters: id: id + headers: + Square-Version: '2025-07-16' request: timecard: location_id: PAA1RJZZKXBFG @@ -990,6 +1010,8 @@ service: examples: - path-parameters: id: id + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/labor/breakTypes.yml b/.mock/definition/labor/breakTypes.yml index 921558e9..9caa5ef1 100644 --- a/.mock/definition/labor/breakTypes.yml +++ b/.mock/definition/labor/breakTypes.yml @@ -41,7 +41,9 @@ service: type: root.ListBreakTypesResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: break_types: - id: REGS1EQR1TPZ5 @@ -120,7 +122,9 @@ service: type: root.CreateBreakTypeResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: idempotency_key: PAD3NG5KSN2GL break_type: location_id: CGJN03P1D08GF @@ -164,6 +168,8 @@ service: examples: - path-parameters: id: id + headers: + Square-Version: '2025-07-16' response: body: break_type: @@ -207,6 +213,8 @@ service: examples: - path-parameters: id: id + headers: + Square-Version: '2025-07-16' request: break_type: location_id: 26M7H24AZ9N6R @@ -254,6 +262,8 @@ service: examples: - path-parameters: id: id + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/labor/employeeWages.yml b/.mock/definition/labor/employeeWages.yml index 6d1b740b..3fdb171f 100644 --- a/.mock/definition/labor/employeeWages.yml +++ b/.mock/definition/labor/employeeWages.yml @@ -40,7 +40,9 @@ service: status-code: 200 availability: deprecated examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: employee_wages: - id: pXS3qCv7BERPnEGedM4S8mhm @@ -95,6 +97,8 @@ service: examples: - path-parameters: id: id + headers: + Square-Version: '2025-07-16' response: body: employee_wage: diff --git a/.mock/definition/labor/shifts.yml b/.mock/definition/labor/shifts.yml index 93669d62..38b3737c 100644 --- a/.mock/definition/labor/shifts.yml +++ b/.mock/definition/labor/shifts.yml @@ -68,7 +68,9 @@ service: status-code: 200 availability: deprecated examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: idempotency_key: HIDSNG5KS478L shift: location_id: PAA1RJZZKXBFG @@ -173,7 +175,9 @@ service: status-code: 200 availability: deprecated examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: query: filter: workday: @@ -279,6 +283,8 @@ service: examples: - path-parameters: id: id + headers: + Square-Version: '2025-07-16' response: body: shift: @@ -357,6 +363,8 @@ service: examples: - path-parameters: id: id + headers: + Square-Version: '2025-07-16' request: shift: location_id: PAA1RJZZKXBFG @@ -440,6 +448,8 @@ service: examples: - path-parameters: id: id + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/labor/teamMemberWages.yml b/.mock/definition/labor/teamMemberWages.yml index 8aa34b3a..97dcbc13 100644 --- a/.mock/definition/labor/teamMemberWages.yml +++ b/.mock/definition/labor/teamMemberWages.yml @@ -41,7 +41,9 @@ service: type: root.ListTeamMemberWagesResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: team_member_wages: - id: pXS3qCv7BERPnEGedM4S8mhm @@ -103,6 +105,8 @@ service: examples: - path-parameters: id: id + headers: + Square-Version: '2025-07-16' response: body: team_member_wage: diff --git a/.mock/definition/labor/workweekConfigs.yml b/.mock/definition/labor/workweekConfigs.yml index 8e6e0c12..a41b195e 100644 --- a/.mock/definition/labor/workweekConfigs.yml +++ b/.mock/definition/labor/workweekConfigs.yml @@ -32,7 +32,9 @@ service: type: root.ListWorkweekConfigsResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: workweek_configs: - id: FY4VCAQN700GM @@ -74,6 +76,8 @@ service: examples: - path-parameters: id: id + headers: + Square-Version: '2025-07-16' request: workweek_config: start_of_week: MON diff --git a/.mock/definition/locations.yml b/.mock/definition/locations.yml index 49d64674..77c4ebf3 100644 --- a/.mock/definition/locations.yml +++ b/.mock/definition/locations.yml @@ -22,7 +22,9 @@ service: type: root.ListLocationsResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: errors: - category: API_ERROR @@ -140,7 +142,9 @@ service: type: root.CreateLocationResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: location: name: Midtown address: @@ -235,6 +239,8 @@ service: examples: - path-parameters: location_id: location_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -321,6 +327,8 @@ service: examples: - path-parameters: location_id: location_id + headers: + Square-Version: '2025-07-16' request: location: business_hours: @@ -593,6 +601,8 @@ service: examples: - path-parameters: location_id: location_id + headers: + Square-Version: '2025-07-16' request: idempotency_key: 86ae1696-b1e3-4328-af6d-f1e04d947ad6 order: diff --git a/.mock/definition/locations/customAttributeDefinitions.yml b/.mock/definition/locations/customAttributeDefinitions.yml index a32d7ff2..a8562303 100644 --- a/.mock/definition/locations/customAttributeDefinitions.yml +++ b/.mock/definition/locations/customAttributeDefinitions.yml @@ -63,7 +63,9 @@ service: type: root.ListLocationCustomAttributeDefinitionsResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: custom_attribute_definitions: - key: phone-number @@ -155,7 +157,9 @@ service: type: root.CreateLocationCustomAttributeDefinitionResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: custom_attribute_definition: key: bestseller schema: @@ -231,6 +235,8 @@ service: examples: - path-parameters: key: key + headers: + Square-Version: '2025-07-16' response: body: custom_attribute_definition: @@ -329,6 +335,8 @@ service: examples: - path-parameters: key: key + headers: + Square-Version: '2025-07-16' request: custom_attribute_definition: description: Update the description as desired. @@ -382,6 +390,8 @@ service: examples: - path-parameters: key: key + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/locations/customAttributes.yml b/.mock/definition/locations/customAttributes.yml index 59525e5d..2436421e 100644 --- a/.mock/definition/locations/customAttributes.yml +++ b/.mock/definition/locations/customAttributes.yml @@ -38,7 +38,9 @@ service: type: root.BulkDeleteLocationCustomAttributesResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: values: id1: key: bestseller @@ -127,7 +129,9 @@ service: type: root.BulkUpsertLocationCustomAttributesResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: values: id1: location_id: L0TBCBTB7P8RQ @@ -269,6 +273,8 @@ service: examples: - path-parameters: location_id: location_id + headers: + Square-Version: '2025-07-16' response: body: custom_attributes: @@ -362,6 +368,8 @@ service: - path-parameters: location_id: location_id key: key + headers: + Square-Version: '2025-07-16' response: body: custom_attribute: @@ -468,6 +476,8 @@ service: - path-parameters: location_id: location_id key: key + headers: + Square-Version: '2025-07-16' request: custom_attribute: value: hot cocoa @@ -534,6 +544,8 @@ service: - path-parameters: location_id: location_id key: key + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/locations/transactions.yml b/.mock/definition/locations/transactions.yml index 4c61f9ba..35d612ba 100644 --- a/.mock/definition/locations/transactions.yml +++ b/.mock/definition/locations/transactions.yml @@ -83,6 +83,8 @@ service: examples: - path-parameters: location_id: location_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -170,6 +172,8 @@ service: - path-parameters: location_id: location_id transaction_id: transaction_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -268,6 +272,8 @@ service: - path-parameters: location_id: location_id transaction_id: transaction_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -312,6 +318,8 @@ service: - path-parameters: location_id: location_id transaction_id: transaction_id + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/loyalty.yml b/.mock/definition/loyalty.yml index 7c855c96..1e81d71c 100644 --- a/.mock/definition/loyalty.yml +++ b/.mock/definition/loyalty.yml @@ -68,7 +68,9 @@ service: type: root.SearchLoyaltyEventsResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: query: filter: order_filter: @@ -89,55 +91,31 @@ service: loyalty_program_id: d619f755-2d17-41f3-990d-c04ecedd64dd points: 5 order_id: PyATxhYLfsMqpVkcKJITPydgEYfZY - create_reward: - loyalty_program_id: loyalty_program_id - points: 1 - redeem_reward: - loyalty_program_id: loyalty_program_id - delete_reward: - loyalty_program_id: loyalty_program_id - points: 1 adjust_points: points: 1 loyalty_account_id: 5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd location_id: P034NEENMD09F source: LOYALTY_API expire_points: - loyalty_program_id: loyalty_program_id points: 1 other_event: - loyalty_program_id: loyalty_program_id - points: 1 - accumulate_promotion_points: points: 1 - order_id: order_id - id: e4a5cbc3-a4d0-3779-98e9-e578885d9430 type: REDEEM_REWARD created_at: '2020-05-08T22:01:15Z' - create_reward: - loyalty_program_id: loyalty_program_id - points: 1 redeem_reward: loyalty_program_id: d619f755-2d17-41f3-990d-c04ecedd64dd reward_id: d03f79f4-815f-3500-b851-cc1e68a457f9 order_id: PyATxhYLfsMqpVkcKJITPydgEYfZY - delete_reward: - loyalty_program_id: loyalty_program_id - points: 1 adjust_points: points: 1 loyalty_account_id: 5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd location_id: P034NEENMD09F source: LOYALTY_API expire_points: - loyalty_program_id: loyalty_program_id points: 1 other_event: - loyalty_program_id: loyalty_program_id - points: 1 - accumulate_promotion_points: points: 1 - order_id: order_id - id: 5e127479-0b03-3671-ab1e-15faea8b7188 type: CREATE_REWARD created_at: '2020-05-08T22:00:44Z' @@ -145,25 +123,15 @@ service: loyalty_program_id: d619f755-2d17-41f3-990d-c04ecedd64dd reward_id: d03f79f4-815f-3500-b851-cc1e68a457f9 points: -10 - redeem_reward: - loyalty_program_id: loyalty_program_id - delete_reward: - loyalty_program_id: loyalty_program_id - points: 1 adjust_points: points: 1 loyalty_account_id: 5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd location_id: location_id source: LOYALTY_API expire_points: - loyalty_program_id: loyalty_program_id points: 1 other_event: - loyalty_program_id: loyalty_program_id - points: 1 - accumulate_promotion_points: points: 1 - order_id: order_id cursor: cursor source: openapi: openapi/openapi.json diff --git a/.mock/definition/loyalty/accounts.yml b/.mock/definition/loyalty/accounts.yml index 83da3351..c52772f0 100644 --- a/.mock/definition/loyalty/accounts.yml +++ b/.mock/definition/loyalty/accounts.yml @@ -38,7 +38,9 @@ service: type: root.CreateLoyaltyAccountResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: loyalty_account: program_id: d619f755-2d17-41f3-990d-c04ecedd64dd mapping: @@ -119,7 +121,9 @@ service: type: root.SearchLoyaltyAccountsResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: query: mappings: - phone_number: '+14155551234' @@ -171,6 +175,8 @@ service: examples: - path-parameters: account_id: account_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -279,6 +285,8 @@ service: examples: - path-parameters: account_id: account_id + headers: + Square-Version: '2025-07-16' request: accumulate_points: order_id: RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY @@ -337,28 +345,15 @@ service: loyalty_program_id: d619f755-2d17-41f3-990d-c04ecedd64dd points: 6 order_id: RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY - create_reward: - loyalty_program_id: loyalty_program_id - points: 1 - redeem_reward: - loyalty_program_id: loyalty_program_id - delete_reward: - loyalty_program_id: loyalty_program_id - points: 1 adjust_points: points: 1 loyalty_account_id: 5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd location_id: P034NEENMD09F source: LOYALTY_API expire_points: - loyalty_program_id: loyalty_program_id points: 1 other_event: - loyalty_program_id: loyalty_program_id - points: 1 - accumulate_promotion_points: points: 1 - order_id: order_id adjust: path: /v2/loyalty/accounts/{account_id}/adjust method: POST @@ -421,6 +416,8 @@ service: examples: - path-parameters: account_id: account_id + headers: + Square-Version: '2025-07-16' request: idempotency_key: bc29a517-3dc9-450e-aa76-fae39ee849d1 adjust_points: diff --git a/.mock/definition/loyalty/programs.yml b/.mock/definition/loyalty/programs.yml index eb39d23d..741a44a5 100644 --- a/.mock/definition/loyalty/programs.yml +++ b/.mock/definition/loyalty/programs.yml @@ -31,7 +31,9 @@ service: status-code: 200 availability: deprecated examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: errors: - category: API_ERROR @@ -105,6 +107,8 @@ service: examples: - path-parameters: program_id: program_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -252,6 +256,8 @@ service: examples: - path-parameters: program_id: program_id + headers: + Square-Version: '2025-07-16' request: order_id: RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY loyalty_account_id: 79b807d2-d786-46a9-933b-918028d7a8c5 diff --git a/.mock/definition/loyalty/programs/promotions.yml b/.mock/definition/loyalty/programs/promotions.yml index 329b5180..9e478716 100644 --- a/.mock/definition/loyalty/programs/promotions.yml +++ b/.mock/definition/loyalty/programs/promotions.yml @@ -73,6 +73,8 @@ service: examples: - path-parameters: program_id: program_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -226,6 +228,8 @@ service: examples: - path-parameters: program_id: program_id + headers: + Square-Version: '2025-07-16' request: loyalty_promotion: name: Tuesday Happy Hour Promo @@ -325,6 +329,8 @@ service: - path-parameters: promotion_id: promotion_id program_id: program_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -410,6 +416,8 @@ service: - path-parameters: promotion_id: promotion_id program_id: program_id + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/loyalty/rewards.yml b/.mock/definition/loyalty/rewards.yml index 47fdb4a8..93b92c44 100644 --- a/.mock/definition/loyalty/rewards.yml +++ b/.mock/definition/loyalty/rewards.yml @@ -51,7 +51,9 @@ service: type: root.CreateLoyaltyRewardResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: reward: loyalty_account_id: 5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd reward_tier_id: e1b39225-9da5-43d1-a5db-782cdd8ad94f @@ -134,7 +136,9 @@ service: type: root.SearchLoyaltyRewardsResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: query: loyalty_account_id: 5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd limit: 10 @@ -204,6 +208,8 @@ service: examples: - path-parameters: reward_id: reward_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -258,6 +264,8 @@ service: examples: - path-parameters: reward_id: reward_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -318,6 +326,8 @@ service: examples: - path-parameters: reward_id: reward_id + headers: + Square-Version: '2025-07-16' request: idempotency_key: 98adc7f7-6963-473b-b29c-f3c9cdd7d994 location_id: P034NEENMD09F diff --git a/.mock/definition/merchants.yml b/.mock/definition/merchants.yml index 29e187f1..f44b1510 100644 --- a/.mock/definition/merchants.yml +++ b/.mock/definition/merchants.yml @@ -49,7 +49,9 @@ service: type: root.ListMerchantsResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: errors: - category: API_ERROR @@ -92,6 +94,8 @@ service: examples: - path-parameters: merchant_id: merchant_id + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/merchants/customAttributeDefinitions.yml b/.mock/definition/merchants/customAttributeDefinitions.yml index d9e7162b..e452d3ba 100644 --- a/.mock/definition/merchants/customAttributeDefinitions.yml +++ b/.mock/definition/merchants/customAttributeDefinitions.yml @@ -63,7 +63,9 @@ service: type: root.ListMerchantCustomAttributeDefinitionsResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: custom_attribute_definitions: - key: has_seen_tutorial @@ -157,7 +159,9 @@ service: type: root.CreateMerchantCustomAttributeDefinitionResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: custom_attribute_definition: key: alternative_seller_name schema: @@ -233,6 +237,8 @@ service: examples: - path-parameters: key: key + headers: + Square-Version: '2025-07-16' response: body: custom_attribute_definition: @@ -331,6 +337,8 @@ service: examples: - path-parameters: key: key + headers: + Square-Version: '2025-07-16' request: custom_attribute_definition: description: Update the description as desired. @@ -384,6 +392,8 @@ service: examples: - path-parameters: key: key + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/merchants/customAttributes.yml b/.mock/definition/merchants/customAttributes.yml index f3079e5d..72c2fce7 100644 --- a/.mock/definition/merchants/customAttributes.yml +++ b/.mock/definition/merchants/customAttributes.yml @@ -38,7 +38,9 @@ service: type: root.BulkDeleteMerchantCustomAttributesResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: values: id1: key: alternative_seller_name @@ -118,7 +120,9 @@ service: type: root.BulkUpsertMerchantCustomAttributesResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: values: id1: merchant_id: DM7VKY8Q63GNP @@ -243,6 +247,8 @@ service: examples: - path-parameters: merchant_id: merchant_id + headers: + Square-Version: '2025-07-16' response: body: custom_attributes: @@ -336,6 +342,8 @@ service: - path-parameters: merchant_id: merchant_id key: key + headers: + Square-Version: '2025-07-16' response: body: custom_attribute: @@ -443,6 +451,8 @@ service: - path-parameters: merchant_id: merchant_id key: key + headers: + Square-Version: '2025-07-16' request: custom_attribute: value: Ultimate Sneaker Store @@ -509,6 +519,8 @@ service: - path-parameters: merchant_id: merchant_id key: key + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/mobile.yml b/.mock/definition/mobile.yml index 847e85be..18a595bf 100644 --- a/.mock/definition/mobile.yml +++ b/.mock/definition/mobile.yml @@ -61,7 +61,9 @@ service: status-code: 200 availability: deprecated examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: location_id: YOUR_LOCATION_ID response: body: diff --git a/.mock/definition/oAuth.yml b/.mock/definition/oAuth.yml index 35bba044..b7c6391f 100644 --- a/.mock/definition/oAuth.yml +++ b/.mock/definition/oAuth.yml @@ -80,7 +80,9 @@ service: type: root.RevokeTokenResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: client_id: CLIENT_ID access_token: ACCESS_TOKEN response: @@ -309,7 +311,9 @@ service: type: root.ObtainTokenResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: client_id: sq0idp-uaPHILoPzWZk3tlJqlML0g client_secret: sq0csp-30a-4C_tVOnTh14Piza2BfTPBXyLafLPWSzY1qAjeBfM code: sq0cgb-l0SBqxs4uwxErTVyYOdemg @@ -344,7 +348,9 @@ service: type: root.RetrieveTokenStatusResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: scopes: - PAYMENTS_READ @@ -364,6 +370,7 @@ service: source: openapi: openapi/openapi.json examples: - - {} + - headers: + Square-Version: '2025-07-16' source: openapi: openapi/openapi.json diff --git a/.mock/definition/orders.yml b/.mock/definition/orders.yml index a39095aa..4dc1424f 100644 --- a/.mock/definition/orders.yml +++ b/.mock/definition/orders.yml @@ -34,7 +34,9 @@ service: type: root.CreateOrderResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: order: location_id: 057P5VYJ4A5X1 reference_id: my-order-001 @@ -322,7 +324,9 @@ service: type: root.BatchGetOrdersResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: location_id: 057P5VYJ4A5X1 order_ids: - CAISEM82RcpmcFBM0TfOyiHV3es @@ -427,7 +431,9 @@ service: type: root.CalculateOrderResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: order: location_id: D7AVYMEAPJ3A3 line_items: @@ -650,7 +656,9 @@ service: type: root.CloneOrderResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: order_id: ZAISEM52YcpmcWAzERDOyiWS123 version: 3 idempotency_key: UNIQUE_STRING @@ -967,7 +975,9 @@ service: type: root.SearchOrdersResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: location_ids: - 057P5VYJ4A5X1 - 18YC4JDH91E1H @@ -1058,6 +1068,8 @@ service: examples: - path-parameters: order_id: order_id + headers: + Square-Version: '2025-07-16' response: body: order: @@ -1304,6 +1316,8 @@ service: examples: - path-parameters: order_id: order_id + headers: + Square-Version: '2025-07-16' request: order: location_id: location_id @@ -1530,6 +1544,8 @@ service: examples: - path-parameters: order_id: order_id + headers: + Square-Version: '2025-07-16' request: idempotency_key: c043a359-7ad9-4136-82a9-c3f1d66dcbff payment_ids: diff --git a/.mock/definition/orders/customAttributeDefinitions.yml b/.mock/definition/orders/customAttributeDefinitions.yml index f6b8bd52..db1cec64 100644 --- a/.mock/definition/orders/customAttributeDefinitions.yml +++ b/.mock/definition/orders/customAttributeDefinitions.yml @@ -69,7 +69,9 @@ service: type: root.ListOrderCustomAttributeDefinitionsResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: custom_attribute_definitions: - key: cover-count @@ -167,7 +169,9 @@ service: type: root.CreateOrderCustomAttributeDefinitionResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: custom_attribute_definition: key: cover-count schema: @@ -239,6 +243,8 @@ service: examples: - path-parameters: key: key + headers: + Square-Version: '2025-07-16' response: body: custom_attribute_definition: @@ -316,6 +322,8 @@ service: examples: - path-parameters: key: key + headers: + Square-Version: '2025-07-16' request: custom_attribute_definition: key: cover-count @@ -367,6 +375,8 @@ service: examples: - path-parameters: key: key + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/orders/customAttributes.yml b/.mock/definition/orders/customAttributes.yml index b096cf25..a626c622 100644 --- a/.mock/definition/orders/customAttributes.yml +++ b/.mock/definition/orders/customAttributes.yml @@ -64,7 +64,9 @@ service: type: root.BulkDeleteOrderCustomAttributesResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: values: cover-count: key: cover-count @@ -148,7 +150,9 @@ service: type: root.BulkUpsertOrderCustomAttributesResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: values: cover-count: custom_attribute: @@ -275,6 +279,8 @@ service: examples: - path-parameters: order_id: order_id + headers: + Square-Version: '2025-07-16' response: body: custom_attributes: @@ -359,6 +365,8 @@ service: - path-parameters: order_id: order_id custom_attribute_key: custom_attribute_key + headers: + Square-Version: '2025-07-16' response: body: custom_attribute: @@ -468,6 +476,8 @@ service: - path-parameters: order_id: order_id custom_attribute_key: custom_attribute_key + headers: + Square-Version: '2025-07-16' request: custom_attribute: key: table-number @@ -538,6 +548,8 @@ service: - path-parameters: order_id: order_id custom_attribute_key: custom_attribute_key + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/payments.yml b/.mock/definition/payments.yml index 793511f6..b2d02f6c 100644 --- a/.mock/definition/payments.yml +++ b/.mock/definition/payments.yml @@ -160,7 +160,9 @@ service: type: root.ListPaymentsResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: errors: - category: API_ERROR @@ -617,7 +619,9 @@ service: type: root.CreatePaymentResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: source_id: ccof:GaJGNaZa8x4OgDJn4GB idempotency_key: 7b0f3ec5-086a-4871-8f13-3c81b3875218 amount_money: @@ -832,7 +836,9 @@ service: type: root.CancelPaymentByIdempotencyKeyResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: idempotency_key: a7e36d40-d24b-11e8-b568-0800200c9a66 response: body: @@ -862,6 +868,8 @@ service: examples: - path-parameters: payment_id: payment_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -1061,6 +1069,8 @@ service: examples: - path-parameters: payment_id: payment_id + headers: + Square-Version: '2025-07-16' request: payment: amount_money: @@ -1249,6 +1259,8 @@ service: examples: - path-parameters: payment_id: payment_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -1443,6 +1455,8 @@ service: examples: - path-parameters: payment_id: payment_id + headers: + Square-Version: '2025-07-16' request: {} response: body: diff --git a/.mock/definition/payouts.yml b/.mock/definition/payouts.yml index efd249d7..c404acb3 100644 --- a/.mock/definition/payouts.yml +++ b/.mock/definition/payouts.yml @@ -85,7 +85,9 @@ service: type: root.ListPayoutsResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: payouts: - id: po_b345d2c7-90b3-4f0b-a2aa-df1def7f8afc @@ -153,6 +155,8 @@ service: examples: - path-parameters: payout_id: payout_id + headers: + Square-Version: '2025-07-16' response: body: payout: @@ -237,6 +241,8 @@ service: examples: - path-parameters: payout_id: payout_id + headers: + Square-Version: '2025-07-16' response: body: payout_entries: diff --git a/.mock/definition/refunds.yml b/.mock/definition/refunds.yml index f94a598d..c267c592 100644 --- a/.mock/definition/refunds.yml +++ b/.mock/definition/refunds.yml @@ -151,7 +151,9 @@ service: type: root.ListPaymentRefundsResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: errors: - category: API_ERROR @@ -374,7 +376,9 @@ service: type: root.RefundPaymentResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: idempotency_key: 9b7f2dcf-49da-4411-b23e-a2d6af21333a amount_money: amount: 1000 @@ -440,6 +444,8 @@ service: examples: - path-parameters: refund_id: refund_id + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/sites.yml b/.mock/definition/sites.yml index a17d1c73..91dc19f5 100644 --- a/.mock/definition/sites.yml +++ b/.mock/definition/sites.yml @@ -26,7 +26,9 @@ service: type: root.ListSitesResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: errors: - category: API_ERROR diff --git a/.mock/definition/snippets.yml b/.mock/definition/snippets.yml index 0bec7630..95732fcc 100644 --- a/.mock/definition/snippets.yml +++ b/.mock/definition/snippets.yml @@ -39,6 +39,8 @@ service: examples: - path-parameters: site_id: site_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -96,6 +98,8 @@ service: examples: - path-parameters: site_id: site_id + headers: + Square-Version: '2025-07-16' request: snippet: content: @@ -145,6 +149,8 @@ service: examples: - path-parameters: site_id: site_id + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/subscriptions.yml b/.mock/definition/subscriptions.yml index d8005f17..e66a6e8a 100644 --- a/.mock/definition/subscriptions.yml +++ b/.mock/definition/subscriptions.yml @@ -159,7 +159,9 @@ service: type: root.CreateSubscriptionResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: idempotency_key: 8193148c-9586-11e6-99f9-28cfe92138cf location_id: S8GWD5R9QB376 plan_variation_id: 6JHXF3B2CW3YKHDV4XEM674H @@ -258,7 +260,9 @@ service: type: root.BulkSwapPlanResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: new_plan_variation_id: FQ7CDXXWSLUJRPM3GFJSJGZ7 old_plan_variation_id: 6JHXF3B2CW3YKHDV4XEM674H location_id: S8GWD5R9QB376 @@ -356,7 +360,9 @@ service: type: root.SearchSubscriptionsResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: query: filter: customer_ids: @@ -481,6 +487,8 @@ service: examples: - path-parameters: subscription_id: subscription_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -553,6 +561,8 @@ service: examples: - path-parameters: subscription_id: subscription_id + headers: + Square-Version: '2025-07-16' request: subscription: card_id: '{NEW CARD ID}' @@ -615,6 +625,8 @@ service: - path-parameters: subscription_id: subscription_id action_id: action_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -696,6 +708,8 @@ service: examples: - path-parameters: subscription_id: subscription_id + headers: + Square-Version: '2025-07-16' request: monthly_billing_anchor_date: 1 response: @@ -769,6 +783,8 @@ service: examples: - path-parameters: subscription_id: subscription_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -860,6 +876,8 @@ service: examples: - path-parameters: subscription_id: subscription_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -994,6 +1012,8 @@ service: examples: - path-parameters: subscription_id: subscription_id + headers: + Square-Version: '2025-07-16' request: {} response: body: @@ -1076,6 +1096,8 @@ service: examples: - path-parameters: subscription_id: subscription_id + headers: + Square-Version: '2025-07-16' request: {} response: body: @@ -1161,6 +1183,8 @@ service: examples: - path-parameters: subscription_id: subscription_id + headers: + Square-Version: '2025-07-16' request: new_plan_variation_id: FQ7CDXXWSLUJRPM3GFJSJGZ7 phases: diff --git a/.mock/definition/team.yml b/.mock/definition/team.yml index 3d207bab..9b12d852 100644 --- a/.mock/definition/team.yml +++ b/.mock/definition/team.yml @@ -33,7 +33,9 @@ service: type: root.ListJobsResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: jobs: - id: VDNpRv8da51NU8qZFC5zDWpF @@ -94,7 +96,9 @@ service: type: root.CreateJobResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: job: title: Cashier is_tip_eligible: true @@ -134,6 +138,8 @@ service: examples: - path-parameters: job_id: job_id + headers: + Square-Version: '2025-07-16' response: body: job: @@ -188,6 +194,8 @@ service: examples: - path-parameters: job_id: job_id + headers: + Square-Version: '2025-07-16' request: job: title: Cashier 1 diff --git a/.mock/definition/teamMembers.yml b/.mock/definition/teamMembers.yml index d562a1cf..cfef0122 100644 --- a/.mock/definition/teamMembers.yml +++ b/.mock/definition/teamMembers.yml @@ -32,7 +32,9 @@ service: type: root.CreateTeamMemberResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: idempotency_key: idempotency-key-0 team_member: reference_id: reference_id_1 @@ -152,7 +154,9 @@ service: type: root.BatchCreateTeamMembersResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: team_members: idempotency-key-1: team_member: @@ -264,7 +268,9 @@ service: type: root.BatchUpdateTeamMembersResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: team_members: AFMwA08kR-MIF-3Vs0OE: team_member: @@ -378,7 +384,9 @@ service: type: root.SearchTeamMembersResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: query: filter: location_ids: @@ -614,6 +622,8 @@ service: examples: - path-parameters: team_member_id: team_member_id + headers: + Square-Version: '2025-07-16' response: body: team_member: @@ -688,6 +698,8 @@ service: examples: - path-parameters: team_member_id: team_member_id + headers: + Square-Version: '2025-07-16' request: team_member: reference_id: reference_id_1 diff --git a/.mock/definition/teamMembers/wageSetting.yml b/.mock/definition/teamMembers/wageSetting.yml index 3b9ca3c6..7bded52e 100644 --- a/.mock/definition/teamMembers/wageSetting.yml +++ b/.mock/definition/teamMembers/wageSetting.yml @@ -39,6 +39,8 @@ service: examples: - path-parameters: team_member_id: team_member_id + headers: + Square-Version: '2025-07-16' response: body: wage_setting: @@ -123,6 +125,8 @@ service: examples: - path-parameters: team_member_id: team_member_id + headers: + Square-Version: '2025-07-16' request: wage_setting: job_assignments: diff --git a/.mock/definition/terminal.yml b/.mock/definition/terminal.yml index 06947665..263becab 100644 --- a/.mock/definition/terminal.yml +++ b/.mock/definition/terminal.yml @@ -34,6 +34,8 @@ service: examples: - path-parameters: action_id: action_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -131,6 +133,8 @@ service: examples: - path-parameters: checkout_id: checkout_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -204,6 +208,8 @@ service: examples: - path-parameters: terminal_refund_id: terminal_refund_id + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/terminal/actions.yml b/.mock/definition/terminal/actions.yml index b3b9fea5..e777c121 100644 --- a/.mock/definition/terminal/actions.yml +++ b/.mock/definition/terminal/actions.yml @@ -42,7 +42,9 @@ service: type: root.CreateTerminalActionResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: idempotency_key: thahn-70e75c10-47f7-4ab6-88cc-aaa4076d065e action: device_id: '{{DEVICE_ID}}' @@ -168,7 +170,9 @@ service: type: root.SearchTerminalActionsResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: query: filter: created_at: @@ -285,6 +289,8 @@ service: examples: - path-parameters: action_id: action_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -376,6 +382,8 @@ service: examples: - path-parameters: action_id: action_id + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/terminal/checkouts.yml b/.mock/definition/terminal/checkouts.yml index 59ff4afe..f9840a9d 100644 --- a/.mock/definition/terminal/checkouts.yml +++ b/.mock/definition/terminal/checkouts.yml @@ -44,7 +44,9 @@ service: type: root.CreateTerminalCheckoutResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: idempotency_key: 28a0c3bc-7839-11ea-bc55-0242ac130003 checkout: amount_money: @@ -148,7 +150,9 @@ service: type: root.SearchTerminalCheckoutsResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: query: filter: status: COMPLETED @@ -235,6 +239,8 @@ service: examples: - path-parameters: checkout_id: checkout_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -304,6 +310,8 @@ service: examples: - path-parameters: checkout_id: checkout_id + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/terminal/refunds.yml b/.mock/definition/terminal/refunds.yml index 628b34ce..9ab41737 100644 --- a/.mock/definition/terminal/refunds.yml +++ b/.mock/definition/terminal/refunds.yml @@ -45,7 +45,9 @@ service: type: root.CreateTerminalRefundResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: idempotency_key: 402a640b-b26f-401f-b406-46f839590c04 refund: payment_id: 5O5OvgkcNUhl7JBuINflcjKqUzXZY @@ -123,7 +125,9 @@ service: type: root.SearchTerminalRefundsResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: query: filter: status: COMPLETED @@ -177,6 +181,8 @@ service: examples: - path-parameters: terminal_refund_id: terminal_refund_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -225,6 +231,8 @@ service: examples: - path-parameters: terminal_refund_id: terminal_refund_id + headers: + Square-Version: '2025-07-16' response: body: errors: diff --git a/.mock/definition/v1Transactions.yml b/.mock/definition/v1Transactions.yml index f6b8232c..b4d2cb62 100644 --- a/.mock/definition/v1Transactions.yml +++ b/.mock/definition/v1Transactions.yml @@ -40,6 +40,8 @@ service: examples: - path-parameters: location_id: location_id + headers: + Square-Version: '2025-07-16' response: body: - errors: @@ -136,6 +138,8 @@ service: - path-parameters: location_id: location_id order_id: order_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -279,6 +283,8 @@ service: - path-parameters: location_id: location_id order_id: order_id + headers: + Square-Version: '2025-07-16' request: action: COMPLETE response: diff --git a/.mock/definition/vendors.yml b/.mock/definition/vendors.yml index 037c1a82..b05ad2df 100644 --- a/.mock/definition/vendors.yml +++ b/.mock/definition/vendors.yml @@ -30,7 +30,9 @@ service: type: root.BatchCreateVendorsResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: vendors: 8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe: name: Joe's Fresh Seafood @@ -103,7 +105,9 @@ service: type: root.BatchGetVendorsResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: vendor_ids: - INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4 response: @@ -168,7 +172,9 @@ service: type: root.BatchUpdateVendorsResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: vendors: FMCYHBWT1TPL8MFH52PBMEN92A: vendor: {} @@ -274,7 +280,9 @@ service: type: root.CreateVendorResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: idempotency_key: 8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe vendor: name: Joe's Fresh Seafood @@ -368,7 +376,9 @@ service: type: root.SearchVendorsResponse status-code: 200 examples: - - request: {} + - headers: + Square-Version: '2025-07-16' + request: {} response: body: errors: @@ -420,6 +430,8 @@ service: examples: - path-parameters: vendor_id: vendor_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -482,6 +494,8 @@ service: examples: - path-parameters: vendor_id: vendor_id + headers: + Square-Version: '2025-07-16' request: idempotency_key: 8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe vendor: diff --git a/.mock/definition/webhooks/eventTypes.yml b/.mock/definition/webhooks/eventTypes.yml index 13b091ac..620f2033 100644 --- a/.mock/definition/webhooks/eventTypes.yml +++ b/.mock/definition/webhooks/eventTypes.yml @@ -25,7 +25,9 @@ service: type: root.ListWebhookEventTypesResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: errors: - category: API_ERROR diff --git a/.mock/definition/webhooks/subscriptions.yml b/.mock/definition/webhooks/subscriptions.yml index f5f89d18..8282c610 100644 --- a/.mock/definition/webhooks/subscriptions.yml +++ b/.mock/definition/webhooks/subscriptions.yml @@ -63,7 +63,9 @@ service: type: root.ListWebhookSubscriptionsResponse status-code: 200 examples: - - response: + - headers: + Square-Version: '2025-07-16' + response: body: errors: - category: API_ERROR @@ -112,7 +114,9 @@ service: type: root.CreateWebhookSubscriptionResponse status-code: 200 examples: - - request: + - headers: + Square-Version: '2025-07-16' + request: idempotency_key: 63f84c6c-2200-4c99-846c-2670a1311fbf subscription: name: Example Webhook Subscription @@ -163,6 +167,8 @@ service: examples: - path-parameters: subscription_id: subscription_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -211,6 +217,8 @@ service: examples: - path-parameters: subscription_id: subscription_id + headers: + Square-Version: '2025-07-16' request: subscription: name: Updated Example Webhook Subscription @@ -257,6 +265,8 @@ service: examples: - path-parameters: subscription_id: subscription_id + headers: + Square-Version: '2025-07-16' response: body: errors: @@ -300,6 +310,8 @@ service: examples: - path-parameters: subscription_id: subscription_id + headers: + Square-Version: '2025-07-16' request: idempotency_key: ed80ae6b-0654-473b-bbab-a39aee89a60d response: @@ -347,6 +359,8 @@ service: examples: - path-parameters: subscription_id: subscription_id + headers: + Square-Version: '2025-07-16' request: event_type: payment.created response: diff --git a/.mock/fern.config.json b/.mock/fern.config.json index 2414e804..47de4c7d 100644 --- a/.mock/fern.config.json +++ b/.mock/fern.config.json @@ -1,4 +1,4 @@ { "organization" : "square", - "version" : "0.57.17" + "version" : "0.64.23" } \ No newline at end of file diff --git a/.mock/openapi/openapi.json b/.mock/openapi/openapi.json index becb01f9..33c6c40f 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-06-18" + "default": "2025-07-16" } } ], @@ -76794,7 +76794,7 @@ "name": "version", "optional": true, "env": "VERSION", - "type": "literal\u003c\"2025-06-18\"\u003e" + "type": "literal\u003c\"2025-07-16\"\u003e" } ] } \ No newline at end of file diff --git a/src/SquareClient.php b/src/SquareClient.php index a05db80b..14e8034a 100644 --- a/src/SquareClient.php +++ b/src/SquareClient.php @@ -247,7 +247,7 @@ 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-06-18', + 'Square-Version' => '2025-07-16', 'X-Fern-Language' => 'PHP', 'X-Fern-SDK-Name' => 'Square', 'X-Fern-SDK-Version' => '43.0.0.20250618', diff --git a/src/Types/CustomerSegment.php b/src/Types/CustomerSegment.php index b069c963..94cf32db 100644 --- a/src/Types/CustomerSegment.php +++ b/src/Types/CustomerSegment.php @@ -20,10 +20,10 @@ class CustomerSegment extends JsonSerializableType private ?string $id; /** - * @var string $name The name of the segment. + * @var ?string $name The name of the segment. */ #[JsonProperty('name')] - private string $name; + private ?string $name; /** * @var ?string $createdAt The timestamp when the segment was created, in RFC 3339 format. @@ -39,17 +39,17 @@ class CustomerSegment extends JsonSerializableType /** * @param array{ - * name: string, * id?: ?string, + * name?: ?string, * createdAt?: ?string, * updatedAt?: ?string, * } $values */ public function __construct( - array $values, + array $values = [], ) { $this->id = $values['id'] ?? null; - $this->name = $values['name']; + $this->name = $values['name'] ?? null; $this->createdAt = $values['createdAt'] ?? null; $this->updatedAt = $values['updatedAt'] ?? null; } @@ -72,17 +72,17 @@ public function setId(?string $value = null): self } /** - * @return string + * @return ?string */ - public function getName(): string + public function getName(): ?string { return $this->name; } /** - * @param string $value + * @param ?string $value */ - public function setName(string $value): self + public function setName(?string $value = null): self { $this->name = $value; return $this; diff --git a/src/Types/LoyaltyEvent.php b/src/Types/LoyaltyEvent.php index 90cd65bd..a103e504 100644 --- a/src/Types/LoyaltyEvent.php +++ b/src/Types/LoyaltyEvent.php @@ -12,10 +12,10 @@ class LoyaltyEvent extends JsonSerializableType { /** - * @var string $id The Square-assigned ID of the loyalty event. + * @var ?string $id The Square-assigned ID of the loyalty event. */ #[JsonProperty('id')] - private string $id; + private ?string $id; /** * The type of the loyalty event. @@ -27,10 +27,10 @@ class LoyaltyEvent extends JsonSerializableType private string $type; /** - * @var string $createdAt The timestamp when the event was created, in RFC 3339 format. + * @var ?string $createdAt The timestamp when the event was created, in RFC 3339 format. */ #[JsonProperty('created_at')] - private string $createdAt; + private ?string $createdAt; /** * @var ?LoyaltyEventAccumulatePoints $accumulatePoints Provides metadata when the event `type` is `ACCUMULATE_POINTS`. @@ -63,10 +63,10 @@ class LoyaltyEvent extends JsonSerializableType private ?LoyaltyEventAdjustPoints $adjustPoints; /** - * @var string $loyaltyAccountId The ID of the [loyalty account](entity:LoyaltyAccount) associated with the event. + * @var ?string $loyaltyAccountId The ID of the [loyalty account](entity:LoyaltyAccount) associated with the event. */ #[JsonProperty('loyalty_account_id')] - private string $loyaltyAccountId; + private ?string $loyaltyAccountId; /** * @var ?string $locationId The ID of the [location](entity:Location) where the event occurred. @@ -103,16 +103,16 @@ class LoyaltyEvent extends JsonSerializableType /** * @param array{ - * id: string, * type: value-of, - * createdAt: string, - * loyaltyAccountId: string, * source: value-of, + * id?: ?string, + * createdAt?: ?string, * accumulatePoints?: ?LoyaltyEventAccumulatePoints, * createReward?: ?LoyaltyEventCreateReward, * redeemReward?: ?LoyaltyEventRedeemReward, * deleteReward?: ?LoyaltyEventDeleteReward, * adjustPoints?: ?LoyaltyEventAdjustPoints, + * loyaltyAccountId?: ?string, * locationId?: ?string, * expirePoints?: ?LoyaltyEventExpirePoints, * otherEvent?: ?LoyaltyEventOther, @@ -122,15 +122,15 @@ class LoyaltyEvent extends JsonSerializableType public function __construct( array $values, ) { - $this->id = $values['id']; + $this->id = $values['id'] ?? null; $this->type = $values['type']; - $this->createdAt = $values['createdAt']; + $this->createdAt = $values['createdAt'] ?? null; $this->accumulatePoints = $values['accumulatePoints'] ?? null; $this->createReward = $values['createReward'] ?? null; $this->redeemReward = $values['redeemReward'] ?? null; $this->deleteReward = $values['deleteReward'] ?? null; $this->adjustPoints = $values['adjustPoints'] ?? null; - $this->loyaltyAccountId = $values['loyaltyAccountId']; + $this->loyaltyAccountId = $values['loyaltyAccountId'] ?? null; $this->locationId = $values['locationId'] ?? null; $this->source = $values['source']; $this->expirePoints = $values['expirePoints'] ?? null; @@ -139,17 +139,17 @@ public function __construct( } /** - * @return string + * @return ?string */ - public function getId(): string + public function getId(): ?string { return $this->id; } /** - * @param string $value + * @param ?string $value */ - public function setId(string $value): self + public function setId(?string $value = null): self { $this->id = $value; return $this; @@ -173,17 +173,17 @@ public function setType(string $value): self } /** - * @return string + * @return ?string */ - public function getCreatedAt(): string + public function getCreatedAt(): ?string { return $this->createdAt; } /** - * @param string $value + * @param ?string $value */ - public function setCreatedAt(string $value): self + public function setCreatedAt(?string $value = null): self { $this->createdAt = $value; return $this; @@ -275,17 +275,17 @@ public function setAdjustPoints(?LoyaltyEventAdjustPoints $value = null): self } /** - * @return string + * @return ?string */ - public function getLoyaltyAccountId(): string + public function getLoyaltyAccountId(): ?string { return $this->loyaltyAccountId; } /** - * @param string $value + * @param ?string $value */ - public function setLoyaltyAccountId(string $value): self + public function setLoyaltyAccountId(?string $value = null): self { $this->loyaltyAccountId = $value; return $this; diff --git a/src/Types/LoyaltyEventAccumulatePromotionPoints.php b/src/Types/LoyaltyEventAccumulatePromotionPoints.php index 8f7c4b2f..de980564 100644 --- a/src/Types/LoyaltyEventAccumulatePromotionPoints.php +++ b/src/Types/LoyaltyEventAccumulatePromotionPoints.php @@ -23,35 +23,35 @@ class LoyaltyEventAccumulatePromotionPoints extends JsonSerializableType private ?string $loyaltyPromotionId; /** - * @var int $points The number of points earned by the event. + * @var ?int $points The number of points earned by the event. */ #[JsonProperty('points')] - private int $points; + private ?int $points; /** * The ID of the [order](entity:Order) for which the buyer earned the promotion points. * Only applications that use the Orders API to process orders can trigger this event. * - * @var string $orderId + * @var ?string $orderId */ #[JsonProperty('order_id')] - private string $orderId; + private ?string $orderId; /** * @param array{ - * points: int, - * orderId: string, * loyaltyProgramId?: ?string, * loyaltyPromotionId?: ?string, + * points?: ?int, + * orderId?: ?string, * } $values */ public function __construct( - array $values, + array $values = [], ) { $this->loyaltyProgramId = $values['loyaltyProgramId'] ?? null; $this->loyaltyPromotionId = $values['loyaltyPromotionId'] ?? null; - $this->points = $values['points']; - $this->orderId = $values['orderId']; + $this->points = $values['points'] ?? null; + $this->orderId = $values['orderId'] ?? null; } /** @@ -89,34 +89,34 @@ public function setLoyaltyPromotionId(?string $value = null): self } /** - * @return int + * @return ?int */ - public function getPoints(): int + public function getPoints(): ?int { return $this->points; } /** - * @param int $value + * @param ?int $value */ - public function setPoints(int $value): self + public function setPoints(?int $value = null): self { $this->points = $value; return $this; } /** - * @return string + * @return ?string */ - public function getOrderId(): string + public function getOrderId(): ?string { return $this->orderId; } /** - * @param string $value + * @param ?string $value */ - public function setOrderId(string $value): self + public function setOrderId(?string $value = null): self { $this->orderId = $value; return $this; diff --git a/src/Types/LoyaltyEventCreateReward.php b/src/Types/LoyaltyEventCreateReward.php index 19ed692c..d4ebcae2 100644 --- a/src/Types/LoyaltyEventCreateReward.php +++ b/src/Types/LoyaltyEventCreateReward.php @@ -11,10 +11,10 @@ class LoyaltyEventCreateReward extends JsonSerializableType { /** - * @var string $loyaltyProgramId The ID of the [loyalty program](entity:LoyaltyProgram). + * @var ?string $loyaltyProgramId The ID of the [loyalty program](entity:LoyaltyProgram). */ #[JsonProperty('loyalty_program_id')] - private string $loyaltyProgramId; + private ?string $loyaltyProgramId; /** * The Square-assigned ID of the created [loyalty reward](entity:LoyaltyReward). @@ -26,38 +26,38 @@ class LoyaltyEventCreateReward extends JsonSerializableType private ?string $rewardId; /** - * @var int $points The loyalty points used to create the reward. + * @var ?int $points The loyalty points used to create the reward. */ #[JsonProperty('points')] - private int $points; + private ?int $points; /** * @param array{ - * loyaltyProgramId: string, - * points: int, + * loyaltyProgramId?: ?string, * rewardId?: ?string, + * points?: ?int, * } $values */ public function __construct( - array $values, + array $values = [], ) { - $this->loyaltyProgramId = $values['loyaltyProgramId']; + $this->loyaltyProgramId = $values['loyaltyProgramId'] ?? null; $this->rewardId = $values['rewardId'] ?? null; - $this->points = $values['points']; + $this->points = $values['points'] ?? null; } /** - * @return string + * @return ?string */ - public function getLoyaltyProgramId(): string + public function getLoyaltyProgramId(): ?string { return $this->loyaltyProgramId; } /** - * @param string $value + * @param ?string $value */ - public function setLoyaltyProgramId(string $value): self + public function setLoyaltyProgramId(?string $value = null): self { $this->loyaltyProgramId = $value; return $this; @@ -81,17 +81,17 @@ public function setRewardId(?string $value = null): self } /** - * @return int + * @return ?int */ - public function getPoints(): int + public function getPoints(): ?int { return $this->points; } /** - * @param int $value + * @param ?int $value */ - public function setPoints(int $value): self + public function setPoints(?int $value = null): self { $this->points = $value; return $this; diff --git a/src/Types/LoyaltyEventDeleteReward.php b/src/Types/LoyaltyEventDeleteReward.php index 97a00361..3cbb939f 100644 --- a/src/Types/LoyaltyEventDeleteReward.php +++ b/src/Types/LoyaltyEventDeleteReward.php @@ -11,10 +11,10 @@ class LoyaltyEventDeleteReward extends JsonSerializableType { /** - * @var string $loyaltyProgramId The ID of the [loyalty program](entity:LoyaltyProgram). + * @var ?string $loyaltyProgramId The ID of the [loyalty program](entity:LoyaltyProgram). */ #[JsonProperty('loyalty_program_id')] - private string $loyaltyProgramId; + private ?string $loyaltyProgramId; /** * The ID of the deleted [loyalty reward](entity:LoyaltyReward). @@ -26,38 +26,38 @@ class LoyaltyEventDeleteReward extends JsonSerializableType private ?string $rewardId; /** - * @var int $points The number of points returned to the loyalty account. + * @var ?int $points The number of points returned to the loyalty account. */ #[JsonProperty('points')] - private int $points; + private ?int $points; /** * @param array{ - * loyaltyProgramId: string, - * points: int, + * loyaltyProgramId?: ?string, * rewardId?: ?string, + * points?: ?int, * } $values */ public function __construct( - array $values, + array $values = [], ) { - $this->loyaltyProgramId = $values['loyaltyProgramId']; + $this->loyaltyProgramId = $values['loyaltyProgramId'] ?? null; $this->rewardId = $values['rewardId'] ?? null; - $this->points = $values['points']; + $this->points = $values['points'] ?? null; } /** - * @return string + * @return ?string */ - public function getLoyaltyProgramId(): string + public function getLoyaltyProgramId(): ?string { return $this->loyaltyProgramId; } /** - * @param string $value + * @param ?string $value */ - public function setLoyaltyProgramId(string $value): self + public function setLoyaltyProgramId(?string $value = null): self { $this->loyaltyProgramId = $value; return $this; @@ -81,17 +81,17 @@ public function setRewardId(?string $value = null): self } /** - * @return int + * @return ?int */ - public function getPoints(): int + public function getPoints(): ?int { return $this->points; } /** - * @param int $value + * @param ?int $value */ - public function setPoints(int $value): self + public function setPoints(?int $value = null): self { $this->points = $value; return $this; diff --git a/src/Types/LoyaltyEventExpirePoints.php b/src/Types/LoyaltyEventExpirePoints.php index 684efad6..a80f86d3 100644 --- a/src/Types/LoyaltyEventExpirePoints.php +++ b/src/Types/LoyaltyEventExpirePoints.php @@ -11,10 +11,10 @@ class LoyaltyEventExpirePoints extends JsonSerializableType { /** - * @var string $loyaltyProgramId The Square-assigned ID of the [loyalty program](entity:LoyaltyProgram). + * @var ?string $loyaltyProgramId The Square-assigned ID of the [loyalty program](entity:LoyaltyProgram). */ #[JsonProperty('loyalty_program_id')] - private string $loyaltyProgramId; + private ?string $loyaltyProgramId; /** * @var int $points The number of points expired. @@ -24,29 +24,29 @@ class LoyaltyEventExpirePoints extends JsonSerializableType /** * @param array{ - * loyaltyProgramId: string, * points: int, + * loyaltyProgramId?: ?string, * } $values */ public function __construct( array $values, ) { - $this->loyaltyProgramId = $values['loyaltyProgramId']; + $this->loyaltyProgramId = $values['loyaltyProgramId'] ?? null; $this->points = $values['points']; } /** - * @return string + * @return ?string */ - public function getLoyaltyProgramId(): string + public function getLoyaltyProgramId(): ?string { return $this->loyaltyProgramId; } /** - * @param string $value + * @param ?string $value */ - public function setLoyaltyProgramId(string $value): self + public function setLoyaltyProgramId(?string $value = null): self { $this->loyaltyProgramId = $value; return $this; diff --git a/src/Types/LoyaltyEventOther.php b/src/Types/LoyaltyEventOther.php index 98b163f8..512e63c9 100644 --- a/src/Types/LoyaltyEventOther.php +++ b/src/Types/LoyaltyEventOther.php @@ -11,10 +11,10 @@ class LoyaltyEventOther extends JsonSerializableType { /** - * @var string $loyaltyProgramId The Square-assigned ID of the [loyalty program](entity:LoyaltyProgram). + * @var ?string $loyaltyProgramId The Square-assigned ID of the [loyalty program](entity:LoyaltyProgram). */ #[JsonProperty('loyalty_program_id')] - private string $loyaltyProgramId; + private ?string $loyaltyProgramId; /** * @var int $points The number of points added or removed. @@ -24,29 +24,29 @@ class LoyaltyEventOther extends JsonSerializableType /** * @param array{ - * loyaltyProgramId: string, * points: int, + * loyaltyProgramId?: ?string, * } $values */ public function __construct( array $values, ) { - $this->loyaltyProgramId = $values['loyaltyProgramId']; + $this->loyaltyProgramId = $values['loyaltyProgramId'] ?? null; $this->points = $values['points']; } /** - * @return string + * @return ?string */ - public function getLoyaltyProgramId(): string + public function getLoyaltyProgramId(): ?string { return $this->loyaltyProgramId; } /** - * @param string $value + * @param ?string $value */ - public function setLoyaltyProgramId(string $value): self + public function setLoyaltyProgramId(?string $value = null): self { $this->loyaltyProgramId = $value; return $this; diff --git a/src/Types/LoyaltyEventRedeemReward.php b/src/Types/LoyaltyEventRedeemReward.php index 9b50f26d..ccf00599 100644 --- a/src/Types/LoyaltyEventRedeemReward.php +++ b/src/Types/LoyaltyEventRedeemReward.php @@ -11,10 +11,10 @@ class LoyaltyEventRedeemReward extends JsonSerializableType { /** - * @var string $loyaltyProgramId The ID of the [loyalty program](entity:LoyaltyProgram). + * @var ?string $loyaltyProgramId The ID of the [loyalty program](entity:LoyaltyProgram). */ #[JsonProperty('loyalty_program_id')] - private string $loyaltyProgramId; + private ?string $loyaltyProgramId; /** * The ID of the redeemed [loyalty reward](entity:LoyaltyReward). @@ -36,31 +36,31 @@ class LoyaltyEventRedeemReward extends JsonSerializableType /** * @param array{ - * loyaltyProgramId: string, + * loyaltyProgramId?: ?string, * rewardId?: ?string, * orderId?: ?string, * } $values */ public function __construct( - array $values, + array $values = [], ) { - $this->loyaltyProgramId = $values['loyaltyProgramId']; + $this->loyaltyProgramId = $values['loyaltyProgramId'] ?? null; $this->rewardId = $values['rewardId'] ?? null; $this->orderId = $values['orderId'] ?? null; } /** - * @return string + * @return ?string */ - public function getLoyaltyProgramId(): string + public function getLoyaltyProgramId(): ?string { return $this->loyaltyProgramId; } /** - * @param string $value + * @param ?string $value */ - public function setLoyaltyProgramId(string $value): self + public function setLoyaltyProgramId(?string $value = null): self { $this->loyaltyProgramId = $value; return $this;