2019-09-16 09:22:22 -04:00
|
|
|
|
using System;
|
2019-09-16 16:23:07 -04:00
|
|
|
|
using System.Collections.Generic;
|
2019-09-16 09:22:22 -04:00
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Bit.Billing.Models
|
|
|
|
|
|
{
|
|
|
|
|
|
public class AppleReceiptStatus
|
|
|
|
|
|
{
|
|
|
|
|
|
[JsonProperty("status")]
|
|
|
|
|
|
public int? Status { get; set; }
|
2019-09-16 16:23:07 -04:00
|
|
|
|
[JsonProperty("environment")]
|
|
|
|
|
|
public string Environment { get; set; }
|
2019-09-16 09:22:22 -04:00
|
|
|
|
[JsonProperty("latest_receipt")]
|
|
|
|
|
|
public string LatestReceipt { get; set; }
|
|
|
|
|
|
[JsonProperty("receipt")]
|
|
|
|
|
|
public AppleReceipt Receipt { get; set; }
|
|
|
|
|
|
[JsonProperty("latest_receipt_info")]
|
2019-09-16 16:23:07 -04:00
|
|
|
|
public List<AppleTransaction> LatestReceiptInfo { get; set; }
|
|
|
|
|
|
/*
|
2019-09-16 09:22:22 -04:00
|
|
|
|
[JsonProperty("latest_expired_receipt_info")]
|
|
|
|
|
|
public AppleReceipt LatestExpiredReceiptInfo { get; set; }
|
|
|
|
|
|
[JsonProperty("auto_renew_status")]
|
|
|
|
|
|
public string AutoRenewStatus { get; set; }
|
|
|
|
|
|
[JsonProperty("auto_renew_product_id")]
|
|
|
|
|
|
public string AutoRenewProductId { get; set; }
|
|
|
|
|
|
[JsonProperty("notification_type")]
|
|
|
|
|
|
public string NotificationType { get; set; }
|
|
|
|
|
|
[JsonProperty("expiration_intent")]
|
|
|
|
|
|
public string ExpirationIntent { get; set; }
|
|
|
|
|
|
[JsonProperty("is_in_billing_retry_period")]
|
|
|
|
|
|
public string IsInBillingRetryPeriod { get; set; }
|
2019-09-16 16:23:07 -04:00
|
|
|
|
*/
|
2019-09-16 09:22:22 -04:00
|
|
|
|
|
|
|
|
|
|
public class AppleReceipt
|
|
|
|
|
|
{
|
2019-09-16 16:23:07 -04:00
|
|
|
|
[JsonProperty("receipt_type")]
|
|
|
|
|
|
public string ReceiptType { get; set; }
|
|
|
|
|
|
[JsonProperty("bundle_id")]
|
|
|
|
|
|
public string BundleId { get; set; }
|
|
|
|
|
|
[JsonProperty("receipt_creation_date")]
|
|
|
|
|
|
public DateTime ReceiptCreationDate { get; set; }
|
|
|
|
|
|
[JsonProperty("in_app")]
|
|
|
|
|
|
public List<AppleTransaction> InApp { get; set; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class AppleTransaction
|
|
|
|
|
|
{
|
|
|
|
|
|
[JsonProperty("quantity")]
|
|
|
|
|
|
public string Quantity { get; set; }
|
|
|
|
|
|
[JsonProperty("product_id")]
|
|
|
|
|
|
public string ProductId { get; set; }
|
|
|
|
|
|
[JsonProperty("transaction_id")]
|
|
|
|
|
|
public string TransactionId { get; set; }
|
|
|
|
|
|
[JsonProperty("original_transaction_id")]
|
|
|
|
|
|
public string OriginalTransactionId { get; set; }
|
2019-09-16 09:22:22 -04:00
|
|
|
|
[JsonProperty("purchase_date")]
|
|
|
|
|
|
public DateTime PurchaseDate { get; set; }
|
|
|
|
|
|
[JsonProperty("original_purchase_date")]
|
|
|
|
|
|
public DateTime OriginalPurchaseDate { get; set; }
|
2019-09-16 16:23:07 -04:00
|
|
|
|
[JsonProperty("expires_date")]
|
2019-09-16 09:22:22 -04:00
|
|
|
|
public DateTime ExpiresDate { get; set; }
|
|
|
|
|
|
[JsonProperty("web_order_line_item_id")]
|
|
|
|
|
|
public string WebOrderLineItemId { get; set; }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|