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
897 changes: 805 additions & 92 deletions openapi.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/SumUp/Models/BadRequestErrorsType.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ namespace SumUp;
[JsonConverter(typeof(EnumMemberJsonConverterFactory))]
public enum BadRequestErrorsType
{
[EnumMember(Value = "INVALID_AFFILIATE_KEY")]
InvalidAffiliateKey,
[EnumMember(Value = "APP_OUTDATED")]
AppOutdated,
[EnumMember(Value = "INVALID_BEARER_TOKEN")]
InvalidBearerToken,
[EnumMember(Value = "INVALID_USER_AGENT")]
Expand Down
13 changes: 8 additions & 5 deletions src/SumUp/Models/CreateReaderCheckoutRequest.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,31 @@ namespace SumUp;

using System.Text.Json.Serialization;
using System.Collections.Generic;
/// <summary>Reader Checkout</summary>
/// <summary>Payment details for a Reader Checkout.</summary>
public sealed partial class CreateReaderCheckoutRequest
{
/// <summary>Optional object containing data for transactions from ERP integrators in Greece that comply with the AADE 1155 protocol. When such regulatory/business requirements apply, this object must be provided and contains the data needed to validate the transaction with the AADE signature provider.</summary>
[JsonPropertyName("aade")]
public CreateReaderCheckoutRequestAade? Aade { get; set; }
/// <summary>Affiliate metadata for the transaction. It is a field that allow for integrators to track the source of the transaction.</summary>
/// <summary>Optional affiliate metadata associated with the checkout's payment. Provide both app_id and key when including this object.</summary>
[JsonPropertyName("affiliate")]
public CreateReaderCheckoutRequestAffiliate? Affiliate { get; set; }
/// <summary>The card type of the card used for the transaction. Is is required only for some countries (e.g: Brazil).</summary>
/// <summary>The card type of the card used for the transaction. It is required only for some countries (e.g: Brazil).</summary>
[JsonPropertyName("card_type")]
public CreateReaderCheckoutRequestCardType? CardType { get; set; }
/// <summary>Description of the checkout to be shown in the Merchant Sales</summary>
[JsonPropertyName("description")]
public string? Description { get; set; }
/// <summary>Number of installments for the transaction. It may vary according to the merchant country. For example, in Brazil, the maximum number of installments is 12. Omit if the merchant country does support installments. Otherwise, the checkout will be rejected.</summary>
/// <summary>Number of installments for the transaction. It may vary according to the merchant country. For example, in Brazil, the maximum number of installments is 12. Omit if the merchant country does not support installments. Otherwise, the checkout will be rejected.</summary>
[JsonPropertyName("installments")]
public int? Installments { get; set; }
/// <summary>The payment method type for the transaction. Defaults to card. Use pix to initiate a Pix QR-code payment flow on the device. Pix is only supported for Brazilian merchants; other merchants will receive a 422 error.</summary>
[JsonPropertyName("payment_type")]
public CreateReaderCheckoutRequestPaymentType? PaymentType { get; set; }
/// <summary>Webhook URL to which the payment result will be sent. It must be a HTTPS url.</summary>
[JsonPropertyName("return_url")]
public string? ReturnUrl { get; set; }
/// <summary>List of tipping rates to be displayed to the cardholder. The rates are in percentage and should be between 0.01 and 0.99. The list should be sorted in ascending order.</summary>
/// <summary>Exactly three distinct tipping rates to be displayed to the cardholder. Each rate is a fraction between 0.01 and 1.00 in increments of 0.01. The rates are sorted in ascending order by the server.</summary>
[JsonPropertyName("tip_rates")]
public IEnumerable<float>? TipRates { get; set; }
/// <summary>Time in seconds the cardholder has to select a tip rate. If not provided, the default value is 30 seconds. It can only be set if tip_rates is provided. Note: If the target device is a Solo, it must be in version 3.3.38.0 or higher.</summary>
Expand Down
12 changes: 6 additions & 6 deletions src/SumUp/Models/CreateReaderCheckoutRequestAffiliate.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
namespace SumUp;

using System.Text.Json.Serialization;
/// <summary>Affiliate metadata for the transaction. It is a field that allow for integrators to track the source of the transaction.</summary>
/// <summary>Optional affiliate metadata associated with the checkout's payment. Provide both app_id and key when including this object.</summary>
public sealed partial class CreateReaderCheckoutRequestAffiliate
{
/// <summary>Application ID of the affiliate. It is a unique identifier for the application and should be set by the integrator in the Affiliate Keys page.</summary>
/// <summary>Integrator application identifier from the Affiliate Keys page. Required when the affiliate object is provided.</summary>
[JsonPropertyName("app_id")]
public string AppId { get; set; } = default!;
/// <summary>Foreign transaction ID of the affiliate. It is a unique identifier for the transaction. It can be used later to fetch the transaction details via the Transactions API.</summary>
/// <summary>Integrator-owned transaction reference. Optional. Can be used to retrieve the transaction via the Transactions API.</summary>
[JsonPropertyName("foreign_transaction_id")]
public string ForeignTransactionId { get; set; } = default!;
/// <summary>Key of the affiliate. It is a unique identifier for the key and should be generated by the integrator in the Affiliate Keys page.</summary>
public string? ForeignTransactionId { get; set; }
/// <summary>Affiliate key generated in the Affiliate Keys page. Required when the affiliate object is provided.</summary>
[JsonPropertyName("key")]
public string Key { get; set; } = default!;
/// <summary>Additional metadata for the transaction. It is key-value object that can be associated with the transaction.</summary>
/// <summary>Optional key-value metadata associated with the transaction.</summary>
[JsonPropertyName("tags")]
public JsonObject? Tags { get; set; }
}
16 changes: 16 additions & 0 deletions src/SumUp/Models/CreateReaderCheckoutRequestPaymentType.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 CreateReaderCheckoutRequestPaymentType
{
[EnumMember(Value = "card")]
Card,
[EnumMember(Value = "pix")]
Pix,
}
2 changes: 1 addition & 1 deletion src/SumUp/Models/CreateReaderCheckoutResponseData.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ 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>
/// <summary>Unique identifier for the transaction associated with this checkout. Use this value to match the checkout with payment events and transaction records.</summary>
[JsonPropertyName("client_transaction_id")]
public string ClientTransactionId { get; set; } = default!;
}
19 changes: 19 additions & 0 deletions src/SumUp/Models/CustomerValidationError.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>Details of a customer validation error.</summary>
public sealed partial class CustomerValidationError
{
/// <summary>Platform code for the error.</summary>
[JsonPropertyName("error_code")]
public string ErrorCode { get; set; } = default!;
/// <summary>Short description of the error.</summary>
[JsonPropertyName("error_message")]
public string ErrorMessage { get; set; } = default!;
/// <summary>Unique identifier of this error occurrence.</summary>
[JsonPropertyName("instance")]
public string Instance { get; set; } = default!;
}
6 changes: 3 additions & 3 deletions src/SumUp/Models/GetReaderCheckoutResponseData.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace SumUp;
using System.Text.Json.Serialization;
public sealed partial class GetReaderCheckoutResponseData
{
/// <summary>Type of the card. Required for some countries</summary>
/// <summary>Type of the card, or null when no card type was specified.</summary>
[JsonPropertyName("card_type")]
public GetReaderCheckoutResponseDataCardType? CardType { get; set; }
/// <summary>Unique identifier for the checkout</summary>
Expand All @@ -21,10 +21,10 @@ public sealed partial class GetReaderCheckoutResponseData
/// <summary>Number of installments for the transaction. Required for some countries.</summary>
[JsonPropertyName("installments")]
public int? Installments { get; set; }
/// <summary>Payment failure reason</summary>
/// <summary>Reason for the payment failure, or null when no failure reason is available.</summary>
[JsonPropertyName("payment_failure_reason")]
public string? PaymentFailureReason { get; set; }
/// <summary>Payment status from payments v2 event</summary>
/// <summary>Status of the payment, or null when no payment status is available.</summary>
[JsonPropertyName("payment_status")]
public string? PaymentStatus { get; set; }
/// <summary>Type of the payment. Required for some countries</summary>
Expand Down
2 changes: 2 additions & 0 deletions src/SumUp/Models/GetReaderCheckoutResponseDataCardType.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ public enum GetReaderCheckoutResponseDataCardType
Credit,
[EnumMember(Value = "debit")]
Debit,
[EnumMember(Value = "null")]
NullValue,
}
12 changes: 12 additions & 0 deletions src/SumUp/Models/GetReaderSettingsResponse.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// <auto-generated />
#nullable enable

namespace SumUp;

using System.Text.Json.Serialization;
/// <summary>Menu lock settings reported by the reader, or the last saved settings when offline.</summary>
public sealed partial class GetReaderSettingsResponse
{
[JsonPropertyName("data")]
public GetReaderSettingsResponseData Data { get; set; } = default!;
}
12 changes: 12 additions & 0 deletions src/SumUp/Models/GetReaderSettingsResponseData.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// <auto-generated />
#nullable enable

namespace SumUp;

using System.Text.Json.Serialization;
public sealed partial class GetReaderSettingsResponseData
{
/// <summary>Menu lock configuration. Fields may be absent if no value is available.</summary>
[JsonPropertyName("menu_lock")]
public GetReaderSettingsResponseDataMenuLock MenuLock { get; set; } = default!;
}
16 changes: 16 additions & 0 deletions src/SumUp/Models/GetReaderSettingsResponseDataMenuLock.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// <auto-generated />
#nullable enable

namespace SumUp;

using System.Text.Json.Serialization;
/// <summary>Menu lock configuration. Fields may be absent if no value is available.</summary>
public sealed partial class GetReaderSettingsResponseDataMenuLock
{
/// <summary>Whether menu lock is enabled.</summary>
[JsonPropertyName("enabled")]
public bool? Enabled { get; set; }
/// <summary>Four-digit PIN used to unlock the reader's menu.</summary>
[JsonPropertyName("passcode")]
public string? Passcode { get; set; }
}
19 changes: 19 additions & 0 deletions src/SumUp/Models/Token.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>A short-lived credential for the requested merchant account and actions. Pass access_token to a SumUp SDK that supports merchant tokens.</summary>
public sealed partial class Token
{
/// <summary>Secret token to pass to the SDK. Treat this value as an opaque string; do not parse it or depend on its format.</summary>
[JsonPropertyName("access_token")]
public string AccessToken { get; set; } = default!;
/// <summary>Remaining lifetime of the token in seconds when the response is created. Tokens expire 15 minutes after creation. Request a new token when needed.</summary>
[JsonPropertyName("expires_in")]
public int ExpiresIn { get; set; }
/// <summary>Authentication scheme used by the token. Always Bearer.</summary>
[JsonPropertyName("token_type")]
public TokenTokenType TokenType { get; set; }
}
14 changes: 14 additions & 0 deletions src/SumUp/Models/TokenTokenType.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// <auto-generated />
#nullable enable

namespace SumUp;

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

[JsonConverter(typeof(EnumMemberJsonConverterFactory))]
public enum TokenTokenType
{
[EnumMember(Value = "Bearer")]
Bearer,
}
13 changes: 13 additions & 0 deletions src/SumUp/Models/TokensCreateRequest.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;
using System.Collections.Generic;
public sealed partial class TokensCreateRequest
{
/// <summary>Actions the token allows for this merchant account.</summary>
[JsonPropertyName("actions")]
public IEnumerable<TokensCreateRequestActionsItem> Actions { get; set; } = default!;
}
14 changes: 14 additions & 0 deletions src/SumUp/Models/TokensCreateRequestActionsItem.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// <auto-generated />
#nullable enable

namespace SumUp;

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

[JsonConverter(typeof(EnumMemberJsonConverterFactory))]
public enum TokensCreateRequestActionsItem
{
[EnumMember(Value = "checkout")]
Checkout,
}
12 changes: 12 additions & 0 deletions src/SumUp/Models/UpdateReaderSettingsError.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// <auto-generated />
#nullable enable

namespace SumUp;

using System.Text.Json.Serialization;
/// <summary>Details of a failed reader settings request.</summary>
public sealed partial class UpdateReaderSettingsError
{
[JsonPropertyName("errors")]
public UpdateReaderSettingsErrorErrors Errors { get; set; } = default!;
}
15 changes: 15 additions & 0 deletions src/SumUp/Models/UpdateReaderSettingsErrorErrors.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 UpdateReaderSettingsErrorErrors
{
/// <summary>Error message</summary>
[JsonPropertyName("detail")]
public string Detail { get; set; } = default!;
/// <summary>Error code</summary>
[JsonPropertyName("type")]
public string? Type { get; set; }
}
13 changes: 13 additions & 0 deletions src/SumUp/Models/UpdateReaderSettingsRequest.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;
/// <summary>Menu lock settings to update for a Solo reader.</summary>
public sealed partial class UpdateReaderSettingsRequest
{
/// <summary>Menu lock configuration. Provide at least one of enabled or passcode.</summary>
[JsonPropertyName("menu_lock")]
public UpdateReaderSettingsRequestMenuLock MenuLock { get; set; } = default!;
}
16 changes: 16 additions & 0 deletions src/SumUp/Models/UpdateReaderSettingsRequestMenuLock.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// <auto-generated />
#nullable enable

namespace SumUp;

using System.Text.Json.Serialization;
/// <summary>Menu lock configuration. Provide at least one of enabled or passcode.</summary>
public sealed partial class UpdateReaderSettingsRequestMenuLock
{
/// <summary>Whether menu lock is enabled.</summary>
[JsonPropertyName("enabled")]
public bool? Enabled { get; set; }
/// <summary>Four-digit PIN used to unlock the reader's menu.</summary>
[JsonPropertyName("passcode")]
public string? Passcode { get; set; }
}
12 changes: 12 additions & 0 deletions src/SumUp/Models/UpdateReaderSettingsResponse.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// <auto-generated />
#nullable enable

namespace SumUp;

using System.Text.Json.Serialization;
/// <summary>Menu lock settings applied to the reader.</summary>
public sealed partial class UpdateReaderSettingsResponse
{
[JsonPropertyName("data")]
public UpdateReaderSettingsResponseData Data { get; set; } = default!;
}
15 changes: 15 additions & 0 deletions src/SumUp/Models/UpdateReaderSettingsResponseData.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 UpdateReaderSettingsResponseData
{
/// <summary>Settings included in the update. Omitted fields are not returned.</summary>
[JsonPropertyName("menu_lock")]
public UpdateReaderSettingsResponseDataMenuLock MenuLock { get; set; } = default!;
/// <summary>Indicates that the reader applied the settings update.</summary>
[JsonPropertyName("status")]
public UpdateReaderSettingsResponseDataStatus Status { get; set; }
}
16 changes: 16 additions & 0 deletions src/SumUp/Models/UpdateReaderSettingsResponseDataMenuLock.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// <auto-generated />
#nullable enable

namespace SumUp;

using System.Text.Json.Serialization;
/// <summary>Settings included in the update. Omitted fields are not returned.</summary>
public sealed partial class UpdateReaderSettingsResponseDataMenuLock
{
/// <summary>Whether menu lock is enabled.</summary>
[JsonPropertyName("enabled")]
public bool? Enabled { get; set; }
/// <summary>Four-digit PIN used to unlock the reader's menu.</summary>
[JsonPropertyName("passcode")]
public string? Passcode { get; set; }
}
14 changes: 14 additions & 0 deletions src/SumUp/Models/UpdateReaderSettingsResponseDataStatus.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// <auto-generated />
#nullable enable

namespace SumUp;

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

[JsonConverter(typeof(EnumMemberJsonConverterFactory))]
public enum UpdateReaderSettingsResponseDataStatus
{
[EnumMember(Value = "applied")]
Applied,
}
Loading
Loading