mirror of
https://git.oceanpay.cc/danial/kami_itunes_june.git
synced 2025-12-18 22:31:24 +00:00
165 lines
3.1 KiB
C#
165 lines
3.1 KiB
C#
using System.Text.RegularExpressions;
|
|
|
|
namespace AppleBatch_June.Model
|
|
{
|
|
internal class PurchasesItems
|
|
{
|
|
public class Data
|
|
{
|
|
public string id { get; set; }
|
|
|
|
public string type { get; set; }
|
|
|
|
public Attributes attributes { get; set; }
|
|
}
|
|
|
|
public class Attributes
|
|
{
|
|
public bool disabledstorefront { get; set; }
|
|
|
|
public object[] alerts { get; set; }
|
|
|
|
public Purchase[] purchases { get; set; }
|
|
|
|
public Range range { get; set; }
|
|
|
|
public int storefrontid { get; set; }
|
|
|
|
public bool iscomplete { get; set; }
|
|
|
|
public bool canpaywithstorecreditenabled { get; set; }
|
|
|
|
public string paginationtoken { get; set; }
|
|
}
|
|
|
|
public class Range
|
|
{
|
|
public string start { get; set; }
|
|
|
|
public string displayablerange { get; set; }
|
|
}
|
|
|
|
public class Purchase
|
|
{
|
|
private static string pattern = "(\\p{Sc})?";
|
|
|
|
private Regex rgx = new Regex(pattern);
|
|
|
|
private string _total;
|
|
|
|
public BilledTo billedto { get; set; }
|
|
|
|
public long id { get; set; }
|
|
|
|
public string invoicedate { get; set; }
|
|
|
|
public Item[] items { get; set; }
|
|
|
|
public string orderid { get; set; }
|
|
|
|
public bool pending { get; set; }
|
|
|
|
public string subtotal { get; set; }
|
|
|
|
public string tax { get; set; }
|
|
|
|
public decimal money { get; set; }
|
|
|
|
public string total
|
|
{
|
|
get
|
|
{
|
|
return _total;
|
|
}
|
|
set
|
|
{
|
|
_total = value;
|
|
if (decimal.TryParse(rgx.Replace(value, ""), out var result))
|
|
{
|
|
money = result;
|
|
}
|
|
}
|
|
}
|
|
|
|
public bool fromemailinvoice { get; set; }
|
|
|
|
public bool ischargeback { get; set; }
|
|
|
|
public bool showtax { get; set; }
|
|
|
|
public bool showsubtotal { get; set; }
|
|
|
|
public bool canbeclearedwithstorecredit { get; set; }
|
|
}
|
|
|
|
public class BilledTo
|
|
{
|
|
public Address address { get; set; }
|
|
|
|
public string email { get; set; }
|
|
|
|
public bool isvat { get; set; }
|
|
|
|
public string receiptlabel { get; set; }
|
|
}
|
|
|
|
public class Address
|
|
{
|
|
public string addressOfficialCity { get; set; }
|
|
|
|
public string addressOfficialCountryCode { get; set; }
|
|
|
|
public string addressOfficialStateProvince { get; set; }
|
|
|
|
public string addressOfficialLineFirst { get; set; }
|
|
|
|
public string addressOfficialLineSecond { get; set; }
|
|
|
|
public string addressOfficialPostalCode { get; set; }
|
|
|
|
public string billingFirstName { get; set; }
|
|
|
|
public string billingLastName { get; set; }
|
|
}
|
|
|
|
public class Item
|
|
{
|
|
public string kind { get; set; }
|
|
|
|
public string displayablekind { get; set; }
|
|
|
|
public string artistname { get; set; }
|
|
|
|
public string itemid { get; set; }
|
|
|
|
public string itemname { get; set; }
|
|
|
|
public string itemurl { get; set; }
|
|
|
|
public string seller { get; set; }
|
|
|
|
public string artworktemplateurl { get; set; }
|
|
|
|
public int artworkheight { get; set; }
|
|
|
|
public int artworkwidth { get; set; }
|
|
|
|
public bool issubscription { get; set; }
|
|
|
|
public string price { get; set; }
|
|
|
|
public bool partiallyrefunded { get; set; }
|
|
|
|
public bool refunded { get; set; }
|
|
|
|
public string purchasedate { get; set; }
|
|
|
|
public bool isgiftitem { get; set; }
|
|
|
|
public string itemtitle { get; set; }
|
|
}
|
|
|
|
public Data data { get; set; }
|
|
}
|
|
}
|