69 lines
2.4 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace gehGassi.Klarna.Checkout
{
public class PaymentProvider
{
/// <summary>
/// The name of the payment provider. (max 255 characters)
/// </summary>
/// <value>The name of the payment provider. (max 255 characters)</value>
[Required]
[StringLength(255, MinimumLength = 0)]
[JsonProperty("name")]
public string Name { get; set; }
/// <summary>
/// Minor units. Includes tax.
/// </summary>
/// <value>Minor units. Includes tax.</value>
[JsonProperty("fee")]
public long? Fee { get; set; }
/// <summary>
/// Description. (max 500 characters)
/// </summary>
/// <value>Description. (max 500 characters)</value>
[StringLength(500, MinimumLength = 0)]
[JsonProperty("description")]
public string Description { get; set; }
/// <summary>
/// If specified, limits the method to the listed countries (alpha 2 codes).
/// </summary>
/// <value>If specified, limits the method to the listed countries (alpha 2 codes).</value>
[JsonProperty("countries")]
public List<string> Countries { get; set; }
/// <summary>
/// Controls label of buy button&lt;ul&gt;&lt;li&gt;continue&lt;/li&gt;&lt;li&gt;complete&lt;/li&gt;&lt;/ul&gt;
/// </summary>
/// <value>Controls label of buy button&lt;ul&gt;&lt;li&gt;continue&lt;/li&gt;&lt;li&gt;complete&lt;/li&gt;&lt;/ul&gt;</value>
[JsonProperty("label")]
public string Label { get; set; }
/// <summary>
/// URL to redirect to. (must be https, min 7, max 2000 characters)
/// </summary>
/// <value>URL to redirect to. (must be https, min 7, max 2000 characters)</value>
[Required]
[StringLength(2000, MinimumLength = 7)]
[JsonProperty("redirect_url")]
public string RedirectUrl { get; set; }
/// <summary>
/// URL to an image to display. (must be https, max 2000 characters)
/// </summary>
/// <value>URL to an image to display. (must be https, max 2000 characters)</value>
[StringLength(2000, MinimumLength = 0)]
[JsonProperty("image_url")]
public string ImageUrl { get; set; }
}
}