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 Options { /// /// If true, validate callback must get a positive response to not stop purchase. Default: false. /// /// If true, validate callback must get a positive response to not stop purchase. Default: false. [JsonProperty("require_validate_callback_success")] public bool? RequireValidateCallbackSuccess { get; set; } /// /// Acquiring channel for the order. The possible values are: <ul><li><em>MOTO for \"Mail Order Telephone Order\"</em></li><li><em>ECOMMERCE for \"E-commerce\"</em></li><li><em>IN_STORE for \"Purchase in boutique\"</em></li><li><em>TELESALES for \"Telesales/telemarketing\"</em></li><li><em>Default : ECOMMERCE</em></li></ul> /// /// Acquiring channel for the order. The possible values are: <ul><li><em>MOTO for \"Mail Order Telephone Order\"</em></li><li><em>ECOMMERCE for \"E-commerce\"</em></li><li><em>IN_STORE for \"Purchase in boutique\"</em></li><li><em>TELESALES for \"Telesales/telemarketing\"</em></li><li><em>Default : ECOMMERCE</em></li></ul> [RegularExpression("/ECOMMERCE|MOTO|IN_STORE|TELESALES/")] [JsonProperty("acquiring_channel")] public string AcquiringChannel { get; set; } /// /// If true, VAT is not displayed in Checkout's Order Summary page. /// /// If true, VAT is not displayed in Checkout's Order Summary page. [JsonProperty("vat_removed")] public bool? VatRemoved { get; set; } /// /// If true, the consumer can enter different billing and shipping addresses. Default: false, except for purchase_country DE where default is: true /// /// If true, the consumer can enter different billing and shipping addresses. Default: false, except for purchase_country DE where default is: true [JsonProperty("allow_separate_shipping_address")] public bool? AllowSeparateShippingAddress { get; set; } /// /// Color for the buttons within the iFrame. Value should be a CSS hex color, e.g. \"#FF9900\" /// /// Color for the buttons within the iFrame. Value should be a CSS hex color, e.g. \"#FF9900\" [RegularExpression("/^#[A-Fa-f0-9]{6}$/")] [JsonProperty("color_button")] public string ColorButton { get; set; } /// /// Color for the text inside the buttons within the iFrame. Value should be a CSS hex color, e.g. \"#FF9900\" /// /// Color for the text inside the buttons within the iFrame. Value should be a CSS hex color, e.g. \"#FF9900\" [RegularExpression("/^#[A-Fa-f0-9]{6}$/")] [JsonProperty("color_button_text")] public string ColorButtonText { get; set; } /// /// Color for the checkboxes within the iFrame. Value should be a CSS hex color, e.g. \"#FF9900\" /// /// Color for the checkboxes within the iFrame. Value should be a CSS hex color, e.g. \"#FF9900\" [RegularExpression("/^#[A-Fa-f0-9]{6}$/")] [JsonProperty("color_checkbox")] public string ColorCheckbox { get; set; } /// /// Color for the checkboxes checkmark within the iFrame. Value should be a CSS hex color, e.g. \"#FF9900\" /// /// Color for the checkboxes checkmark within the iFrame. Value should be a CSS hex color, e.g. \"#FF9900\" [RegularExpression("/^#[A-Fa-f0-9]{6}$/")] [JsonProperty("color_checkbox_checkmark")] public string ColorCheckboxCheckmark { get; set; } /// /// Color for the headers within the iFrame. Value should be a CSS hex color, e.g. \"#FF9900\" /// /// Color for the headers within the iFrame. Value should be a CSS hex color, e.g. \"#FF9900\" [RegularExpression("/^#[A-Fa-f0-9]{6}$/")] [JsonProperty("color_header")] public string ColorHeader { get; set; } /// /// Color for the hyperlinks within the iFrame. Value should be a CSS hex color, e.g. \"#FF9900\" /// /// Color for the hyperlinks within the iFrame. Value should be a CSS hex color, e.g. \"#FF9900\" [RegularExpression("/^#[A-Fa-f0-9]{6}$/")] [JsonProperty("color_link")] public string ColorLink { get; set; } /// /// If true, the consumer cannot skip date of birth. Default: false /// /// If true, the consumer cannot skip date of birth. Default: false [JsonProperty("date_of_birth_mandatory")] public bool? DateOfBirthMandatory { get; set; } /// /// A message that will be presented on the confirmation page under the headline \"Delivery\" (max 255 characters). /// /// A message that will be presented on the confirmation page under the headline \"Delivery\" (max 255 characters). [JsonProperty("shipping_details")] public string ShippingDetails { get; set; } /// /// If specified to false, title becomes optional. Only available for orders for country GB. /// /// If specified to false, title becomes optional. Only available for orders for country GB. [JsonProperty("title_mandatory")] public bool? TitleMandatory { get; set; } /// /// Gets or Sets AdditionalCheckbox /// [JsonProperty("additional_checkbox")] public Checkbox AdditionalCheckbox { get; set; } /// /// If true, the user cannot skip national identification number in SE, NO, FI and DK. Default: false. In order to read the national identification number in the validation callback, please contact Klarna’s merchant support. /// /// If true, the user cannot skip national identification number in SE, NO, FI and DK. Default: false. In order to read the national identification number in the validation callback, please contact Klarna’s merchant support. [JsonProperty("national_identification_number_mandatory")] public bool? NationalIdentificationNumberMandatory { get; set; } /// /// Additional merchant defined field. e.g. Extra terms and conditions to show. Example: \"ADDITIONAL MERCHANT TERMS! \\[terms link\\](https://merchant.com/extra_terms)\" /// /// Additional merchant defined field. e.g. Extra terms and conditions to show. Example: \"ADDITIONAL MERCHANT TERMS! \\[terms link\\](https://merchant.com/extra_terms)\" [JsonProperty("additional_merchant_terms")] public string AdditionalMerchantTerms { get; set; } /// /// If false, the consumer can skip the phone. Only available for orders in DACH countries. /// /// If false, the consumer can skip the phone. Only available for orders in DACH countries. [JsonProperty("phone_mandatory")] public bool? PhoneMandatory { get; set; } /// /// Radius for the border of elements within the iFrame. /// /// Radius for the border of elements within the iFrame. [JsonProperty("radius_border")] public string RadiusBorder { get; set; } /// /// A list of allowed customer types. Supported types: <b>person</b> & <b>organization</b>. Example: [\"person\",\"organization\"] /// /// A list of allowed customer types. Supported types: <b>person</b> & <b>organization</b>. Example: [\"person\",\"organization\"] [JsonProperty("allowed_customer_types")] public List AllowedCustomerTypes { get; set; } /// /// If true, the Order Detail subtotals view is expanded when the Klarna Checkout iFrame is loaded. Default: false /// /// If true, the Order Detail subtotals view is expanded when the Klarna Checkout iFrame is loaded. Default: false [JsonProperty("show_subtotal_detail")] public bool? ShowSubtotalDetail { get; set; } /// /// Gets or Sets AdditionalCheckboxes /// [JsonProperty("additional_checkboxes")] public List AdditionalCheckboxes { get; set; } /// /// Enable verification of National Identification Numbers only in Sweden, Finland and Norway. This option also make the national identification number mandatory. (Not applicable for countries outside of Sweden, Finland and Norway) /// /// Enable verification of National Identification Numbers only in Sweden, Finland and Norway. This option also make the national identification number mandatory. (Not applicable for countries outside of Sweden, Finland and Norway) [JsonProperty("verify_national_identification_number")] public bool? VerifyNationalIdentificationNumber { get; set; } /// /// If true, a optional VAT registration number field will be shown in the address form. Only applies for b2b orders. /// /// If true, a optional VAT registration number field will be shown in the address form. Only applies for b2b orders. [JsonProperty("show_vat_registration_number_field")] public bool? ShowVatRegistrationNumberField { get; set; } } }