btcpayserver/BTCPayServer/Plugins/Shopify/Models/ShopifySettings.cs
Andrew Camilleri 5de93f8cc4
Abstract Store integrations (#2384)
* Decouple Shopify from Store

* Decouple shopify from store blob

* Update BTCPayServer.Tests.csproj

* Make sure shopify obj is set

* make shopify a system plugin
2021-04-08 13:37:05 +09:00

32 lines
878 B
C#

using System;
using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json;
namespace BTCPayServer.Plugins.Shopify.Models
{
public class ShopifySettings
{
[Display(Name = "Shop Name")]
public string ShopName { get; set; }
public string ApiKey { get; set; }
public string Password { get; set; }
public bool CredentialsPopulated()
{
return
!string.IsNullOrWhiteSpace(ShopName) &&
!string.IsNullOrWhiteSpace(ApiKey) &&
!string.IsNullOrWhiteSpace(Password);
}
public DateTimeOffset? IntegratedAt { get; set; }
[JsonIgnore]
public string ShopifyUrl
{
get
{
return ShopName?.Contains(".") is true ? $"https://{ShopName}.myshopify.com" : ShopName;
}
}
}
}