diff options
Diffstat (limited to 'src/IOL.VippsEcommerce/Models/Api')
22 files changed, 636 insertions, 658 deletions
diff --git a/src/IOL.VippsEcommerce/Models/Api/EErrorGroupEnum.cs b/src/IOL.VippsEcommerce/Models/Api/EErrorGroupEnum.cs index 8c6bf2f..c6a2a91 100644 --- a/src/IOL.VippsEcommerce/Models/Api/EErrorGroupEnum.cs +++ b/src/IOL.VippsEcommerce/Models/Api/EErrorGroupEnum.cs @@ -1,47 +1,46 @@ using System.Text.Json.Serialization; -namespace IOL.VippsEcommerce.Models.Api +namespace IOL.VippsEcommerce.Models.Api; + +/// <summary> +/// The error group. See: https://github.com/vippsas/vipps-ecom-api/blob/master/vipps-ecom-api.md#error-groups +/// </summary> +public enum EErrorGroupEnum { - /// <summary> - /// The error group. See: https://github.com/vippsas/vipps-ecom-api/blob/master/vipps-ecom-api.md#error-groups - /// </summary> - public enum EErrorGroupEnum - { - /// <summary> - /// Enum Authentication for value: Authentication - /// </summary> - [JsonPropertyName("Authentication")] - AUTHENTICATION = 1, + /// <summary> + /// Enum Authentication for value: Authentication + /// </summary> + [JsonPropertyName("Authentication")] + AUTHENTICATION = 1, - /// <summary> - /// Enum Payments for value: Payments - /// </summary> - [JsonPropertyName("Payments")] - PAYMENTS = 2, + /// <summary> + /// Enum Payments for value: Payments + /// </summary> + [JsonPropertyName("Payments")] + PAYMENTS = 2, - /// <summary> - /// Enum InvalidRequest for value: InvalidRequest - /// </summary> - [JsonPropertyName("InvalidRequest")] - INVALID_REQUEST = 3, + /// <summary> + /// Enum InvalidRequest for value: InvalidRequest + /// </summary> + [JsonPropertyName("InvalidRequest")] + INVALID_REQUEST = 3, - /// <summary> - /// Enum VippsError for value: VippsError - /// </summary> - [JsonPropertyName("VippsError")] - VIPPS_ERROR = 4, + /// <summary> + /// Enum VippsError for value: VippsError + /// </summary> + [JsonPropertyName("VippsError")] + VIPPS_ERROR = 4, - /// <summary> - /// Enum User for value: User - /// </summary> - [JsonPropertyName("User")] - USER = 5, + /// <summary> + /// Enum User for value: User + /// </summary> + [JsonPropertyName("User")] + USER = 5, - /// <summary> - /// Enum Merchant for value: Merchant - /// </summary> - [JsonPropertyName("Merchant")] - MERCHANT = 6 + /// <summary> + /// Enum Merchant for value: Merchant + /// </summary> + [JsonPropertyName("Merchant")] + MERCHANT = 6 - } }
\ No newline at end of file diff --git a/src/IOL.VippsEcommerce/Models/Api/EStatusEnum.cs b/src/IOL.VippsEcommerce/Models/Api/EStatusEnum.cs index bf579a4..7a38412 100644 --- a/src/IOL.VippsEcommerce/Models/Api/EStatusEnum.cs +++ b/src/IOL.VippsEcommerce/Models/Api/EStatusEnum.cs @@ -1,25 +1,24 @@ using System.Text.Json.Serialization; -namespace IOL.VippsEcommerce.Models.Api +namespace IOL.VippsEcommerce.Models.Api; + +public enum EStatusEnum { - public enum EStatusEnum - { - /// <summary> - /// Enum Cancelled for value: Cancelled - /// </summary> - [JsonPropertyName("Cancelled")] - CANCELLED = 1, + /// <summary> + /// Enum Cancelled for value: Cancelled + /// </summary> + [JsonPropertyName("Cancelled")] + CANCELLED = 1, - /// <summary> - /// Enum Captured for value: Captured - /// </summary> - [JsonPropertyName("Captured")] - CAPTURED = 2, + /// <summary> + /// Enum Captured for value: Captured + /// </summary> + [JsonPropertyName("Captured")] + CAPTURED = 2, - /// <summary> - /// Enum Refund for value: Refund - /// </summary> - [JsonPropertyName("Refund")] - REFUND = 3 - } + /// <summary> + /// Enum Refund for value: Refund + /// </summary> + [JsonPropertyName("Refund")] + REFUND = 3 }
\ No newline at end of file diff --git a/src/IOL.VippsEcommerce/Models/Api/ETransactionStatus.cs b/src/IOL.VippsEcommerce/Models/Api/ETransactionStatus.cs index 303a4e9..d66bcea 100644 --- a/src/IOL.VippsEcommerce/Models/Api/ETransactionStatus.cs +++ b/src/IOL.VippsEcommerce/Models/Api/ETransactionStatus.cs @@ -1,22 +1,21 @@ using System.Text.Json.Serialization; -namespace IOL.VippsEcommerce.Models.Api +namespace IOL.VippsEcommerce.Models.Api; + +public enum ETransactionStatus { - public enum ETransactionStatus - { - [JsonPropertyName("RESERVED")] - RESERVED, - [JsonPropertyName("SALE")] - SALE, - [JsonPropertyName("CANCELLED")] - CANCELLED, - [JsonPropertyName("REJECTED")] - REJECTED, - [JsonPropertyName("AUTO_CANCEL")] - AUTO_CANCEL, - [JsonPropertyName("SALE_FAILED")] - SALE_FAILED, - [JsonPropertyName("RESERVE_FAILED")] - RESERVE_FAILED - } + [JsonPropertyName("RESERVED")] + RESERVED, + [JsonPropertyName("SALE")] + SALE, + [JsonPropertyName("CANCELLED")] + CANCELLED, + [JsonPropertyName("REJECTED")] + REJECTED, + [JsonPropertyName("AUTO_CANCEL")] + AUTO_CANCEL, + [JsonPropertyName("SALE_FAILED")] + SALE_FAILED, + [JsonPropertyName("RESERVE_FAILED")] + RESERVE_FAILED }
\ No newline at end of file diff --git a/src/IOL.VippsEcommerce/Models/Api/TAdditionalTransactionData.cs b/src/IOL.VippsEcommerce/Models/Api/TAdditionalTransactionData.cs index 692c7be..8da5bb7 100644 --- a/src/IOL.VippsEcommerce/Models/Api/TAdditionalTransactionData.cs +++ b/src/IOL.VippsEcommerce/Models/Api/TAdditionalTransactionData.cs @@ -1,42 +1,41 @@ using System.Text.Json.Serialization; -namespace IOL.VippsEcommerce.Models.Api +namespace IOL.VippsEcommerce.Models.Api; + +public class TAdditionalTransactionData { - public class TAdditionalTransactionData - { - /// <summary> - /// Passenger name, initials, and a title. - /// </summary> - /// <value>Passenger name, initials, and a title.</value> - [JsonPropertyName("passengerName")] - public string PassengerName { get; set; } + /// <summary> + /// Passenger name, initials, and a title. + /// </summary> + /// <value>Passenger name, initials, and a title.</value> + [JsonPropertyName("passengerName")] + public string PassengerName { get; set; } - /// <summary> - /// IATA 3-digit accounting code (PAX); numeric. It identifies the carrier. eg KLM = 074 - /// </summary> - /// <value>IATA 3-digit accounting code (PAX); numeric. It identifies the carrier. eg KLM = 074</value> - [JsonPropertyName("airlineCode")] - public string AirlineCode { get; set; } + /// <summary> + /// IATA 3-digit accounting code (PAX); numeric. It identifies the carrier. eg KLM = 074 + /// </summary> + /// <value>IATA 3-digit accounting code (PAX); numeric. It identifies the carrier. eg KLM = 074</value> + [JsonPropertyName("airlineCode")] + public string AirlineCode { get; set; } - /// <summary> - /// IATA 2-letter accounting code (PAX); alphabetical. It identifies the carrier. Eg KLM = KL - /// </summary> - /// <value>IATA 2-letter accounting code (PAX); alphabetical. It identifies the carrier. Eg KLM = KL</value> - [JsonPropertyName("airlineDesignatorCode")] - public string AirlineDesignatorCode { get; set; } + /// <summary> + /// IATA 2-letter accounting code (PAX); alphabetical. It identifies the carrier. Eg KLM = KL + /// </summary> + /// <value>IATA 2-letter accounting code (PAX); alphabetical. It identifies the carrier. Eg KLM = KL</value> + [JsonPropertyName("airlineDesignatorCode")] + public string AirlineDesignatorCode { get; set; } - /// <summary> - /// The ticket's unique identifier. - /// </summary> - /// <value>The ticket's unique identifier.</value> - [JsonPropertyName("ticketNumber")] - public string TicketNumber { get; set; } + /// <summary> + /// The ticket's unique identifier. + /// </summary> + /// <value>The ticket's unique identifier.</value> + [JsonPropertyName("ticketNumber")] + public string TicketNumber { get; set; } - /// <summary> - /// Reference number for the invoice, issued by the agency. - /// </summary> - /// <value>Reference number for the invoice, issued by the agency.</value> - [JsonPropertyName("agencyInvoiceNumber")] - public string AgencyInvoiceNumber { get; set; } - } + /// <summary> + /// Reference number for the invoice, issued by the agency. + /// </summary> + /// <value>Reference number for the invoice, issued by the agency.</value> + [JsonPropertyName("agencyInvoiceNumber")] + public string AgencyInvoiceNumber { get; set; } }
\ No newline at end of file diff --git a/src/IOL.VippsEcommerce/Models/Api/TCustomerInfo.cs b/src/IOL.VippsEcommerce/Models/Api/TCustomerInfo.cs index a558638..7978a19 100644 --- a/src/IOL.VippsEcommerce/Models/Api/TCustomerInfo.cs +++ b/src/IOL.VippsEcommerce/Models/Api/TCustomerInfo.cs @@ -1,14 +1,13 @@ using System.Text.Json.Serialization; -namespace IOL.VippsEcommerce.Models.Api +namespace IOL.VippsEcommerce.Models.Api; + +public class TCustomerInfo { - public class TCustomerInfo - { - /// <summary> - /// Mobile number of the user who has to pay for the transation from Vipps. Allowed format: xxxxxxxx. No country code. - /// </summary> - /// <value>Mobile number of the user who has to pay for the transation from Vipps. Allowed format: xxxxxxxx. No country code.</value> - [JsonPropertyName("mobileNumber")] - public string MobileNumber { get; set; } - } + /// <summary> + /// Mobile number of the user who has to pay for the transation from Vipps. Allowed format: xxxxxxxx. No country code. + /// </summary> + /// <value>Mobile number of the user who has to pay for the transation from Vipps. Allowed format: xxxxxxxx. No country code.</value> + [JsonPropertyName("mobileNumber")] + public string MobileNumber { get; set; } }
\ No newline at end of file diff --git a/src/IOL.VippsEcommerce/Models/Api/TMerchantInfo.cs b/src/IOL.VippsEcommerce/Models/Api/TMerchantInfo.cs index 881bc16..20b67b7 100644 --- a/src/IOL.VippsEcommerce/Models/Api/TMerchantInfo.cs +++ b/src/IOL.VippsEcommerce/Models/Api/TMerchantInfo.cs @@ -1,65 +1,64 @@ using System.Collections.Generic; using System.Text.Json.Serialization; -namespace IOL.VippsEcommerce.Models.Api +namespace IOL.VippsEcommerce.Models.Api; + +public class TMerchantInfo { - public class TMerchantInfo - { - /// <summary> - /// Authorization token that the merchant could share to make callbacks more secure. If provided this token will be returned as an `Authorization` header for our callbacks. This includes shipping details and callback. - /// </summary> - /// <value>Authorization token that the merchant could share to make callbacks more secure. If provided this token will be returned as an `Authorization` header for our callbacks. This includes shipping details and callback.</value> - //[JsonPropertyName("authToken")] - //public string AuthToken { get; set; } + /// <summary> + /// Authorization token that the merchant could share to make callbacks more secure. If provided this token will be returned as an `Authorization` header for our callbacks. This includes shipping details and callback. + /// </summary> + /// <value>Authorization token that the merchant could share to make callbacks more secure. If provided this token will be returned as an `Authorization` header for our callbacks. This includes shipping details and callback.</value> + //[JsonPropertyName("authToken")] + //public string AuthToken { get; set; } - /// <summary> - /// This is an URL for Vipps to call at the merchant's server to provide updated information about the order after the payment request. Domain name and context path should be provided by merchant as the value for this parameter. Vipps will add `/v2/payments/{orderId}` to the end or this URL. URLs passed to Vipps must validate with the Apache Commons [UrlValidator](https://commons.apache.org/proper/commons-validator/apidocs/org/apache/commons/validator/routines/UrlValidator.html). We don't send requests to all ports, so to be safe use common ports such as: 80, 443, 8080. - /// </summary> - /// <value>This is an URL for Vipps to call at the merchant's server to provide updated information about the order after the payment request. Domain name and context path should be provided by merchant as the value for this parameter. Vipps will add `/v2/payments/{orderId}` to the end or this URL. URLs passed to Vipps must validate with the Apache Commons [UrlValidator](https://commons.apache.org/proper/commons-validator/apidocs/org/apache/commons/validator/routines/UrlValidator.html). We don't send requests to all ports, so to be safe use common ports such as: 80, 443, 8080.</value> - [JsonPropertyName("callbackPrefix")] - public string CallbackPrefix { get; set; } + /// <summary> + /// This is an URL for Vipps to call at the merchant's server to provide updated information about the order after the payment request. Domain name and context path should be provided by merchant as the value for this parameter. Vipps will add `/v2/payments/{orderId}` to the end or this URL. URLs passed to Vipps must validate with the Apache Commons [UrlValidator](https://commons.apache.org/proper/commons-validator/apidocs/org/apache/commons/validator/routines/UrlValidator.html). We don't send requests to all ports, so to be safe use common ports such as: 80, 443, 8080. + /// </summary> + /// <value>This is an URL for Vipps to call at the merchant's server to provide updated information about the order after the payment request. Domain name and context path should be provided by merchant as the value for this parameter. Vipps will add `/v2/payments/{orderId}` to the end or this URL. URLs passed to Vipps must validate with the Apache Commons [UrlValidator](https://commons.apache.org/proper/commons-validator/apidocs/org/apache/commons/validator/routines/UrlValidator.html). We don't send requests to all ports, so to be safe use common ports such as: 80, 443, 8080.</value> + [JsonPropertyName("callbackPrefix")] + public string CallbackPrefix { get; set; } - /// <summary> - /// Required for Vipps Hurtigkasse (express checkout) payments. This callback URL will be used by Vipps to inform the merchant that the user has revoked his/her consent: This Vipps user does do not want the merchant to store or use his/her personal information anymore. Required by GDPR. Vipps will add `/v2/consents/{userId}` to the end or this URL. URLs passed to Vipps should be URL-encoded, and must validate with the Apache Commons [UrlValidator](https://commons.apache.org/proper/commons-validator/apidocs/org/apache/commons/validator/routines/UrlValidator.html). We don't send requests to all ports, so to be safe use common ports such as: 80, 443, 8080. - /// </summary> - /// <value>Required for Vipps Hurtigkasse (express checkout) payments. This callback URL will be used by Vipps to inform the merchant that the user has revoked his/her consent: This Vipps user does do not want the merchant to store or use his/her personal information anymore. Required by GDPR. Vipps will add `/v2/consents/{userId}` to the end or this URL. URLs passed to Vipps should be URL-encoded, and must validate with the Apache Commons [UrlValidator](https://commons.apache.org/proper/commons-validator/apidocs/org/apache/commons/validator/routines/UrlValidator.html). We don't send requests to all ports, so to be safe use common ports such as: 80, 443, 8080.</value> - //[JsonPropertyName("consentRemovalPrefix")] - //public string ConsentRemovalPrefix { get; set; } + /// <summary> + /// Required for Vipps Hurtigkasse (express checkout) payments. This callback URL will be used by Vipps to inform the merchant that the user has revoked his/her consent: This Vipps user does do not want the merchant to store or use his/her personal information anymore. Required by GDPR. Vipps will add `/v2/consents/{userId}` to the end or this URL. URLs passed to Vipps should be URL-encoded, and must validate with the Apache Commons [UrlValidator](https://commons.apache.org/proper/commons-validator/apidocs/org/apache/commons/validator/routines/UrlValidator.html). We don't send requests to all ports, so to be safe use common ports such as: 80, 443, 8080. + /// </summary> + /// <value>Required for Vipps Hurtigkasse (express checkout) payments. This callback URL will be used by Vipps to inform the merchant that the user has revoked his/her consent: This Vipps user does do not want the merchant to store or use his/her personal information anymore. Required by GDPR. Vipps will add `/v2/consents/{userId}` to the end or this URL. URLs passed to Vipps should be URL-encoded, and must validate with the Apache Commons [UrlValidator](https://commons.apache.org/proper/commons-validator/apidocs/org/apache/commons/validator/routines/UrlValidator.html). We don't send requests to all ports, so to be safe use common ports such as: 80, 443, 8080.</value> + //[JsonPropertyName("consentRemovalPrefix")] + //public string ConsentRemovalPrefix { get; set; } - /// <summary> - /// Vipps will use the fallBack URL to redirect the Vipps user to the merchant’s confirmation page once the payment is completed in Vipps. This is normally the “success page”, although the “fallback” name is ambiguous (the same URL is also used if payment was not successful). In other words: This is the URL Vipps sends the Vipps user back to. URLs passed to Vipps must validate with the Apache Commons [UrlValidator](https://commons.apache.org/proper/commons-validator/apidocs/org/apache/commons/validator/routines/UrlValidator.html). - /// </summary> - /// <value>Vipps will use the fallBack URL to redirect the Vipps user to the merchant’s confirmation page once the payment is completed in Vipps. This is normally the “success page”, although the “fallback” name is ambiguous (the same URL is also used if payment was not successful). In other words: This is the URL Vipps sends the Vipps user back to. URLs passed to Vipps must validate with the Apache Commons [UrlValidator](https://commons.apache.org/proper/commons-validator/apidocs/org/apache/commons/validator/routines/UrlValidator.html).</value> - [JsonPropertyName("fallBack")] - public string FallBack { get; set; } + /// <summary> + /// Vipps will use the fallBack URL to redirect the Vipps user to the merchant’s confirmation page once the payment is completed in Vipps. This is normally the “success page”, although the “fallback” name is ambiguous (the same URL is also used if payment was not successful). In other words: This is the URL Vipps sends the Vipps user back to. URLs passed to Vipps must validate with the Apache Commons [UrlValidator](https://commons.apache.org/proper/commons-validator/apidocs/org/apache/commons/validator/routines/UrlValidator.html). + /// </summary> + /// <value>Vipps will use the fallBack URL to redirect the Vipps user to the merchant’s confirmation page once the payment is completed in Vipps. This is normally the “success page”, although the “fallback” name is ambiguous (the same URL is also used if payment was not successful). In other words: This is the URL Vipps sends the Vipps user back to. URLs passed to Vipps must validate with the Apache Commons [UrlValidator](https://commons.apache.org/proper/commons-validator/apidocs/org/apache/commons/validator/routines/UrlValidator.html).</value> + [JsonPropertyName("fallBack")] + public string FallBack { get; set; } - /// <summary> - /// This parameter indicates whether payment request is triggered from Mobile App or Web browser. Based on this value, response will be redirect URL for Vipps landing page or deeplink URL to connect vipps App. When isApp is set to true, URLs passed to Vipps will not be validated as regular URLs. - /// </summary> - /// <value>This parameter indicates whether payment request is triggered from Mobile App or Web browser. Based on this value, response will be redirect URL for Vipps landing page or deeplink URL to connect vipps App. When isApp is set to true, URLs passed to Vipps will not be validated as regular URLs.</value> - [JsonPropertyName("isApp")] - public bool? IsApp { get; set; } + /// <summary> + /// This parameter indicates whether payment request is triggered from Mobile App or Web browser. Based on this value, response will be redirect URL for Vipps landing page or deeplink URL to connect vipps App. When isApp is set to true, URLs passed to Vipps will not be validated as regular URLs. + /// </summary> + /// <value>This parameter indicates whether payment request is triggered from Mobile App or Web browser. Based on this value, response will be redirect URL for Vipps landing page or deeplink URL to connect vipps App. When isApp is set to true, URLs passed to Vipps will not be validated as regular URLs.</value> + [JsonPropertyName("isApp")] + public bool? IsApp { get; set; } - /// <summary> - /// Unique id for this merchant's sales channel: website, mobile app etc. Short name: MSN. - /// </summary> - /// <value>Unique id for this merchant's sales channel: website, mobile app etc. Short name: MSN.</value> - [JsonPropertyName("merchantSerialNumber")] - public string MerchantSerialNumber { get; set; } + /// <summary> + /// Unique id for this merchant's sales channel: website, mobile app etc. Short name: MSN. + /// </summary> + /// <value>Unique id for this merchant's sales channel: website, mobile app etc. Short name: MSN.</value> + [JsonPropertyName("merchantSerialNumber")] + public string MerchantSerialNumber { get; set; } - /// <summary> - /// In case of Vipps Hurtigkasse (express checkout) payment, merchant should pass this prefix to let Vipps fetch shipping cost and method related details. Vipps will add `/v2/payments/{orderId}/shippingDetails` to the end or this URL. We don't send requests to all ports, so to be safe use common ports such as: 80, 443, 8080. - /// </summary> - /// <value>In case of Vipps Hurtigkasse (express checkout) payment, merchant should pass this prefix to let Vipps fetch shipping cost and method related details. Vipps will add `/v2/payments/{orderId}/shippingDetails` to the end or this URL. We don't send requests to all ports, so to be safe use common ports such as: 80, 443, 8080.</value> - [JsonPropertyName("shippingDetailsPrefix")] - public string ShippingDetailsPrefix { get; set; } + /// <summary> + /// In case of Vipps Hurtigkasse (express checkout) payment, merchant should pass this prefix to let Vipps fetch shipping cost and method related details. Vipps will add `/v2/payments/{orderId}/shippingDetails` to the end or this URL. We don't send requests to all ports, so to be safe use common ports such as: 80, 443, 8080. + /// </summary> + /// <value>In case of Vipps Hurtigkasse (express checkout) payment, merchant should pass this prefix to let Vipps fetch shipping cost and method related details. Vipps will add `/v2/payments/{orderId}/shippingDetails` to the end or this URL. We don't send requests to all ports, so to be safe use common ports such as: 80, 443, 8080.</value> + [JsonPropertyName("shippingDetailsPrefix")] + public string ShippingDetailsPrefix { get; set; } - /// <summary> - /// If shipping method and cost are always a fixed value, for example 50 NOK, then the method and price can be provided during the initiate call. The shippingDetailsPrefix callback will not be used if this value is provided. This will result in a faster checkout and a better customer experience. - /// </summary> - /// <value>If shipping method and cost are always a fixed value, for example 50 NOK, then the method and price can be provided during the initiate call. The shippingDetailsPrefix callback will not be used if this value is provided. This will result in a faster checkout and a better customer experience.</value> - [JsonPropertyName("staticShippingDetails")] - public List<TShippingDetails> StaticShippingDetails { get; set; } - } + /// <summary> + /// If shipping method and cost are always a fixed value, for example 50 NOK, then the method and price can be provided during the initiate call. The shippingDetailsPrefix callback will not be used if this value is provided. This will result in a faster checkout and a better customer experience. + /// </summary> + /// <value>If shipping method and cost are always a fixed value, for example 50 NOK, then the method and price can be provided during the initiate call. The shippingDetailsPrefix callback will not be used if this value is provided. This will result in a faster checkout and a better customer experience.</value> + [JsonPropertyName("staticShippingDetails")] + public List<TShippingDetails> StaticShippingDetails { get; set; } }
\ No newline at end of file diff --git a/src/IOL.VippsEcommerce/Models/Api/TMerchantInfoPayment.cs b/src/IOL.VippsEcommerce/Models/Api/TMerchantInfoPayment.cs index ce0cbc3..cb77121 100644 --- a/src/IOL.VippsEcommerce/Models/Api/TMerchantInfoPayment.cs +++ b/src/IOL.VippsEcommerce/Models/Api/TMerchantInfoPayment.cs @@ -1,15 +1,14 @@ using System.Text.Json.Serialization; -namespace IOL.VippsEcommerce.Models.Api +namespace IOL.VippsEcommerce.Models.Api; + +public class TMerchantInfoPayment { - public class TMerchantInfoPayment - { - /// <summary> - /// Unique id for this merchant's sales channel: website, mobile app etc. Short name: MSN. - /// </summary> - /// <value>Unique id for this merchant's sales channel: website, mobile app etc. Short name: MSN.</value> - [JsonPropertyName("merchantSerialNumber")] - public string MerchantSerialNumber { get; set; } - } + /// <summary> + /// Unique id for this merchant's sales channel: website, mobile app etc. Short name: MSN. + /// </summary> + /// <value>Unique id for this merchant's sales channel: website, mobile app etc. Short name: MSN.</value> + [JsonPropertyName("merchantSerialNumber")] + public string MerchantSerialNumber { get; set; } }
\ No newline at end of file diff --git a/src/IOL.VippsEcommerce/Models/Api/TShippingDetails.cs b/src/IOL.VippsEcommerce/Models/Api/TShippingDetails.cs index 72ac7f2..cc3f509 100644 --- a/src/IOL.VippsEcommerce/Models/Api/TShippingDetails.cs +++ b/src/IOL.VippsEcommerce/Models/Api/TShippingDetails.cs @@ -1,32 +1,31 @@ using System.Text.Json.Serialization; -namespace IOL.VippsEcommerce.Models.Api +namespace IOL.VippsEcommerce.Models.Api; + +public class TShippingDetails { - public class TShippingDetails - { - /// <summary> - /// Gets or Sets Priority - /// </summary> - [JsonPropertyName("priority")] - public int? Priority { get; set; } + /// <summary> + /// Gets or Sets Priority + /// </summary> + [JsonPropertyName("priority")] + public int? Priority { get; set; } - /// <summary> - /// Gets or Sets ShippingCost - /// </summary> - [JsonPropertyName("shippingCost")] - public double? ShippingCost { get; set; } + /// <summary> + /// Gets or Sets ShippingCost + /// </summary> + [JsonPropertyName("shippingCost")] + public double? ShippingCost { get; set; } - /// <summary> - /// Shipping method. Max length: 256 characters. Recommended length for readability on most screens: 25 characters. - /// </summary> - /// <value>Shipping method. Max length: 256 characters. Recommended length for readability on most screens: 25 characters.</value> - [JsonPropertyName("shippingMethod")] - public string ShippingMethod { get; set; } + /// <summary> + /// Shipping method. Max length: 256 characters. Recommended length for readability on most screens: 25 characters. + /// </summary> + /// <value>Shipping method. Max length: 256 characters. Recommended length for readability on most screens: 25 characters.</value> + [JsonPropertyName("shippingMethod")] + public string ShippingMethod { get; set; } - /// <summary> - /// Gets or Sets ShippingMethodId - /// </summary> - [JsonPropertyName("shippingMethodId")] - public string ShippingMethodId { get; set; } - } + /// <summary> + /// Gets or Sets ShippingMethodId + /// </summary> + [JsonPropertyName("shippingMethodId")] + public string ShippingMethodId { get; set; } }
\ No newline at end of file diff --git a/src/IOL.VippsEcommerce/Models/Api/TTransaction.cs b/src/IOL.VippsEcommerce/Models/Api/TTransaction.cs index 9e09758..ec56231 100644 --- a/src/IOL.VippsEcommerce/Models/Api/TTransaction.cs +++ b/src/IOL.VippsEcommerce/Models/Api/TTransaction.cs @@ -1,21 +1,20 @@ using System.Text.Json.Serialization; -namespace IOL.VippsEcommerce.Models.Api +namespace IOL.VippsEcommerce.Models.Api; + +public class TTransaction { - public class TTransaction - { - /// <summary> - /// Amount in øre, if amount is 0 or not provided then full capture will be performed. 32 Bit Integer (2147483647) - /// </summary> - /// <value>Amount in øre, if amount is 0 or not provided then full capture will be performed. 32 Bit Integer (2147483647)</value> - [JsonPropertyName("amount")] - public int? Amount { get; set; } + /// <summary> + /// Amount in øre, if amount is 0 or not provided then full capture will be performed. 32 Bit Integer (2147483647) + /// </summary> + /// <value>Amount in øre, if amount is 0 or not provided then full capture will be performed. 32 Bit Integer (2147483647)</value> + [JsonPropertyName("amount")] + public int? Amount { get; set; } - /// <summary> - /// Transaction text to be displayed in Vipps - /// </summary> - /// <value>Transaction text to be displayed in Vipps</value> - [JsonPropertyName("transactionText")] - public string TransactionText { get; set; } - } + /// <summary> + /// Transaction text to be displayed in Vipps + /// </summary> + /// <value>Transaction text to be displayed in Vipps</value> + [JsonPropertyName("transactionText")] + public string TransactionText { get; set; } }
\ No newline at end of file diff --git a/src/IOL.VippsEcommerce/Models/Api/TTransactionInfo.cs b/src/IOL.VippsEcommerce/Models/Api/TTransactionInfo.cs index 30e62f9..9374fe3 100644 --- a/src/IOL.VippsEcommerce/Models/Api/TTransactionInfo.cs +++ b/src/IOL.VippsEcommerce/Models/Api/TTransactionInfo.cs @@ -1,15 +1,14 @@ using System.Text.Json.Serialization; using IOL.VippsEcommerce.Models.Api; -namespace IOL.VippsEcommerce.Models.Api +namespace IOL.VippsEcommerce.Models.Api; + +public class TTransactionInfo { - public class TTransactionInfo - { - /// <summary> - /// Status which gives the current state of the payment within Vipps. See the [API guide](https://github.com/vippsas/vipps-ecom-api/blob/master/vipps-ecom-api.md#responses-from-requests) for more information. - /// </summary> - /// <value>Status which gives the current state of the payment within Vipps. See the [API guide](https://github.com/vippsas/vipps-ecom-api/blob/master/vipps-ecom-api.md#responses-from-requests) for more information.</value> - [JsonPropertyName("status")] - public EStatusEnum Status { get; set; } - } + /// <summary> + /// Status which gives the current state of the payment within Vipps. See the [API guide](https://github.com/vippsas/vipps-ecom-api/blob/master/vipps-ecom-api.md#responses-from-requests) for more information. + /// </summary> + /// <value>Status which gives the current state of the payment within Vipps. See the [API guide](https://github.com/vippsas/vipps-ecom-api/blob/master/vipps-ecom-api.md#responses-from-requests) for more information.</value> + [JsonPropertyName("status")] + public EStatusEnum Status { get; set; } }
\ No newline at end of file diff --git a/src/IOL.VippsEcommerce/Models/Api/TTransactionInfoInitiate.cs b/src/IOL.VippsEcommerce/Models/Api/TTransactionInfoInitiate.cs index 7ad989b..dc08630 100644 --- a/src/IOL.VippsEcommerce/Models/Api/TTransactionInfoInitiate.cs +++ b/src/IOL.VippsEcommerce/Models/Api/TTransactionInfoInitiate.cs @@ -1,57 +1,56 @@ using System; using System.Text.Json.Serialization; -namespace IOL.VippsEcommerce.Models.Api +namespace IOL.VippsEcommerce.Models.Api; + +public class TTransactionInfoInitiate { - public class TTransactionInfoInitiate - { - /// <summary> - /// Amount in øre. 32 bit Integer (2147483647). Must be non-zero. - /// </summary> - /// <value>Amount in øre. 32 bit Integer (2147483647). Must be non-zero.</value> - [JsonPropertyName("amount")] - public int? Amount { get; set; } + /// <summary> + /// Amount in øre. 32 bit Integer (2147483647). Must be non-zero. + /// </summary> + /// <value>Amount in øre. 32 bit Integer (2147483647). Must be non-zero.</value> + [JsonPropertyName("amount")] + public int? Amount { get; set; } - /// <summary> - /// Id which uniquely identifies a payment. Maximum length is 50 alphanumeric characters: a-z, A-Z, 0-9 and '-'. - /// </summary> - /// <value>Id which uniquely identifies a payment. Maximum length is 50 alphanumeric characters: a-z, A-Z, 0-9 and '-'.</value> - [JsonPropertyName("orderId")] - public string OrderId { get; set; } + /// <summary> + /// Id which uniquely identifies a payment. Maximum length is 50 alphanumeric characters: a-z, A-Z, 0-9 and '-'. + /// </summary> + /// <value>Id which uniquely identifies a payment. Maximum length is 50 alphanumeric characters: a-z, A-Z, 0-9 and '-'.</value> + [JsonPropertyName("orderId")] + public string OrderId { get; set; } - /// <summary> - /// ISO formatted date time string. - /// </summary> - /// <value>ISO formatted date time string.</value> - [JsonPropertyName("timeStamp")] - public string TimeStamp { get; set; } + /// <summary> + /// ISO formatted date time string. + /// </summary> + /// <value>ISO formatted date time string.</value> + [JsonPropertyName("timeStamp")] + public string TimeStamp { get; set; } - /// <summary> - /// Transaction text to be displayed in Vipps - /// </summary> - /// <value>Transaction text to be displayed in Vipps</value> - [JsonPropertyName("transactionText")] - public string TransactionText { get; set; } + /// <summary> + /// Transaction text to be displayed in Vipps + /// </summary> + /// <value>Transaction text to be displayed in Vipps</value> + [JsonPropertyName("transactionText")] + public string TransactionText { get; set; } - /// <summary> - /// Skips the landing page for whitelisted sale units. Requires a valid customerInfo.mobileNumber. - /// </summary> - /// <value>Skips the landing page for whitelisted sale units. Requires a valid customerInfo.mobileNumber.</value> - [JsonPropertyName("skipLandingPage")] - public bool? SkipLandingPage { get; set; } + /// <summary> + /// Skips the landing page for whitelisted sale units. Requires a valid customerInfo.mobileNumber. + /// </summary> + /// <value>Skips the landing page for whitelisted sale units. Requires a valid customerInfo.mobileNumber.</value> + [JsonPropertyName("skipLandingPage")] + public bool? SkipLandingPage { get; set; } - /// <summary> - /// Gets or Sets AdditionalData - /// </summary> - [JsonPropertyName("additionalData")] - public TAdditionalTransactionData AdditionalData { get; set; } + /// <summary> + /// Gets or Sets AdditionalData + /// </summary> + [JsonPropertyName("additionalData")] + public TAdditionalTransactionData AdditionalData { get; set; } - /// <summary> - /// Use the extended UX flow for express checkout which forces users to confirm their address and shipping choices - /// </summary> - /// <value>Use the extended UX flow for express checkout which forces users to confirm their address and shipping choices</value> - [JsonPropertyName("useExplicitCheckoutFlow")] - public bool? UseExplicitCheckoutFlow { get; set; } - } + /// <summary> + /// Use the extended UX flow for express checkout which forces users to confirm their address and shipping choices + /// </summary> + /// <value>Use the extended UX flow for express checkout which forces users to confirm their address and shipping choices</value> + [JsonPropertyName("useExplicitCheckoutFlow")] + public bool? UseExplicitCheckoutFlow { get; set; } }
\ No newline at end of file diff --git a/src/IOL.VippsEcommerce/Models/Api/TTransactionSummary.cs b/src/IOL.VippsEcommerce/Models/Api/TTransactionSummary.cs index 786bcaa..479c0dc 100644 --- a/src/IOL.VippsEcommerce/Models/Api/TTransactionSummary.cs +++ b/src/IOL.VippsEcommerce/Models/Api/TTransactionSummary.cs @@ -1,42 +1,41 @@ using System.Text.Json.Serialization; -namespace IOL.VippsEcommerce.Models.Api +namespace IOL.VippsEcommerce.Models.Api; + +public class TTransactionSummary { - public class TTransactionSummary - { - /// <summary> - /// Total amount captured - /// </summary> - /// <value>Total amount captured</value> - [JsonPropertyName("capturedAmount")] - public int? CapturedAmount { get; set; } + /// <summary> + /// Total amount captured + /// </summary> + /// <value>Total amount captured</value> + [JsonPropertyName("capturedAmount")] + public int? CapturedAmount { get; set; } - /// <summary> - /// Total refunded amount of the order - /// </summary> - /// <value>Total refunded amount of the order</value> - [JsonPropertyName("refundedAmount")] - public int? RefundedAmount { get; set; } + /// <summary> + /// Total refunded amount of the order + /// </summary> + /// <value>Total refunded amount of the order</value> + [JsonPropertyName("refundedAmount")] + public int? RefundedAmount { get; set; } - /// <summary> - /// Total remaining amount to capture - /// </summary> - /// <value>Total remaining amount to capture</value> - [JsonPropertyName("remainingAmountToCapture")] - public int? RemainingAmountToCapture { get; set; } + /// <summary> + /// Total remaining amount to capture + /// </summary> + /// <value>Total remaining amount to capture</value> + [JsonPropertyName("remainingAmountToCapture")] + public int? RemainingAmountToCapture { get; set; } - /// <summary> - /// Total remaining amount to refund - /// </summary> - /// <value>Total remaining amount to refund</value> - [JsonPropertyName("remainingAmountToRefund")] - public int? RemainingAmountToRefund { get; set; } + /// <summary> + /// Total remaining amount to refund + /// </summary> + /// <value>Total remaining amount to refund</value> + [JsonPropertyName("remainingAmountToRefund")] + public int? RemainingAmountToRefund { get; set; } - /// <summary> - /// Bank Identification Number, first 6 digit of card number - /// </summary> - /// <value>Bank Identification Number, first 6 digit of card number</value> - [JsonPropertyName("bankIdentificationNumber")] - public string BankIdentificationNumber { get; set; } - } + /// <summary> + /// Bank Identification Number, first 6 digit of card number + /// </summary> + /// <value>Bank Identification Number, first 6 digit of card number</value> + [JsonPropertyName("bankIdentificationNumber")] + public string BankIdentificationNumber { get; set; } }
\ No newline at end of file diff --git a/src/IOL.VippsEcommerce/Models/Api/VippsAuthorizationTokenResponse.cs b/src/IOL.VippsEcommerce/Models/Api/VippsAuthorizationTokenResponse.cs index b870ddb..44ab083 100644 --- a/src/IOL.VippsEcommerce/Models/Api/VippsAuthorizationTokenResponse.cs +++ b/src/IOL.VippsEcommerce/Models/Api/VippsAuthorizationTokenResponse.cs @@ -1,58 +1,57 @@ using System.Text.Json.Serialization; -namespace IOL.VippsEcommerce.Models.Api +namespace IOL.VippsEcommerce.Models.Api; + +/// <summary> +/// AuthorizationTokenResponse +/// </summary> +public class VippsAuthorizationTokenResponse { - /// <summary> - /// AuthorizationTokenResponse - /// </summary> - public class VippsAuthorizationTokenResponse - { - /// <summary> - /// String containing the type for the Access Token. - /// </summary> - /// <value>String containing the type for the Access Token.</value> - [JsonPropertyName("token_type")] - public string TokenType { get; set; } + /// <summary> + /// String containing the type for the Access Token. + /// </summary> + /// <value>String containing the type for the Access Token.</value> + [JsonPropertyName("token_type")] + public string TokenType { get; set; } - /// <summary> - /// Token expiry time in seconds. - /// </summary> - /// <value>Token expiry time in seconds.</value> - [JsonPropertyName("expires_in")] - public string ExpiresIn { get; set; } + /// <summary> + /// Token expiry time in seconds. + /// </summary> + /// <value>Token expiry time in seconds.</value> + [JsonPropertyName("expires_in")] + public string ExpiresIn { get; set; } - /// <summary> - /// Extra time added to expiry time. Currently disabled. - /// </summary> - /// <value>Extra time added to expiry time. Currently disabled.</value> - [JsonPropertyName("ext_expires_in")] - public string ExtExpiresIn { get; set; } + /// <summary> + /// Extra time added to expiry time. Currently disabled. + /// </summary> + /// <value>Extra time added to expiry time. Currently disabled.</value> + [JsonPropertyName("ext_expires_in")] + public string ExtExpiresIn { get; set; } - /// <summary> - /// Token expiry time in epoch time format. - /// </summary> - /// <value>Token expiry time in epoch time format.</value> - [JsonPropertyName("expires_on")] - public string ExpiresOn { get; set; } + /// <summary> + /// Token expiry time in epoch time format. + /// </summary> + /// <value>Token expiry time in epoch time format.</value> + [JsonPropertyName("expires_on")] + public string ExpiresOn { get; set; } - /// <summary> - /// Token creation time in epoch time format. - /// </summary> - /// <value>Token creation time in epoch time format.</value> - [JsonPropertyName("not_before")] - public string NotBefore { get; set; } + /// <summary> + /// Token creation time in epoch time format. + /// </summary> + /// <value>Token creation time in epoch time format.</value> + [JsonPropertyName("not_before")] + public string NotBefore { get; set; } - /// <summary> - /// A common resource object. Not used in token validation - /// </summary> - /// <value>A common resource object. Not used in token validation</value> - [JsonPropertyName("resource")] - public string Resource { get; set; } + /// <summary> + /// A common resource object. Not used in token validation + /// </summary> + /// <value>A common resource object. Not used in token validation</value> + [JsonPropertyName("resource")] + public string Resource { get; set; } - /// <summary> - /// Gets or Sets AccessToken - /// </summary> - [JsonPropertyName("access_token")] - public string AccessToken { get; set; } - } + /// <summary> + /// Gets or Sets AccessToken + /// </summary> + [JsonPropertyName("access_token")] + public string AccessToken { get; set; } }
\ No newline at end of file diff --git a/src/IOL.VippsEcommerce/Models/Api/VippsErrorResponse.cs b/src/IOL.VippsEcommerce/Models/Api/VippsErrorResponse.cs index 6471913..62753b8 100644 --- a/src/IOL.VippsEcommerce/Models/Api/VippsErrorResponse.cs +++ b/src/IOL.VippsEcommerce/Models/Api/VippsErrorResponse.cs @@ -1,39 +1,38 @@ using System.Text.Json.Serialization; -namespace IOL.VippsEcommerce.Models.Api +namespace IOL.VippsEcommerce.Models.Api; + +/// <summary> +/// VippsErrorResponse +/// </summary> +public class VippsErrorResponse { /// <summary> - /// VippsErrorResponse + /// The error group. See: https://github.com/vippsas/vipps-ecom-api/blob/master/vipps-ecom-api.md#error-groups /// </summary> - public class VippsErrorResponse - { - /// <summary> - /// The error group. See: https://github.com/vippsas/vipps-ecom-api/blob/master/vipps-ecom-api.md#error-groups - /// </summary> - /// <value>The error group. See: https://github.com/vippsas/vipps-ecom-api/blob/master/vipps-ecom-api.md#error-groups</value> - [JsonPropertyName("errorGroup")] - public EErrorGroupEnum ErrorGroup { get; } + /// <value>The error group. See: https://github.com/vippsas/vipps-ecom-api/blob/master/vipps-ecom-api.md#error-groups</value> + [JsonPropertyName("errorGroup")] + public EErrorGroupEnum ErrorGroup { get; } - /// <summary> - /// The error code. See: https://github.com/vippsas/vipps-ecom-api/blob/master/vipps-ecom-api.md#error-codes - /// </summary> - /// <value>The error code. See: https://github.com/vippsas/vipps-ecom-api/blob/master/vipps-ecom-api.md#error-codes</value> - [JsonPropertyName("errorCode")] - public string ErrorCode { get; } + /// <summary> + /// The error code. See: https://github.com/vippsas/vipps-ecom-api/blob/master/vipps-ecom-api.md#error-codes + /// </summary> + /// <value>The error code. See: https://github.com/vippsas/vipps-ecom-api/blob/master/vipps-ecom-api.md#error-codes</value> + [JsonPropertyName("errorCode")] + public string ErrorCode { get; } - /// <summary> - /// A description of what went wrong. See https://github.com/vippsas/vipps-ecom-api/blob/master/vipps-ecom-api.md#errors - /// </summary> - /// <value>A description of what went wrong. See https://github.com/vippsas/vipps-ecom-api/blob/master/vipps-ecom-api.md#errors</value> - [JsonPropertyName("errorMessage")] - public string ErrorMessage { get; } + /// <summary> + /// A description of what went wrong. See https://github.com/vippsas/vipps-ecom-api/blob/master/vipps-ecom-api.md#errors + /// </summary> + /// <value>A description of what went wrong. See https://github.com/vippsas/vipps-ecom-api/blob/master/vipps-ecom-api.md#errors</value> + [JsonPropertyName("errorMessage")] + public string ErrorMessage { get; } - /// <summary> - /// A unique id for this error, useful for searching in logs - /// </summary> - /// <value>A unique id for this error, useful for searching in logs</value> - [JsonPropertyName("contextId")] - public string ContextId { get; } - } + /// <summary> + /// A unique id for this error, useful for searching in logs + /// </summary> + /// <value>A unique id for this error, useful for searching in logs</value> + [JsonPropertyName("contextId")] + public string ContextId { get; } }
\ No newline at end of file diff --git a/src/IOL.VippsEcommerce/Models/Api/VippsForceApproveRequest.cs b/src/IOL.VippsEcommerce/Models/Api/VippsForceApproveRequest.cs index 6a539c2..2437427 100644 --- a/src/IOL.VippsEcommerce/Models/Api/VippsForceApproveRequest.cs +++ b/src/IOL.VippsEcommerce/Models/Api/VippsForceApproveRequest.cs @@ -1,21 +1,20 @@ using System.Text.Json.Serialization; -namespace IOL.VippsEcommerce.Models.Api +namespace IOL.VippsEcommerce.Models.Api; + +public class VippsForceApproveRequest { - public class VippsForceApproveRequest - { - /// <summary> - /// Target customer phone number. 8 digits. - /// </summary> - /// <value>Target customer phone number. 8 digits.</value> - [JsonPropertyName("customerPhoneNumber")] - public string CustomerPhoneNumber { get; set; } + /// <summary> + /// Target customer phone number. 8 digits. + /// </summary> + /// <value>Target customer phone number. 8 digits.</value> + [JsonPropertyName("customerPhoneNumber")] + public string CustomerPhoneNumber { get; set; } - /// <summary> - /// The token value recieved in the `url` property in the Initiate response - /// </summary> - /// <value>The token value recieved in the `url` property in the Initiate response</value> - [JsonPropertyName("token")] - public string Token { get; set; } - } + /// <summary> + /// The token value recieved in the `url` property in the Initiate response + /// </summary> + /// <value>The token value recieved in the `url` property in the Initiate response</value> + [JsonPropertyName("token")] + public string Token { get; set; } }
\ No newline at end of file diff --git a/src/IOL.VippsEcommerce/Models/Api/VippsGetPaymentDetailsResponse.cs b/src/IOL.VippsEcommerce/Models/Api/VippsGetPaymentDetailsResponse.cs index 844ac88..fe2849c 100644 --- a/src/IOL.VippsEcommerce/Models/Api/VippsGetPaymentDetailsResponse.cs +++ b/src/IOL.VippsEcommerce/Models/Api/VippsGetPaymentDetailsResponse.cs @@ -1,125 +1,124 @@ using System; using System.Text.Json.Serialization; -namespace IOL.VippsEcommerce.Models.Api +namespace IOL.VippsEcommerce.Models.Api; + +public class VippsGetPaymentDetailsResponse { - public class VippsGetPaymentDetailsResponse - { - [JsonPropertyName("orderId")] - public string OrderId { get; set; } + [JsonPropertyName("orderId")] + public string OrderId { get; set; } - [JsonPropertyName("shippingDetails")] - public ShippingDetails ShippingDetails { get; set; } + [JsonPropertyName("shippingDetails")] + public ShippingDetails ShippingDetails { get; set; } - [JsonPropertyName("transactionLogHistory")] - public TransactionLogHistory[] TransactionLogHistory { get; set; } + [JsonPropertyName("transactionLogHistory")] + public TransactionLogHistory[] TransactionLogHistory { get; set; } - [JsonPropertyName("transactionSummary")] - public TransactionSummary TransactionSummary { get; set; } + [JsonPropertyName("transactionSummary")] + public TransactionSummary TransactionSummary { get; set; } - [JsonPropertyName("userDetails")] - public UserDetails UserDetails { get; set; } - } + [JsonPropertyName("userDetails")] + public UserDetails UserDetails { get; set; } +} - public class ShippingDetails - { - [JsonPropertyName("address")] - public Address Address { get; set; } +public class ShippingDetails +{ + [JsonPropertyName("address")] + public Address Address { get; set; } - [JsonPropertyName("shippingCost")] - public long ShippingCost { get; set; } + [JsonPropertyName("shippingCost")] + public long ShippingCost { get; set; } - [JsonPropertyName("shippingMethod")] - public string ShippingMethod { get; set; } + [JsonPropertyName("shippingMethod")] + public string ShippingMethod { get; set; } - [JsonPropertyName("shippingMethodId")] - public string ShippingMethodId { get; set; } - } + [JsonPropertyName("shippingMethodId")] + public string ShippingMethodId { get; set; } +} - public class Address - { - [JsonPropertyName("addressLine1")] - public string AddressLine1 { get; set; } +public class Address +{ + [JsonPropertyName("addressLine1")] + public string AddressLine1 { get; set; } - [JsonPropertyName("addressLine2")] - public string AddressLine2 { get; set; } + [JsonPropertyName("addressLine2")] + public string AddressLine2 { get; set; } - [JsonPropertyName("city")] - public string City { get; set; } + [JsonPropertyName("city")] + public string City { get; set; } - [JsonPropertyName("country")] - public string Country { get; set; } + [JsonPropertyName("country")] + public string Country { get; set; } - [JsonPropertyName("postCode")] - public string PostCode { get; set; } - } + [JsonPropertyName("postCode")] + public string PostCode { get; set; } +} - public class TransactionLogHistory - { - [JsonPropertyName("amount")] - public long Amount { get; set; } +public class TransactionLogHistory +{ + [JsonPropertyName("amount")] + public long Amount { get; set; } - [JsonPropertyName("operation")] - public string Operation { get; set; } + [JsonPropertyName("operation")] + public string Operation { get; set; } - [JsonPropertyName("operationSuccess")] - public bool OperationSuccess { get; set; } + [JsonPropertyName("operationSuccess")] + public bool OperationSuccess { get; set; } - [JsonPropertyName("requestId")] - public string RequestId { get; set; } + [JsonPropertyName("requestId")] + public string RequestId { get; set; } - [JsonPropertyName("timeStamp")] - public DateTime TimeStamp { get; set; } + [JsonPropertyName("timeStamp")] + public DateTime TimeStamp { get; set; } - [JsonPropertyName("transactionId")] - public string TransactionId { get; set; } + [JsonPropertyName("transactionId")] + public string TransactionId { get; set; } - [JsonPropertyName("transactionText")] - public string TransactionText { get; set; } - } + [JsonPropertyName("transactionText")] + public string TransactionText { get; set; } +} - public class TransactionSummary - { - [JsonPropertyName("capturedAmount")] - public long CapturedAmount { get; set; } +public class TransactionSummary +{ + [JsonPropertyName("capturedAmount")] + public long CapturedAmount { get; set; } - [JsonPropertyName("refundedAmount")] - public long RefundedAmount { get; set; } + [JsonPropertyName("refundedAmount")] + public long RefundedAmount { get; set; } - [JsonPropertyName("remainingAmountToCapture")] - public long RemainingAmountToCapture { get; set; } + [JsonPropertyName("remainingAmountToCapture")] + public long RemainingAmountToCapture { get; set; } - [JsonPropertyName("remainingAmountToRefund")] - public long RemainingAmountToRefund { get; set; } + [JsonPropertyName("remainingAmountToRefund")] + public long RemainingAmountToRefund { get; set; } - [JsonPropertyName("bankIdentificationNumber")] - public long BankIdentificationNumber { get; set; } - } + [JsonPropertyName("bankIdentificationNumber")] + public long BankIdentificationNumber { get; set; } +} - public class UserDetails - { - [JsonPropertyName("bankIdVerified")] - public string BankIdVerified { get; set; } +public class UserDetails +{ + [JsonPropertyName("bankIdVerified")] + public string BankIdVerified { get; set; } - [JsonPropertyName("dateOfBirth")] - public string DateOfBirth { get; set; } + [JsonPropertyName("dateOfBirth")] + public string DateOfBirth { get; set; } - [JsonPropertyName("email")] - public string Email { get; set; } + [JsonPropertyName("email")] + public string Email { get; set; } - [JsonPropertyName("firstName")] - public string FirstName { get; set; } + [JsonPropertyName("firstName")] + public string FirstName { get; set; } - [JsonPropertyName("lastName")] - public string LastName { get; set; } + [JsonPropertyName("lastName")] + public string LastName { get; set; } - [JsonPropertyName("mobileNumber")] - public long MobileNumber { get; set; } + [JsonPropertyName("mobileNumber")] + public long MobileNumber { get; set; } - [JsonPropertyName("ssn")] - public string Ssn { get; set; } + [JsonPropertyName("ssn")] + public string Ssn { get; set; } - [JsonPropertyName("userId")] - public string UserId { get; set; } - } + [JsonPropertyName("userId")] + public string UserId { get; set; } }
\ No newline at end of file diff --git a/src/IOL.VippsEcommerce/Models/Api/VippsInitiatePaymentRequest.cs b/src/IOL.VippsEcommerce/Models/Api/VippsInitiatePaymentRequest.cs index 2e8a040..1763e4d 100644 --- a/src/IOL.VippsEcommerce/Models/Api/VippsInitiatePaymentRequest.cs +++ b/src/IOL.VippsEcommerce/Models/Api/VippsInitiatePaymentRequest.cs @@ -1,27 +1,26 @@ using System.Text.Json.Serialization; -namespace IOL.VippsEcommerce.Models.Api +namespace IOL.VippsEcommerce.Models.Api; + +public class VippsInitiatePaymentRequest { - public class VippsInitiatePaymentRequest - { - /// <summary> - /// Gets or Sets CustomerInfo - /// </summary> - [JsonPropertyName("customerInfo")] - public TCustomerInfo CustomerInfo { get; set; } + /// <summary> + /// Gets or Sets CustomerInfo + /// </summary> + [JsonPropertyName("customerInfo")] + public TCustomerInfo CustomerInfo { get; set; } - /// <summary> - /// Gets or Sets MerchantInfo - /// </summary> - /// - [JsonPropertyName("merchantInfo")] - public TMerchantInfo MerchantInfo { get; set; } + /// <summary> + /// Gets or Sets MerchantInfo + /// </summary> + /// + [JsonPropertyName("merchantInfo")] + public TMerchantInfo MerchantInfo { get; set; } - /// <summary> - /// Gets or Sets Transaction - /// </summary> - [JsonPropertyName("transaction")] - public TTransactionInfoInitiate Transaction { get; set; } + /// <summary> + /// Gets or Sets Transaction + /// </summary> + [JsonPropertyName("transaction")] + public TTransactionInfoInitiate Transaction { get; set; } - } }
\ No newline at end of file diff --git a/src/IOL.VippsEcommerce/Models/Api/VippsInitiatePaymentResponse.cs b/src/IOL.VippsEcommerce/Models/Api/VippsInitiatePaymentResponse.cs index 471133a..93f7f3f 100644 --- a/src/IOL.VippsEcommerce/Models/Api/VippsInitiatePaymentResponse.cs +++ b/src/IOL.VippsEcommerce/Models/Api/VippsInitiatePaymentResponse.cs @@ -1,21 +1,20 @@ using System.Text.Json.Serialization; -namespace IOL.VippsEcommerce.Models.Api +namespace IOL.VippsEcommerce.Models.Api; + +public class VippsInitiatePaymentResponse { - public class VippsInitiatePaymentResponse - { - /// <summary> - /// Id which uniquely identifies a payment. Maximum length is 50 alphanumeric characters: a-z, A-Z, 0-9 and '-'. - /// </summary> - /// <value>Id which uniquely identifies a payment. Maximum length is 50 alphanumeric characters: a-z, A-Z, 0-9 and '-'.</value> - [JsonPropertyName("orderId")] - public string OrderId { get; set; } + /// <summary> + /// Id which uniquely identifies a payment. Maximum length is 50 alphanumeric characters: a-z, A-Z, 0-9 and '-'. + /// </summary> + /// <value>Id which uniquely identifies a payment. Maximum length is 50 alphanumeric characters: a-z, A-Z, 0-9 and '-'.</value> + [JsonPropertyName("orderId")] + public string OrderId { get; set; } - /// <summary> - /// URL to redirect the user to Vipps landing page or a deeplink URL to open Vipps app, if `isApp` was set as true. The landing page will also redirect a user to the app if the user is using a mobile browser. This link will timeout after 5 minutes. This example is a shortened deeplink URL. The URL received fromn Vipps should not be changed, and the format may change without notice. - /// </summary> - /// <value>URL to redirect the user to Vipps landing page or a deeplink URL to open Vipps app, if `isApp` was set as true. The landing page will also redirect a user to the app if the user is using a mobile browser. This link will timeout after 5 minutes. This example is a shortened deeplink URL. The URL received fromn Vipps should not be changed, and the format may change without notice.</value> - [JsonPropertyName("url")] - public string Url { get; set; } - } + /// <summary> + /// URL to redirect the user to Vipps landing page or a deeplink URL to open Vipps app, if `isApp` was set as true. The landing page will also redirect a user to the app if the user is using a mobile browser. This link will timeout after 5 minutes. This example is a shortened deeplink URL. The URL received fromn Vipps should not be changed, and the format may change without notice. + /// </summary> + /// <value>URL to redirect the user to Vipps landing page or a deeplink URL to open Vipps app, if `isApp` was set as true. The landing page will also redirect a user to the app if the user is using a mobile browser. This link will timeout after 5 minutes. This example is a shortened deeplink URL. The URL received fromn Vipps should not be changed, and the format may change without notice.</value> + [JsonPropertyName("url")] + public string Url { get; set; } }
\ No newline at end of file diff --git a/src/IOL.VippsEcommerce/Models/Api/VippsPaymentActionRequest.cs b/src/IOL.VippsEcommerce/Models/Api/VippsPaymentActionRequest.cs index f336bce..303bd67 100644 --- a/src/IOL.VippsEcommerce/Models/Api/VippsPaymentActionRequest.cs +++ b/src/IOL.VippsEcommerce/Models/Api/VippsPaymentActionRequest.cs @@ -1,19 +1,18 @@ using System.Text.Json.Serialization; -namespace IOL.VippsEcommerce.Models.Api +namespace IOL.VippsEcommerce.Models.Api; + +public class VippsPaymentActionRequest { - public class VippsPaymentActionRequest - { - /// <summary> - /// Gets or Sets MerchantInfo - /// </summary> - [JsonPropertyName("merchantInfo")] - public TMerchantInfoPayment MerchantInfo { get; set; } + /// <summary> + /// Gets or Sets MerchantInfo + /// </summary> + [JsonPropertyName("merchantInfo")] + public TMerchantInfoPayment MerchantInfo { get; set; } - /// <summary> - /// Gets or Sets Transaction - /// </summary> - [JsonPropertyName("transaction")] - public TTransaction Transaction { get; set; } - } + /// <summary> + /// Gets or Sets Transaction + /// </summary> + [JsonPropertyName("transaction")] + public TTransaction Transaction { get; set; } }
\ No newline at end of file diff --git a/src/IOL.VippsEcommerce/Models/Api/VippsPaymentActionResponse.cs b/src/IOL.VippsEcommerce/Models/Api/VippsPaymentActionResponse.cs index 90b4389..7f4f6f7 100644 --- a/src/IOL.VippsEcommerce/Models/Api/VippsPaymentActionResponse.cs +++ b/src/IOL.VippsEcommerce/Models/Api/VippsPaymentActionResponse.cs @@ -1,34 +1,33 @@ using System.Text.Json.Serialization; -namespace IOL.VippsEcommerce.Models.Api +namespace IOL.VippsEcommerce.Models.Api; + +public class VippsPaymentActionResponse { - public class VippsPaymentActionResponse - { - /// <summary> - /// Text which describes what instrument was used to complete the payment. Not included until a user has chosen and approved in the app. - /// </summary> - /// <value>Text which describes what instrument was used to complete the payment. Not included until a user has chosen and approved in the app.</value> - [JsonPropertyName("paymentInstrument")] - public string PaymentInstrument { get; set; } + /// <summary> + /// Text which describes what instrument was used to complete the payment. Not included until a user has chosen and approved in the app. + /// </summary> + /// <value>Text which describes what instrument was used to complete the payment. Not included until a user has chosen and approved in the app.</value> + [JsonPropertyName("paymentInstrument")] + public string PaymentInstrument { get; set; } - /// <summary> - /// Id which uniquely identifies a payment. Maximum length is 50 alphanumeric characters: a-z, A-Z, 0-9 and '-'. - /// </summary> - /// <value>Id which uniquely identifies a payment. Maximum length is 50 alphanumeric characters: a-z, A-Z, 0-9 and '-'.</value> - [JsonPropertyName("orderId")] - public string OrderId { get; set; } + /// <summary> + /// Id which uniquely identifies a payment. Maximum length is 50 alphanumeric characters: a-z, A-Z, 0-9 and '-'. + /// </summary> + /// <value>Id which uniquely identifies a payment. Maximum length is 50 alphanumeric characters: a-z, A-Z, 0-9 and '-'.</value> + [JsonPropertyName("orderId")] + public string OrderId { get; set; } - /// <summary> - /// Gets or Sets TransactionInfo - /// </summary> - [JsonPropertyName("transactionInfo")] - public TTransactionInfo TransactionInfo { get; set; } + /// <summary> + /// Gets or Sets TransactionInfo + /// </summary> + [JsonPropertyName("transactionInfo")] + public TTransactionInfo TransactionInfo { get; set; } - /// <summary> - /// Gets or Sets TransactionSummary - /// </summary> - [JsonPropertyName("transactionSummary")] - public TTransactionSummary TransactionSummary { get; set; } + /// <summary> + /// Gets or Sets TransactionSummary + /// </summary> + [JsonPropertyName("transactionSummary")] + public TTransactionSummary TransactionSummary { get; set; } - } }
\ No newline at end of file diff --git a/src/IOL.VippsEcommerce/Models/Api/VippsPaymentInitiationCallbackResponse.cs b/src/IOL.VippsEcommerce/Models/Api/VippsPaymentInitiationCallbackResponse.cs index 3b02536..749dd66 100644 --- a/src/IOL.VippsEcommerce/Models/Api/VippsPaymentInitiationCallbackResponse.cs +++ b/src/IOL.VippsEcommerce/Models/Api/VippsPaymentInitiationCallbackResponse.cs @@ -1,119 +1,118 @@ using System; using System.Text.Json.Serialization; -namespace IOL.VippsEcommerce.Models.Api +namespace IOL.VippsEcommerce.Models.Api; + +public class VippsPaymentInitiationCallbackResponse { - public class VippsPaymentInitiationCallbackResponse - { - [JsonPropertyName("merchantSerialNumber")] - public string MerchantSerialNumber { get; set; } + [JsonPropertyName("merchantSerialNumber")] + public string MerchantSerialNumber { get; set; } - [JsonPropertyName("orderId")] - public string OrderId { get; set; } + [JsonPropertyName("orderId")] + public string OrderId { get; set; } - // [JsonPropertyName("shippingDetails")] - // public TShippingDetails? ShippingDetails { get; set; } + // [JsonPropertyName("shippingDetails")] + // public TShippingDetails? ShippingDetails { get; set; } - [JsonPropertyName("transactionInfo")] - public TTransactionInfo TransactionInfo { get; set; } + [JsonPropertyName("transactionInfo")] + public TTransactionInfo TransactionInfo { get; set; } - // [JsonPropertyName("userDetails")] - // public UserDetails? UserDetails { get; set; } - // - // [JsonPropertyName("errorInfo")] - // public TErrorInfo? ErrorInfo { get; set; } + // [JsonPropertyName("userDetails")] + // public UserDetails? UserDetails { get; set; } + // + // [JsonPropertyName("errorInfo")] + // public TErrorInfo? ErrorInfo { get; set; } - public class TErrorInfo - { - [JsonPropertyName("errorGroup")] - public string ErrorGroup { get; set; } + public class TErrorInfo + { + [JsonPropertyName("errorGroup")] + public string ErrorGroup { get; set; } - [JsonPropertyName("errorCode")] - public string ErrorCode { get; set; } + [JsonPropertyName("errorCode")] + public string ErrorCode { get; set; } - [JsonPropertyName("errorMessage")] - public string ErrorMessage { get; set; } + [JsonPropertyName("errorMessage")] + public string ErrorMessage { get; set; } - [JsonPropertyName("contextId")] - public Guid ContextId { get; set; } - } + [JsonPropertyName("contextId")] + public Guid ContextId { get; set; } + } - public class TShippingDetails - { - [JsonPropertyName("address")] - public TAddress Address { get; set; } + public class TShippingDetails + { + [JsonPropertyName("address")] + public TAddress Address { get; set; } - [JsonPropertyName("shippingCost")] - public int ShippingCost { get; set; } + [JsonPropertyName("shippingCost")] + public int ShippingCost { get; set; } - [JsonPropertyName("shippingMethod")] - public string ShippingMethod { get; set; } + [JsonPropertyName("shippingMethod")] + public string ShippingMethod { get; set; } - [JsonPropertyName("shippingMethodId")] - public string ShippingMethodId { get; set; } - } + [JsonPropertyName("shippingMethodId")] + public string ShippingMethodId { get; set; } + } - public class TAddress - { - [JsonPropertyName("addressLine1")] - public string AddressLine1 { get; set; } + public class TAddress + { + [JsonPropertyName("addressLine1")] + public string AddressLine1 { get; set; } - [JsonPropertyName("addressLine2")] - public string AddressLine2 { get; set; } + [JsonPropertyName("addressLine2")] + public string AddressLine2 { get; set; } - [JsonPropertyName("city")] - public string City { get; set; } + [JsonPropertyName("city")] + public string City { get; set; } - [JsonPropertyName("country")] - public string Country { get; set; } + [JsonPropertyName("country")] + public string Country { get; set; } - [JsonPropertyName("zipCode")] - public string ZipCode { get; set; } - } + [JsonPropertyName("zipCode")] + public string ZipCode { get; set; } + } - public class TTransactionInfo - { - [JsonPropertyName("amount")] - public int Amount { get; set; } + public class TTransactionInfo + { + [JsonPropertyName("amount")] + public int Amount { get; set; } - [JsonPropertyName("status")] - public string Status { get; set; } + [JsonPropertyName("status")] + public string Status { get; set; } - public ETransactionStatus StatusEnum() => Enum.Parse<ETransactionStatus>(Status); + public ETransactionStatus StatusEnum() => Enum.Parse<ETransactionStatus>(Status); - [JsonPropertyName("timeStamp")] - public DateTime TimeStamp { get; set; } + [JsonPropertyName("timeStamp")] + public DateTime TimeStamp { get; set; } - [JsonPropertyName("transactionId")] - public string TransactionId { get; set; } - } + [JsonPropertyName("transactionId")] + public string TransactionId { get; set; } + } - public class TUserDetails - { - [JsonPropertyName("bankIdVerified")] - public string BankIdVerified { get; set; } + public class TUserDetails + { + [JsonPropertyName("bankIdVerified")] + public string BankIdVerified { get; set; } - [JsonPropertyName("dateOfBirth")] - public string DateOfBirth { get; set; } + [JsonPropertyName("dateOfBirth")] + public string DateOfBirth { get; set; } - [JsonPropertyName("email")] - public string Email { get; set; } + [JsonPropertyName("email")] + public string Email { get; set; } - [JsonPropertyName("firstName")] - public string FirstName { get; set; } + [JsonPropertyName("firstName")] + public string FirstName { get; set; } - [JsonPropertyName("lastName")] - public string LastName { get; set; } + [JsonPropertyName("lastName")] + public string LastName { get; set; } - [JsonPropertyName("mobileNumber")] - public string MobileNumber { get; set; } + [JsonPropertyName("mobileNumber")] + public string MobileNumber { get; set; } - [JsonPropertyName("ssn")] - public string Ssn { get; set; } + [JsonPropertyName("ssn")] + public string Ssn { get; set; } - [JsonPropertyName("userId")] - public string UserId { get; set; } - } - } + [JsonPropertyName("userId")] + public string UserId { get; set; } + } }
\ No newline at end of file diff --git a/src/IOL.VippsEcommerce/Models/Api/VippsRequestException.cs b/src/IOL.VippsEcommerce/Models/Api/VippsRequestException.cs index f456131..4caab3a 100644 --- a/src/IOL.VippsEcommerce/Models/Api/VippsRequestException.cs +++ b/src/IOL.VippsEcommerce/Models/Api/VippsRequestException.cs @@ -1,19 +1,18 @@ #nullable enable using System; -namespace IOL.VippsEcommerce.Models.Api +namespace IOL.VippsEcommerce.Models.Api; + +[Serializable] +public class VippsRequestException : Exception { - [Serializable] - public class VippsRequestException : Exception - { - public VippsRequestException() { } + public VippsRequestException() { } - public VippsRequestException(string message) + public VippsRequestException(string message) : base(message) { } - public VippsRequestException(string message, Exception inner) + public VippsRequestException(string message, Exception inner) : base(message, inner) { } - public VippsErrorResponse? ErrorResponse { get; set; } - } + public VippsErrorResponse? ErrorResponse { get; set; } }
\ No newline at end of file |
