Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"inline-path-parameters": true,
"use-discriminated-unions": true
},
"originGitCommit": "074e2540401528521d322c512800c4ebd67cd153",
"sdkVersion": "46.0.0"
"originGitCommit": "b05364cda2b85e35d8daa9ff2c24bbabbbd9652a",
"sdkVersion": "46.1.0"
}
8 changes: 7 additions & 1 deletion .fern/replay.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -8348,8 +8348,9 @@ how to sort or filter the results. Your `SearchOrdersQuery` can:

Note that details for orders processed with Square Point of Sale while in
offline mode might not be transmitted to Square for up to 72 hours. Offline
orders have a `created_at` value that reflects the time the order was created,
not the time it was subsequently transmitted to Square.
orders have a `created_at` value that reflects the time the order was
transmitted to Square and created server-side, not the time the order was
created on the Point of Sale device.
</dd>
</dl>
</dd>
Expand Down
16 changes: 15 additions & 1 deletion src/Square.Test/Unit/MockServer/Catalog/BatchGetTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,21 @@ public async Task MockServerTest()
"image_id": "image_id",
"type": "TAX"
}
]
],
"included_resources": {
"nested_modifiers": [
{
"id": "id",
"type": "ITEM"
}
],
"ancestor_modifiers": [
{
"id": "id",
"type": "ITEM"
}
]
}
}
""";

Expand Down
16 changes: 15 additions & 1 deletion src/Square.Test/Unit/MockServer/Catalog/SearchItemsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,21 @@ public async Task MockServerTest()
"cursor": "cursor",
"matched_variation_ids": [
"VBJNPHCOKDFECR6VU25WRJUD"
]
],
"included_resources": {
"nested_modifiers": [
{
"id": "id",
"type": "ITEM"
}
],
"ancestor_modifiers": [
{
"id": "id",
"type": "ITEM"
}
]
}
}
""";

Expand Down
16 changes: 15 additions & 1 deletion src/Square.Test/Unit/MockServer/Catalog/SearchTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,21 @@ public async Task MockServerTest()
"type": "ITEM"
}
],
"latest_time": "latest_time"
"latest_time": "latest_time",
"included_resources": {
"nested_modifiers": [
{
"id": "id",
"type": "ITEM"
}
],
"ancestor_modifiers": [
{
"id": "id",
"type": "ITEM"
}
]
}
}
""";

Expand Down
4 changes: 3 additions & 1 deletion src/Square.Test/Unit/MockServer/Locations/CreateTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ public async Task MockServerTest()
"fr_naf": "fr_naf",
"es_nif": "es_nif",
"jp_qii": "jp_qii"
}
},
"custom_receipt_text": "custom_receipt_text",
"return_policy": "return_policy"
}
}
""";
Expand Down
4 changes: 3 additions & 1 deletion src/Square.Test/Unit/MockServer/Locations/GetTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ public async Task MockServerTest()
"fr_naf": "fr_naf",
"es_nif": "es_nif",
"jp_qii": "jp_qii"
}
},
"custom_receipt_text": "custom_receipt_text",
"return_policy": "return_policy"
}
}
""";
Expand Down
8 changes: 6 additions & 2 deletions src/Square.Test/Unit/MockServer/Locations/ListTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ public async Task MockServerTest()
"logo_url": "logo_url",
"pos_background_url": "pos_background_url",
"mcc": "mcc",
"full_format_logo_url": "full_format_logo_url"
"full_format_logo_url": "full_format_logo_url",
"custom_receipt_text": "custom_receipt_text",
"return_policy": "return_policy"
},
{
"id": "3Z4V4WHQK64X9",
Expand Down Expand Up @@ -91,7 +93,9 @@ public async Task MockServerTest()
"logo_url": "logo_url",
"pos_background_url": "pos_background_url",
"mcc": "7299",
"full_format_logo_url": "full_format_logo_url"
"full_format_logo_url": "full_format_logo_url",
"custom_receipt_text": "custom_receipt_text",
"return_policy": "return_policy"
}
]
}
Expand Down
4 changes: 3 additions & 1 deletion src/Square.Test/Unit/MockServer/Locations/UpdateTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ public async Task MockServerTest()
"fr_naf": "fr_naf",
"es_nif": "es_nif",
"jp_qii": "jp_qii"
}
},
"custom_receipt_text": "custom_receipt_text",
"return_policy": "return_policy"
}
}
""";
Expand Down
7 changes: 7 additions & 0 deletions src/Square/Catalog/Requests/BatchGetCatalogObjectsRequest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Text.Json.Serialization;
using Square;
using Square.Core;

namespace Square.Catalog;
Expand Down Expand Up @@ -55,6 +56,12 @@ public record BatchGetCatalogObjectsRequest
[JsonPropertyName("include_category_path_to_root")]
public bool? IncludeCategoryPathToRoot { get; set; }

/// <summary>
/// Options to include related resources in the response.
/// </summary>
[JsonPropertyName("include_options")]
public IncludeOptions? IncludeOptions { get; set; }

/// <inheritdoc />
public override string ToString()
{
Expand Down
6 changes: 6 additions & 0 deletions src/Square/Catalog/Requests/SearchCatalogItemsRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ public record SearchCatalogItemsRequest
[JsonPropertyName("archived_state")]
public ArchivedState? ArchivedState { get; set; }

/// <summary>
/// Options to include related resources in the response.
/// </summary>
[JsonPropertyName("include_options")]
public IncludeOptions? IncludeOptions { get; set; }

/// <inheritdoc />
public override string ToString()
{
Expand Down
6 changes: 6 additions & 0 deletions src/Square/Catalog/Requests/SearchCatalogObjectsRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ public record SearchCatalogObjectsRequest
[JsonPropertyName("include_category_path_to_root")]
public bool? IncludeCategoryPathToRoot { get; set; }

/// <summary>
/// Options to include related resources in the response.
/// </summary>
[JsonPropertyName("include_options")]
public IncludeOptions? IncludeOptions { get; set; }

/// <inheritdoc />
public override string ToString()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Square/Core/Public/Version.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ namespace Square;
[Serializable]
internal class Version
{
public const string Current = "46.0.0";
public const string Current = "46.1.0";
}
5 changes: 3 additions & 2 deletions src/Square/Orders/IOrdersClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ Task<CloneOrderResponse> CloneAsync(
///
/// Note that details for orders processed with Square Point of Sale while in
/// offline mode might not be transmitted to Square for up to 72 hours. Offline
/// orders have a `created_at` value that reflects the time the order was created,
/// not the time it was subsequently transmitted to Square.
/// orders have a `created_at` value that reflects the time the order was
/// transmitted to Square and created server-side, not the time the order was
/// created on the Point of Sale device.
/// </summary>
Task<SearchOrdersResponse> SearchAsync(
SearchOrdersRequest request,
Expand Down
5 changes: 3 additions & 2 deletions src/Square/Orders/OrdersClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,9 @@ public async Task<CloneOrderResponse> CloneAsync(
///
/// Note that details for orders processed with Square Point of Sale while in
/// offline mode might not be transmitted to Square for up to 72 hours. Offline
/// orders have a `created_at` value that reflects the time the order was created,
/// not the time it was subsequently transmitted to Square.
/// orders have a `created_at` value that reflects the time the order was
/// transmitted to Square and created server-side, not the time the order was
/// created on the Point of Sale device.
/// </summary>
/// <example><code>
/// await client.Orders.SearchAsync(
Expand Down
2 changes: 1 addition & 1 deletion src/Square/Square.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>12</LangVersion>
<Nullable>enable</Nullable>
<Version>46.0.0</Version>
<Version>46.1.0</Version>
<AssemblyVersion>$(Version)</AssemblyVersion>
<FileVersion>$(Version)</FileVersion>
<PackageReadmeFile>README.md</PackageReadmeFile>
Expand Down
4 changes: 2 additions & 2 deletions src/Square/SquareClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ public SquareClient(string? token = null, ClientOptions? clientOptions = null)
new Dictionary<string, string>()
{
{ "Authorization", $"Bearer {token}" },
{ "Square-Version", "2026-07-15" },
{ "Square-Version", "2026-08-19" },
{ "X-Fern-Language", "C#" },
{ "X-Fern-SDK-Name", "Square" },
{ "X-Fern-SDK-Version", Version.Current },
{ "User-Agent", "Square/46.0.0" },
{ "User-Agent", "Square/46.1.0" },
}
);
clientOptions ??= new ClientOptions();
Expand Down
6 changes: 6 additions & 0 deletions src/Square/Types/BatchGetCatalogObjectsResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ public record BatchGetCatalogObjectsResponse : IJsonOnDeserialized
[JsonPropertyName("related_objects")]
public IEnumerable<CatalogObject>? RelatedObjects { get; set; }

/// <summary>
/// A list of [CatalogObject](entity:CatalogObject)s referenced by the object in the `objects` field and specifically requested.
/// </summary>
[JsonPropertyName("included_resources")]
public IncludedResources? IncludedResources { get; set; }

[JsonIgnore]
public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new();

Expand Down
16 changes: 16 additions & 0 deletions src/Square/Types/CardBrand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ namespace Square;

public static readonly CardBrand Ebt = new(Values.Ebt);

public static readonly CardBrand Quicpay = new(Values.Quicpay);

public static readonly CardBrand Id = new(Values.Id);

public static readonly CardBrand TransportationIc = new(Values.TransportationIc);

public static readonly CardBrand Carnet = new(Values.Carnet);

public CardBrand(string value)
{
Value = value;
Expand Down Expand Up @@ -107,5 +115,13 @@ public static class Values
public const string Felica = "FELICA";

public const string Ebt = "EBT";

public const string Quicpay = "QUICPAY";

public const string Id = "ID";

public const string TransportationIc = "TRANSPORTATION_IC";

public const string Carnet = "CARNET";
}
}
13 changes: 13 additions & 0 deletions src/Square/Types/CatalogModifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,19 @@ public record CatalogModifier : IJsonOnDeserialized
[JsonPropertyName("hidden_online")]
public bool? HiddenOnline { get; set; }

/// <summary>
/// Child `CatalogModifierList`s that this `CatalogModifier` nests for multi-step choices.
/// When a customer or staff member selects this modifier, the relevant follow-up modifier list appears.
/// For example, selecting "Hummus" reveals a secondary "Choose Hummus Flavor" set, and selecting a flavor
/// could reveal a third-level portion size set.
///
/// Each entry references a child modifier list. Each modifier can nest up to 5 child modifier list, and
/// supports up to 3 levels of nesting depth. The order in `child_modifier_list_ids` determines display order
/// during checkout.
/// </summary>
[JsonPropertyName("child_modifier_list_ids")]
public IEnumerable<string>? ChildModifierListIds { get; set; }

[JsonIgnore]
public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new();

Expand Down
6 changes: 6 additions & 0 deletions src/Square/Types/CatalogQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ public record CatalogQuery : IJsonOnDeserialized
[JsonPropertyName("item_variations_for_item_option_values_query")]
public CatalogQueryItemVariationsForItemOptionValues? ItemVariationsForItemOptionValuesQuery { get; set; }

/// <summary>
/// A query expression to return `CatalogModifier` objects that nest the specified modifier lists (via `child_modifier_list_ids`)
/// </summary>
[JsonPropertyName("modifiers_for_child_list_query")]
public CatalogQueryModifiersForChildList? ModifiersForChildListQuery { get; set; }

[JsonIgnore]
public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new();

Expand Down
35 changes: 35 additions & 0 deletions src/Square/Types/CatalogQueryModifiersForChildList.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using System.Text.Json;
using System.Text.Json.Serialization;
using Square.Core;

namespace Square;

/// <summary>
/// Query to find `CatalogModifier` objects that reference a given `CatalogModifierList` in their `child_modifier_list_ids` field.
/// </summary>
[Serializable]
public record CatalogQueryModifiersForChildList : IJsonOnDeserialized
{
[JsonExtensionData]
private readonly IDictionary<string, JsonElement> _extensionData =
new Dictionary<string, JsonElement>();

/// <summary>
/// The `CatalogModifierList` IDs to find parent `CatalogModifier`s for.
/// Returns `CatalogModifier` objects where `child_modifier_list_ids` contains any of these IDs.
/// </summary>
[JsonPropertyName("child_modifier_list_ids")]
public IEnumerable<string> ChildModifierListIds { get; set; } = new List<string>();

[JsonIgnore]
public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new();

void IJsonOnDeserialized.OnDeserialized() =>
AdditionalProperties.CopyFromExtensionData(_extensionData);

/// <inheritdoc />
public override string ToString()
{
return JsonUtils.Serialize(this);
}
}
Loading
Loading