diff --git a/doc/api/booking-custom-attributes.md b/doc/api/booking-custom-attributes.md index 71373eab..475d7160 100644 --- a/doc/api/booking-custom-attributes.md +++ b/doc/api/booking-custom-attributes.md @@ -256,8 +256,18 @@ CompletableFuture bulkDeleteBookingCu ```java Map values = new LinkedHashMap<>(); -values.put("", values0); -values.put("", values1); +BookingCustomAttributeDeleteRequest values0 = new BookingCustomAttributeDeleteRequest.Builder( + "booking_id8", + "key4") + .build(); + +values.put("key0", values0); +BookingCustomAttributeDeleteRequest values1 = new BookingCustomAttributeDeleteRequest.Builder( + "booking_id9", + "key5") + .build(); + +values.put("key1", values1); BulkDeleteBookingCustomAttributesRequest body = new BulkDeleteBookingCustomAttributesRequest.Builder( values) @@ -301,8 +311,24 @@ CompletableFuture bulkUpsertBookingCu ```java Map values = new LinkedHashMap<>(); -values.put("", values0); -values.put("", values1); +CustomAttribute customAttribute = new CustomAttribute.Builder() + .build(); + +BookingCustomAttributeUpsertRequest values0 = new BookingCustomAttributeUpsertRequest.Builder( + "booking_id8", + customAttribute) + .build(); + +values.put("key0", values0); +CustomAttribute customAttribute = new CustomAttribute.Builder() + .build(); + +BookingCustomAttributeUpsertRequest values1 = new BookingCustomAttributeUpsertRequest.Builder( + "booking_id9", + customAttribute) + .build(); + +values.put("key1", values1); BulkUpsertBookingCustomAttributesRequest body = new BulkUpsertBookingCustomAttributesRequest.Builder( values) diff --git a/doc/api/bookings.md b/doc/api/bookings.md index 067c0a9c..6facd46a 100644 --- a/doc/api/bookings.md +++ b/doc/api/bookings.md @@ -69,6 +69,14 @@ bookingsApi.listBookingsAsync(null, null, null, null, null, null).thenAccept(res Creates a booking. +The required input must include the following: + +- `Booking.location_id`, +- `Booking.start_at`, +- `Booking.team_member_id` +- `Booking.AppointmentSegment.service_variation_id` +- `Booking.AppointmentSegment.service_variation_version` + To call this endpoint with buyer-level permissions, set `APPOINTMENTS_WRITE` for the OAuth scope. To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope. diff --git a/doc/api/catalog.md b/doc/api/catalog.md index bde3fa7a..ff3e8152 100644 --- a/doc/api/catalog.md +++ b/doc/api/catalog.md @@ -163,16 +163,10 @@ List taxIds = new LinkedList<>(); taxIds.add("#SalesTax"); List variations = new LinkedList<>(); -Money priceMoney = new Money.Builder() - .amount(150L) - .currency("USD") - .build(); - CatalogItemVariation itemVariationData = new CatalogItemVariation.Builder() .itemId("#Tea") .name("Mug") .pricingType("FIXED_PRICING") - .priceMoney(priceMoney) .build(); CatalogObject variations0 = new CatalogObject.Builder( @@ -204,16 +198,10 @@ List taxIds = new LinkedList<>(); taxIds.add("#SalesTax"); List variations = new LinkedList<>(); -Money priceMoney = new Money.Builder() - .amount(250L) - .currency("USD") - .build(); - CatalogItemVariation itemVariationData = new CatalogItemVariation.Builder() .itemId("#Coffee") .name("Regular") .pricingType("FIXED_PRICING") - .priceMoney(priceMoney) .build(); CatalogObject variations0 = new CatalogObject.Builder( @@ -224,16 +212,10 @@ CatalogObject variations0 = new CatalogObject.Builder( .build(); variations.add(variations0); -Money priceMoney = new Money.Builder() - .amount(350L) - .currency("USD") - .build(); - CatalogItemVariation itemVariationData = new CatalogItemVariation.Builder() .itemId("#Coffee") .name("Large") .pricingType("FIXED_PRICING") - .priceMoney(priceMoney) .build(); CatalogObject variations1 = new CatalogObject.Builder( @@ -517,16 +499,10 @@ CatalogObject variations0 = new CatalogObject.Builder( .build(); variations.add(variations0); -Money priceMoney = new Money.Builder() - .amount(400L) - .currency("USD") - .build(); - CatalogItemVariation itemVariationData = new CatalogItemVariation.Builder() .itemId("#Cocoa") .name("Large") .pricingType("FIXED_PRICING") - .priceMoney(priceMoney) .build(); CatalogObject variations1 = new CatalogObject.Builder( diff --git a/doc/api/checkout.md b/doc/api/checkout.md index d3fd99a2..5fae9d4f 100644 --- a/doc/api/checkout.md +++ b/doc/api/checkout.md @@ -67,41 +67,23 @@ OrderLineItemAppliedDiscount appliedDiscounts0 = new OrderLineItemAppliedDiscoun appliedDiscounts.add(appliedDiscounts0); -Money basePriceMoney = new Money.Builder() - .amount(1500L) - .currency("USD") - .build(); - OrderLineItem lineItems0 = new OrderLineItem.Builder( "2") .name("Printed T Shirt") .appliedTaxes(appliedTaxes) .appliedDiscounts(appliedDiscounts) - .basePriceMoney(basePriceMoney) .build(); lineItems.add(lineItems0); -Money basePriceMoney = new Money.Builder() - .amount(2500L) - .currency("USD") - .build(); - OrderLineItem lineItems1 = new OrderLineItem.Builder( "1") .name("Slim Jeans") - .basePriceMoney(basePriceMoney) .build(); lineItems.add(lineItems1); -Money basePriceMoney = new Money.Builder() - .amount(3500L) - .currency("USD") - .build(); - OrderLineItem lineItems2 = new OrderLineItem.Builder( "3") .name("Woven Sweater") - .basePriceMoney(basePriceMoney) .build(); lineItems.add(lineItems2); @@ -117,15 +99,9 @@ OrderLineItemTax taxes0 = new OrderLineItemTax.Builder() taxes.add(taxes0); List discounts = new LinkedList<>(); -Money amountMoney = new Money.Builder() - .amount(100L) - .currency("USD") - .build(); - OrderLineItemDiscount discounts0 = new OrderLineItemDiscount.Builder() .uid("56ae1696-z1e3-9328-af6d-f1e04d947gd4") .type("FIXED_AMOUNT") - .amountMoney(amountMoney) .scope("LINE_ITEM") .build(); diff --git a/doc/api/customer-custom-attributes.md b/doc/api/customer-custom-attributes.md index 9adc1a57..44cdbff5 100644 --- a/doc/api/customer-custom-attributes.md +++ b/doc/api/customer-custom-attributes.md @@ -274,8 +274,24 @@ CompletableFuture bulkUpsertCustomer ```java Map values = new LinkedHashMap<>(); -values.put("", values0); -values.put("", values1); +CustomAttribute customAttribute = new CustomAttribute.Builder() + .build(); + +BulkUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest values0 = new BulkUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest.Builder( + "customer_id2", + customAttribute) + .build(); + +values.put("key0", values0); +CustomAttribute customAttribute = new CustomAttribute.Builder() + .build(); + +BulkUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest values1 = new BulkUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest.Builder( + "customer_id3", + customAttribute) + .build(); + +values.put("key1", values1); BulkUpsertCustomerCustomAttributesRequest body = new BulkUpsertCustomerCustomAttributesRequest.Builder( values) diff --git a/doc/api/devices.md b/doc/api/devices.md index 1f5c683d..ff7bfd3e 100644 --- a/doc/api/devices.md +++ b/doc/api/devices.md @@ -76,7 +76,7 @@ CompletableFuture createDeviceCodeAsync( ```java DeviceCode deviceCode = new DeviceCode.Builder( - null) + "TERMINAL_API") .name("Counter 1") .locationId("B5E4484SHHNYH") .build(); diff --git a/doc/api/invoices.md b/doc/api/invoices.md index df9bc51e..242cd0c3 100644 --- a/doc/api/invoices.md +++ b/doc/api/invoices.md @@ -201,7 +201,7 @@ InvoiceFilter filter = new InvoiceFilter.Builder( .build(); InvoiceSort sort = new InvoiceSort.Builder( - null) + "INVOICE_SORT_DATE") .order("DESC") .build(); diff --git a/doc/api/location-custom-attributes.md b/doc/api/location-custom-attributes.md index 956da10e..6230763b 100644 --- a/doc/api/location-custom-attributes.md +++ b/doc/api/location-custom-attributes.md @@ -253,9 +253,9 @@ CompletableFuture bulkDeleteLocation ```java Map values = new LinkedHashMap<>(); -values.put("", values0); -values.put("", values1); -values.put("", values2); +values.put("id1", values0); +values.put("id2", values1); +values.put("id3", values2); BulkDeleteLocationCustomAttributesRequest body = new BulkDeleteLocationCustomAttributesRequest.Builder( values) @@ -302,8 +302,24 @@ CompletableFuture bulkUpsertLocation ```java Map values = new LinkedHashMap<>(); -values.put("", values0); -values.put("", values1); +CustomAttribute customAttribute = new CustomAttribute.Builder() + .build(); + +BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest values0 = new BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest.Builder( + "location_id8", + customAttribute) + .build(); + +values.put("key0", values0); +CustomAttribute customAttribute = new CustomAttribute.Builder() + .build(); + +BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest values1 = new BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest.Builder( + "location_id9", + customAttribute) + .build(); + +values.put("key1", values1); BulkUpsertLocationCustomAttributesRequest body = new BulkUpsertLocationCustomAttributesRequest.Builder( values) diff --git a/doc/api/order-custom-attributes.md b/doc/api/order-custom-attributes.md index e1d0645f..1676ad1a 100644 --- a/doc/api/order-custom-attributes.md +++ b/doc/api/order-custom-attributes.md @@ -267,8 +267,18 @@ CompletableFuture bulkDeleteOrderCustom ```java Map values = new LinkedHashMap<>(); -values.put("", values0); -values.put("", values1); +BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute values0 = new BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute.Builder( + "7BbXGEIWNldxAzrtGf9GPVZTwZ4F") + .key("cover-count") + .build(); + +values.put("cover-count", values0); +BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute values1 = new BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute.Builder( + "7BbXGEIWNldxAzrtGf9GPVZTwZ4F") + .key("table-number") + .build(); + +values.put("table-number", values1); BulkDeleteOrderCustomAttributesRequest body = new BulkDeleteOrderCustomAttributesRequest.Builder( values) @@ -319,8 +329,24 @@ CompletableFuture bulkUpsertOrderCustom ```java Map values = new LinkedHashMap<>(); -values.put("", values0); -values.put("", values1); +CustomAttribute customAttribute = new CustomAttribute.Builder() + .build(); + +BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute values0 = new BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute.Builder( + customAttribute, + "order_id2") + .build(); + +values.put("key0", values0); +CustomAttribute customAttribute = new CustomAttribute.Builder() + .build(); + +BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute values1 = new BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute.Builder( + customAttribute, + "order_id1") + .build(); + +values.put("key1", values1); BulkUpsertOrderCustomAttributesRequest body = new BulkUpsertOrderCustomAttributesRequest.Builder( values) diff --git a/doc/api/orders.md b/doc/api/orders.md index 8467c574..c7109b6e 100644 --- a/doc/api/orders.md +++ b/doc/api/orders.md @@ -49,15 +49,9 @@ CompletableFuture createOrderAsync( ```java List lineItems = new LinkedList<>(); -Money basePriceMoney = new Money.Builder() - .amount(1599L) - .currency("USD") - .build(); - OrderLineItem lineItems0 = new OrderLineItem.Builder( "1") .name("New York Strip Steak") - .basePriceMoney(basePriceMoney) .build(); lineItems.add(lineItems0); @@ -110,15 +104,9 @@ OrderLineItemDiscount discounts1 = new OrderLineItemDiscount.Builder() .build(); discounts.add(discounts1); -Money amountMoney = new Money.Builder() - .amount(100L) - .currency("USD") - .build(); - OrderLineItemDiscount discounts2 = new OrderLineItemDiscount.Builder() .uid("one-dollar-off") .name("Sale - $1.00 off") - .amountMoney(amountMoney) .scope("LINE_ITEM") .build(); @@ -211,27 +199,15 @@ CompletableFuture calculateOrderAsync( ```java List lineItems = new LinkedList<>(); -Money basePriceMoney = new Money.Builder() - .amount(500L) - .currency("USD") - .build(); - OrderLineItem lineItems0 = new OrderLineItem.Builder( "1") .name("Item 1") - .basePriceMoney(basePriceMoney) .build(); lineItems.add(lineItems0); -Money basePriceMoney = new Money.Builder() - .amount(300L) - .currency("USD") - .build(); - OrderLineItem lineItems1 = new OrderLineItem.Builder( "2") .name("Item 2") - .basePriceMoney(basePriceMoney) .build(); lineItems.add(lineItems1); diff --git a/doc/api/subscriptions.md b/doc/api/subscriptions.md index 8be7417f..022e0a86 100644 --- a/doc/api/subscriptions.md +++ b/doc/api/subscriptions.md @@ -54,9 +54,6 @@ Money priceOverrideMoney = new Money.Builder() .currency("USD") .build(); -SubscriptionSource source = new SubscriptionSource.Builder() - .build(); - CreateSubscriptionRequest body = new CreateSubscriptionRequest.Builder( "S8GWD5R9QB376", "6JHXF3B2CW3YKHDV4XEM674H", @@ -67,7 +64,6 @@ CreateSubscriptionRequest body = new CreateSubscriptionRequest.Builder( .priceOverrideMoney(priceOverrideMoney) .cardId("ccof:qy5x8hHGYsgLrp4Q4GB") .timezone("America/Los_Angeles") - .source(source) .build(); subscriptionsApi.createSubscriptionAsync(body).thenAccept(result -> { @@ -440,10 +436,6 @@ CompletableFuture swapPlanAsync( ```java String subscriptionId = "subscription_id0"; -SwapPlanRequest body = new SwapPlanRequest.Builder( - null) - .build(); - subscriptionsApi.swapPlanAsync(subscriptionId, body).thenAccept(result -> { // TODO success callback handler }).exceptionally(exception -> { diff --git a/doc/api/team.md b/doc/api/team.md index 2110ae52..325b9e1d 100644 --- a/doc/api/team.md +++ b/doc/api/team.md @@ -109,8 +109,47 @@ CompletableFuture bulkCreateTeamMembersAsync( ```java Map teamMembers = new LinkedHashMap<>(); -teamMembers.put("", teamMembers0); -teamMembers.put("", teamMembers1); +List locationIds = new LinkedList<>(); +locationIds.add("YSGH2WBKG94QZ"); +locationIds.add("GA2Y9HSJ8KRYT"); + +TeamMemberAssignedLocations assignedLocations = new TeamMemberAssignedLocations.Builder() + .assignmentType("EXPLICIT_LOCATIONS") + .locationIds(locationIds) + .build(); + +TeamMember teamMember = new TeamMember.Builder() + .referenceId("reference_id_1") + .givenName("Joe") + .familyName("Doe") + .emailAddress("joe_doe@gmail.com") + .phoneNumber("+14159283333") + .assignedLocations(assignedLocations) + .build(); + +CreateTeamMemberRequest teamMembers0 = new CreateTeamMemberRequest.Builder() + .teamMember(teamMember) + .build(); + +teamMembers.put("idempotency-key-1", teamMembers0); +TeamMemberAssignedLocations assignedLocations = new TeamMemberAssignedLocations.Builder() + .assignmentType("ALL_CURRENT_AND_FUTURE_LOCATIONS") + .build(); + +TeamMember teamMember = new TeamMember.Builder() + .referenceId("reference_id_2") + .givenName("Jane") + .familyName("Smith") + .emailAddress("jane_smith@gmail.com") + .phoneNumber("+14159223334") + .assignedLocations(assignedLocations) + .build(); + +CreateTeamMemberRequest teamMembers1 = new CreateTeamMemberRequest.Builder() + .teamMember(teamMember) + .build(); + +teamMembers.put("idempotency-key-2", teamMembers1); BulkCreateTeamMembersRequest body = new BulkCreateTeamMembersRequest.Builder( teamMembers) @@ -152,8 +191,51 @@ CompletableFuture bulkUpdateTeamMembersAsync( ```java Map teamMembers = new LinkedHashMap<>(); -teamMembers.put("", teamMembers0); -teamMembers.put("", teamMembers1); +TeamMemberAssignedLocations assignedLocations = new TeamMemberAssignedLocations.Builder() + .assignmentType("ALL_CURRENT_AND_FUTURE_LOCATIONS") + .build(); + +TeamMember teamMember = new TeamMember.Builder() + .referenceId("reference_id_2") + .isOwner(false) + .status("ACTIVE") + .givenName("Jane") + .familyName("Smith") + .emailAddress("jane_smith@gmail.com") + .phoneNumber("+14159223334") + .assignedLocations(assignedLocations) + .build(); + +UpdateTeamMemberRequest teamMembers0 = new UpdateTeamMemberRequest.Builder() + .teamMember(teamMember) + .build(); + +teamMembers.put("AFMwA08kR-MIF-3Vs0OE", teamMembers0); +List locationIds = new LinkedList<>(); +locationIds.add("YSGH2WBKG94QZ"); +locationIds.add("GA2Y9HSJ8KRYT"); + +TeamMemberAssignedLocations assignedLocations = new TeamMemberAssignedLocations.Builder() + .assignmentType("EXPLICIT_LOCATIONS") + .locationIds(locationIds) + .build(); + +TeamMember teamMember = new TeamMember.Builder() + .referenceId("reference_id_1") + .isOwner(false) + .status("ACTIVE") + .givenName("Joe") + .familyName("Doe") + .emailAddress("joe_doe@gmail.com") + .phoneNumber("+14159283333") + .assignedLocations(assignedLocations) + .build(); + +UpdateTeamMemberRequest teamMembers1 = new UpdateTeamMemberRequest.Builder() + .teamMember(teamMember) + .build(); + +teamMembers.put("fpgteZNMaf0qOK-a4t6P", teamMembers1); BulkUpdateTeamMembersRequest body = new BulkUpdateTeamMembersRequest.Builder( teamMembers) diff --git a/doc/api/vendors.md b/doc/api/vendors.md index 6f61fca3..7160b863 100644 --- a/doc/api/vendors.md +++ b/doc/api/vendors.md @@ -42,8 +42,14 @@ CompletableFuture bulkCreateVendorsAsync( ```java Map vendors = new LinkedHashMap<>(); -vendors.put("", vendors0); -vendors.put("", vendors1); +Vendor vendors0 = new Vendor.Builder() + .build(); + +vendors.put("key0", vendors0); +Vendor vendors1 = new Vendor.Builder() + .build(); + +vendors.put("key1", vendors1); BulkCreateVendorsRequest body = new BulkCreateVendorsRequest.Builder( vendors) @@ -119,8 +125,22 @@ CompletableFuture bulkUpdateVendorsAsync( ```java Map vendors = new LinkedHashMap<>(); -vendors.put("", vendors0); -vendors.put("", vendors1); +Vendor vendor = new Vendor.Builder() + .build(); + +UpdateVendorRequest vendors0 = new UpdateVendorRequest.Builder( + vendor) + .build(); + +vendors.put("key0", vendors0); +Vendor vendor = new Vendor.Builder() + .build(); + +UpdateVendorRequest vendors1 = new UpdateVendorRequest.Builder( + vendor) + .build(); + +vendors.put("key1", vendors1); BulkUpdateVendorsRequest body = new BulkUpdateVendorsRequest.Builder( vendors) diff --git a/doc/client.md b/doc/client.md index 170abf06..628711c9 100644 --- a/doc/client.md +++ b/doc/client.md @@ -5,7 +5,7 @@ The following parameters are configurable for the API Client: | Parameter | Type | Description | | --- | --- | --- | -| `squareVersion` | `String` | Square Connect API versions
*Default*: `"2023-01-19"` | +| `squareVersion` | `String` | Square Connect API versions
*Default*: `"2023-03-15"` | | `customUrl` | `String` | Sets the base URL requests are made to. Defaults to `https://connect.squareup.com`
*Default*: `"https://connect.squareup.com"` | | `environment` | `string` | The API environment.
**Default: `production`** | | `httpClientConfig` | [`ReadonlyHttpClientConfiguration`](http-client-configuration.md) | Http Client Configuration instance. | @@ -19,7 +19,7 @@ The API client can be initialized as follows: SquareClient client = new SquareClient.Builder() .httpClientConfig(configBuilder -> configBuilder .timeout(0)) - .squareVersion("2023-01-19") + .squareVersion("2023-03-15") .accessToken("AccessToken") .environment(Environment.PRODUCTION) .customUrl("https://connect.squareup.com") @@ -45,7 +45,7 @@ public class Program { SquareClient client = new SquareClient.Builder() .httpClientConfig(configBuilder -> configBuilder .timeout(0)) - .squareVersion("2023-01-19") + .squareVersion("2023-03-15") .accessToken("AccessToken") .build(); diff --git a/doc/models/appointment-segment.md b/doc/models/appointment-segment.md index cb8050eb..ce68287b 100644 --- a/doc/models/appointment-segment.md +++ b/doc/models/appointment-segment.md @@ -26,7 +26,10 @@ Defines an appointment segment of a booking. "duration_minutes": null, "service_variation_id": null, "team_member_id": "team_member_id0", - "service_variation_version": null + "service_variation_version": null, + "intermission_minutes": null, + "any_team_member": null, + "resource_ids": null } ``` diff --git a/doc/models/availability.md b/doc/models/availability.md index 3c083f2c..48ce7006 100644 --- a/doc/models/availability.md +++ b/doc/models/availability.md @@ -20,6 +20,7 @@ Defines an appointment slot that encapsulates the appointment segments, location ```json { "start_at": null, + "location_id": null, "appointment_segments": null } ``` diff --git a/doc/models/bank-account-payment-details.md b/doc/models/bank-account-payment-details.md index e6eec3e2..9d1769ee 100644 --- a/doc/models/bank-account-payment-details.md +++ b/doc/models/bank-account-payment-details.md @@ -13,7 +13,7 @@ Additional details about BANK_ACCOUNT type payments. | --- | --- | --- | --- | --- | | `BankName` | `String` | Optional | The name of the bank associated with the bank account.
**Constraints**: *Maximum Length*: `100` | String getBankName() | | `TransferType` | `String` | Optional | The type of the bank transfer. The type can be `ACH` or `UNKNOWN`.
**Constraints**: *Maximum Length*: `50` | String getTransferType() | -| `AccountOwnershipType` | `String` | Optional | The ownership type of the bank account performing the transfer.
The type can be `INDIVIDUAL`, `COMPANY`, or `UNKNOWN`.
**Constraints**: *Maximum Length*: `50` | String getAccountOwnershipType() | +| `AccountOwnershipType` | `String` | Optional | The ownership type of the bank account performing the transfer.
The type can be `INDIVIDUAL`, `COMPANY`, or `ACCOUNT_TYPE_UNKNOWN`.
**Constraints**: *Maximum Length*: `50` | String getAccountOwnershipType() | | `Fingerprint` | `String` | Optional | Uniquely identifies the bank account for this seller and can be used
to determine if payments are from the same bank account.
**Constraints**: *Maximum Length*: `255` | String getFingerprint() | | `Country` | `String` | Optional | The two-letter ISO code representing the country the bank account is located in.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2` | String getCountry() | | `StatementDescription` | `String` | Optional | The statement description as sent to the bank.
**Constraints**: *Maximum Length*: `1000` | String getStatementDescription() | diff --git a/doc/models/booking-creator-details.md b/doc/models/booking-creator-details.md index 0cae1227..75b20aa2 100644 --- a/doc/models/booking-creator-details.md +++ b/doc/models/booking-creator-details.md @@ -19,7 +19,9 @@ Information about a booking creator. ```json { - "creator_type": null + "creator_type": null, + "team_member_id": null, + "customer_id": null } ``` diff --git a/doc/models/booking-custom-attribute-upsert-request.md b/doc/models/booking-custom-attribute-upsert-request.md index e0a34cd4..b369ced7 100644 --- a/doc/models/booking-custom-attribute-upsert-request.md +++ b/doc/models/booking-custom-attribute-upsert-request.md @@ -27,7 +27,9 @@ and an optional idempotency key. "value": null, "version": null, "visibility": null, - "definition": null + "definition": null, + "updated_at": null, + "created_at": null }, "idempotency_key": null } diff --git a/doc/models/booking.md b/doc/models/booking.md index 65601306..dd7fa864 100644 --- a/doc/models/booking.md +++ b/doc/models/booking.md @@ -33,14 +33,19 @@ at a given location to a requesting customer in one or more appointment segments ```json { + "id": null, "version": null, "status": null, + "created_at": null, + "updated_at": null, "start_at": null, "location_id": null, "customer_id": null, "customer_note": null, "seller_note": null, "appointment_segments": null, + "transition_time_minutes": null, + "all_day": null, "location_type": null, "creator_details": null, "source": null diff --git a/doc/models/break-type.md b/doc/models/break-type.md index 93e20e1b..b5b9c93c 100644 --- a/doc/models/break-type.md +++ b/doc/models/break-type.md @@ -30,7 +30,9 @@ instances on a `Shift`. "break_name": "break_name8", "expected_duration": "expected_duration4", "is_paid": false, - "version": null + "version": null, + "created_at": null, + "updated_at": null } ``` diff --git a/doc/models/bulk-create-vendors-request.md b/doc/models/bulk-create-vendors-request.md index 31f1116a..f1737fd7 100644 --- a/doc/models/bulk-create-vendors-request.md +++ b/doc/models/bulk-create-vendors-request.md @@ -20,6 +20,8 @@ Represents an input to a call to [BulkCreateVendors](../../doc/api/vendors.md#bu "vendors": { "key0": { "id": null, + "created_at": null, + "updated_at": null, "name": null, "address": null, "contacts": null, @@ -30,6 +32,8 @@ Represents an input to a call to [BulkCreateVendors](../../doc/api/vendors.md#bu }, "key1": { "id": null, + "created_at": null, + "updated_at": null, "name": null, "address": null, "contacts": null, @@ -40,6 +44,8 @@ Represents an input to a call to [BulkCreateVendors](../../doc/api/vendors.md#bu }, "key2": { "id": null, + "created_at": null, + "updated_at": null, "name": null, "address": null, "contacts": null, diff --git a/doc/models/bulk-delete-location-custom-attributes-request-location-custom-attribute-delete-request.md b/doc/models/bulk-delete-location-custom-attributes-request-location-custom-attribute-delete-request.md index c101e6bb..2efec3c9 100644 --- a/doc/models/bulk-delete-location-custom-attributes-request-location-custom-attribute-delete-request.md +++ b/doc/models/bulk-delete-location-custom-attributes-request-location-custom-attribute-delete-request.md @@ -18,6 +18,8 @@ and optional key of the associated custom attribute definition. ## Example (as JSON) ```json -{} +{ + "key": null +} ``` diff --git a/doc/models/bulk-delete-order-custom-attributes-request-delete-custom-attribute.md b/doc/models/bulk-delete-order-custom-attributes-request-delete-custom-attribute.md index 645e40b3..c439a81a 100644 --- a/doc/models/bulk-delete-order-custom-attributes-request-delete-custom-attribute.md +++ b/doc/models/bulk-delete-order-custom-attributes-request-delete-custom-attribute.md @@ -18,6 +18,7 @@ Represents one delete within the bulk operation. ```json { + "key": null, "order_id": "order_id6" } ``` diff --git a/doc/models/bulk-update-vendors-request.md b/doc/models/bulk-update-vendors-request.md index 5b360390..dc4a43aa 100644 --- a/doc/models/bulk-update-vendors-request.md +++ b/doc/models/bulk-update-vendors-request.md @@ -22,6 +22,8 @@ Represents an input to a call to [BulkUpdateVendors](../../doc/api/vendors.md#bu "idempotency_key": null, "vendor": { "id": null, + "created_at": null, + "updated_at": null, "name": null, "address": null, "contacts": null, @@ -35,6 +37,8 @@ Represents an input to a call to [BulkUpdateVendors](../../doc/api/vendors.md#bu "idempotency_key": null, "vendor": { "id": null, + "created_at": null, + "updated_at": null, "name": null, "address": null, "contacts": null, @@ -48,6 +52,8 @@ Represents an input to a call to [BulkUpdateVendors](../../doc/api/vendors.md#bu "idempotency_key": null, "vendor": { "id": null, + "created_at": null, + "updated_at": null, "name": null, "address": null, "contacts": null, diff --git a/doc/models/bulk-upsert-booking-custom-attributes-request.md b/doc/models/bulk-upsert-booking-custom-attributes-request.md index 77c7cbb6..f515e67a 100644 --- a/doc/models/bulk-upsert-booking-custom-attributes-request.md +++ b/doc/models/bulk-upsert-booking-custom-attributes-request.md @@ -25,7 +25,9 @@ Represents a [BulkUpsertBookingCustomAttributes](../../doc/api/booking-custom-at "value": null, "version": null, "visibility": null, - "definition": null + "definition": null, + "updated_at": null, + "created_at": null }, "idempotency_key": null }, @@ -36,7 +38,9 @@ Represents a [BulkUpsertBookingCustomAttributes](../../doc/api/booking-custom-at "value": null, "version": null, "visibility": null, - "definition": null + "definition": null, + "updated_at": null, + "created_at": null }, "idempotency_key": null }, @@ -47,7 +51,9 @@ Represents a [BulkUpsertBookingCustomAttributes](../../doc/api/booking-custom-at "value": null, "version": null, "visibility": null, - "definition": null + "definition": null, + "updated_at": null, + "created_at": null }, "idempotency_key": null } diff --git a/doc/models/bulk-upsert-customer-custom-attributes-request-customer-custom-attribute-upsert-request.md b/doc/models/bulk-upsert-customer-custom-attributes-request-customer-custom-attribute-upsert-request.md index ae49c0f0..28d08fbb 100644 --- a/doc/models/bulk-upsert-customer-custom-attributes-request-customer-custom-attribute-upsert-request.md +++ b/doc/models/bulk-upsert-customer-custom-attributes-request-customer-custom-attribute-upsert-request.md @@ -27,7 +27,9 @@ and an optional idempotency key. "value": null, "version": null, "visibility": null, - "definition": null + "definition": null, + "updated_at": null, + "created_at": null }, "idempotency_key": null } diff --git a/doc/models/bulk-upsert-customer-custom-attributes-request.md b/doc/models/bulk-upsert-customer-custom-attributes-request.md index 8051e8c2..75170aff 100644 --- a/doc/models/bulk-upsert-customer-custom-attributes-request.md +++ b/doc/models/bulk-upsert-customer-custom-attributes-request.md @@ -25,7 +25,9 @@ Represents a [BulkUpsertCustomerCustomAttributes](../../doc/api/customer-custom- "value": null, "version": null, "visibility": null, - "definition": null + "definition": null, + "updated_at": null, + "created_at": null }, "idempotency_key": null }, @@ -36,7 +38,9 @@ Represents a [BulkUpsertCustomerCustomAttributes](../../doc/api/customer-custom- "value": null, "version": null, "visibility": null, - "definition": null + "definition": null, + "updated_at": null, + "created_at": null }, "idempotency_key": null }, @@ -47,7 +51,9 @@ Represents a [BulkUpsertCustomerCustomAttributes](../../doc/api/customer-custom- "value": null, "version": null, "visibility": null, - "definition": null + "definition": null, + "updated_at": null, + "created_at": null }, "idempotency_key": null } diff --git a/doc/models/bulk-upsert-location-custom-attributes-request-location-custom-attribute-upsert-request.md b/doc/models/bulk-upsert-location-custom-attributes-request-location-custom-attribute-upsert-request.md index 47105b7d..2f528271 100644 --- a/doc/models/bulk-upsert-location-custom-attributes-request-location-custom-attribute-upsert-request.md +++ b/doc/models/bulk-upsert-location-custom-attributes-request-location-custom-attribute-upsert-request.md @@ -27,7 +27,9 @@ and an optional idempotency key. "value": null, "version": null, "visibility": null, - "definition": null + "definition": null, + "updated_at": null, + "created_at": null }, "idempotency_key": null } diff --git a/doc/models/bulk-upsert-location-custom-attributes-request.md b/doc/models/bulk-upsert-location-custom-attributes-request.md index 194deb2a..4b8704b7 100644 --- a/doc/models/bulk-upsert-location-custom-attributes-request.md +++ b/doc/models/bulk-upsert-location-custom-attributes-request.md @@ -25,7 +25,9 @@ Represents a [BulkUpsertLocationCustomAttributes](../../doc/api/location-custom- "value": null, "version": null, "visibility": null, - "definition": null + "definition": null, + "updated_at": null, + "created_at": null }, "idempotency_key": null }, @@ -36,7 +38,9 @@ Represents a [BulkUpsertLocationCustomAttributes](../../doc/api/location-custom- "value": null, "version": null, "visibility": null, - "definition": null + "definition": null, + "updated_at": null, + "created_at": null }, "idempotency_key": null }, @@ -47,7 +51,9 @@ Represents a [BulkUpsertLocationCustomAttributes](../../doc/api/location-custom- "value": null, "version": null, "visibility": null, - "definition": null + "definition": null, + "updated_at": null, + "created_at": null }, "idempotency_key": null } diff --git a/doc/models/bulk-upsert-order-custom-attributes-request-upsert-custom-attribute.md b/doc/models/bulk-upsert-order-custom-attributes-request-upsert-custom-attribute.md index a9097016..643f54f3 100644 --- a/doc/models/bulk-upsert-order-custom-attributes-request-upsert-custom-attribute.md +++ b/doc/models/bulk-upsert-order-custom-attributes-request-upsert-custom-attribute.md @@ -24,7 +24,9 @@ Represents one upsert within the bulk operation. "value": null, "version": null, "visibility": null, - "definition": null + "definition": null, + "updated_at": null, + "created_at": null }, "idempotency_key": null, "order_id": "order_id6" diff --git a/doc/models/bulk-upsert-order-custom-attributes-request.md b/doc/models/bulk-upsert-order-custom-attributes-request.md index 8d5d458c..5230a0df 100644 --- a/doc/models/bulk-upsert-order-custom-attributes-request.md +++ b/doc/models/bulk-upsert-order-custom-attributes-request.md @@ -24,7 +24,9 @@ Represents a bulk upsert request for one or more order custom attributes. "value": null, "version": null, "visibility": null, - "definition": null + "definition": null, + "updated_at": null, + "created_at": null }, "idempotency_key": null, "order_id": "order_id4" @@ -35,7 +37,9 @@ Represents a bulk upsert request for one or more order custom attributes. "value": null, "version": null, "visibility": null, - "definition": null + "definition": null, + "updated_at": null, + "created_at": null }, "idempotency_key": null, "order_id": "order_id5" @@ -46,7 +50,9 @@ Represents a bulk upsert request for one or more order custom attributes. "value": null, "version": null, "visibility": null, - "definition": null + "definition": null, + "updated_at": null, + "created_at": null }, "idempotency_key": null, "order_id": "order_id6" diff --git a/doc/models/business-booking-profile.md b/doc/models/business-booking-profile.md index d659e2a5..a3bf39f1 100644 --- a/doc/models/business-booking-profile.md +++ b/doc/models/business-booking-profile.md @@ -23,6 +23,7 @@ ```json { "seller_id": null, + "created_at": null, "booking_enabled": null, "customer_timezone_choice": null, "booking_policy": null, diff --git a/doc/models/cancel-invoice-response.md b/doc/models/cancel-invoice-response.md index 9fe8a628..8068a6c7 100644 --- a/doc/models/cancel-invoice-response.md +++ b/doc/models/cancel-invoice-response.md @@ -18,7 +18,6 @@ The response returned by the `CancelInvoice` request. ```json { - "errors": [], "invoice": { "accepted_payment_methods": { "bank_account": false, diff --git a/doc/models/card.md b/doc/models/card.md index eb3b9f69..87d49d84 100644 --- a/doc/models/card.md +++ b/doc/models/card.md @@ -34,15 +34,21 @@ details are determined by the payment token generated by Web Payments SDK. ```json { + "id": null, "card_brand": null, + "last_4": null, "exp_month": null, "exp_year": null, "cardholder_name": null, "billing_address": null, + "fingerprint": null, "customer_id": null, + "merchant_id": null, "reference_id": null, + "enabled": null, "card_type": null, "prepaid_type": null, + "bin": null, "version": null, "card_co_brand": null } diff --git a/doc/models/cash-app-details.md b/doc/models/cash-app-details.md index aff2586c..2942aa31 100644 --- a/doc/models/cash-app-details.md +++ b/doc/models/cash-app-details.md @@ -20,7 +20,8 @@ Additional details about `WALLET` type payments with the `brand` of `CASH_APP`. ```json { "buyer_full_name": null, - "buyer_country_code": null + "buyer_country_code": null, + "buyer_cashtag": null } ``` diff --git a/doc/models/cash-drawer-shift-event.md b/doc/models/cash-drawer-shift-event.md index a9a54662..b1922c07 100644 --- a/doc/models/cash-drawer-shift-event.md +++ b/doc/models/cash-drawer-shift-event.md @@ -24,6 +24,7 @@ "employee_id": null, "event_type": null, "event_money": null, + "created_at": null, "description": null } ``` diff --git a/doc/models/catalog-custom-attribute-definition.md b/doc/models/catalog-custom-attribute-definition.md index e0aa4246..6b7bb5dc 100644 --- a/doc/models/catalog-custom-attribute-definition.md +++ b/doc/models/catalog-custom-attribute-definition.md @@ -46,6 +46,7 @@ to store any sensitive information (personally identifiable information, card de "string_config": null, "number_config": null, "selection_config": null, + "custom_attribute_usage_count": null, "key": null } ``` diff --git a/doc/models/catalog-custom-attribute-value.md b/doc/models/catalog-custom-attribute-value.md index 2d0ba870..dc4535c4 100644 --- a/doc/models/catalog-custom-attribute-value.md +++ b/doc/models/catalog-custom-attribute-value.md @@ -28,10 +28,12 @@ added to `ITEM` and `ITEM_VARIATION` type catalog objects. { "name": null, "string_value": null, + "custom_attribute_definition_id": null, "type": null, "number_value": null, "boolean_value": null, - "selection_uid_values": null + "selection_uid_values": null, + "key": null } ``` diff --git a/doc/models/catalog-item-variation.md b/doc/models/catalog-item-variation.md index eca828b7..45065800 100644 --- a/doc/models/catalog-item-variation.md +++ b/doc/models/catalog-item-variation.md @@ -50,6 +50,7 @@ decreases by 2, and the stockable count automatically decreases by 0.4 bottle ac "name": null, "sku": null, "upc": null, + "ordinal": null, "pricing_type": null, "price_money": null, "location_overrides": null, diff --git a/doc/models/catalog-object-batch.md b/doc/models/catalog-object-batch.md index 6d94bcc4..32b7fec8 100644 --- a/doc/models/catalog-object-batch.md +++ b/doc/models/catalog-object-batch.md @@ -21,6 +21,7 @@ A batch of catalog objects. { "type": "CUSTOM_ATTRIBUTE_DEFINITION", "id": "id8", + "updated_at": null, "version": null, "is_deleted": null, "custom_attribute_values": null, @@ -49,6 +50,7 @@ A batch of catalog objects. { "type": "ITEM_OPTION_VAL", "id": "id9", + "updated_at": null, "version": null, "is_deleted": null, "custom_attribute_values": null, diff --git a/doc/models/catalog-object.md b/doc/models/catalog-object.md index 7e286b91..2d9b0054 100644 --- a/doc/models/catalog-object.md +++ b/doc/models/catalog-object.md @@ -54,6 +54,7 @@ For a more detailed discussion of the Catalog data model, please see the { "type": "ITEM_VARIATION", "id": "id0", + "updated_at": null, "version": null, "is_deleted": null, "custom_attribute_values": null, diff --git a/doc/models/checkout.md b/doc/models/checkout.md index b8d477d8..7369e8b8 100644 --- a/doc/models/checkout.md +++ b/doc/models/checkout.md @@ -35,6 +35,7 @@ payment types using a checkout workflow hosted on squareup.com. "pre_populate_shipping_address": null, "redirect_url": null, "order": null, + "created_at": null, "additional_recipients": null } ``` diff --git a/doc/models/create-booking-custom-attribute-definition-request.md b/doc/models/create-booking-custom-attribute-definition-request.md index dd91b5c0..3b01d2b6 100644 --- a/doc/models/create-booking-custom-attribute-definition-request.md +++ b/doc/models/create-booking-custom-attribute-definition-request.md @@ -24,7 +24,9 @@ Represents a [CreateBookingCustomAttributeDefinition](../../doc/api/booking-cust "name": null, "description": null, "visibility": null, - "version": null + "version": null, + "updated_at": null, + "created_at": null }, "idempotency_key": null } diff --git a/doc/models/create-booking-request.md b/doc/models/create-booking-request.md index 976bb52a..8a614657 100644 --- a/doc/models/create-booking-request.md +++ b/doc/models/create-booking-request.md @@ -18,14 +18,19 @@ { "idempotency_key": null, "booking": { + "id": null, "version": null, "status": null, + "created_at": null, + "updated_at": null, "start_at": null, "location_id": null, "customer_id": null, "customer_note": null, "seller_note": null, "appointment_segments": null, + "transition_time_minutes": null, + "all_day": null, "location_type": null, "creator_details": null, "source": null diff --git a/doc/models/create-invoice-response.md b/doc/models/create-invoice-response.md index eb0cc2ac..096237b2 100644 --- a/doc/models/create-invoice-response.md +++ b/doc/models/create-invoice-response.md @@ -18,7 +18,6 @@ The response returned by the `CreateInvoice` request. ```json { - "errors": [], "invoice": { "accepted_payment_methods": { "bank_account": false, diff --git a/doc/models/create-payment-request.md b/doc/models/create-payment-request.md index c0831e2a..c7df2e53 100644 --- a/doc/models/create-payment-request.md +++ b/doc/models/create-payment-request.md @@ -12,7 +12,7 @@ Describes a request to create a payment using | Name | Type | Tags | Description | Getter | | --- | --- | --- | --- | --- | -| `SourceId` | `String` | Required | The ID for the source of funds for this payment. This can be a payment token
(card nonce) generated by the Square payment form or a card on file made with the
Customers API. If recording a payment that the seller
received outside of Square, specify either "CASH" or "EXTERNAL".
For more information, see
[Take Payments](https://developer.squareup.com/docs/payments-api/take-payments).
**Constraints**: *Minimum Length*: `1` | String getSourceId() | +| `SourceId` | `String` | Required | The ID for the source of funds for this payment.
This could be a payment token generated by the Web Payments SDK for any of its
[supported methods](https://developer.squareup.com/docs/web-payments/overview#explore-payment-methods),
including cards, bank transfers, Afterpay or Cash App Pay. If recording a payment
that the seller received outside of Square, specify either "CASH" or "EXTERNAL".
For more information, see
[Take Payments](https://developer.squareup.com/docs/payments-api/take-payments).
**Constraints**: *Minimum Length*: `1` | String getSourceId() | | `IdempotencyKey` | `String` | Required | A unique string that identifies this `CreatePayment` request. Keys can be any valid string
but must be unique for every `CreatePayment` request.

Note: The number of allowed characters might be less than the stated maximum, if multi-byte
characters are used.

For more information, see [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `45` | String getIdempotencyKey() | | `AmountMoney` | [`Money`](../../doc/models/money.md) | Required | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | Money getAmountMoney() | | `TipMoney` | [`Money`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | Money getTipMoney() | @@ -21,7 +21,7 @@ Describes a request to create a payment using | `DelayAction` | `String` | Optional | The action to be applied to the payment when the `delay_duration` has elapsed. The action must be
CANCEL or COMPLETE. For more information, see
[Time Threshold](https://developer.squareup.com/docs/payments-api/take-payments/card-payments/delayed-capture#time-threshold).

Default: CANCEL | String getDelayAction() | | `Autocomplete` | `Boolean` | Optional | If set to `true`, this payment will be completed when possible. If
set to `false`, this payment is held in an approved state until either
explicitly completed (captured) or canceled (voided). For more information, see
[Delayed capture](https://developer.squareup.com/docs/payments-api/take-payments/card-payments#delayed-capture-of-a-card-payment).

Default: true | Boolean getAutocomplete() | | `OrderId` | `String` | Optional | Associates a previously created order with this payment. | String getOrderId() | -| `CustomerId` | `String` | Optional | The [Customer](../../doc/models/customer.md) ID of the customer associated with the payment.

This is required if the `source_id` refers to a card on file created using the Customers API. | String getCustomerId() | +| `CustomerId` | `String` | Optional | The [Customer](../../doc/models/customer.md) ID of the customer associated with the payment.

This is required if the `source_id` refers to a card on file created using the Cards API. | String getCustomerId() | | `LocationId` | `String` | Optional | The location ID to associate with the payment. If not specified, the [main location](https://developer.squareup.com/docs/locations-api#about-the-main-location) is
used. | String getLocationId() | | `TeamMemberId` | `String` | Optional | An optional [TeamMember](../../doc/models/team-member.md) ID to associate with
this payment. | String getTeamMemberId() | | `ReferenceId` | `String` | Optional | A user-defined ID to associate with the payment.

You can use this field to associate the payment to an entity in an external system
(for example, you might specify an order ID that is generated by a third-party shopping cart).
**Constraints**: *Maximum Length*: `40` | String getReferenceId() | diff --git a/doc/models/custom-attribute-definition.md b/doc/models/custom-attribute-definition.md index 93d486ca..f4f628b3 100644 --- a/doc/models/custom-attribute-definition.md +++ b/doc/models/custom-attribute-definition.md @@ -30,7 +30,9 @@ specifies the key, visibility, schema, and other properties for a custom attribu "name": null, "description": null, "visibility": null, - "version": null + "version": null, + "updated_at": null, + "created_at": null } ``` diff --git a/doc/models/custom-attribute.md b/doc/models/custom-attribute.md index 8984da3a..f1660339 100644 --- a/doc/models/custom-attribute.md +++ b/doc/models/custom-attribute.md @@ -28,7 +28,9 @@ A custom attribute value. Each custom attribute value has a corresponding "value": null, "version": null, "visibility": null, - "definition": null + "definition": null, + "updated_at": null, + "created_at": null } ``` diff --git a/doc/models/customer-group.md b/doc/models/customer-group.md index 34fd2434..94ba2671 100644 --- a/doc/models/customer-group.md +++ b/doc/models/customer-group.md @@ -23,7 +23,10 @@ the Customers API or within the Customer Directory in the Square Seller Dashboar ```json { - "name": "name0" + "id": null, + "name": "name0", + "created_at": null, + "updated_at": null } ``` diff --git a/doc/models/customer-segment.md b/doc/models/customer-segment.md index 6774c9ad..78a8661c 100644 --- a/doc/models/customer-segment.md +++ b/doc/models/customer-segment.md @@ -22,6 +22,11 @@ Square Seller Dashboard or Point of Sale. ## Example (as JSON) ```json -{} +{ + "id": null, + "name": "name0", + "created_at": null, + "updated_at": null +} ``` diff --git a/doc/models/customer.md b/doc/models/customer.md index 3fe3b7ca..3c94a47e 100644 --- a/doc/models/customer.md +++ b/doc/models/customer.md @@ -37,6 +37,8 @@ Represents a Square customer profile in the Customer Directory of a Square selle ```json { "id": null, + "created_at": null, + "updated_at": null, "cards": null, "given_name": null, "family_name": null, diff --git a/doc/models/delete-invoice-response.md b/doc/models/delete-invoice-response.md index 40b0b72c..709a11be 100644 --- a/doc/models/delete-invoice-response.md +++ b/doc/models/delete-invoice-response.md @@ -16,8 +16,6 @@ Describes a `DeleteInvoice` response. ## Example (as JSON) ```json -{ - "errors": [] -} +{} ``` diff --git a/doc/models/dispute.md b/doc/models/dispute.md index 903a2819..85906959 100644 --- a/doc/models/dispute.md +++ b/doc/models/dispute.md @@ -41,6 +41,8 @@ Represents a [dispute](https://developer.squareup.com/docs/disputes-api/overview "disputed_payment": null, "evidence_ids": null, "card_brand": null, + "created_at": null, + "updated_at": null, "brand_dispute_id": null, "reported_date": null, "reported_at": null, diff --git a/doc/models/employee.md b/doc/models/employee.md index 8d152d9d..2b843b8a 100644 --- a/doc/models/employee.md +++ b/doc/models/employee.md @@ -33,7 +33,9 @@ An employee object that is used by the external API. "phone_number": null, "location_ids": null, "status": null, - "is_owner": null + "is_owner": null, + "created_at": null, + "updated_at": null } ``` diff --git a/doc/models/event-type-metadata.md b/doc/models/event-type-metadata.md index 32931ad3..3ba949d5 100644 --- a/doc/models/event-type-metadata.md +++ b/doc/models/event-type-metadata.md @@ -18,6 +18,10 @@ Contains the metadata of a webhook event type. ## Example (as JSON) ```json -{} +{ + "event_type": null, + "api_version_introduced": null, + "release_status": null +} ``` diff --git a/doc/models/fulfillment-delivery-details.md b/doc/models/fulfillment-delivery-details.md index bfd5a44f..c470030c 100644 --- a/doc/models/fulfillment-delivery-details.md +++ b/doc/models/fulfillment-delivery-details.md @@ -41,11 +41,17 @@ Describes delivery details of an order fulfillment. { "recipient": null, "schedule_type": null, + "placed_at": null, "deliver_at": null, "prep_time_duration": null, "delivery_window_duration": null, "note": null, "completed_at": null, + "in_progress_at": null, + "rejected_at": null, + "ready_at": null, + "delivered_at": null, + "canceled_at": null, "cancel_reason": null, "courier_pickup_at": null, "courier_pickup_window_duration": null, diff --git a/doc/models/fulfillment-pickup-details.md b/doc/models/fulfillment-pickup-details.md index 46dd0669..7d67cf5a 100644 --- a/doc/models/fulfillment-pickup-details.md +++ b/doc/models/fulfillment-pickup-details.md @@ -42,6 +42,13 @@ Contains details necessary to fulfill a pickup order. "pickup_window_duration": null, "prep_time_duration": null, "note": null, + "placed_at": null, + "accepted_at": null, + "rejected_at": null, + "ready_at": null, + "expired_at": null, + "picked_up_at": null, + "canceled_at": null, "cancel_reason": null, "is_curbside_pickup": null, "curbside_pickup_details": null diff --git a/doc/models/fulfillment-shipment-details.md b/doc/models/fulfillment-shipment-details.md index e94e6cb4..685b720e 100644 --- a/doc/models/fulfillment-shipment-details.md +++ b/doc/models/fulfillment-shipment-details.md @@ -37,9 +37,14 @@ Contains the details necessary to fulfill a shipment order. "shipping_type": null, "tracking_number": null, "tracking_url": null, + "placed_at": null, + "in_progress_at": null, + "packaged_at": null, "expected_shipped_at": null, + "shipped_at": null, "canceled_at": null, "cancel_reason": null, + "failed_at": null, "failure_reason": null } ``` diff --git a/doc/models/fulfillment.md b/doc/models/fulfillment.md index 97ed3ee3..0187495a 100644 --- a/doc/models/fulfillment.md +++ b/doc/models/fulfillment.md @@ -31,6 +31,7 @@ However, orders returned by the Orders API might contain multiple fulfillments b "type": null, "state": null, "line_item_application": null, + "entries": null, "metadata": null, "pickup_details": null, "shipment_details": null, diff --git a/doc/models/get-invoice-response.md b/doc/models/get-invoice-response.md index eea82737..97e76a7f 100644 --- a/doc/models/get-invoice-response.md +++ b/doc/models/get-invoice-response.md @@ -18,7 +18,6 @@ Describes a `GetInvoice` response. ```json { - "errors": [], "invoice": { "accepted_payment_methods": { "bank_account": false, diff --git a/doc/models/gift-card-activity-redeem.md b/doc/models/gift-card-activity-redeem.md index 9e26a3e1..2d196c60 100644 --- a/doc/models/gift-card-activity-redeem.md +++ b/doc/models/gift-card-activity-redeem.md @@ -24,6 +24,7 @@ Represents details about a `REDEEM` [gift card activity type](../../doc/models/g "amount": null, "currency": null }, + "payment_id": null, "reference_id": null, "status": null } diff --git a/doc/models/gift-card-activity-refund.md b/doc/models/gift-card-activity-refund.md index be0af30b..e750f769 100644 --- a/doc/models/gift-card-activity-refund.md +++ b/doc/models/gift-card-activity-refund.md @@ -22,7 +22,8 @@ Represents details about a `REFUND` [gift card activity type](../../doc/models/g { "redeem_activity_id": null, "amount_money": null, - "reference_id": null + "reference_id": null, + "payment_id": null } ``` diff --git a/doc/models/gift-card-activity-unlinked-activity-refund.md b/doc/models/gift-card-activity-unlinked-activity-refund.md index bfbc60ec..f746f9b2 100644 --- a/doc/models/gift-card-activity-unlinked-activity-refund.md +++ b/doc/models/gift-card-activity-unlinked-activity-refund.md @@ -23,7 +23,8 @@ Represents details about an `UNLINKED_ACTIVITY_REFUND` [gift card activity type] "amount": null, "currency": null }, - "reference_id": null + "reference_id": null, + "payment_id": null } ``` diff --git a/doc/models/gift-card-activity.md b/doc/models/gift-card-activity.md index 88217114..f2a164b0 100644 --- a/doc/models/gift-card-activity.md +++ b/doc/models/gift-card-activity.md @@ -40,8 +40,10 @@ includes a `redeem_activity_details` field that contains information about the r ```json { + "id": null, "type": "ADJUST_INCREMENT", "location_id": "location_id4", + "created_at": null, "gift_card_id": null, "gift_card_gan": null, "gift_card_balance_money": null, diff --git a/doc/models/gift-card.md b/doc/models/gift-card.md index bee52306..f38d06c1 100644 --- a/doc/models/gift-card.md +++ b/doc/models/gift-card.md @@ -24,11 +24,14 @@ Represents a Square gift card. ```json { + "id": null, "type": "PHYSICAL", "gan_source": null, "state": null, "balance_money": null, - "gan": null + "gan": null, + "created_at": null, + "customer_ids": null } ``` diff --git a/doc/models/inventory-adjustment-group.md b/doc/models/inventory-adjustment-group.md index 9521bd9f..8206d2eb 100644 --- a/doc/models/inventory-adjustment-group.md +++ b/doc/models/inventory-adjustment-group.md @@ -18,6 +18,8 @@ ```json { + "id": null, + "root_adjustment_id": null, "from_state": null, "to_state": null } diff --git a/doc/models/inventory-adjustment.md b/doc/models/inventory-adjustment.md index 14c47d06..ef5ea413 100644 --- a/doc/models/inventory-adjustment.md +++ b/doc/models/inventory-adjustment.md @@ -46,9 +46,14 @@ particular time and location. "quantity": null, "total_price_money": null, "occurred_at": null, + "created_at": null, "source": null, "employee_id": null, "team_member_id": null, + "transaction_id": null, + "refund_id": null, + "purchase_order_id": null, + "goods_receipt_id": null, "adjustment_group": null } ``` diff --git a/doc/models/inventory-change.md b/doc/models/inventory-change.md index 158dbbf7..8baf6f8c 100644 --- a/doc/models/inventory-change.md +++ b/doc/models/inventory-change.md @@ -28,7 +28,8 @@ that is part of the history of inventory changes for a particular "physical_count": null, "adjustment": null, "transfer": null, - "measurement_unit": null + "measurement_unit": null, + "measurement_unit_id": null } ``` diff --git a/doc/models/inventory-count.md b/doc/models/inventory-count.md index 5e3d6b63..7c1c33f6 100644 --- a/doc/models/inventory-count.md +++ b/doc/models/inventory-count.md @@ -29,7 +29,9 @@ inventory adjustments. "catalog_object_type": null, "state": null, "location_id": null, - "quantity": null + "quantity": null, + "calculated_at": null, + "is_estimated": null } ``` diff --git a/doc/models/inventory-physical-count.md b/doc/models/inventory-physical-count.md index 9ca78fe8..f13f196e 100644 --- a/doc/models/inventory-physical-count.md +++ b/doc/models/inventory-physical-count.md @@ -41,7 +41,8 @@ hand or from syncing with an external system. "source": null, "employee_id": null, "team_member_id": null, - "occurred_at": null + "occurred_at": null, + "created_at": null } ``` diff --git a/doc/models/inventory-transfer.md b/doc/models/inventory-transfer.md index 43196602..dc5cac20 100644 --- a/doc/models/inventory-transfer.md +++ b/doc/models/inventory-transfer.md @@ -39,6 +39,7 @@ particular time from one location to another. "catalog_object_type": null, "quantity": null, "occurred_at": null, + "created_at": null, "source": null, "employee_id": null, "team_member_id": null diff --git a/doc/models/invoice-payment-reminder.md b/doc/models/invoice-payment-reminder.md index a6ac3715..c642d074 100644 --- a/doc/models/invoice-payment-reminder.md +++ b/doc/models/invoice-payment-reminder.md @@ -23,9 +23,11 @@ to the customer. You configure a reminder relative to the payment request ```json { + "uid": null, "relative_scheduled_days": null, "message": null, - "status": null + "status": null, + "sent_at": null } ``` diff --git a/doc/models/invoice-recipient-tax-ids.md b/doc/models/invoice-recipient-tax-ids.md index bd6a04fc..ebca8f84 100644 --- a/doc/models/invoice-recipient-tax-ids.md +++ b/doc/models/invoice-recipient-tax-ids.md @@ -18,6 +18,8 @@ see [Invoice recipient tax IDs](https://developer.squareup.com/docs/invoices-api ## Example (as JSON) ```json -{} +{ + "eu_vat": null +} ``` diff --git a/doc/models/invoice-recipient.md b/doc/models/invoice-recipient.md index 9528a585..aa2a08ce 100644 --- a/doc/models/invoice-recipient.md +++ b/doc/models/invoice-recipient.md @@ -30,7 +30,12 @@ Square updates the customer ID in response to a merge operation, but does not up ```json { "customer_id": null, + "given_name": null, + "family_name": null, + "email_address": null, "address": null, + "phone_number": null, + "company_name": null, "tax_ids": null } ``` diff --git a/doc/models/invoice.md b/doc/models/invoice.md index ba1e92d6..98d3d7dc 100644 --- a/doc/models/invoice.md +++ b/doc/models/invoice.md @@ -40,6 +40,7 @@ invoices. For more information, see [Invoices API Overview](https://developer.sq ```json { + "id": null, "version": null, "location_id": null, "order_id": null, @@ -50,10 +51,15 @@ invoices. For more information, see [Invoices API Overview](https://developer.sq "title": null, "description": null, "scheduled_at": null, + "public_url": null, "next_payment_amount_money": null, "status": null, + "timezone": null, + "created_at": null, + "updated_at": null, "accepted_payment_methods": null, "custom_fields": null, + "subscription_id": null, "sale_or_service_date": null, "payment_conditions": null, "store_payment_method_enabled": null diff --git a/doc/models/item-variation-location-overrides.md b/doc/models/item-variation-location-overrides.md index 1ffffbe8..c372be64 100644 --- a/doc/models/item-variation-location-overrides.md +++ b/doc/models/item-variation-location-overrides.md @@ -29,7 +29,9 @@ Price and inventory alerting overrides for a `CatalogItemVariation` at a specifi "pricing_type": null, "track_inventory": null, "inventory_alert_type": null, - "inventory_alert_threshold": null + "inventory_alert_threshold": null, + "sold_out": null, + "sold_out_valid_until": null } ``` diff --git a/doc/models/list-invoices-response.md b/doc/models/list-invoices-response.md index 888335bb..a844a73b 100644 --- a/doc/models/list-invoices-response.md +++ b/doc/models/list-invoices-response.md @@ -20,7 +20,6 @@ Describes a `ListInvoice` response. ```json { "cursor": "ChoIDhIWVm54ZVRhLXhySFBOejBBM2xJb2daUQoFCI4IGAE", - "errors": [], "invoices": [ { "accepted_payment_methods": { @@ -97,7 +96,6 @@ Describes a `ListInvoice` response. "square_gift_card": true }, "created_at": "2021-01-23T15:29:12Z", - "custom_fields": [], "delivery_method": "EMAIL", "id": "inv:0-ChC366qAfskpGrBI_1bozs9mEA3", "invoice_number": "inv-455", @@ -117,7 +115,6 @@ Describes a `ListInvoice` response. }, "due_date": "2021-01-23", "percentage_requested": "25", - "reminders": [], "request_type": "DEPOSIT", "tipping_enabled": false, "total_completed_amount_money": { diff --git a/doc/models/location.md b/doc/models/location.md index e681df1b..c5cbff91 100644 --- a/doc/models/location.md +++ b/doc/models/location.md @@ -43,10 +43,14 @@ Represents one of a business' [locations](https://developer.squareup.com/docs/lo ```json { + "id": null, "name": null, "address": null, "timezone": null, + "capabilities": null, "status": null, + "created_at": null, + "merchant_id": null, "country": null, "language_code": null, "currency": null, @@ -61,7 +65,10 @@ Represents one of a business' [locations](https://developer.squareup.com/docs/lo "instagram_username": null, "facebook_url": null, "coordinates": null, + "logo_url": null, + "pos_background_url": null, "mcc": null, + "full_format_logo_url": null, "tax_ids": null } ``` diff --git a/doc/models/loyalty-account-mapping.md b/doc/models/loyalty-account-mapping.md index 717c212c..3248e2cb 100644 --- a/doc/models/loyalty-account-mapping.md +++ b/doc/models/loyalty-account-mapping.md @@ -22,6 +22,8 @@ Currently, a loyalty account can only be mapped to a buyer by phone number. For ```json { + "id": null, + "created_at": null, "phone_number": null } ``` diff --git a/doc/models/loyalty-account.md b/doc/models/loyalty-account.md index 3beee9dc..953838f3 100644 --- a/doc/models/loyalty-account.md +++ b/doc/models/loyalty-account.md @@ -27,9 +27,14 @@ Describes a loyalty account in a [loyalty program](../../doc/models/loyalty-prog ```json { + "id": null, "program_id": "program_id0", + "balance": null, + "lifetime_points": null, "customer_id": null, "enrolled_at": null, + "created_at": null, + "updated_at": null, "mapping": null, "expiring_point_deadlines": null } diff --git a/doc/models/loyalty-event-accumulate-points.md b/doc/models/loyalty-event-accumulate-points.md index ba62ee59..45566e33 100644 --- a/doc/models/loyalty-event-accumulate-points.md +++ b/doc/models/loyalty-event-accumulate-points.md @@ -19,6 +19,7 @@ Provides metadata when the event `type` is `ACCUMULATE_POINTS`. ```json { + "loyalty_program_id": null, "points": null, "order_id": null } diff --git a/doc/models/loyalty-event-accumulate-promotion-points.md b/doc/models/loyalty-event-accumulate-promotion-points.md index e0fcaca8..c5d03483 100644 --- a/doc/models/loyalty-event-accumulate-promotion-points.md +++ b/doc/models/loyalty-event-accumulate-promotion-points.md @@ -19,6 +19,11 @@ Provides metadata when the event `type` is `ACCUMULATE_PROMOTION_POINTS`. ## Example (as JSON) ```json -{} +{ + "loyalty_program_id": null, + "loyalty_promotion_id": null, + "points": 236, + "order_id": "order_id6" +} ``` diff --git a/doc/models/loyalty-event-adjust-points.md b/doc/models/loyalty-event-adjust-points.md index c052dfe2..a104320d 100644 --- a/doc/models/loyalty-event-adjust-points.md +++ b/doc/models/loyalty-event-adjust-points.md @@ -19,6 +19,7 @@ Provides metadata when the event `type` is `ADJUST_POINTS`. ```json { + "loyalty_program_id": null, "points": 236, "reason": null } diff --git a/doc/models/loyalty-event-create-reward.md b/doc/models/loyalty-event-create-reward.md index 21e1c827..92a40494 100644 --- a/doc/models/loyalty-event-create-reward.md +++ b/doc/models/loyalty-event-create-reward.md @@ -18,6 +18,10 @@ Provides metadata when the event `type` is `CREATE_REWARD`. ## Example (as JSON) ```json -{} +{ + "loyalty_program_id": "loyalty_program_id0", + "reward_id": null, + "points": 236 +} ``` diff --git a/doc/models/loyalty-event-delete-reward.md b/doc/models/loyalty-event-delete-reward.md index e38f429b..bd8b1ad7 100644 --- a/doc/models/loyalty-event-delete-reward.md +++ b/doc/models/loyalty-event-delete-reward.md @@ -18,6 +18,10 @@ Provides metadata when the event `type` is `DELETE_REWARD`. ## Example (as JSON) ```json -{} +{ + "loyalty_program_id": "loyalty_program_id0", + "reward_id": null, + "points": 236 +} ``` diff --git a/doc/models/loyalty-event-expire-points.md b/doc/models/loyalty-event-expire-points.md index 5192a7f1..0a6d3746 100644 --- a/doc/models/loyalty-event-expire-points.md +++ b/doc/models/loyalty-event-expire-points.md @@ -18,6 +18,7 @@ Provides metadata when the event `type` is `EXPIRE_POINTS`. ```json { + "loyalty_program_id": "loyalty_program_id0", "points": 236 } ``` diff --git a/doc/models/loyalty-event-other.md b/doc/models/loyalty-event-other.md index 7ce530dd..7f6c69e6 100644 --- a/doc/models/loyalty-event-other.md +++ b/doc/models/loyalty-event-other.md @@ -18,6 +18,7 @@ Provides metadata when the event `type` is `OTHER`. ```json { + "loyalty_program_id": "loyalty_program_id0", "points": 236 } ``` diff --git a/doc/models/loyalty-event-redeem-reward.md b/doc/models/loyalty-event-redeem-reward.md index 822d582a..92af3974 100644 --- a/doc/models/loyalty-event-redeem-reward.md +++ b/doc/models/loyalty-event-redeem-reward.md @@ -18,6 +18,10 @@ Provides metadata when the event `type` is `REDEEM_REWARD`. ## Example (as JSON) ```json -{} +{ + "loyalty_program_id": "loyalty_program_id0", + "reward_id": null, + "order_id": null +} ``` diff --git a/doc/models/loyalty-event.md b/doc/models/loyalty-event.md index eb3e93ba..1ebd0c35 100644 --- a/doc/models/loyalty-event.md +++ b/doc/models/loyalty-event.md @@ -31,12 +31,16 @@ For more information, see [Search for Balance-Changing Loyalty Events](https://d ```json { + "id": "id0", "type": "OTHER", + "created_at": "created_at2", "accumulate_points": null, "create_reward": null, "redeem_reward": null, "delete_reward": null, "adjust_points": null, + "loyalty_account_id": "loyalty_account_id0", + "location_id": null, "source": "SQUARE", "expire_points": null, "other_event": null, diff --git a/doc/models/loyalty-program-reward-definition.md b/doc/models/loyalty-program-reward-definition.md index 8a9c0750..123c833c 100644 --- a/doc/models/loyalty-program-reward-definition.md +++ b/doc/models/loyalty-program-reward-definition.md @@ -26,6 +26,8 @@ are now defined using a catalog pricing rule and other catalog objects. For more { "scope": "CATEGORY", "discount_type": "FIXED_AMOUNT", + "percentage_discount": null, + "catalog_object_ids": null, "fixed_discount_money": null, "max_discount_money": null } diff --git a/doc/models/loyalty-program-reward-tier.md b/doc/models/loyalty-program-reward-tier.md index e87de9c8..8aebf300 100644 --- a/doc/models/loyalty-program-reward-tier.md +++ b/doc/models/loyalty-program-reward-tier.md @@ -22,8 +22,11 @@ Represents a reward tier in a loyalty program. A reward tier defines how buyers ```json { + "id": null, "points": 236, + "name": null, "definition": null, + "created_at": null, "pricing_rule_reference": { "object_id": null, "catalog_version": null diff --git a/doc/models/loyalty-program.md b/doc/models/loyalty-program.md index d339ea65..0df792be 100644 --- a/doc/models/loyalty-program.md +++ b/doc/models/loyalty-program.md @@ -27,11 +27,14 @@ For more information, see [Loyalty Program Overview](https://developer.squareup. ```json { + "id": null, "status": null, "reward_tiers": null, "expiration_policy": null, "terminology": null, "location_ids": null, + "created_at": null, + "updated_at": null, "accrual_rules": null } ``` diff --git a/doc/models/loyalty-promotion-available-time-data.md b/doc/models/loyalty-promotion-available-time-data.md index 486fcf65..8f0ab4bf 100644 --- a/doc/models/loyalty-promotion-available-time-data.md +++ b/doc/models/loyalty-promotion-available-time-data.md @@ -20,6 +20,8 @@ from a [loyalty promotion](../../doc/models/loyalty-promotion.md). ```json { + "start_date": null, + "end_date": null, "time_periods": [ "time_periods1", "time_periods2" diff --git a/doc/models/loyalty-promotion.md b/doc/models/loyalty-promotion.md index b18d4a80..a5d69637 100644 --- a/doc/models/loyalty-promotion.md +++ b/doc/models/loyalty-promotion.md @@ -32,6 +32,7 @@ A loyalty program can have a maximum of 10 loyalty promotions with an `ACTIVE` o ```json { + "id": null, "name": "name0", "incentive": { "type": "POINTS_MULTIPLIER", @@ -39,12 +40,18 @@ A loyalty program can have a maximum of 10 loyalty promotions with an `ACTIVE` o "points_addition_data": null }, "available_time": { + "start_date": null, + "end_date": null, "time_periods": [ "time_periods9" ] }, "trigger_limit": null, "status": null, + "created_at": null, + "canceled_at": null, + "updated_at": null, + "loyalty_program_id": null, "minimum_spend_amount_money": null, "qualifying_item_variation_ids": null, "qualifying_category_ids": null diff --git a/doc/models/loyalty-reward.md b/doc/models/loyalty-reward.md index 55129d2b..718164d3 100644 --- a/doc/models/loyalty-reward.md +++ b/doc/models/loyalty-reward.md @@ -26,10 +26,15 @@ For more information, see [Manage loyalty rewards](https://developer.squareup.co ```json { + "id": null, "status": null, "loyalty_account_id": "loyalty_account_id0", "reward_tier_id": "reward_tier_id6", - "order_id": null + "points": null, + "order_id": null, + "created_at": null, + "updated_at": null, + "redeemed_at": null } ``` diff --git a/doc/models/merchant.md b/doc/models/merchant.md index cc929eb7..7cb3c7d5 100644 --- a/doc/models/merchant.md +++ b/doc/models/merchant.md @@ -30,7 +30,8 @@ Represents a business that sells with Square. "language_code": null, "currency": null, "status": null, - "main_location_id": null + "main_location_id": null, + "created_at": null } ``` diff --git a/doc/models/order-created.md b/doc/models/order-created.md index 295512e4..bc7e2b54 100644 --- a/doc/models/order-created.md +++ b/doc/models/order-created.md @@ -22,7 +22,8 @@ "order_id": null, "version": null, "location_id": null, - "state": null + "state": null, + "created_at": null } ``` diff --git a/doc/models/order-entry.md b/doc/models/order-entry.md index cdda699c..00b70ba1 100644 --- a/doc/models/order-entry.md +++ b/doc/models/order-entry.md @@ -21,6 +21,7 @@ A lightweight description of an [order](../../doc/models/order.md) that is retur ```json { "order_id": null, + "version": null, "location_id": null } ``` diff --git a/doc/models/order-fulfillment-delivery-details.md b/doc/models/order-fulfillment-delivery-details.md index 0a77d7b0..9012d472 100644 --- a/doc/models/order-fulfillment-delivery-details.md +++ b/doc/models/order-fulfillment-delivery-details.md @@ -41,11 +41,17 @@ Describes delivery details of an order fulfillment. { "recipient": null, "schedule_type": null, + "placed_at": null, "deliver_at": null, "prep_time_duration": null, "delivery_window_duration": null, "note": null, "completed_at": null, + "in_progress_at": null, + "rejected_at": null, + "ready_at": null, + "delivered_at": null, + "canceled_at": null, "cancel_reason": null, "courier_pickup_at": null, "courier_pickup_window_duration": null, diff --git a/doc/models/order-fulfillment-pickup-details.md b/doc/models/order-fulfillment-pickup-details.md index 81615d92..332d5f49 100644 --- a/doc/models/order-fulfillment-pickup-details.md +++ b/doc/models/order-fulfillment-pickup-details.md @@ -42,6 +42,13 @@ Contains details necessary to fulfill a pickup order. "pickup_window_duration": null, "prep_time_duration": null, "note": null, + "placed_at": null, + "accepted_at": null, + "rejected_at": null, + "ready_at": null, + "expired_at": null, + "picked_up_at": null, + "canceled_at": null, "cancel_reason": null, "is_curbside_pickup": null, "curbside_pickup_details": null diff --git a/doc/models/order-fulfillment-shipment-details.md b/doc/models/order-fulfillment-shipment-details.md index c99f77b7..0366062d 100644 --- a/doc/models/order-fulfillment-shipment-details.md +++ b/doc/models/order-fulfillment-shipment-details.md @@ -37,9 +37,14 @@ Contains the details necessary to fulfill a shipment order. "shipping_type": null, "tracking_number": null, "tracking_url": null, + "placed_at": null, + "in_progress_at": null, + "packaged_at": null, "expected_shipped_at": null, + "shipped_at": null, "canceled_at": null, "cancel_reason": null, + "failed_at": null, "failure_reason": null } ``` diff --git a/doc/models/order-fulfillment-updated.md b/doc/models/order-fulfillment-updated.md index 3b4e9c09..626313d9 100644 --- a/doc/models/order-fulfillment-updated.md +++ b/doc/models/order-fulfillment-updated.md @@ -25,6 +25,8 @@ "version": null, "location_id": null, "state": null, + "created_at": null, + "updated_at": null, "fulfillment_update": null } ``` diff --git a/doc/models/order-fulfillment.md b/doc/models/order-fulfillment.md index 93384f0f..6452fe39 100644 --- a/doc/models/order-fulfillment.md +++ b/doc/models/order-fulfillment.md @@ -31,6 +31,7 @@ However, orders returned by the Orders API might contain multiple fulfillments b "type": null, "state": null, "line_item_application": null, + "entries": null, "metadata": null, "pickup_details": null, "shipment_details": null, diff --git a/doc/models/order-line-item-discount.md b/doc/models/order-line-item-discount.md index 3df94886..47b2bd5b 100644 --- a/doc/models/order-line-item-discount.md +++ b/doc/models/order-line-item-discount.md @@ -42,7 +42,9 @@ amount contributed by the item to the order subtotal. "amount_money": null, "applied_money": null, "metadata": null, - "scope": null + "scope": null, + "reward_ids": null, + "pricing_rule_id": null } ``` diff --git a/doc/models/order-line-item-tax.md b/doc/models/order-line-item-tax.md index a584d8c7..e316e78b 100644 --- a/doc/models/order-line-item-tax.md +++ b/doc/models/order-line-item-tax.md @@ -38,7 +38,8 @@ contributes to the order subtotal. "percentage": null, "metadata": null, "applied_money": null, - "scope": null + "scope": null, + "auto_applied": null } ``` diff --git a/doc/models/order-return.md b/doc/models/order-return.md index 18c99423..2d11f820 100644 --- a/doc/models/order-return.md +++ b/doc/models/order-return.md @@ -27,6 +27,7 @@ The set of line items, service charges, taxes, discounts, tips, and other items "uid": null, "source_order_id": null, "return_line_items": null, + "return_service_charges": null, "return_taxes": null, "return_discounts": null, "rounding_adjustment": null, diff --git a/doc/models/order-updated.md b/doc/models/order-updated.md index 7f800fa5..86da42be 100644 --- a/doc/models/order-updated.md +++ b/doc/models/order-updated.md @@ -23,7 +23,9 @@ "order_id": null, "version": null, "location_id": null, - "state": null + "state": null, + "created_at": null, + "updated_at": null } ``` diff --git a/doc/models/order.md b/doc/models/order.md index d020cb43..1ef901bd 100644 --- a/doc/models/order.md +++ b/doc/models/order.md @@ -52,6 +52,7 @@ itemization data. ```json { + "id": null, "location_id": "location_id4", "reference_id": null, "source": null, @@ -61,10 +62,16 @@ itemization data. "discounts": null, "service_charges": null, "fulfillments": null, + "returns": null, "return_amounts": null, "net_amounts": null, "rounding_adjustment": null, + "tenders": null, + "refunds": null, "metadata": null, + "created_at": null, + "updated_at": null, + "closed_at": null, "state": null, "version": null, "total_money": null, @@ -74,6 +81,7 @@ itemization data. "total_service_charge_money": null, "ticket_name": null, "pricing_options": null, + "rewards": null, "net_amount_due_money": null } ``` diff --git a/doc/models/payment-link.md b/doc/models/payment-link.md index f8e11f35..6d92907b 100644 --- a/doc/models/payment-link.md +++ b/doc/models/payment-link.md @@ -24,10 +24,13 @@ ```json { + "id": null, "version": 172, "description": null, + "order_id": null, "checkout_options": null, "pre_populated_data": null, + "url": null, "created_at": null, "updated_at": null, "payment_note": null diff --git a/doc/models/payment-refund.md b/doc/models/payment-refund.md index fd1d075f..ab22212d 100644 --- a/doc/models/payment-refund.md +++ b/doc/models/payment-refund.md @@ -16,7 +16,7 @@ the original payment and the amount of money refunded. | `Status` | `String` | Optional | The refund's status:

- `PENDING` - Awaiting approval.
- `COMPLETED` - Successfully completed.
- `REJECTED` - The refund was rejected.
- `FAILED` - An error occurred.
**Constraints**: *Maximum Length*: `50` | String getStatus() | | `LocationId` | `String` | Optional | The location ID associated with the payment this refund is attached to.
**Constraints**: *Maximum Length*: `50` | String getLocationId() | | `Unlinked` | `Boolean` | Optional | Flag indicating whether or not the refund is linked to an existing payment in Square. | Boolean getUnlinked() | -| `DestinationType` | `String` | Optional | The destination type for this refund.

Current values include `CARD`, `BANK_ACCOUNT`, `WALLET`, `CASH`, or `EXTERNAL`.
**Constraints**: *Maximum Length*: `50` | String getDestinationType() | +| `DestinationType` | `String` | Optional | The destination type for this refund.

Current values include `CARD`, `BANK_ACCOUNT`, `WALLET`, `BUY_NOW_PAY_LATER`, `CASH`, and
`EXTERNAL`.
**Constraints**: *Maximum Length*: `50` | String getDestinationType() | | `DestinationDetails` | [`DestinationDetails`](../../doc/models/destination-details.md) | Optional | Details about a refund's destination. | DestinationDetails getDestinationDetails() | | `AmountMoney` | [`Money`](../../doc/models/money.md) | Required | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | Money getAmountMoney() | | `AppFeeMoney` | [`Money`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | Money getAppFeeMoney() | @@ -35,6 +35,7 @@ the original payment and the amount of money refunded. "id": "id0", "status": null, "location_id": null, + "unlinked": null, "destination_type": null, "destination_details": null, "amount_money": { @@ -45,7 +46,10 @@ the original payment and the amount of money refunded. "processing_fee": null, "payment_id": null, "order_id": null, - "reason": null + "reason": null, + "created_at": null, + "updated_at": null, + "team_member_id": null } ``` diff --git a/doc/models/payment.md b/doc/models/payment.md index 79bb0444..3eb8802b 100644 --- a/doc/models/payment.md +++ b/doc/models/payment.md @@ -56,22 +56,43 @@ Represents a payment processed by the Square API. ```json { + "id": null, + "created_at": null, + "updated_at": null, "amount_money": null, "tip_money": null, "total_money": null, "app_fee_money": null, "approved_money": null, + "processing_fee": null, "refunded_money": null, + "status": null, + "delay_duration": null, "delay_action": null, + "delayed_until": null, + "source_type": null, "card_details": null, "cash_details": null, "bank_account_details": null, "external_details": null, "wallet_details": null, "buy_now_pay_later_details": null, + "location_id": null, + "order_id": null, + "reference_id": null, + "customer_id": null, + "employee_id": null, + "team_member_id": null, + "refund_ids": null, "risk_evaluation": null, + "buyer_email_address": null, "billing_address": null, "shipping_address": null, + "note": null, + "statement_description_identifier": null, + "capabilities": null, + "receipt_number": null, + "receipt_url": null, "device_details": null, "application_details": null, "version_token": null diff --git a/doc/models/publish-invoice-response.md b/doc/models/publish-invoice-response.md index 72e392e9..6eb8c5c3 100644 --- a/doc/models/publish-invoice-response.md +++ b/doc/models/publish-invoice-response.md @@ -18,7 +18,6 @@ Describes a `PublishInvoice` response. ```json { - "errors": [], "invoice": { "accepted_payment_methods": { "bank_account": false, diff --git a/doc/models/refund-payment-request.md b/doc/models/refund-payment-request.md index 2a351a0d..8b25f4cd 100644 --- a/doc/models/refund-payment-request.md +++ b/doc/models/refund-payment-request.md @@ -14,11 +14,11 @@ Describes a request to refund a payment using [RefundPayment](../../doc/api/refu | `IdempotencyKey` | `String` | Required | A unique string that identifies this `RefundPayment` request. The key can be any valid string
but must be unique for every `RefundPayment` request.

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

For more information, see [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency).
**Constraints**: *Minimum Length*: `1` | String getIdempotencyKey() | | `AmountMoney` | [`Money`](../../doc/models/money.md) | Required | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | Money getAmountMoney() | | `AppFeeMoney` | [`Money`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
for more information. | Money getAppFeeMoney() | -| `PaymentId` | `String` | Optional | The unique ID of the payment being refunded.
Must not be provided if `unlinked=true`.
Required if `unlinked=false` or `unlinked` is unset. | String getPaymentId() | -| `DestinationId` | `String` | Optional | The ID indicating where funds will be refunded to, if this is an unlinked refund.
This can be any of the following: A token generated by Web Payments SDK or RSDK2;
a card-on-file identifier.
Required for requests specifying unlinked=true.
Otherwise, if included when `unlinked=false`, will throw an error. | String getDestinationId() | +| `PaymentId` | `String` | Optional | The unique ID of the payment being refunded.
Required when unlinked=false, otherwise must not be set. | String getPaymentId() | +| `DestinationId` | `String` | Optional | The ID indicating where funds will be refunded to, if this is an unlinked refund.
This can be any of the following: A token generated by Web Payments SDK;
a card-on-file identifier.
Required for requests specifying unlinked=true.
Otherwise, if included when `unlinked=false`, will throw an error. | String getDestinationId() | | `Unlinked` | `Boolean` | Optional | Indicates that the refund is not linked to a Square payment.
If set to true, `destination_id` and `location_id` must be supplied while `payment_id` must not
be provided. | Boolean getUnlinked() | -| `LocationId` | `String` | Optional | The location ID associated with the unlinked refund.
Required for requests specifying `unlinked=true`.
Otherwise, if included when `unlinked=false` or unset, will throw an error.
**Constraints**: *Maximum Length*: `50` | String getLocationId() | -| `CustomerId` | `String` | Optional | The [Customer](../../doc/models/customer.md) ID of the customer associated with the refund.
This is required if the `destination_id` refers to a card on file created using the Customers
API. Only allowed when `unlinked=true`. | String getCustomerId() | +| `LocationId` | `String` | Optional | The location ID associated with the unlinked refund.
Required for requests specifying `unlinked=true`.
Otherwise, if included when `unlinked=false`, will throw an error.
**Constraints**: *Maximum Length*: `50` | String getLocationId() | +| `CustomerId` | `String` | Optional | The [Customer](../../doc/models/customer.md) ID of the customer associated with the refund.
This is required if the `destination_id` refers to a card on file created using the Cards
API. Only allowed when `unlinked=true`. | String getCustomerId() | | `Reason` | `String` | Optional | A description of the reason for the refund.
**Constraints**: *Maximum Length*: `192` | String getReason() | | `PaymentVersionToken` | `String` | Optional | Used for optimistic concurrency. This opaque token identifies the current `Payment`
version that the caller expects. If the server has a different version of the Payment,
the update fails and a response with a VERSION_MISMATCH error is returned.
If the versions match, or the field is not provided, the refund proceeds as normal. | String getPaymentVersionToken() | | `TeamMemberId` | `String` | Optional | An optional [TeamMember](../../doc/models/team-member.md) ID to associate with this refund.
**Constraints**: *Maximum Length*: `192` | String getTeamMemberId() | diff --git a/doc/models/refund.md b/doc/models/refund.md index 976bbc03..0e6120bc 100644 --- a/doc/models/refund.md +++ b/doc/models/refund.md @@ -30,6 +30,7 @@ Represents a refund processed for a Square transaction. "location_id": "location_id4", "transaction_id": null, "tender_id": "tender_id8", + "created_at": null, "reason": "reason4", "amount_money": { "amount": null, diff --git a/doc/models/risk-evaluation.md b/doc/models/risk-evaluation.md index 7f45703d..6dbaff80 100644 --- a/doc/models/risk-evaluation.md +++ b/doc/models/risk-evaluation.md @@ -23,6 +23,7 @@ provide the goods/services or refund the payment). ```json { + "created_at": null, "risk_level": null } ``` diff --git a/doc/models/save-card-options.md b/doc/models/save-card-options.md index 9f380250..ccbc2ede 100644 --- a/doc/models/save-card-options.md +++ b/doc/models/save-card-options.md @@ -20,6 +20,7 @@ Describes save-card action fields. ```json { "customer_id": "customer_id8", + "card_id": null, "reference_id": null } ``` diff --git a/doc/models/search-invoices-response.md b/doc/models/search-invoices-response.md index 333c1b77..944e9493 100644 --- a/doc/models/search-invoices-response.md +++ b/doc/models/search-invoices-response.md @@ -20,7 +20,6 @@ Describes a `SearchInvoices` response. ```json { "cursor": "ChoIDhIWVm54ZVRhLXhySFBOejBBM2xJb2daUQoFCI4IGAE", - "errors": [], "invoices": [ { "accepted_payment_methods": { @@ -97,7 +96,6 @@ Describes a `SearchInvoices` response. "square_gift_card": true }, "created_at": "2021-01-23T15:29:12Z", - "custom_fields": [], "delivery_method": "EMAIL", "id": "inv:0-ChC366qAfskpGrBI_1bozs9mEA3", "invoice_number": "inv-455", @@ -117,7 +115,6 @@ Describes a `SearchInvoices` response. }, "due_date": "2021-01-23", "percentage_requested": "25", - "reminders": [], "request_type": "DEPOSIT", "tipping_enabled": false, "total_completed_amount_money": { @@ -134,7 +131,6 @@ Describes a `SearchInvoices` response. "currency": "USD" }, "due_date": "2021-06-15", - "reminders": [], "request_type": "BALANCE", "tipping_enabled": false, "total_completed_amount_money": { diff --git a/doc/models/shift.md b/doc/models/shift.md index 2e1e312a..cd6e6f33 100644 --- a/doc/models/shift.md +++ b/doc/models/shift.md @@ -41,6 +41,8 @@ taken during the shift. "breaks": null, "status": null, "version": null, + "created_at": null, + "updated_at": null, "team_member_id": null } ``` diff --git a/doc/models/site.md b/doc/models/site.md index 81434156..58fcdd1c 100644 --- a/doc/models/site.md +++ b/doc/models/site.md @@ -22,9 +22,12 @@ Represents a Square Online site, which is an online store for a Square seller. ```json { + "id": null, "site_title": null, "domain": null, - "is_published": null + "is_published": null, + "created_at": null, + "updated_at": null } ``` diff --git a/doc/models/snippet.md b/doc/models/snippet.md index 458d3428..e20613c4 100644 --- a/doc/models/snippet.md +++ b/doc/models/snippet.md @@ -21,7 +21,11 @@ Represents the snippet that is added to a Square Online site. The snippet code i ```json { - "content": "content4" + "id": null, + "site_id": null, + "content": "content4", + "created_at": null, + "updated_at": null } ``` diff --git a/doc/models/square-event-data.md b/doc/models/square-event-data.md new file mode 100644 index 00000000..ea7fc5ee --- /dev/null +++ b/doc/models/square-event-data.md @@ -0,0 +1,27 @@ + +# Square Event Data + +## Structure + +`SquareEventData` + +## Fields + +| Name | Type | Tags | Description | Getter | +| --- | --- | --- | --- | --- | +| `Type` | `String` | Optional | Name of the affected object’s type. | String getType() | +| `Id` | `String` | Optional | ID of the affected object. | String getId() | +| `Deleted` | `Boolean` | Optional | Is true if the affected object was deleted. Otherwise absent. | Boolean getDeleted() | +| `Object` | `JsonObject` | Optional | An object containing fields and values relevant to the event. Is absent if affected object was deleted. | JsonObject getObject() | + +## Example (as JSON) + +```json +{ + "type": null, + "id": null, + "deleted": null, + "object": null +} +``` + diff --git a/doc/models/square-event.md b/doc/models/square-event.md new file mode 100644 index 00000000..42e71c64 --- /dev/null +++ b/doc/models/square-event.md @@ -0,0 +1,31 @@ + +# Square Event + +## Structure + +`SquareEvent` + +## Fields + +| Name | Type | Tags | Description | Getter | +| --- | --- | --- | --- | --- | +| `MerchantId` | `String` | Optional | The ID of the target merchant associated with the event. | String getMerchantId() | +| `LocationId` | `String` | Optional | The ID of the location associated with the event. | String getLocationId() | +| `Type` | `String` | Optional | The type of event this represents. | String getType() | +| `EventId` | `String` | Optional | A unique ID for the event. | String getEventId() | +| `CreatedAt` | `String` | Optional | Timestamp of when the event was created, in RFC 3339 format. | String getCreatedAt() | +| `Data` | [`SquareEventData`](../../doc/models/square-event-data.md) | Optional | - | SquareEventData getData() | + +## Example (as JSON) + +```json +{ + "merchant_id": null, + "location_id": null, + "type": null, + "event_id": null, + "created_at": null, + "data": null +} +``` + diff --git a/doc/models/subscription-source.md b/doc/models/subscription-source.md index 106ba0b9..f1989445 100644 --- a/doc/models/subscription-source.md +++ b/doc/models/subscription-source.md @@ -16,6 +16,8 @@ The origination details of the subscription. ## Example (as JSON) ```json -{} +{ + "name": null +} ``` diff --git a/doc/models/subscription-test-result.md b/doc/models/subscription-test-result.md index fa3e3122..fc547daf 100644 --- a/doc/models/subscription-test-result.md +++ b/doc/models/subscription-test-result.md @@ -22,8 +22,11 @@ event types, and signature key. ```json { + "id": null, "status_code": null, - "payload": null + "payload": null, + "created_at": null, + "updated_at": null } ``` diff --git a/doc/models/subscription.md b/doc/models/subscription.md index 6e6035a7..59ef6dca 100644 --- a/doc/models/subscription.md +++ b/doc/models/subscription.md @@ -36,12 +36,21 @@ For an overview of the `Subscription` type, see ```json { + "id": null, + "location_id": null, + "plan_id": null, + "customer_id": null, + "start_date": null, "canceled_date": null, + "charged_through_date": null, "status": null, "tax_percentage": null, + "invoice_ids": null, "price_override_money": null, "version": null, + "created_at": null, "card_id": null, + "timezone": null, "source": null, "actions": null } diff --git a/doc/models/swap-plan-request.md b/doc/models/swap-plan-request.md index 5972dc79..87af74ef 100644 --- a/doc/models/swap-plan-request.md +++ b/doc/models/swap-plan-request.md @@ -17,6 +17,8 @@ Defines input parameters in a call to the ## Example (as JSON) ```json -{} +{ + "new_plan_id": "new_plan_id4" +} ``` diff --git a/doc/models/team-member-booking-profile.md b/doc/models/team-member-booking-profile.md index 319454dd..dd56373f 100644 --- a/doc/models/team-member-booking-profile.md +++ b/doc/models/team-member-booking-profile.md @@ -21,7 +21,11 @@ The booking profile of a seller's team member, including the team member's ID, d ```json { - "is_bookable": null + "team_member_id": null, + "description": null, + "display_name": null, + "is_bookable": null, + "profile_image_url": null } ``` diff --git a/doc/models/team-member.md b/doc/models/team-member.md index 4a83b699..8cd4494f 100644 --- a/doc/models/team-member.md +++ b/doc/models/team-member.md @@ -27,12 +27,16 @@ A record representing an individual team member for a business. ```json { + "id": null, "reference_id": null, + "is_owner": null, "status": null, "given_name": null, "family_name": null, "email_address": null, "phone_number": null, + "created_at": null, + "updated_at": null, "assigned_locations": null } ``` diff --git a/doc/models/tender.md b/doc/models/tender.md index 1595a87f..dafe4886 100644 --- a/doc/models/tender.md +++ b/doc/models/tender.md @@ -33,6 +33,7 @@ Represents a tender (i.e., a method of payment) used in a Square transaction. "id": null, "location_id": null, "transaction_id": null, + "created_at": null, "note": null, "amount_money": null, "tip_money": null, diff --git a/doc/models/terminal-action.md b/doc/models/terminal-action.md index 6d82cb77..8d4b6711 100644 --- a/doc/models/terminal-action.md +++ b/doc/models/terminal-action.md @@ -28,9 +28,14 @@ Represents an action processed by the Square Terminal. ```json { + "id": null, "device_id": null, "deadline_duration": null, + "status": null, "cancel_reason": null, + "created_at": null, + "updated_at": null, + "app_id": null, "type": null, "save_card_options": null, "receipt_options": null, diff --git a/doc/models/terminal-checkout.md b/doc/models/terminal-checkout.md index 0e662a38..35c61e61 100644 --- a/doc/models/terminal-checkout.md +++ b/doc/models/terminal-checkout.md @@ -34,6 +34,7 @@ Represents a checkout processed by the Square Terminal. ```json { + "id": null, "amount_money": { "amount": null, "currency": null @@ -50,7 +51,13 @@ Represents a checkout processed by the Square Terminal. "show_itemized_cart": null }, "deadline_duration": null, + "status": null, "cancel_reason": null, + "payment_ids": null, + "created_at": null, + "updated_at": null, + "app_id": null, + "location_id": null, "payment_type": null, "customer_id": null, "app_fee_money": null diff --git a/doc/models/terminal-refund.md b/doc/models/terminal-refund.md index 30a97ea3..f5b7b5d6 100644 --- a/doc/models/terminal-refund.md +++ b/doc/models/terminal-refund.md @@ -30,7 +30,10 @@ Represents a payment refund processed by the Square Terminal. Only supports Inte ```json { + "id": null, + "refund_id": null, "payment_id": "payment_id0", + "order_id": null, "amount_money": { "amount": null, "currency": null @@ -38,7 +41,12 @@ Represents a payment refund processed by the Square Terminal. Only supports Inte "reason": "reason4", "device_id": "device_id6", "deadline_duration": null, - "cancel_reason": null + "status": null, + "cancel_reason": null, + "created_at": null, + "updated_at": null, + "app_id": null, + "location_id": null } ``` diff --git a/doc/models/update-booking-custom-attribute-definition-request.md b/doc/models/update-booking-custom-attribute-definition-request.md index fea98f77..c154ba58 100644 --- a/doc/models/update-booking-custom-attribute-definition-request.md +++ b/doc/models/update-booking-custom-attribute-definition-request.md @@ -24,7 +24,9 @@ Represents an [UpdateBookingCustomAttributeDefinition](../../doc/api/booking-cus "name": null, "description": null, "visibility": null, - "version": null + "version": null, + "updated_at": null, + "created_at": null }, "idempotency_key": null } diff --git a/doc/models/update-booking-request.md b/doc/models/update-booking-request.md index 9b6bb368..c889f604 100644 --- a/doc/models/update-booking-request.md +++ b/doc/models/update-booking-request.md @@ -18,14 +18,19 @@ { "idempotency_key": null, "booking": { + "id": null, "version": null, "status": null, + "created_at": null, + "updated_at": null, "start_at": null, "location_id": null, "customer_id": null, "customer_note": null, "seller_note": null, "appointment_segments": null, + "transition_time_minutes": null, + "all_day": null, "location_type": null, "creator_details": null, "source": null diff --git a/doc/models/update-invoice-response.md b/doc/models/update-invoice-response.md index 5cc8c7a8..a8343966 100644 --- a/doc/models/update-invoice-response.md +++ b/doc/models/update-invoice-response.md @@ -18,7 +18,6 @@ Describes a `UpdateInvoice` response. ```json { - "errors": [], "invoice": { "accepted_payment_methods": { "bank_account": false, @@ -57,7 +56,6 @@ Describes a `UpdateInvoice` response. "currency": "USD" }, "due_date": "2030-01-24", - "reminders": [], "request_type": "BALANCE", "tipping_enabled": false, "total_completed_amount_money": { diff --git a/doc/models/upsert-booking-custom-attribute-request.md b/doc/models/upsert-booking-custom-attribute-request.md index 7c127a07..fe63944f 100644 --- a/doc/models/upsert-booking-custom-attribute-request.md +++ b/doc/models/upsert-booking-custom-attribute-request.md @@ -23,7 +23,9 @@ Represents an [UpsertBookingCustomAttribute](../../doc/api/booking-custom-attrib "value": null, "version": null, "visibility": null, - "definition": null + "definition": null, + "updated_at": null, + "created_at": null }, "idempotency_key": null } diff --git a/doc/models/upsert-customer-custom-attribute-request.md b/doc/models/upsert-customer-custom-attribute-request.md index b3292b61..a86311d5 100644 --- a/doc/models/upsert-customer-custom-attribute-request.md +++ b/doc/models/upsert-customer-custom-attribute-request.md @@ -23,7 +23,9 @@ Represents an [UpsertCustomerCustomAttribute](../../doc/api/customer-custom-attr "value": null, "version": null, "visibility": null, - "definition": null + "definition": null, + "updated_at": null, + "created_at": null }, "idempotency_key": null } diff --git a/doc/models/upsert-location-custom-attribute-request.md b/doc/models/upsert-location-custom-attribute-request.md index 5479dfef..1f244254 100644 --- a/doc/models/upsert-location-custom-attribute-request.md +++ b/doc/models/upsert-location-custom-attribute-request.md @@ -23,7 +23,9 @@ Represents an [UpsertLocationCustomAttribute](../../doc/api/location-custom-attr "value": null, "version": null, "visibility": null, - "definition": null + "definition": null, + "updated_at": null, + "created_at": null }, "idempotency_key": null } diff --git a/doc/models/upsert-order-custom-attribute-request.md b/doc/models/upsert-order-custom-attribute-request.md index 4a086d95..e90352fb 100644 --- a/doc/models/upsert-order-custom-attribute-request.md +++ b/doc/models/upsert-order-custom-attribute-request.md @@ -23,7 +23,9 @@ Represents an upsert request for an order custom attribute. "value": null, "version": null, "visibility": null, - "definition": null + "definition": null, + "updated_at": null, + "created_at": null }, "idempotency_key": null } diff --git a/doc/models/vendor.md b/doc/models/vendor.md index ca47be9c..7b574a52 100644 --- a/doc/models/vendor.md +++ b/doc/models/vendor.md @@ -27,6 +27,8 @@ Represents a supplier to a seller. ```json { "id": null, + "created_at": null, + "updated_at": null, "name": null, "address": null, "contacts": null, diff --git a/doc/models/wage-setting.md b/doc/models/wage-setting.md index b224653b..586aa200 100644 --- a/doc/models/wage-setting.md +++ b/doc/models/wage-setting.md @@ -25,7 +25,9 @@ An object representing a team member's wage information. "team_member_id": null, "job_assignments": null, "is_overtime_exempt": null, - "version": null + "version": null, + "created_at": null, + "updated_at": null } ``` diff --git a/doc/models/webhook-subscription.md b/doc/models/webhook-subscription.md index 72bba0bc..ba3b297f 100644 --- a/doc/models/webhook-subscription.md +++ b/doc/models/webhook-subscription.md @@ -26,11 +26,15 @@ event types, and signature key. ```json { + "id": null, "name": null, "enabled": null, "event_types": null, "notification_url": null, - "api_version": null + "api_version": null, + "signature_key": null, + "created_at": null, + "updated_at": null } ``` diff --git a/doc/models/workweek-config.md b/doc/models/workweek-config.md index 3ddedfa0..2ca77434 100644 --- a/doc/models/workweek-config.md +++ b/doc/models/workweek-config.md @@ -26,7 +26,9 @@ workweek. This is used to calculate overtime pay. "id": null, "start_of_week": "MON", "start_of_day_local_time": "start_of_day_local_time6", - "version": null + "version": null, + "created_at": null, + "updated_at": null } ``` diff --git a/pom.xml b/pom.xml index 08fc7296..295c0dbe 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.squareup square - 27.1.0.20230119 + 27.2.0.20230315 jar Square Java client library for the Square API @@ -45,7 +45,7 @@ io.apimatic core - [0.3, 0.4) + [0.4, 0.5) io.apimatic diff --git a/src/main/java/com/squareup/square/SquareClient.java b/src/main/java/com/squareup/square/SquareClient.java index 509b5750..f688428a 100644 --- a/src/main/java/com/squareup/square/SquareClient.java +++ b/src/main/java/com/squareup/square/SquareClient.java @@ -148,7 +148,7 @@ public final class SquareClient implements SquareClientInterface { private static final CompatibilityFactory compatibilityFactory = new CompatibilityFactoryImpl(); - private static String userAgent = "Square-Java-SDK/27.1.0.20230119 ({api-version}) {engine}/{engine-version} ({os-info}) {detail}"; + private static String userAgent = "Square-Java-SDK/27.2.0.20230315 ({api-version}) {engine}/{engine-version} ({os-info}) {detail}"; /** * Current API environment. @@ -685,7 +685,7 @@ public String getAccessToken() { * @return sdkVersion */ public String getSdkVersion() { - return "27.1.0.20230119"; + return "27.2.0.20230315"; } /** @@ -799,7 +799,7 @@ public static class Builder { private Environment environment = Environment.PRODUCTION; private String customUrl = "https://connect.squareup.com"; - private String squareVersion = "2023-01-19"; + private String squareVersion = "2023-03-15"; private HttpClient httpClient; private Headers additionalHeaders = new Headers(); private String userAgentDetail = null; diff --git a/src/main/java/com/squareup/square/api/BaseApi.java b/src/main/java/com/squareup/square/api/BaseApi.java index 7eaed64d..accbbf8c 100644 --- a/src/main/java/com/squareup/square/api/BaseApi.java +++ b/src/main/java/com/squareup/square/api/BaseApi.java @@ -18,7 +18,7 @@ public abstract class BaseApi { new HashMap>(); private GlobalConfiguration globalConfig; static { - GLOBAL_ERROR_CASES.put(ErrorCase.DEFAULT, ErrorCase.create("HTTP Response Not OK", + GLOBAL_ERROR_CASES.put(ErrorCase.DEFAULT, ErrorCase.setReason("HTTP Response Not OK", (reason, context) -> new ApiException(reason, context))); } diff --git a/src/main/java/com/squareup/square/api/BookingsApi.java b/src/main/java/com/squareup/square/api/BookingsApi.java index 30c80c6e..e08fbc13 100644 --- a/src/main/java/com/squareup/square/api/BookingsApi.java +++ b/src/main/java/com/squareup/square/api/BookingsApi.java @@ -80,11 +80,14 @@ CompletableFuture listBookingsAsync( final String startAtMax); /** - * Creates a booking. To call this endpoint with buyer-level permissions, set - * `APPOINTMENTS_WRITE` for the OAuth scope. To call this endpoint with seller-level - * permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope. For - * calls to this endpoint with seller-level permissions to succeed, the seller must have - * subscribed to *Appointments Plus* or *Appointments Premium*. + * Creates a booking. The required input must include the following: - `Booking.location_id`, - + * `Booking.start_at`, - `Booking.team_member_id` - + * `Booking.AppointmentSegment.service_variation_id` - + * `Booking.AppointmentSegment.service_variation_version` To call this endpoint with buyer-level + * permissions, set `APPOINTMENTS_WRITE` for the OAuth scope. To call this endpoint with + * seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth + * scope. For calls to this endpoint with seller-level permissions to succeed, the seller must + * have subscribed to *Appointments Plus* or *Appointments Premium*. * @param body Required parameter: An object containing the fields to POST for the request. * See the corresponding object definition for field details. * @return Returns the CreateBookingResponse response from the API call @@ -95,11 +98,14 @@ CreateBookingResponse createBooking( final CreateBookingRequest body) throws ApiException, IOException; /** - * Creates a booking. To call this endpoint with buyer-level permissions, set - * `APPOINTMENTS_WRITE` for the OAuth scope. To call this endpoint with seller-level - * permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope. For - * calls to this endpoint with seller-level permissions to succeed, the seller must have - * subscribed to *Appointments Plus* or *Appointments Premium*. + * Creates a booking. The required input must include the following: - `Booking.location_id`, - + * `Booking.start_at`, - `Booking.team_member_id` - + * `Booking.AppointmentSegment.service_variation_id` - + * `Booking.AppointmentSegment.service_variation_version` To call this endpoint with buyer-level + * permissions, set `APPOINTMENTS_WRITE` for the OAuth scope. To call this endpoint with + * seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth + * scope. For calls to this endpoint with seller-level permissions to succeed, the seller must + * have subscribed to *Appointments Plus* or *Appointments Premium*. * @param body Required parameter: An object containing the fields to POST for the request. * See the corresponding object definition for field details. * @return Returns the CreateBookingResponse response from the API call diff --git a/src/main/java/com/squareup/square/api/DefaultBookingsApi.java b/src/main/java/com/squareup/square/api/DefaultBookingsApi.java index 61f3cfd4..a26fe4e7 100644 --- a/src/main/java/com/squareup/square/api/DefaultBookingsApi.java +++ b/src/main/java/com/squareup/square/api/DefaultBookingsApi.java @@ -146,11 +146,14 @@ private ApiCall prepareListBookingsRequest( } /** - * Creates a booking. To call this endpoint with buyer-level permissions, set - * `APPOINTMENTS_WRITE` for the OAuth scope. To call this endpoint with seller-level - * permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope. For - * calls to this endpoint with seller-level permissions to succeed, the seller must have - * subscribed to *Appointments Plus* or *Appointments Premium*. + * Creates a booking. The required input must include the following: - `Booking.location_id`, - + * `Booking.start_at`, - `Booking.team_member_id` - + * `Booking.AppointmentSegment.service_variation_id` - + * `Booking.AppointmentSegment.service_variation_version` To call this endpoint with buyer-level + * permissions, set `APPOINTMENTS_WRITE` for the OAuth scope. To call this endpoint with + * seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth + * scope. For calls to this endpoint with seller-level permissions to succeed, the seller must + * have subscribed to *Appointments Plus* or *Appointments Premium*. * @param body Required parameter: An object containing the fields to POST for the request. * See the corresponding object definition for field details. * @return Returns the CreateBookingResponse response from the API call @@ -163,11 +166,14 @@ public CreateBookingResponse createBooking( } /** - * Creates a booking. To call this endpoint with buyer-level permissions, set - * `APPOINTMENTS_WRITE` for the OAuth scope. To call this endpoint with seller-level - * permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope. For - * calls to this endpoint with seller-level permissions to succeed, the seller must have - * subscribed to *Appointments Plus* or *Appointments Premium*. + * Creates a booking. The required input must include the following: - `Booking.location_id`, - + * `Booking.start_at`, - `Booking.team_member_id` - + * `Booking.AppointmentSegment.service_variation_id` - + * `Booking.AppointmentSegment.service_variation_version` To call this endpoint with buyer-level + * permissions, set `APPOINTMENTS_WRITE` for the OAuth scope. To call this endpoint with + * seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth + * scope. For calls to this endpoint with seller-level permissions to succeed, the seller must + * have subscribed to *Appointments Plus* or *Appointments Premium*. * @param body Required parameter: An object containing the fields to POST for the request. * See the corresponding object definition for field details. * @return Returns the CreateBookingResponse response from the API call diff --git a/src/main/java/com/squareup/square/models/BankAccountPaymentDetails.java b/src/main/java/com/squareup/square/models/BankAccountPaymentDetails.java index aa9fbe64..bcb1c51e 100644 --- a/src/main/java/com/squareup/square/models/BankAccountPaymentDetails.java +++ b/src/main/java/com/squareup/square/models/BankAccountPaymentDetails.java @@ -121,7 +121,7 @@ public String getTransferType() { /** * Internal Getter for AccountOwnershipType. * The ownership type of the bank account performing the transfer. The type can be `INDIVIDUAL`, - * `COMPANY`, or `UNKNOWN`. + * `COMPANY`, or `ACCOUNT_TYPE_UNKNOWN`. * @return Returns the Internal String */ @JsonGetter("account_ownership_type") @@ -134,7 +134,7 @@ protected OptionalNullable internalGetAccountOwnershipType() { /** * Getter for AccountOwnershipType. * The ownership type of the bank account performing the transfer. The type can be `INDIVIDUAL`, - * `COMPANY`, or `UNKNOWN`. + * `COMPANY`, or `ACCOUNT_TYPE_UNKNOWN`. * @return Returns the String */ @JsonIgnore diff --git a/src/main/java/com/squareup/square/models/CreatePaymentRequest.java b/src/main/java/com/squareup/square/models/CreatePaymentRequest.java index 9e433431..e228765b 100644 --- a/src/main/java/com/squareup/square/models/CreatePaymentRequest.java +++ b/src/main/java/com/squareup/square/models/CreatePaymentRequest.java @@ -110,11 +110,12 @@ public CreatePaymentRequest( /** * Getter for SourceId. - * The ID for the source of funds for this payment. This can be a payment token (card nonce) - * generated by the Square payment form or a card on file made with the Customers API. If - * recording a payment that the seller received outside of Square, specify either "CASH" or - * "EXTERNAL". For more information, see [Take - * Payments](https://developer.squareup.com/docs/payments-api/take-payments). + * The ID for the source of funds for this payment. This could be a payment token generated by + * the Web Payments SDK for any of its [supported + * methods](https://developer.squareup.com/docs/web-payments/overview#explore-payment-methods), + * including cards, bank transfers, Afterpay or Cash App Pay. If recording a payment that the + * seller received outside of Square, specify either "CASH" or "EXTERNAL". For more information, + * see [Take Payments](https://developer.squareup.com/docs/payments-api/take-payments). * @return Returns the String */ @JsonGetter("source_id") @@ -244,7 +245,7 @@ public String getOrderId() { /** * Getter for CustomerId. * The [Customer]($m/Customer) ID of the customer associated with the payment. This is required - * if the `source_id` refers to a card on file created using the Customers API. + * if the `source_id` refers to a card on file created using the Cards API. * @return Returns the String */ @JsonGetter("customer_id") diff --git a/src/main/java/com/squareup/square/models/PaymentRefund.java b/src/main/java/com/squareup/square/models/PaymentRefund.java index c6c0f25a..20b63a06 100644 --- a/src/main/java/com/squareup/square/models/PaymentRefund.java +++ b/src/main/java/com/squareup/square/models/PaymentRefund.java @@ -181,7 +181,7 @@ public Boolean getUnlinked() { /** * Internal Getter for DestinationType. * The destination type for this refund. Current values include `CARD`, `BANK_ACCOUNT`, - * `WALLET`, `CASH`, or `EXTERNAL`. + * `WALLET`, `BUY_NOW_PAY_LATER`, `CASH`, and `EXTERNAL`. * @return Returns the Internal String */ @JsonGetter("destination_type") @@ -194,7 +194,7 @@ protected OptionalNullable internalGetDestinationType() { /** * Getter for DestinationType. * The destination type for this refund. Current values include `CARD`, `BANK_ACCOUNT`, - * `WALLET`, `CASH`, or `EXTERNAL`. + * `WALLET`, `BUY_NOW_PAY_LATER`, `CASH`, and `EXTERNAL`. * @return Returns the String */ @JsonIgnore diff --git a/src/main/java/com/squareup/square/models/RefundPaymentRequest.java b/src/main/java/com/squareup/square/models/RefundPaymentRequest.java index c22240ba..c7a871f6 100644 --- a/src/main/java/com/squareup/square/models/RefundPaymentRequest.java +++ b/src/main/java/com/squareup/square/models/RefundPaymentRequest.java @@ -135,8 +135,8 @@ public Money getAppFeeMoney() { /** * Internal Getter for PaymentId. - * The unique ID of the payment being refunded. Must not be provided if `unlinked=true`. - * Required if `unlinked=false` or `unlinked` is unset. + * The unique ID of the payment being refunded. Required when unlinked=false, otherwise must not + * be set. * @return Returns the Internal String */ @JsonGetter("payment_id") @@ -148,8 +148,8 @@ protected OptionalNullable internalGetPaymentId() { /** * Getter for PaymentId. - * The unique ID of the payment being refunded. Must not be provided if `unlinked=true`. - * Required if `unlinked=false` or `unlinked` is unset. + * The unique ID of the payment being refunded. Required when unlinked=false, otherwise must not + * be set. * @return Returns the String */ @JsonIgnore @@ -160,9 +160,9 @@ public String getPaymentId() { /** * Internal Getter for DestinationId. * The ID indicating where funds will be refunded to, if this is an unlinked refund. This can be - * any of the following: A token generated by Web Payments SDK or RSDK2; a card-on-file - * identifier. Required for requests specifying unlinked=true. Otherwise, if included when - * `unlinked=false`, will throw an error. + * any of the following: A token generated by Web Payments SDK; a card-on-file identifier. + * Required for requests specifying unlinked=true. Otherwise, if included when `unlinked=false`, + * will throw an error. * @return Returns the Internal String */ @JsonGetter("destination_id") @@ -175,9 +175,9 @@ protected OptionalNullable internalGetDestinationId() { /** * Getter for DestinationId. * The ID indicating where funds will be refunded to, if this is an unlinked refund. This can be - * any of the following: A token generated by Web Payments SDK or RSDK2; a card-on-file - * identifier. Required for requests specifying unlinked=true. Otherwise, if included when - * `unlinked=false`, will throw an error. + * any of the following: A token generated by Web Payments SDK; a card-on-file identifier. + * Required for requests specifying unlinked=true. Otherwise, if included when `unlinked=false`, + * will throw an error. * @return Returns the String */ @JsonIgnore @@ -212,7 +212,7 @@ public Boolean getUnlinked() { /** * Internal Getter for LocationId. * The location ID associated with the unlinked refund. Required for requests specifying - * `unlinked=true`. Otherwise, if included when `unlinked=false` or unset, will throw an error. + * `unlinked=true`. Otherwise, if included when `unlinked=false`, will throw an error. * @return Returns the Internal String */ @JsonGetter("location_id") @@ -225,7 +225,7 @@ protected OptionalNullable internalGetLocationId() { /** * Getter for LocationId. * The location ID associated with the unlinked refund. Required for requests specifying - * `unlinked=true`. Otherwise, if included when `unlinked=false` or unset, will throw an error. + * `unlinked=true`. Otherwise, if included when `unlinked=false`, will throw an error. * @return Returns the String */ @JsonIgnore @@ -236,8 +236,8 @@ public String getLocationId() { /** * Internal Getter for CustomerId. * The [Customer]($m/Customer) ID of the customer associated with the refund. This is required - * if the `destination_id` refers to a card on file created using the Customers API. Only - * allowed when `unlinked=true`. + * if the `destination_id` refers to a card on file created using the Cards API. Only allowed + * when `unlinked=true`. * @return Returns the Internal String */ @JsonGetter("customer_id") @@ -250,8 +250,8 @@ protected OptionalNullable internalGetCustomerId() { /** * Getter for CustomerId. * The [Customer]($m/Customer) ID of the customer associated with the refund. This is required - * if the `destination_id` refers to a card on file created using the Customers API. Only - * allowed when `unlinked=true`. + * if the `destination_id` refers to a card on file created using the Cards API. Only allowed + * when `unlinked=true`. * @return Returns the String */ @JsonIgnore diff --git a/src/main/java/com/squareup/square/models/SquareEvent.java b/src/main/java/com/squareup/square/models/SquareEvent.java new file mode 100644 index 00000000..8105235e --- /dev/null +++ b/src/main/java/com/squareup/square/models/SquareEvent.java @@ -0,0 +1,339 @@ + +package com.squareup.square.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import io.apimatic.core.types.BaseModel; +import io.apimatic.core.types.OptionalNullable; +import java.util.Objects; + +/** + * This is a model class for SquareEvent type. + */ +public class SquareEvent { + private final OptionalNullable merchantId; + private final OptionalNullable locationId; + private final OptionalNullable type; + private final OptionalNullable eventId; + private final String createdAt; + private final SquareEventData data; + + /** + * Initialization constructor. + * @param merchantId String value for merchantId. + * @param locationId String value for locationId. + * @param type String value for type. + * @param eventId String value for eventId. + * @param createdAt String value for createdAt. + * @param data SquareEventData value for data. + */ + @JsonCreator + public SquareEvent( + @JsonProperty("merchant_id") String merchantId, + @JsonProperty("location_id") String locationId, + @JsonProperty("type") String type, + @JsonProperty("event_id") String eventId, + @JsonProperty("created_at") String createdAt, + @JsonProperty("data") SquareEventData data) { + this.merchantId = OptionalNullable.of(merchantId); + this.locationId = OptionalNullable.of(locationId); + this.type = OptionalNullable.of(type); + this.eventId = OptionalNullable.of(eventId); + this.createdAt = createdAt; + this.data = data; + } + + /** + * Internal initialization constructor. + */ + protected SquareEvent(OptionalNullable merchantId, OptionalNullable locationId, + OptionalNullable type, OptionalNullable eventId, String createdAt, + SquareEventData data) { + this.merchantId = merchantId; + this.locationId = locationId; + this.type = type; + this.eventId = eventId; + this.createdAt = createdAt; + this.data = data; + } + + /** + * Internal Getter for MerchantId. + * The ID of the target merchant associated with the event. + * @return Returns the Internal String + */ + @JsonGetter("merchant_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetMerchantId() { + return this.merchantId; + } + + /** + * Getter for MerchantId. + * The ID of the target merchant associated with the event. + * @return Returns the String + */ + @JsonIgnore + public String getMerchantId() { + return OptionalNullable.getFrom(merchantId); + } + + /** + * Internal Getter for LocationId. + * The ID of the location associated with the event. + * @return Returns the Internal String + */ + @JsonGetter("location_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetLocationId() { + return this.locationId; + } + + /** + * Getter for LocationId. + * The ID of the location associated with the event. + * @return Returns the String + */ + @JsonIgnore + public String getLocationId() { + return OptionalNullable.getFrom(locationId); + } + + /** + * Internal Getter for Type. + * The type of event this represents. + * @return Returns the Internal String + */ + @JsonGetter("type") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetType() { + return this.type; + } + + /** + * Getter for Type. + * The type of event this represents. + * @return Returns the String + */ + @JsonIgnore + public String getType() { + return OptionalNullable.getFrom(type); + } + + /** + * Internal Getter for EventId. + * A unique ID for the event. + * @return Returns the Internal String + */ + @JsonGetter("event_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetEventId() { + return this.eventId; + } + + /** + * Getter for EventId. + * A unique ID for the event. + * @return Returns the String + */ + @JsonIgnore + public String getEventId() { + return OptionalNullable.getFrom(eventId); + } + + /** + * Getter for CreatedAt. + * Timestamp of when the event was created, in RFC 3339 format. + * @return Returns the String + */ + @JsonGetter("created_at") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getCreatedAt() { + return createdAt; + } + + /** + * Getter for Data. + * @return Returns the SquareEventData + */ + @JsonGetter("data") + @JsonInclude(JsonInclude.Include.NON_NULL) + public SquareEventData getData() { + return data; + } + + @Override + public int hashCode() { + return Objects.hash(merchantId, locationId, type, eventId, createdAt, data); + } + + @Override + public boolean equals(Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof SquareEvent)) { + return false; + } + SquareEvent other = (SquareEvent) obj; + return Objects.equals(merchantId, other.merchantId) + && Objects.equals(locationId, other.locationId) + && Objects.equals(type, other.type) + && Objects.equals(eventId, other.eventId) + && Objects.equals(createdAt, other.createdAt) + && Objects.equals(data, other.data); + } + + /** + * Converts this SquareEvent into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "SquareEvent [" + "merchantId=" + merchantId + ", locationId=" + locationId + + ", type=" + type + ", eventId=" + eventId + ", createdAt=" + createdAt + ", data=" + + data + "]"; + } + + /** + * Builds a new {@link SquareEvent.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link SquareEvent.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .createdAt(getCreatedAt()) + .data(getData()); + builder.merchantId = internalGetMerchantId(); + builder.locationId = internalGetLocationId(); + builder.type = internalGetType(); + builder.eventId = internalGetEventId(); + return builder; + } + + /** + * Class to build instances of {@link SquareEvent}. + */ + public static class Builder { + private OptionalNullable merchantId; + private OptionalNullable locationId; + private OptionalNullable type; + private OptionalNullable eventId; + private String createdAt; + private SquareEventData data; + + + + /** + * Setter for merchantId. + * @param merchantId String value for merchantId. + * @return Builder + */ + public Builder merchantId(String merchantId) { + this.merchantId = OptionalNullable.of(merchantId); + return this; + } + + /** + * UnSetter for merchantId. + * @return Builder + */ + public Builder unsetMerchantId() { + merchantId = null; + return this; + } + + /** + * Setter for locationId. + * @param locationId String value for locationId. + * @return Builder + */ + public Builder locationId(String locationId) { + this.locationId = OptionalNullable.of(locationId); + return this; + } + + /** + * UnSetter for locationId. + * @return Builder + */ + public Builder unsetLocationId() { + locationId = null; + return this; + } + + /** + * Setter for type. + * @param type String value for type. + * @return Builder + */ + public Builder type(String type) { + this.type = OptionalNullable.of(type); + return this; + } + + /** + * UnSetter for type. + * @return Builder + */ + public Builder unsetType() { + type = null; + return this; + } + + /** + * Setter for eventId. + * @param eventId String value for eventId. + * @return Builder + */ + public Builder eventId(String eventId) { + this.eventId = OptionalNullable.of(eventId); + return this; + } + + /** + * UnSetter for eventId. + * @return Builder + */ + public Builder unsetEventId() { + eventId = null; + return this; + } + + /** + * Setter for createdAt. + * @param createdAt String value for createdAt. + * @return Builder + */ + public Builder createdAt(String createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Setter for data. + * @param data SquareEventData value for data. + * @return Builder + */ + public Builder data(SquareEventData data) { + this.data = data; + return this; + } + + /** + * Builds a new {@link SquareEvent} object using the set fields. + * @return {@link SquareEvent} + */ + public SquareEvent build() { + return new SquareEvent(merchantId, locationId, type, eventId, createdAt, data); + } + } +} diff --git a/src/main/java/com/squareup/square/models/SquareEventData.java b/src/main/java/com/squareup/square/models/SquareEventData.java new file mode 100644 index 00000000..3185ce3b --- /dev/null +++ b/src/main/java/com/squareup/square/models/SquareEventData.java @@ -0,0 +1,263 @@ + +package com.squareup.square.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.squareup.square.utilities.JsonObject; +import io.apimatic.core.types.BaseModel; +import io.apimatic.core.types.OptionalNullable; +import java.util.Objects; + +/** + * This is a model class for SquareEventData type. + */ +public class SquareEventData { + private final OptionalNullable type; + private final String id; + private final OptionalNullable deleted; + private final OptionalNullable object; + + /** + * Initialization constructor. + * @param type String value for type. + * @param id String value for id. + * @param deleted Boolean value for deleted. + * @param object JsonObject value for object. + */ + @JsonCreator + public SquareEventData( + @JsonProperty("type") String type, + @JsonProperty("id") String id, + @JsonProperty("deleted") Boolean deleted, + @JsonProperty("object") JsonObject object) { + this.type = OptionalNullable.of(type); + this.id = id; + this.deleted = OptionalNullable.of(deleted); + this.object = OptionalNullable.of(object); + } + + /** + * Internal initialization constructor. + */ + protected SquareEventData(OptionalNullable type, String id, + OptionalNullable deleted, OptionalNullable object) { + this.type = type; + this.id = id; + this.deleted = deleted; + this.object = object; + } + + /** + * Internal Getter for Type. + * Name of the affected object’s type. + * @return Returns the Internal String + */ + @JsonGetter("type") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetType() { + return this.type; + } + + /** + * Getter for Type. + * Name of the affected object’s type. + * @return Returns the String + */ + @JsonIgnore + public String getType() { + return OptionalNullable.getFrom(type); + } + + /** + * Getter for Id. + * ID of the affected object. + * @return Returns the String + */ + @JsonGetter("id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getId() { + return id; + } + + /** + * Internal Getter for Deleted. + * Is true if the affected object was deleted. Otherwise absent. + * @return Returns the Internal Boolean + */ + @JsonGetter("deleted") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetDeleted() { + return this.deleted; + } + + /** + * Getter for Deleted. + * Is true if the affected object was deleted. Otherwise absent. + * @return Returns the Boolean + */ + @JsonIgnore + public Boolean getDeleted() { + return OptionalNullable.getFrom(deleted); + } + + /** + * Internal Getter for Object. + * An object containing fields and values relevant to the event. Is absent if affected object + * was deleted. + * @return Returns the Internal JsonObject + */ + @JsonGetter("object") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetObject() { + return this.object; + } + + /** + * Getter for Object. + * An object containing fields and values relevant to the event. Is absent if affected object + * was deleted. + * @return Returns the JsonObject + */ + @JsonIgnore + public JsonObject getObject() { + return OptionalNullable.getFrom(object); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, deleted, object); + } + + @Override + public boolean equals(Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof SquareEventData)) { + return false; + } + SquareEventData other = (SquareEventData) obj; + return Objects.equals(type, other.type) + && Objects.equals(id, other.id) + && Objects.equals(deleted, other.deleted) + && Objects.equals(object, other.object); + } + + /** + * Converts this SquareEventData into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "SquareEventData [" + "type=" + type + ", id=" + id + ", deleted=" + deleted + + ", object=" + object + "]"; + } + + /** + * Builds a new {@link SquareEventData.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link SquareEventData.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .id(getId()); + builder.type = internalGetType(); + builder.deleted = internalGetDeleted(); + builder.object = internalGetObject(); + return builder; + } + + /** + * Class to build instances of {@link SquareEventData}. + */ + public static class Builder { + private OptionalNullable type; + private String id; + private OptionalNullable deleted; + private OptionalNullable object; + + + + /** + * Setter for type. + * @param type String value for type. + * @return Builder + */ + public Builder type(String type) { + this.type = OptionalNullable.of(type); + return this; + } + + /** + * UnSetter for type. + * @return Builder + */ + public Builder unsetType() { + type = null; + return this; + } + + /** + * Setter for id. + * @param id String value for id. + * @return Builder + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * Setter for deleted. + * @param deleted Boolean value for deleted. + * @return Builder + */ + public Builder deleted(Boolean deleted) { + this.deleted = OptionalNullable.of(deleted); + return this; + } + + /** + * UnSetter for deleted. + * @return Builder + */ + public Builder unsetDeleted() { + deleted = null; + return this; + } + + /** + * Setter for object. + * @param object JsonObject value for object. + * @return Builder + */ + public Builder object(JsonObject object) { + this.object = OptionalNullable.of(object); + return this; + } + + /** + * UnSetter for object. + * @return Builder + */ + public Builder unsetObject() { + object = null; + return this; + } + + /** + * Builds a new {@link SquareEventData} object using the set fields. + * @return {@link SquareEventData} + */ + public SquareEventData build() { + return new SquareEventData(type, id, deleted, object); + } + } +}