From 5e56903e65aff9e80b1ea320e49bbb09f0b88527 Mon Sep 17 00:00:00 2001
From: "sumup-release-bot[bot]"
<241716704+sumup-release-bot[bot]@users.noreply.github.com>
Date: Mon, 16 Nov 2026 18:46:10 +0000
Subject: [PATCH 1/2] chore: synced local 'openapi.json' with remote
'specs/openapi31.json'
---
openapi.json | 136 ++++++++++++++++++++-------------------------------
1 file changed, 53 insertions(+), 83 deletions(-)
diff --git a/openapi.json b/openapi.json
index 64d1f0a..67b9067 100644
--- a/openapi.json
+++ b/openapi.json
@@ -3526,7 +3526,8 @@
},
"x-scopes": [
"user.profile",
- "user.profile_readonly"
+ "user.profile_readonly",
+ "members.read"
],
"security": [
{
@@ -3541,6 +3542,11 @@
"oauth2": [
"user.profile_readonly"
]
+ },
+ {
+ "oauth2": [
+ "members.read"
+ ]
}
],
"parameters": [
@@ -3822,7 +3828,7 @@
},
"x-permissions": [
{
- "relation": "merchant_read",
+ "relation": "merchant.read",
"object_type": "merchant",
"object_id_param": "merchant_code"
}
@@ -5888,7 +5894,7 @@
"content": {
"application/problem+json": {
"schema": {
- "$ref": "#/components/schemas/ProblemV10"
+ "$ref": "#/components/schemas/Problem"
}
}
}
@@ -5898,7 +5904,7 @@
"content": {
"application/problem+json": {
"schema": {
- "$ref": "#/components/schemas/ProblemV10"
+ "$ref": "#/components/schemas/Problem"
}
}
}
@@ -5908,7 +5914,7 @@
"content": {
"application/problem+json": {
"schema": {
- "$ref": "#/components/schemas/ProblemV10"
+ "$ref": "#/components/schemas/Problem"
}
}
}
@@ -5918,7 +5924,7 @@
"content": {
"application/problem+json": {
"schema": {
- "$ref": "#/components/schemas/ProblemV10"
+ "$ref": "#/components/schemas/Problem"
}
}
}
@@ -6005,7 +6011,7 @@
"content": {
"application/problem+json": {
"schema": {
- "$ref": "#/components/schemas/ProblemV10"
+ "$ref": "#/components/schemas/Problem"
}
}
}
@@ -6015,7 +6021,7 @@
"content": {
"application/problem+json": {
"schema": {
- "$ref": "#/components/schemas/ProblemV10"
+ "$ref": "#/components/schemas/Problem"
}
}
}
@@ -6025,7 +6031,7 @@
"content": {
"application/problem+json": {
"schema": {
- "$ref": "#/components/schemas/ProblemV10"
+ "$ref": "#/components/schemas/Problem"
}
}
}
@@ -6035,7 +6041,7 @@
"content": {
"application/problem+json": {
"schema": {
- "$ref": "#/components/schemas/ProblemV10"
+ "$ref": "#/components/schemas/Problem"
}
}
}
@@ -6181,7 +6187,7 @@
"content": {
"application/problem+json": {
"schema": {
- "$ref": "#/components/schemas/ProblemV10"
+ "$ref": "#/components/schemas/Problem"
}
}
}
@@ -6191,7 +6197,7 @@
"content": {
"application/problem+json": {
"schema": {
- "$ref": "#/components/schemas/ProblemV10"
+ "$ref": "#/components/schemas/Problem"
}
}
}
@@ -6201,7 +6207,7 @@
"content": {
"application/problem+json": {
"schema": {
- "$ref": "#/components/schemas/ProblemV10"
+ "$ref": "#/components/schemas/Problem"
}
}
}
@@ -6211,7 +6217,7 @@
"content": {
"application/problem+json": {
"schema": {
- "$ref": "#/components/schemas/ProblemV10"
+ "$ref": "#/components/schemas/Problem"
}
}
}
@@ -11742,7 +11748,7 @@
}
}
},
- "LineItemPriceV10": {
+ "SaleItemPrice": {
"type": "object",
"description": "Pricing for a single line, valid for every item type.\n\nMerges the standard amounts (with tax breakdown) and the final amounts (after\ndiscounts/modifiers).\n\nTotals and tax amounts can be negative for return-like operations (for example\na deposit with `operation_type` = `RETURN`).",
"required": [
@@ -11861,7 +11867,7 @@
}
}
},
- "CategoryV10": {
+ "SaleItemCategory": {
"type": "object",
"description": "A category a line belongs to.",
"required": [
@@ -12149,7 +12155,7 @@
}
]
},
- "ItemReferencesV10": {
+ "SaleItemReferences": {
"type": "object",
"description": "Outward identifiers and links for a line, kept in one place rather than scattered\nper item type.",
"properties": {
@@ -12183,7 +12189,7 @@
}
}
},
- "FeatureValueTypeV10": {
+ "SaleItemFeatureValueType": {
"type": "string",
"description": "The data type of a feature value. The wire `value` is always a string and is parsed\naccording to this type.",
"enum": [
@@ -12195,7 +12201,7 @@
],
"example": "TEXT"
},
- "FeatureV10": {
+ "SaleItemFeature": {
"type": "object",
"description": "A named, typed characteristic of a line. New item types add data here instead of\na typed sub-object per type.\n\nExamples by item type (illustrative, not exhaustive):\n - DEPOSIT: `operation_type` = \"SALE\", `linked_line_id` = \"line-1\"\n - GIFT_CARD: `gift_card_reference` = \"GCMINGXPC5\"\n - CATALOG: `variant_name` = \"Large\", `item_id` / `variant_id` (TEXT),\n `reporting_category_id` = \"cat-...\"\n - FEE: `fee_type` = \"SHIPPING\" (required); optional `fee_id`,\n `value_absolute` or `value_percentage`, and per-type metadata\n features such as `delivery_name` / `tracking_reference` (shipping),\n `card_type` / `scheme` (surcharge), or `policy_id` (cancellation)\n - (future) SUBSCRIPTION: `billing_period` = \"P1M\", `renews_at` = \"2026-07-02\"\n\nConventional `FEE` feature keys:\n - `fee_type` (TEXT, required): `SHIPPING`, `SURCHARGE`, `SERVICE_CHARGE`, or\n `CANCELLATION`\n - `fee_id` (TEXT, optional): identifier of the fee definition\n - `value_absolute` (INTEGER, optional): configured absolute value in minor units\n of the sale currency (the charged amount is on `price`)\n - `value_percentage` (INTEGER, optional): configured percentage in minor units\n (1/100000; e.g. 10000 = 10%)\n - Per-type metadata (optional, TEXT unless noted): `delivery_name`,\n `tracking_reference` (shipping); `card_type`, `scheme` (surcharge);\n `policy_id` (cancellation)",
"required": [
@@ -12211,7 +12217,7 @@
"example": "operation_type"
},
"value_type": {
- "$ref": "#/components/schemas/FeatureValueTypeV10"
+ "$ref": "#/components/schemas/SaleItemFeatureValueType"
},
"value": {
"type": "string",
@@ -12221,7 +12227,7 @@
}
}
},
- "SaleLineItemV10": {
+ "SaleItem": {
"type": "object",
"description": "A single line of a sale.\n\nThe envelope (id, type, name, quantity, unit_of_measure, price) is stable and\ntype-agnostic: any consumer can render and total a line from these fields alone.\nType-specific data is in `features`. There is no per-type object and no discriminator,\nso a new item type does not change this schema.",
"required": [
@@ -12241,7 +12247,7 @@
},
"type": {
"type": "string",
- "description": "Classifies a sale line. Not a schema subclass.\n\nKnown values: `CATALOG`, `DEPOSIT`, `GIFT_CARD`, `CUSTOM`, `FEE`.\n\n`FEE` lines represent merchant-charged fees on the sale (e.g. shipping, service\ncharge, surcharge, cancellation). They participate in sale totals like any other\nline; type-specific data is carried in `features` (see `Feature` for the\nconventional feature keys).\n\nThis is intentionally an open string, NOT a closed enum: new values are added\nover time as pure data and consumers MUST tolerate unknown values, rendering the\nline from the generic envelope (name, quantity, price, taxes) and reading any\nextra information from `features`.",
+ "description": "Classifies a sale line. Not a schema subclass.\n\nKnown values: `CATALOG`, `DEPOSIT`, `GIFT_CARD`, `CUSTOM`, `FEE`.\n\n`FEE` lines represent merchant-charged fees on the sale (e.g. shipping, service\ncharge, surcharge, cancellation). They participate in sale totals like any other\nline; type-specific data is carried in `features` (see `SaleItemFeature` for the\nconventional feature keys).\n\nThis is intentionally an open string, NOT a closed enum: new values are added\nover time as pure data and consumers MUST tolerate unknown values, rendering the\nline from the generic envelope (name, quantity, price, taxes) and reading any\nextra information from `features`.",
"example": "CATALOG"
},
"name": {
@@ -12276,14 +12282,14 @@
"example": "extra hot"
},
"price": {
- "$ref": "#/components/schemas/LineItemPriceV10"
+ "$ref": "#/components/schemas/SaleItemPrice"
},
"categories": {
"type": "array",
"description": "Categories the line belongs to. A shared optional structure available to any\nline; not a per-type field.\n",
"maxItems": 1000,
"items": {
- "$ref": "#/components/schemas/CategoryV10"
+ "$ref": "#/components/schemas/SaleItemCategory"
},
"example": [
{
@@ -12302,14 +12308,14 @@
"example": []
},
"references": {
- "$ref": "#/components/schemas/ItemReferencesV10"
+ "$ref": "#/components/schemas/SaleItemReferences"
},
"features": {
"type": "array",
- "description": "Named, typed, type-specific data. New item types add their data here as\nfeatures instead of new schema variants. See `Feature` for per-type examples.\n",
+ "description": "Named, typed, type-specific data. New item types add their data here as\nfeatures instead of new schema variants. See `SaleItemFeature` for per-type examples.\n",
"maxItems": 100,
"items": {
- "$ref": "#/components/schemas/FeatureV10"
+ "$ref": "#/components/schemas/SaleItemFeature"
},
"example": [
{
@@ -12321,9 +12327,9 @@
}
}
},
- "SalePriceV10": {
+ "SaleTotals": {
"type": "object",
- "description": "Sale-level pricing aggregate, parallel to `LineItemPrice` on each `SaleLineItem`.\n\nLine-level breakdown (unit price, line discounts, per-line taxes) lives on\n`items[].price`. This object holds the rolled-up totals and cart-level\nadjustments that consumers use for receipts and payment reconciliation.",
+ "description": "Sale-level pricing aggregate, parallel to `SaleItemPrice` on each `SaleItem`.\n\nLine-level breakdown (unit price, line discounts, per-line taxes) lives on\n`items[].price`. This object holds the rolled-up totals and cart-level\nadjustments that consumers use for receipts and payment reconciliation.",
"required": [
"net_amount",
"gross_amount",
@@ -12424,7 +12430,7 @@
"channel"
]
},
- "PublicCardV10": {
+ "SalePaymentCard": {
"type": "object",
"description": "Card brand, credit/debit processing type, and last four digits.",
"required": [
@@ -12459,7 +12465,7 @@
}
}
},
- "PublicGiftCardPayment": {
+ "SaleGiftCardPayment": {
"type": "object",
"description": "Gift card used for this payment. Present when `method` is `gift_card` and the gift card\nid is known.\nGift card IDs use the format \"GC\" followed by 9 alphanumeric characters\n(e.g. GCZ3NTMB1V).",
"properties": {
@@ -12473,8 +12479,8 @@
"id"
]
},
- "PublicPaymentV10": {
- "title": "PublicPayment",
+ "SalePayment": {
+ "title": "SalePayment",
"type": "object",
"description": "Payment on a closed sale, for bookkeeping and reconciliation.\n\nAcquirer/processing cost is not on this object. Merchant-charged fees (shipping, service\ncharge, etc.) appear as `type: \"FEE\"` item lines in `Sale.items`.",
"required": [
@@ -12533,10 +12539,10 @@
"maxLength": 20
},
"card": {
- "$ref": "#/components/schemas/PublicCardV10"
+ "$ref": "#/components/schemas/SalePaymentCard"
},
"gift_card": {
- "$ref": "#/components/schemas/PublicGiftCardPayment"
+ "$ref": "#/components/schemas/SaleGiftCardPayment"
},
"processed_at": {
"type": "string",
@@ -12546,7 +12552,7 @@
}
}
},
- "SaleStateV10": {
+ "SaleLifecycleState": {
"type": "string",
"description": "Lifecycle state of the sale.\nNon-finalised sales are never returned; only fully-paid sales.",
"enum": [
@@ -12557,7 +12563,7 @@
"Sale": {
"title": "Sale",
"type": "object",
- "description": "Core model of the Sales API. Returned by `GET /sales` and `GET /sales/{sale_id}`.\n\nNon-finalised sales are never returned; only fully-paid sales.\n\nItem lines are `SaleLineItem`. Merchant fees appear as `type: \"FEE\"` lines; extra fee data\nis in `features`.",
+ "description": "Core model of the Sales API. Returned by `GET /sales` and `GET /sales/{sale_id}`.\n\nNon-finalised sales are never returned; only fully-paid sales.\n\nItem lines are `SaleItem`. Merchant fees appear as `type: \"FEE\"` lines; extra fee data\nis in `features`.",
"required": [
"id",
"currency",
@@ -12603,11 +12609,11 @@
"maxItems": 1000,
"description": "The lines sold in this sale, in the order they were added to the cart.\nIncludes merchant fees (`type: \"FEE\"`) when present; fee details are in `features`.\n",
"items": {
- "$ref": "#/components/schemas/SaleLineItemV10"
+ "$ref": "#/components/schemas/SaleItem"
}
},
"price": {
- "$ref": "#/components/schemas/SalePriceV10"
+ "$ref": "#/components/schemas/SaleTotals"
},
"tax_mode": {
"$ref": "#/components/schemas/TaxMode"
@@ -12620,7 +12626,7 @@
"maxItems": 1000,
"description": "Payments on this sale, in the order they were recorded.\n",
"items": {
- "$ref": "#/components/schemas/PublicPaymentV10"
+ "$ref": "#/components/schemas/SalePayment"
},
"example": [
{
@@ -12646,7 +12652,7 @@
"example": "2026-06-02T10:20:00Z"
},
"state": {
- "$ref": "#/components/schemas/SaleStateV10"
+ "$ref": "#/components/schemas/SaleLifecycleState"
}
}
},
@@ -12671,43 +12677,7 @@
}
}
},
- "ProblemV10": {
- "type": "object",
- "description": "A RFC 9457 problem details object.\n\nAdditional properties specific to the problem type may be present.\n",
- "required": [
- "type"
- ],
- "additionalProperties": true,
- "properties": {
- "type": {
- "type": "string",
- "format": "uri",
- "description": "A URI reference that identifies the problem type.",
- "example": "https://developer.sumup.com/problem/not-found"
- },
- "title": {
- "type": "string",
- "description": "A short, human-readable summary of the problem type.",
- "example": "Requested resource couldn't be found."
- },
- "status": {
- "type": "integer",
- "description": "The HTTP status code generated by the origin server for this occurrence of the problem.",
- "example": 404
- },
- "detail": {
- "type": "string",
- "description": "A human-readable explanation specific to this occurrence of the problem.",
- "example": "The requested resource doesn't exist or does not belong to you."
- },
- "instance": {
- "type": "string",
- "format": "uri",
- "description": "A URI reference that identifies the specific occurrence of the problem."
- }
- }
- },
- "PaymentStatusFilterV10": {
+ "SalePaymentStatusFilter": {
"type": "string",
"description": "Payment outcome filter value. Multi-select uses **OR** within this field; combined with\nother filters using **AND**.\nOnly fully-paid closed sales are exposed. Refunded original sales remain searchable as\n`PAID`; refunds are separate negative sales, not a `REFUNDED` sale-search outcome.",
"enum": [
@@ -12716,7 +12686,7 @@
],
"example": "PAID"
},
- "SalesChannelFilterV10": {
+ "SaleChannelFilter": {
"type": "string",
"description": "Sale channel filter value. Multi-select uses **OR** within this field.",
"enum": [
@@ -12755,7 +12725,7 @@
"type": "array",
"description": "Filters rows by sale lifecycle (`state`). Multiple values match any of them (**OR**).\nUses the same values as `Sale.state`. Non-finalised sales are never returned; only\nfully-paid sales.",
"items": {
- "$ref": "#/components/schemas/SaleStateV10"
+ "$ref": "#/components/schemas/SaleLifecycleState"
},
"example": [
"CLOSED"
@@ -12765,7 +12735,7 @@
"type": "array",
"description": "Filters rows by payment outcome. Multiple values match any of them (**OR**). The search\nrow does not echo this value.",
"items": {
- "$ref": "#/components/schemas/PaymentStatusFilterV10"
+ "$ref": "#/components/schemas/SalePaymentStatusFilter"
},
"example": [
"PAID"
@@ -12775,7 +12745,7 @@
"type": "array",
"description": "Sales channel filter. Multiple values match any of them (**OR**).",
"items": {
- "$ref": "#/components/schemas/SalesChannelFilterV10"
+ "$ref": "#/components/schemas/SaleChannelFilter"
},
"example": [
"POS"
@@ -12822,7 +12792,7 @@
"example": "d6f51684-519b-454c-bdb3-deeb05f52b92"
},
"state": {
- "$ref": "#/components/schemas/SaleStateV10"
+ "$ref": "#/components/schemas/SaleLifecycleState"
},
"name": {
"type": "string",
From 8dbd4778a60a667caf03f1fd76ec05d41523fae3 Mon Sep 17 00:00:00 2001
From: "sumup-release-bot[bot]"
<241716704+sumup-release-bot[bot]@users.noreply.github.com>
Date: Mon, 16 Nov 2026 18:47:50 +0000
Subject: [PATCH 2/2] chore: generate code
---
src/SumUp/Models/ProblemV10.g.cs | 91 ------------------
src/SumUp/Models/Sale.g.cs | 12 +--
...lFilterV10.g.cs => SaleChannelFilter.g.cs} | 2 +-
...dPayment.g.cs => SaleGiftCardPayment.g.cs} | 2 +-
.../{SaleLineItemV10.g.cs => SaleItem.g.cs} | 16 ++--
...CategoryV10.g.cs => SaleItemCategory.g.cs} | 2 +-
.../{FeatureV10.g.cs => SaleItemFeature.g.cs} | 4 +-
...V10.g.cs => SaleItemFeatureValueType.g.cs} | 2 +-
...neItemPriceV10.g.cs => SaleItemPrice.g.cs} | 2 +-
...rencesV10.g.cs => SaleItemReferences.g.cs} | 4 +-
...s => SaleItemReferencesCatalogSource.g.cs} | 2 +-
...viceType.g.cs => SaleItemServiceType.g.cs} | 2 +-
...eStateV10.g.cs => SaleLifecycleState.g.cs} | 2 +-
...PublicPaymentV10.g.cs => SalePayment.g.cs} | 8 +-
...ublicCardV10.g.cs => SalePaymentCard.g.cs} | 4 +-
...dV10Type.g.cs => SalePaymentCardType.g.cs} | 2 +-
...tV10Status.g.cs => SalePaymentStatus.g.cs} | 2 +-
...rV10.g.cs => SalePaymentStatusFilter.g.cs} | 2 +-
src/SumUp/Models/SaleSearchItem.g.cs | 2 +-
src/SumUp/Models/SaleSearchRequest.g.cs | 6 +-
.../{SalePriceV10.g.cs => SaleTotals.g.cs} | 4 +-
src/SumUp/SalesClient.g.cs | 96 +++++++++----------
22 files changed, 89 insertions(+), 180 deletions(-)
delete mode 100644 src/SumUp/Models/ProblemV10.g.cs
rename src/SumUp/Models/{SalesChannelFilterV10.g.cs => SaleChannelFilter.g.cs} (95%)
rename src/SumUp/Models/{PublicGiftCardPayment.g.cs => SaleGiftCardPayment.g.cs} (90%)
rename src/SumUp/Models/{SaleLineItemV10.g.cs => SaleItem.g.cs} (79%)
rename src/SumUp/Models/{CategoryV10.g.cs => SaleItemCategory.g.cs} (90%)
rename src/SumUp/Models/{FeatureV10.g.cs => SaleItemFeature.g.cs} (95%)
rename src/SumUp/Models/{FeatureValueTypeV10.g.cs => SaleItemFeatureValueType.g.cs} (92%)
rename src/SumUp/Models/{LineItemPriceV10.g.cs => SaleItemPrice.g.cs} (98%)
rename src/SumUp/Models/{ItemReferencesV10.g.cs => SaleItemReferences.g.cs} (90%)
rename src/SumUp/Models/{ItemReferencesV10CatalogSource.g.cs => SaleItemReferencesCatalogSource.g.cs} (86%)
rename src/SumUp/Models/{SaleLineItemV10ServiceType.g.cs => SaleItemServiceType.g.cs} (88%)
rename src/SumUp/Models/{SaleStateV10.g.cs => SaleLifecycleState.g.cs} (88%)
rename src/SumUp/Models/{PublicPaymentV10.g.cs => SalePayment.g.cs} (93%)
rename src/SumUp/Models/{PublicCardV10.g.cs => SalePaymentCard.g.cs} (90%)
rename src/SumUp/Models/{PublicCardV10Type.g.cs => SalePaymentCardType.g.cs} (91%)
rename src/SumUp/Models/{PublicPaymentV10Status.g.cs => SalePaymentStatus.g.cs} (90%)
rename src/SumUp/Models/{PaymentStatusFilterV10.g.cs => SalePaymentStatusFilter.g.cs} (89%)
rename src/SumUp/Models/{SalePriceV10.g.cs => SaleTotals.g.cs} (78%)
diff --git a/src/SumUp/Models/ProblemV10.g.cs b/src/SumUp/Models/ProblemV10.g.cs
deleted file mode 100644
index 17a1bc7..0000000
--- a/src/SumUp/Models/ProblemV10.g.cs
+++ /dev/null
@@ -1,91 +0,0 @@
-//
-#nullable enable
-
-namespace SumUp;
-
-using System.Text.Json.Serialization;
-using System.Collections.Generic;
-using System.Text.Json;
-using System.Text;
-/// A RFC 9457 problem details object. Additional properties specific to the problem type may be present.
-public sealed partial class ProblemV10
-{
- /// A human-readable explanation specific to this occurrence of the problem.
- [JsonPropertyName("detail")]
- public string? Detail { get; set; }
- /// A URI reference that identifies the specific occurrence of the problem.
- [JsonPropertyName("instance")]
- public string? Instance { get; set; }
- /// The HTTP status code generated by the origin server for this occurrence of the problem.
- [JsonPropertyName("status")]
- public int? Status { get; set; }
- /// A short, human-readable summary of the problem type.
- [JsonPropertyName("title")]
- public string? Title { get; set; }
- /// A URI reference that identifies the problem type.
- [JsonPropertyName("type")]
- public string Type { get; set; } = default!;
-
- [JsonExtensionData]
- public IDictionary AdditionalProperties { get; set; } = new Dictionary();
-
- public override string ToString()
- {
- var builder = new StringBuilder();
- builder.Append("ProblemV10");
- var hasValue = false;
-
- void Append(string label, object? value)
- {
- if (value is null)
- {
- return;
- }
- if (!hasValue)
- {
- builder.Append(" (");
- hasValue = true;
- }
- else
- {
- builder.Append(", ");
- }
- builder.Append(label).Append(": ").Append(value);
- }
-
- void Close()
- {
- if (hasValue)
- {
- builder.Append(")");
- }
- }
- if (!string.IsNullOrWhiteSpace(Detail))
- {
- Append("detail", Detail);
- }
- if (!string.IsNullOrWhiteSpace(Instance))
- {
- Append("instance", Instance);
- }
- if (Status is not null)
- {
- Append("status", Status);
- }
- if (!string.IsNullOrWhiteSpace(Title))
- {
- Append("title", Title);
- }
- if (!string.IsNullOrWhiteSpace(Type))
- {
- Append("type", Type);
- }
-
- Close();
- if (hasValue)
- {
- return builder.ToString();
- }
- return JsonSerializer.Serialize(this);
- }
-}
\ No newline at end of file
diff --git a/src/SumUp/Models/Sale.g.cs b/src/SumUp/Models/Sale.g.cs
index 153cb54..7c8021d 100644
--- a/src/SumUp/Models/Sale.g.cs
+++ b/src/SumUp/Models/Sale.g.cs
@@ -5,7 +5,7 @@ namespace SumUp;
using System.Text.Json.Serialization;
using System.Collections.Generic;
-/// Core model of the Sales API. Returned by GET /sales and GET /sales/{sale_id}. Non-finalised sales are never returned; only fully-paid sales. Item lines are SaleLineItem. Merchant fees appear as type: "FEE" lines; extra fee data is in features.
+/// Core model of the Sales API. Returned by GET /sales and GET /sales/{sale_id}. Non-finalised sales are never returned; only fully-paid sales. Item lines are SaleItem. Merchant fees appear as type: "FEE" lines; extra fee data is in features.
public sealed partial class Sale
{
/// Instant when the sale was closed. Always present: non-finalised sales are never returned.
@@ -22,7 +22,7 @@ public sealed partial class Sale
public string Id { get; set; } = default!;
/// The lines sold in this sale, in the order they were added to the cart. Includes merchant fees (type: "FEE") when present; fee details are in features.
[JsonPropertyName("items")]
- public IEnumerable Items { get; set; } = default!;
+ public IEnumerable Items { get; set; } = default!;
/// Human-readable name of the sale (not unique, not the sale id).
[JsonPropertyName("name")]
public string? Name { get; set; }
@@ -31,16 +31,16 @@ public sealed partial class Sale
public string? Note { get; set; }
/// Payments on this sale, in the order they were recorded.
[JsonPropertyName("payments")]
- public IEnumerable Payments { get; set; } = default!;
- /// Sale-level pricing aggregate, parallel to LineItemPrice on each SaleLineItem. Line-level breakdown (unit price, line discounts, per-line taxes) lives on items[].price. This object holds the rolled-up totals and cart-level adjustments that consumers use for receipts and payment reconciliation.
+ public IEnumerable Payments { get; set; } = default!;
+ /// Sale-level pricing aggregate, parallel to SaleItemPrice on each SaleItem. Line-level breakdown (unit price, line discounts, per-line taxes) lives on items[].price. This object holds the rolled-up totals and cart-level adjustments that consumers use for receipts and payment reconciliation.
[JsonPropertyName("price")]
- public SalePriceV10 Price { get; set; } = default!;
+ public SaleTotals Price { get; set; } = default!;
/// Information about the source of the sale.
[JsonPropertyName("source")]
public SaleSource Source { get; set; } = default!;
/// Lifecycle state of the sale. Non-finalised sales are never returned; only fully-paid sales.
[JsonPropertyName("state")]
- public SaleStateV10 State { get; set; }
+ public SaleLifecycleState State { get; set; }
/// The tax mode used by merchant for displaying prices and calculating taxes: - NO_TAX: The prices don't contain any taxes, merchant don't report taxes - GROSS: The prices used by merchant already include taxes (common in EU), the tax is calculated from the gross price - NET: The prices used by merchant don't include taxes (common in US), the tax is calculated from the net price Since tax values can be different for the same net price depending if the tax was calculated from gross or net price, this info is necessary to be able to reconcile tax calculations.
[JsonPropertyName("tax_mode")]
public TaxMode TaxMode { get; set; }
diff --git a/src/SumUp/Models/SalesChannelFilterV10.g.cs b/src/SumUp/Models/SaleChannelFilter.g.cs
similarity index 95%
rename from src/SumUp/Models/SalesChannelFilterV10.g.cs
rename to src/SumUp/Models/SaleChannelFilter.g.cs
index 6469c5b..2407f4d 100644
--- a/src/SumUp/Models/SalesChannelFilterV10.g.cs
+++ b/src/SumUp/Models/SaleChannelFilter.g.cs
@@ -7,7 +7,7 @@ namespace SumUp;
using System.Text.Json.Serialization;
[JsonConverter(typeof(EnumMemberJsonConverterFactory))]
-public enum SalesChannelFilterV10
+public enum SaleChannelFilter
{
[EnumMember(Value = "POS")]
Pos,
diff --git a/src/SumUp/Models/PublicGiftCardPayment.g.cs b/src/SumUp/Models/SaleGiftCardPayment.g.cs
similarity index 90%
rename from src/SumUp/Models/PublicGiftCardPayment.g.cs
rename to src/SumUp/Models/SaleGiftCardPayment.g.cs
index 689ec26..7951c16 100644
--- a/src/SumUp/Models/PublicGiftCardPayment.g.cs
+++ b/src/SumUp/Models/SaleGiftCardPayment.g.cs
@@ -5,7 +5,7 @@ namespace SumUp;
using System.Text.Json.Serialization;
/// Gift card used for this payment. Present when method is gift_card and the gift card id is known. Gift card IDs use the format "GC" followed by 9 alphanumeric characters (e.g. GCZ3NTMB1V).
-public sealed partial class PublicGiftCardPayment
+public sealed partial class SaleGiftCardPayment
{
/// Gift card identifier. Format "GC" followed by 9 alphanumeric characters (e.g. GCZ3NTMB1V).
[JsonPropertyName("id")]
diff --git a/src/SumUp/Models/SaleLineItemV10.g.cs b/src/SumUp/Models/SaleItem.g.cs
similarity index 79%
rename from src/SumUp/Models/SaleLineItemV10.g.cs
rename to src/SumUp/Models/SaleItem.g.cs
index c090b50..43fd98a 100644
--- a/src/SumUp/Models/SaleLineItemV10.g.cs
+++ b/src/SumUp/Models/SaleItem.g.cs
@@ -6,14 +6,14 @@ namespace SumUp;
using System.Text.Json.Serialization;
using System.Collections.Generic;
/// A single line of a sale. The envelope (id, type, name, quantity, unit_of_measure, price) is stable and type-agnostic: any consumer can render and total a line from these fields alone. Type-specific data is in features. There is no per-type object and no discriminator, so a new item type does not change this schema.
-public sealed partial class SaleLineItemV10
+public sealed partial class SaleItem
{
/// Categories the line belongs to. A shared optional structure available to any line; not a per-type field.
[JsonPropertyName("categories")]
- public IEnumerable? Categories { get; set; }
- /// Named, typed, type-specific data. New item types add their data here as features instead of new schema variants. See Feature for per-type examples.
+ public IEnumerable? Categories { get; set; }
+ /// Named, typed, type-specific data. New item types add their data here as features instead of new schema variants. See SaleItemFeature for per-type examples.
[JsonPropertyName("features")]
- public IEnumerable? Features { get; set; }
+ public IEnumerable? Features { get; set; }
/// Stable identifier of the line within the sale. Used for linking (e.g. deposits).
[JsonPropertyName("id")]
public string Id { get; set; } = default!;
@@ -28,17 +28,17 @@ public sealed partial class SaleLineItemV10
public string? Note { get; set; }
/// Pricing for a single line, valid for every item type. Merges the standard amounts (with tax breakdown) and the final amounts (after discounts/modifiers). Totals and tax amounts can be negative for return-like operations (for example a deposit with operation_type = RETURN).
[JsonPropertyName("price")]
- public LineItemPriceV10 Price { get; set; } = default!;
+ public SaleItemPrice Price { get; set; } = default!;
/// The numerical value representing the quantity in the specified unit.
[JsonPropertyName("quantity")]
public double Quantity { get; set; }
/// Outward identifiers and links for a line, kept in one place rather than scattered per item type.
[JsonPropertyName("references")]
- public ItemReferencesV10? References { get; set; }
+ public SaleItemReferences? References { get; set; }
/// The type of service for this line.
[JsonPropertyName("service_type")]
- public SaleLineItemV10ServiceType? ServiceType { get; set; }
- /// Classifies a sale line. Not a schema subclass. Known values: CATALOG, DEPOSIT, GIFT_CARD, CUSTOM, FEE. FEE lines represent merchant-charged fees on the sale (e.g. shipping, service charge, surcharge, cancellation). They participate in sale totals like any other line; type-specific data is carried in features (see Feature for the conventional feature keys). This is intentionally an open string, NOT a closed enum: new values are added over time as pure data and consumers MUST tolerate unknown values, rendering the line from the generic envelope (name, quantity, price, taxes) and reading any extra information from features.
+ public SaleItemServiceType? ServiceType { get; set; }
+ /// Classifies a sale line. Not a schema subclass. Known values: CATALOG, DEPOSIT, GIFT_CARD, CUSTOM, FEE. FEE lines represent merchant-charged fees on the sale (e.g. shipping, service charge, surcharge, cancellation). They participate in sale totals like any other line; type-specific data is carried in features (see SaleItemFeature for the conventional feature keys). This is intentionally an open string, NOT a closed enum: new values are added over time as pure data and consumers MUST tolerate unknown values, rendering the line from the generic envelope (name, quantity, price, taxes) and reading any extra information from features.
[JsonPropertyName("type")]
public string Type { get; set; } = default!;
/// The unit of measure of the item.
diff --git a/src/SumUp/Models/CategoryV10.g.cs b/src/SumUp/Models/SaleItemCategory.g.cs
similarity index 90%
rename from src/SumUp/Models/CategoryV10.g.cs
rename to src/SumUp/Models/SaleItemCategory.g.cs
index ce752b8..d79ad51 100644
--- a/src/SumUp/Models/CategoryV10.g.cs
+++ b/src/SumUp/Models/SaleItemCategory.g.cs
@@ -5,7 +5,7 @@ namespace SumUp;
using System.Text.Json.Serialization;
/// A category a line belongs to.
-public sealed partial class CategoryV10
+public sealed partial class SaleItemCategory
{
/// The category id. Usually a UUID, but not always (legacy cases).
[JsonPropertyName("id")]
diff --git a/src/SumUp/Models/FeatureV10.g.cs b/src/SumUp/Models/SaleItemFeature.g.cs
similarity index 95%
rename from src/SumUp/Models/FeatureV10.g.cs
rename to src/SumUp/Models/SaleItemFeature.g.cs
index 07af5fc..1496a3e 100644
--- a/src/SumUp/Models/FeatureV10.g.cs
+++ b/src/SumUp/Models/SaleItemFeature.g.cs
@@ -5,7 +5,7 @@ namespace SumUp;
using System.Text.Json.Serialization;
/// A named, typed characteristic of a line. New item types add data here instead of a typed sub-object per type. Examples by item type (illustrative, not exhaustive): - DEPOSIT: operation_type = "SALE", linked_line_id = "line-1" - GIFT_CARD: gift_card_reference = "GCMINGXPC5" - CATALOG: variant_name = "Large", item_id / variant_id (TEXT), reporting_category_id = "cat-..." - FEE: fee_type = "SHIPPING" (required); optional fee_id, value_absolute or value_percentage, and per-type metadata features such as delivery_name / tracking_reference (shipping), card_type / scheme (surcharge), or policy_id (cancellation) - (future) SUBSCRIPTION: billing_period = "P1M", renews_at = "2026-07-02" Conventional FEE feature keys: - fee_type (TEXT, required): SHIPPING, SURCHARGE, SERVICE_CHARGE, or CANCELLATION - fee_id (TEXT, optional): identifier of the fee definition - value_absolute (INTEGER, optional): configured absolute value in minor units of the sale currency (the charged amount is on price) - value_percentage (INTEGER, optional): configured percentage in minor units (1/100000; e.g. 10000 = 10%) - Per-type metadata (optional, TEXT unless noted): delivery_name, tracking_reference (shipping); card_type, scheme (surcharge); policy_id (cancellation)
-public sealed partial class FeatureV10
+public sealed partial class SaleItemFeature
{
/// The feature name/key.
[JsonPropertyName("name")]
@@ -15,5 +15,5 @@ public sealed partial class FeatureV10
public string Value { get; set; } = default!;
/// The data type of a feature value. The wire value is always a string and is parsed according to this type.
[JsonPropertyName("value_type")]
- public FeatureValueTypeV10 ValueType { get; set; }
+ public SaleItemFeatureValueType ValueType { get; set; }
}
\ No newline at end of file
diff --git a/src/SumUp/Models/FeatureValueTypeV10.g.cs b/src/SumUp/Models/SaleItemFeatureValueType.g.cs
similarity index 92%
rename from src/SumUp/Models/FeatureValueTypeV10.g.cs
rename to src/SumUp/Models/SaleItemFeatureValueType.g.cs
index 5aca7ff..c6a6365 100644
--- a/src/SumUp/Models/FeatureValueTypeV10.g.cs
+++ b/src/SumUp/Models/SaleItemFeatureValueType.g.cs
@@ -7,7 +7,7 @@ namespace SumUp;
using System.Text.Json.Serialization;
[JsonConverter(typeof(EnumMemberJsonConverterFactory))]
-public enum FeatureValueTypeV10
+public enum SaleItemFeatureValueType
{
[EnumMember(Value = "TEXT")]
Text,
diff --git a/src/SumUp/Models/LineItemPriceV10.g.cs b/src/SumUp/Models/SaleItemPrice.g.cs
similarity index 98%
rename from src/SumUp/Models/LineItemPriceV10.g.cs
rename to src/SumUp/Models/SaleItemPrice.g.cs
index 25e9184..c32d8dc 100644
--- a/src/SumUp/Models/LineItemPriceV10.g.cs
+++ b/src/SumUp/Models/SaleItemPrice.g.cs
@@ -6,7 +6,7 @@ namespace SumUp;
using System.Text.Json.Serialization;
using System.Collections.Generic;
/// Pricing for a single line, valid for every item type. Merges the standard amounts (with tax breakdown) and the final amounts (after discounts/modifiers). Totals and tax amounts can be negative for return-like operations (for example a deposit with operation_type = RETURN).
-public sealed partial class LineItemPriceV10
+public sealed partial class SaleItemPrice
{
/// Discounts applied. Discount amounts do not affect total_net_amount / total_gross_amount; they are reflected in the *_final amounts.
[JsonPropertyName("discounts")]
diff --git a/src/SumUp/Models/ItemReferencesV10.g.cs b/src/SumUp/Models/SaleItemReferences.g.cs
similarity index 90%
rename from src/SumUp/Models/ItemReferencesV10.g.cs
rename to src/SumUp/Models/SaleItemReferences.g.cs
index 2014e88..ca52fba 100644
--- a/src/SumUp/Models/ItemReferencesV10.g.cs
+++ b/src/SumUp/Models/SaleItemReferences.g.cs
@@ -5,14 +5,14 @@ namespace SumUp;
using System.Text.Json.Serialization;
/// Outward identifiers and links for a line, kept in one place rather than scattered per item type.
-public sealed partial class ItemReferencesV10
+public sealed partial class SaleItemReferences
{
/// Reference to the backing catalog entity (item variant, deposit, ...), typically a URN such as urn:sumup:pos:variant:${MERCHANT_CODE}:${ITEM_ID}:${VARIANT_ID} or urn:sumup:pos:deposit:${MERCHANT_CODE}:${DEPOSIT_ID}. Empty for ad-hoc / manual lines. Type-agnostic on purpose: a new item type backed by a catalog entity reuses this field instead of adding its own.
[JsonPropertyName("catalog_reference")]
public string? CatalogReference { get; set; }
/// The source of the catalog the line originates from.
[JsonPropertyName("catalog_source")]
- public ItemReferencesV10CatalogSource? CatalogSource { get; set; }
+ public SaleItemReferencesCatalogSource? CatalogSource { get; set; }
/// An external reference id connecting this line to another system.
[JsonPropertyName("external_id")]
public string? ExternalId { get; set; }
diff --git a/src/SumUp/Models/ItemReferencesV10CatalogSource.g.cs b/src/SumUp/Models/SaleItemReferencesCatalogSource.g.cs
similarity index 86%
rename from src/SumUp/Models/ItemReferencesV10CatalogSource.g.cs
rename to src/SumUp/Models/SaleItemReferencesCatalogSource.g.cs
index e57d29e..661661c 100644
--- a/src/SumUp/Models/ItemReferencesV10CatalogSource.g.cs
+++ b/src/SumUp/Models/SaleItemReferencesCatalogSource.g.cs
@@ -7,7 +7,7 @@ namespace SumUp;
using System.Text.Json.Serialization;
[JsonConverter(typeof(EnumMemberJsonConverterFactory))]
-public enum ItemReferencesV10CatalogSource
+public enum SaleItemReferencesCatalogSource
{
[EnumMember(Value = "SUMUP")]
Sumup,
diff --git a/src/SumUp/Models/SaleLineItemV10ServiceType.g.cs b/src/SumUp/Models/SaleItemServiceType.g.cs
similarity index 88%
rename from src/SumUp/Models/SaleLineItemV10ServiceType.g.cs
rename to src/SumUp/Models/SaleItemServiceType.g.cs
index 6ee43f6..c9e4532 100644
--- a/src/SumUp/Models/SaleLineItemV10ServiceType.g.cs
+++ b/src/SumUp/Models/SaleItemServiceType.g.cs
@@ -7,7 +7,7 @@ namespace SumUp;
using System.Text.Json.Serialization;
[JsonConverter(typeof(EnumMemberJsonConverterFactory))]
-public enum SaleLineItemV10ServiceType
+public enum SaleItemServiceType
{
[EnumMember(Value = "IN_HOUSE")]
InHouse,
diff --git a/src/SumUp/Models/SaleStateV10.g.cs b/src/SumUp/Models/SaleLifecycleState.g.cs
similarity index 88%
rename from src/SumUp/Models/SaleStateV10.g.cs
rename to src/SumUp/Models/SaleLifecycleState.g.cs
index e771501..cf54422 100644
--- a/src/SumUp/Models/SaleStateV10.g.cs
+++ b/src/SumUp/Models/SaleLifecycleState.g.cs
@@ -7,7 +7,7 @@ namespace SumUp;
using System.Text.Json.Serialization;
[JsonConverter(typeof(EnumMemberJsonConverterFactory))]
-public enum SaleStateV10
+public enum SaleLifecycleState
{
[EnumMember(Value = "CLOSED")]
Closed,
diff --git a/src/SumUp/Models/PublicPaymentV10.g.cs b/src/SumUp/Models/SalePayment.g.cs
similarity index 93%
rename from src/SumUp/Models/PublicPaymentV10.g.cs
rename to src/SumUp/Models/SalePayment.g.cs
index 8eab2a3..e3bc448 100644
--- a/src/SumUp/Models/PublicPaymentV10.g.cs
+++ b/src/SumUp/Models/SalePayment.g.cs
@@ -5,7 +5,7 @@ namespace SumUp;
using System.Text.Json.Serialization;
/// Payment on a closed sale, for bookkeeping and reconciliation. Acquirer/processing cost is not on this object. Merchant-charged fees (shipping, service charge, etc.) appear as type: "FEE" item lines in Sale.items.
-public sealed partial class PublicPaymentV10
+public sealed partial class SalePayment
{
/// The amount of the payment including tips. The value of the amount in minor units of Sale.currency.
[JsonPropertyName("amount")]
@@ -15,10 +15,10 @@ public sealed partial class PublicPaymentV10
public string? ApmType { get; set; }
/// Card brand, credit/debit processing type, and last four digits.
[JsonPropertyName("card")]
- public PublicCardV10? Card { get; set; }
+ public SalePaymentCard? Card { get; set; }
/// Gift card used for this payment. Present when method is gift_card and the gift card id is known. Gift card IDs use the format "GC" followed by 9 alphanumeric characters (e.g. GCZ3NTMB1V).
[JsonPropertyName("gift_card")]
- public PublicGiftCardPayment? GiftCard { get; set; }
+ public SaleGiftCardPayment? GiftCard { get; set; }
/// Payment method on public sales read API v1.0. Digital wallets are first-class methods. Gift card payments use gift_card, not apm. Values use lowercase snake_case. Known values are card, cash, apm, external, apple_pay, google_pay, whatsapp_pay, and gift_card. Additional values may be returned as new payment methods become available.
[JsonPropertyName("method")]
public string Method { get; set; } = default!;
@@ -30,7 +30,7 @@ public sealed partial class PublicPaymentV10
public string Reference { get; set; } = default!;
/// The status of the payment.
[JsonPropertyName("status")]
- public PublicPaymentV10Status Status { get; set; }
+ public SalePaymentStatus Status { get; set; }
/// Payment operation type. This is distinct from the payment instrument in method. Values use lowercase snake_case. Known values are purchase for a normal purchase and unreferenced_refund for negative sales such as deposit returns.
[JsonPropertyName("type")]
public string Type { get; set; } = default!;
diff --git a/src/SumUp/Models/PublicCardV10.g.cs b/src/SumUp/Models/SalePaymentCard.g.cs
similarity index 90%
rename from src/SumUp/Models/PublicCardV10.g.cs
rename to src/SumUp/Models/SalePaymentCard.g.cs
index 5142a04..53f4e99 100644
--- a/src/SumUp/Models/PublicCardV10.g.cs
+++ b/src/SumUp/Models/SalePaymentCard.g.cs
@@ -5,7 +5,7 @@ namespace SumUp;
using System.Text.Json.Serialization;
/// Card brand, credit/debit processing type, and last four digits.
-public sealed partial class PublicCardV10
+public sealed partial class SalePaymentCard
{
/// The brand of the card. Input is case-insensitive; the canonical form is lowercase snake_case. VALUES: [amex, cup, diners, discover, elo, elv, hipercard, jcb, maestro, mastercard, visa, visa_electron, visa_vpay, vr, eftpos, conecs, swile, girocard, interac, sumup, bancomat].
[JsonPropertyName("brand")]
@@ -15,5 +15,5 @@ public sealed partial class PublicCardV10
public string Last4Digits { get; set; } = default!;
/// Credit or debit processing choice, not brand or funding. unknown when unavailable; prepaid/voucher are not processing types.
[JsonPropertyName("type")]
- public PublicCardV10Type Type { get; set; }
+ public SalePaymentCardType Type { get; set; }
}
\ No newline at end of file
diff --git a/src/SumUp/Models/PublicCardV10Type.g.cs b/src/SumUp/Models/SalePaymentCardType.g.cs
similarity index 91%
rename from src/SumUp/Models/PublicCardV10Type.g.cs
rename to src/SumUp/Models/SalePaymentCardType.g.cs
index e3daac3..e28fe5f 100644
--- a/src/SumUp/Models/PublicCardV10Type.g.cs
+++ b/src/SumUp/Models/SalePaymentCardType.g.cs
@@ -7,7 +7,7 @@ namespace SumUp;
using System.Text.Json.Serialization;
[JsonConverter(typeof(EnumMemberJsonConverterFactory))]
-public enum PublicCardV10Type
+public enum SalePaymentCardType
{
[EnumMember(Value = "credit")]
Credit,
diff --git a/src/SumUp/Models/PublicPaymentV10Status.g.cs b/src/SumUp/Models/SalePaymentStatus.g.cs
similarity index 90%
rename from src/SumUp/Models/PublicPaymentV10Status.g.cs
rename to src/SumUp/Models/SalePaymentStatus.g.cs
index 1babd5c..efd3737 100644
--- a/src/SumUp/Models/PublicPaymentV10Status.g.cs
+++ b/src/SumUp/Models/SalePaymentStatus.g.cs
@@ -7,7 +7,7 @@ namespace SumUp;
using System.Text.Json.Serialization;
[JsonConverter(typeof(EnumMemberJsonConverterFactory))]
-public enum PublicPaymentV10Status
+public enum SalePaymentStatus
{
[EnumMember(Value = "FAILED")]
Failed,
diff --git a/src/SumUp/Models/PaymentStatusFilterV10.g.cs b/src/SumUp/Models/SalePaymentStatusFilter.g.cs
similarity index 89%
rename from src/SumUp/Models/PaymentStatusFilterV10.g.cs
rename to src/SumUp/Models/SalePaymentStatusFilter.g.cs
index 6691ffa..6a21a54 100644
--- a/src/SumUp/Models/PaymentStatusFilterV10.g.cs
+++ b/src/SumUp/Models/SalePaymentStatusFilter.g.cs
@@ -7,7 +7,7 @@ namespace SumUp;
using System.Text.Json.Serialization;
[JsonConverter(typeof(EnumMemberJsonConverterFactory))]
-public enum PaymentStatusFilterV10
+public enum SalePaymentStatusFilter
{
[EnumMember(Value = "PAID")]
Paid,
diff --git a/src/SumUp/Models/SaleSearchItem.g.cs b/src/SumUp/Models/SaleSearchItem.g.cs
index 86a6911..33ca77c 100644
--- a/src/SumUp/Models/SaleSearchItem.g.cs
+++ b/src/SumUp/Models/SaleSearchItem.g.cs
@@ -24,7 +24,7 @@ public sealed partial class SaleSearchItem
public string? Name { get; set; }
/// Lifecycle state of the sale. Non-finalised sales are never returned; only fully-paid sales.
[JsonPropertyName("state")]
- public SaleStateV10 State { get; set; }
+ public SaleLifecycleState State { get; set; }
/// Checkout tax mode for the sale. Same values as Sale.tax_mode.
[JsonPropertyName("tax_mode")]
public TaxMode TaxMode { get; set; }
diff --git a/src/SumUp/Models/SaleSearchRequest.g.cs b/src/SumUp/Models/SaleSearchRequest.g.cs
index 4cdd031..a2f4e52 100644
--- a/src/SumUp/Models/SaleSearchRequest.g.cs
+++ b/src/SumUp/Models/SaleSearchRequest.g.cs
@@ -19,13 +19,13 @@ public sealed partial class SaleSearchRequest
public string? PaginationToken { get; set; }
/// Filters rows by payment outcome. Multiple values match any of them (OR). The search row does not echo this value.
[JsonPropertyName("payment_statuses")]
- public IEnumerable? PaymentStatuses { get; set; }
+ public IEnumerable? PaymentStatuses { get; set; }
/// Filters rows by sale lifecycle (state). Multiple values match any of them (OR). Uses the same values as Sale.state. Non-finalised sales are never returned; only fully-paid sales.
[JsonPropertyName("sale_statuses")]
- public IEnumerable? SaleStatuses { get; set; }
+ public IEnumerable? SaleStatuses { get; set; }
/// Sales channel filter. Multiple values match any of them (OR).
[JsonPropertyName("sales_channels")]
- public IEnumerable? SalesChannels { get; set; }
+ public IEnumerable? SalesChannels { get; set; }
/// Sale created on or after this instant (inclusive).
[JsonPropertyName("start_date")]
public DateTimeOffset? StartDate { get; set; }
diff --git a/src/SumUp/Models/SalePriceV10.g.cs b/src/SumUp/Models/SaleTotals.g.cs
similarity index 78%
rename from src/SumUp/Models/SalePriceV10.g.cs
rename to src/SumUp/Models/SaleTotals.g.cs
index ba7df17..b602f41 100644
--- a/src/SumUp/Models/SalePriceV10.g.cs
+++ b/src/SumUp/Models/SaleTotals.g.cs
@@ -5,8 +5,8 @@ namespace SumUp;
using System.Text.Json.Serialization;
using System.Collections.Generic;
-/// Sale-level pricing aggregate, parallel to LineItemPrice on each SaleLineItem. Line-level breakdown (unit price, line discounts, per-line taxes) lives on items[].price. This object holds the rolled-up totals and cart-level adjustments that consumers use for receipts and payment reconciliation.
-public sealed partial class SalePriceV10
+/// Sale-level pricing aggregate, parallel to SaleItemPrice on each SaleItem. Line-level breakdown (unit price, line discounts, per-line taxes) lives on items[].price. This object holds the rolled-up totals and cart-level adjustments that consumers use for receipts and payment reconciliation.
+public sealed partial class SaleTotals
{
/// Discounts applied at cart level. Item-level discounts remain on items[].price.discounts.
[JsonPropertyName("cart_discounts")]
diff --git a/src/SumUp/SalesClient.g.cs b/src/SumUp/SalesClient.g.cs
index 8d20d7f..ddca232 100644
--- a/src/SumUp/SalesClient.g.cs
+++ b/src/SumUp/SalesClient.g.cs
@@ -57,23 +57,23 @@ public ApiResponse Get(string merchantCode, string saleId, RequestOptions?
{
case 401:
{
- var errorForStatus401 = _client.TryDeserialize(responseBody);
- throw new ApiException(response.StatusCode, errorForStatus401, responseBody, response.RequestMessage?.RequestUri, response.Headers);
+ var errorForStatus401 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus401, responseBody, response.RequestMessage?.RequestUri, response.Headers);
}
case 403:
{
- var errorForStatus403 = _client.TryDeserialize(responseBody);
- throw new ApiException(response.StatusCode, errorForStatus403, responseBody, response.RequestMessage?.RequestUri, response.Headers);
+ var errorForStatus403 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus403, responseBody, response.RequestMessage?.RequestUri, response.Headers);
}
case 404:
{
- var errorForStatus404 = _client.TryDeserialize(responseBody);
- throw new ApiException(response.StatusCode, errorForStatus404, responseBody, response.RequestMessage?.RequestUri, response.Headers);
+ var errorForStatus404 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus404, responseBody, response.RequestMessage?.RequestUri, response.Headers);
}
case 412:
{
- var errorForStatus412 = _client.TryDeserialize(responseBody);
- throw new ApiException(response.StatusCode, errorForStatus412, responseBody, response.RequestMessage?.RequestUri, response.Headers);
+ var errorForStatus412 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus412, responseBody, response.RequestMessage?.RequestUri, response.Headers);
}
}
var fallbackError = _client.TryDeserialize(responseBody);
@@ -123,23 +123,23 @@ public async Task> GetAsync(string merchantCode, string saleId
{
case 401:
{
- var errorForStatus401 = _client.TryDeserialize(responseBody);
- throw new ApiException(response.StatusCode, errorForStatus401, responseBody, response.RequestMessage?.RequestUri, response.Headers);
+ var errorForStatus401 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus401, responseBody, response.RequestMessage?.RequestUri, response.Headers);
}
case 403:
{
- var errorForStatus403 = _client.TryDeserialize(responseBody);
- throw new ApiException(response.StatusCode, errorForStatus403, responseBody, response.RequestMessage?.RequestUri, response.Headers);
+ var errorForStatus403 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus403, responseBody, response.RequestMessage?.RequestUri, response.Headers);
}
case 404:
{
- var errorForStatus404 = _client.TryDeserialize(responseBody);
- throw new ApiException(response.StatusCode, errorForStatus404, responseBody, response.RequestMessage?.RequestUri, response.Headers);
+ var errorForStatus404 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus404, responseBody, response.RequestMessage?.RequestUri, response.Headers);
}
case 412:
{
- var errorForStatus412 = _client.TryDeserialize(responseBody);
- throw new ApiException(response.StatusCode, errorForStatus412, responseBody, response.RequestMessage?.RequestUri, response.Headers);
+ var errorForStatus412 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus412, responseBody, response.RequestMessage?.RequestUri, response.Headers);
}
}
var fallbackError = _client.TryDeserialize(responseBody);
@@ -191,23 +191,23 @@ public ApiResponse List(string merchantCode, SalesListOptions? options
{
case 400:
{
- var errorForStatus400 = _client.TryDeserialize(responseBody);
- throw new ApiException(response.StatusCode, errorForStatus400, responseBody, response.RequestMessage?.RequestUri, response.Headers);
+ var errorForStatus400 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus400, responseBody, response.RequestMessage?.RequestUri, response.Headers);
}
case 401:
{
- var errorForStatus401 = _client.TryDeserialize(responseBody);
- throw new ApiException(response.StatusCode, errorForStatus401, responseBody, response.RequestMessage?.RequestUri, response.Headers);
+ var errorForStatus401 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus401, responseBody, response.RequestMessage?.RequestUri, response.Headers);
}
case 403:
{
- var errorForStatus403 = _client.TryDeserialize(responseBody);
- throw new ApiException(response.StatusCode, errorForStatus403, responseBody, response.RequestMessage?.RequestUri, response.Headers);
+ var errorForStatus403 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus403, responseBody, response.RequestMessage?.RequestUri, response.Headers);
}
case 412:
{
- var errorForStatus412 = _client.TryDeserialize(responseBody);
- throw new ApiException(response.StatusCode, errorForStatus412, responseBody, response.RequestMessage?.RequestUri, response.Headers);
+ var errorForStatus412 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus412, responseBody, response.RequestMessage?.RequestUri, response.Headers);
}
}
var fallbackError = _client.TryDeserialize(responseBody);
@@ -259,23 +259,23 @@ public async Task> ListAsync(string merchantCode, SalesLis
{
case 400:
{
- var errorForStatus400 = _client.TryDeserialize(responseBody);
- throw new ApiException(response.StatusCode, errorForStatus400, responseBody, response.RequestMessage?.RequestUri, response.Headers);
+ var errorForStatus400 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus400, responseBody, response.RequestMessage?.RequestUri, response.Headers);
}
case 401:
{
- var errorForStatus401 = _client.TryDeserialize(responseBody);
- throw new ApiException(response.StatusCode, errorForStatus401, responseBody, response.RequestMessage?.RequestUri, response.Headers);
+ var errorForStatus401 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus401, responseBody, response.RequestMessage?.RequestUri, response.Headers);
}
case 403:
{
- var errorForStatus403 = _client.TryDeserialize(responseBody);
- throw new ApiException(response.StatusCode, errorForStatus403, responseBody, response.RequestMessage?.RequestUri, response.Headers);
+ var errorForStatus403 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus403, responseBody, response.RequestMessage?.RequestUri, response.Headers);
}
case 412:
{
- var errorForStatus412 = _client.TryDeserialize(responseBody);
- throw new ApiException(response.StatusCode, errorForStatus412, responseBody, response.RequestMessage?.RequestUri, response.Headers);
+ var errorForStatus412 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus412, responseBody, response.RequestMessage?.RequestUri, response.Headers);
}
}
var fallbackError = _client.TryDeserialize(responseBody);
@@ -328,23 +328,23 @@ public ApiResponse Search(string merchantCode, SaleSearchReq
{
case 400:
{
- var errorForStatus400 = _client.TryDeserialize(responseBody);
- throw new ApiException(response.StatusCode, errorForStatus400, responseBody, response.RequestMessage?.RequestUri, response.Headers);
+ var errorForStatus400 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus400, responseBody, response.RequestMessage?.RequestUri, response.Headers);
}
case 401:
{
- var errorForStatus401 = _client.TryDeserialize(responseBody);
- throw new ApiException(response.StatusCode, errorForStatus401, responseBody, response.RequestMessage?.RequestUri, response.Headers);
+ var errorForStatus401 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus401, responseBody, response.RequestMessage?.RequestUri, response.Headers);
}
case 403:
{
- var errorForStatus403 = _client.TryDeserialize(responseBody);
- throw new ApiException(response.StatusCode, errorForStatus403, responseBody, response.RequestMessage?.RequestUri, response.Headers);
+ var errorForStatus403 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus403, responseBody, response.RequestMessage?.RequestUri, response.Headers);
}
case 412:
{
- var errorForStatus412 = _client.TryDeserialize(responseBody);
- throw new ApiException(response.StatusCode, errorForStatus412, responseBody, response.RequestMessage?.RequestUri, response.Headers);
+ var errorForStatus412 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus412, responseBody, response.RequestMessage?.RequestUri, response.Headers);
}
}
var fallbackError = _client.TryDeserialize(responseBody);
@@ -397,23 +397,23 @@ public async Task> SearchAsync(string merchantCo
{
case 400:
{
- var errorForStatus400 = _client.TryDeserialize(responseBody);
- throw new ApiException(response.StatusCode, errorForStatus400, responseBody, response.RequestMessage?.RequestUri, response.Headers);
+ var errorForStatus400 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus400, responseBody, response.RequestMessage?.RequestUri, response.Headers);
}
case 401:
{
- var errorForStatus401 = _client.TryDeserialize(responseBody);
- throw new ApiException(response.StatusCode, errorForStatus401, responseBody, response.RequestMessage?.RequestUri, response.Headers);
+ var errorForStatus401 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus401, responseBody, response.RequestMessage?.RequestUri, response.Headers);
}
case 403:
{
- var errorForStatus403 = _client.TryDeserialize(responseBody);
- throw new ApiException(response.StatusCode, errorForStatus403, responseBody, response.RequestMessage?.RequestUri, response.Headers);
+ var errorForStatus403 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus403, responseBody, response.RequestMessage?.RequestUri, response.Headers);
}
case 412:
{
- var errorForStatus412 = _client.TryDeserialize(responseBody);
- throw new ApiException(response.StatusCode, errorForStatus412, responseBody, response.RequestMessage?.RequestUri, response.Headers);
+ var errorForStatus412 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus412, responseBody, response.RequestMessage?.RequestUri, response.Headers);
}
}
var fallbackError = _client.TryDeserialize(responseBody);