Skip to content
Open
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
622 changes: 605 additions & 17 deletions openapi.json

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions src/SumUp/Models/Affiliate.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// <auto-generated />
#nullable enable

namespace SumUp;

using System.Text.Json.Serialization;
public sealed partial class Affiliate
{
[JsonPropertyName("app_id")]
public string AppId { get; set; } = default!;
[JsonPropertyName("key")]
public string Key { get; set; } = default!;
}
15 changes: 15 additions & 0 deletions src/SumUp/Models/Amount.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// <auto-generated />
#nullable enable

namespace SumUp;

using System.Text.Json.Serialization;
public sealed partial class Amount
{
/// <summary>Currency ISO 4217 code</summary>
[JsonPropertyName("currency")]
public string Currency { get; set; } = default!;
/// <summary>Amount in minor units (e.g. cents).</summary>
[JsonPropertyName("value")]
public int Value { get; set; }
}
3 changes: 3 additions & 0 deletions src/SumUp/Models/CreateReaderCheckoutResponseData.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ namespace SumUp;
using System.Text.Json.Serialization;
public sealed partial class CreateReaderCheckoutResponseData
{
/// <summary>The checkout ID is a unique identifier for the checkout.</summary>
[JsonPropertyName("checkout_id")]
public string? CheckoutId { get; set; }
/// <summary>The client transaction ID is a unique identifier for the transaction that is generated for the client. It can be used later to fetch the transaction details via the Transactions API.</summary>
[JsonPropertyName("client_transaction_id")]
public string ClientTransactionId { get; set; } = default!;
Expand Down
11 changes: 11 additions & 0 deletions src/SumUp/Models/GetReaderCheckoutResponse.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// <auto-generated />
#nullable enable

namespace SumUp;

using System.Text.Json.Serialization;
public sealed partial class GetReaderCheckoutResponse
{
[JsonPropertyName("data")]
public GetReaderCheckoutResponseData Data { get; set; } = default!;
}
51 changes: 51 additions & 0 deletions src/SumUp/Models/GetReaderCheckoutResponseData.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// <auto-generated />
#nullable enable

namespace SumUp;

using System.Text.Json.Serialization;
public sealed partial class GetReaderCheckoutResponseData
{
/// <summary>Type of the card. Required for some countries</summary>
[JsonPropertyName("card_type")]
public GetReaderCheckoutResponseDataCardType CardType { get; set; }
/// <summary>Unique identifier for the checkout</summary>
[JsonPropertyName("checkout_id")]
public Guid CheckoutId { get; set; }
/// <summary>Client transaction identifier associated with the checkout</summary>
[JsonPropertyName("client_transaction_id")]
public string ClientTransactionId { get; set; } = default!;
/// <summary>Checkout creation timestamp</summary>
[JsonPropertyName("created_at")]
public DateTimeOffset CreatedAt { get; set; }
/// <summary>Number of installments for the transaction. Required for some countries.</summary>
[JsonPropertyName("installments")]
public int? Installments { get; set; }
/// <summary>Payment failure reason</summary>
[JsonPropertyName("payment_failure_reason")]
public string? PaymentFailureReason { get; set; }
/// <summary>Payment status from payments v2 event</summary>
[JsonPropertyName("payment_status")]
public string? PaymentStatus { get; set; }
/// <summary>Type of the payment. Required for some countries</summary>
[JsonPropertyName("payment_type")]
public GetReaderCheckoutResponseDataPaymentType PaymentType { get; set; }
/// <summary>Reader firmware version</summary>
[JsonPropertyName("reader_firmware_version")]
public string ReaderFirmwareVersion { get; set; } = default!;
/// <summary>Device serial number</summary>
[JsonPropertyName("reader_serial_number")]
public string ReaderSerialNumber { get; set; } = default!;
/// <summary>Current status of the checkout</summary>
[JsonPropertyName("status")]
public GetReaderCheckoutResponseDataStatus Status { get; set; }
/// <summary>Amount structure. The amount is represented as an integer value altogether with the currency and the minor unit. For example, EUR 1.00 is represented as value 100 with minor unit of 2.</summary>
[JsonPropertyName("total_amount")]
public GetReaderCheckoutResponseDataTotalAmount TotalAmount { get; set; } = default!;
/// <summary>Checkout last update timestamp</summary>
[JsonPropertyName("updated_at")]
public DateTimeOffset UpdatedAt { get; set; }
/// <summary>Checkout expiration timestamp. After this time, the checkout will be automatically cancelled.</summary>
[JsonPropertyName("valid_until")]
public DateTimeOffset? ValidUntil { get; set; }
}
16 changes: 16 additions & 0 deletions src/SumUp/Models/GetReaderCheckoutResponseDataCardType.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// <auto-generated />
#nullable enable

namespace SumUp;

using System.Runtime.Serialization;
using System.Text.Json.Serialization;

[JsonConverter(typeof(EnumMemberJsonConverterFactory))]
public enum GetReaderCheckoutResponseDataCardType
{
[EnumMember(Value = "credit")]
Credit,
[EnumMember(Value = "debit")]
Debit,
}
16 changes: 16 additions & 0 deletions src/SumUp/Models/GetReaderCheckoutResponseDataPaymentType.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// <auto-generated />
#nullable enable

namespace SumUp;

using System.Runtime.Serialization;
using System.Text.Json.Serialization;

[JsonConverter(typeof(EnumMemberJsonConverterFactory))]
public enum GetReaderCheckoutResponseDataPaymentType
{
[EnumMember(Value = "card")]
Card,
[EnumMember(Value = "pix")]
Pix,
}
20 changes: 20 additions & 0 deletions src/SumUp/Models/GetReaderCheckoutResponseDataStatus.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// <auto-generated />
#nullable enable

namespace SumUp;

using System.Runtime.Serialization;
using System.Text.Json.Serialization;

[JsonConverter(typeof(EnumMemberJsonConverterFactory))]
public enum GetReaderCheckoutResponseDataStatus
{
[EnumMember(Value = "pending")]
Pending,
[EnumMember(Value = "successful")]
Successful,
[EnumMember(Value = "failed")]
Failed,
[EnumMember(Value = "cancelled")]
Cancelled,
}
19 changes: 19 additions & 0 deletions src/SumUp/Models/GetReaderCheckoutResponseDataTotalAmount.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// <auto-generated />
#nullable enable

namespace SumUp;

using System.Text.Json.Serialization;
/// <summary>Amount structure. The amount is represented as an integer value altogether with the currency and the minor unit. For example, EUR 1.00 is represented as value 100 with minor unit of 2.</summary>
public sealed partial class GetReaderCheckoutResponseDataTotalAmount
{
/// <summary>Currency ISO 4217 code</summary>
[JsonPropertyName("currency")]
public string Currency { get; set; } = default!;
/// <summary>The minor units of the currency. It represents the number of decimals of the currency. For the currencies CLP, COP and HUF, the minor unit is 0.</summary>
[JsonPropertyName("minor_unit")]
public int MinorUnit { get; set; }
/// <summary>Integer value of the amount.</summary>
[JsonPropertyName("value")]
public int Value { get; set; }
}
2 changes: 1 addition & 1 deletion src/SumUp/Models/Reader.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public sealed partial class Reader
/// <summary>Information about the underlying physical device.</summary>
[JsonPropertyName("device")]
public ReaderDevice Device { get; set; } = default!;
/// <summary>Unique identifier of the object. Note that this identifies the instance of the physical devices pairing with your SumUp account. If you delete a reader, and pair the device again, the ID will be different. Do not use this ID to refer to a physical device.</summary>
/// <summary>Unique identifier of the reader that the payment is initiated on.</summary>
[JsonPropertyName("id")]
public string Id { get; set; } = default!;
/// <summary>Set of user-defined key-value pairs attached to the object. Partial updates are not supported. When updating, always submit whole metadata. Maximum of 64 parameters are allowed in the object.</summary>
Expand Down
19 changes: 19 additions & 0 deletions src/SumUp/Models/ReaderPaymentRequestParams.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// <auto-generated />
#nullable enable

namespace SumUp;

using System.Text.Json.Serialization;
public sealed partial class ReaderPaymentRequestParams
{
[JsonPropertyName("affiliate")]
public Affiliate? Affiliate { get; set; }
/// <summary>Caller-supplied correlation identifier, used as the idempotency key.</summary>
[JsonPropertyName("client_transaction_id")]
public string ClientTransactionId { get; set; } = default!;
/// <summary>Optional tip amount in minor units, added on top of total_amount.</summary>
[JsonPropertyName("tip_amount")]
public int? TipAmount { get; set; }
[JsonPropertyName("total_amount")]
public Amount TotalAmount { get; set; } = default!;
}
11 changes: 11 additions & 0 deletions src/SumUp/Models/ReaderPaymentResponse.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// <auto-generated />
#nullable enable

namespace SumUp;

using System.Text.Json.Serialization;
public sealed partial class ReaderPaymentResponse
{
[JsonPropertyName("data")]
public ReaderPaymentResponseData? Data { get; set; }
}
15 changes: 15 additions & 0 deletions src/SumUp/Models/ReaderPaymentResponseData.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// <auto-generated />
#nullable enable

namespace SumUp;

using System.Text.Json.Serialization;
public sealed partial class ReaderPaymentResponseData
{
/// <summary>Caller-supplied correlation identifier that was provided in the request.</summary>
[JsonPropertyName("client_transaction_id")]
public string? ClientTransactionId { get; set; }
/// <summary>Transaction code returned by the acquirer/processing entity after processing the transaction.</summary>
[JsonPropertyName("transaction_code")]
public string? TransactionCode { get; set; }
}
13 changes: 13 additions & 0 deletions src/SumUp/Options/ReadersCreateGoCheckoutOptions.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// <auto-generated />
#nullable enable

namespace SumUp;

/// <summary>
/// Optional parameters for Create a Go Reader Payment.
/// </summary>
public sealed partial class ReadersCreateGoCheckoutOptions
{
/// <summary>Access token in the format 'Bearer {token}'.</summary>
public string Authorization { get; set; } = default!;
}
Loading
Loading