|
| 1 | +namespace Stripe |
| 2 | +{ |
| 3 | + using System; |
| 4 | + using System.Collections.Generic; |
| 5 | + using Newtonsoft.Json; |
| 6 | + using Stripe.Infrastructure; |
| 7 | + |
| 8 | + public class PaymentIntent : StripeEntityWithId, ISupportMetadata |
| 9 | + { |
| 10 | + [JsonProperty("object")] |
| 11 | + public string Object { get; set; } |
| 12 | + |
| 13 | + [JsonProperty("allowed_source_types")] |
| 14 | + public List<string> AllowedSourceTypes { get; set; } |
| 15 | + |
| 16 | + [JsonProperty("amount")] |
| 17 | + public int? Amount { get; set; } |
| 18 | + |
| 19 | + [JsonProperty("amount_capturable")] |
| 20 | + public int? AmountCapturable { get; set; } |
| 21 | + |
| 22 | + [JsonProperty("amount_received")] |
| 23 | + public int? AmountReceived { get; set; } |
| 24 | + |
| 25 | + #region Expandable Application |
| 26 | + public string ApplicationId { get; set; } |
| 27 | + |
| 28 | + [JsonIgnore] |
| 29 | + public StripeApplication Application { get; set; } |
| 30 | + |
| 31 | + [JsonProperty("application")] |
| 32 | + internal object InternalApplication |
| 33 | + { |
| 34 | + set |
| 35 | + { |
| 36 | + StringOrObject<StripeApplication>.Map(value, s => this.ApplicationId = s, o => this.Application = o); |
| 37 | + } |
| 38 | + } |
| 39 | + #endregion |
| 40 | + |
| 41 | + [JsonProperty("application_fee_amount")] |
| 42 | + public int? ApplicationFeeAmount { get; set; } |
| 43 | + |
| 44 | + [JsonProperty("canceled_at")] |
| 45 | + [JsonConverter(typeof(StripeDateTimeConverter))] |
| 46 | + public DateTime? CanceledAt { get; set; } |
| 47 | + |
| 48 | + [JsonProperty("capture_method")] |
| 49 | + public string CaptureMethod { get; set; } |
| 50 | + |
| 51 | + [JsonProperty("charges")] |
| 52 | + public StripeList<StripeCharge> Charges { get; set; } |
| 53 | + |
| 54 | + [JsonProperty("client_secret")] |
| 55 | + public string ClientSecret { get; set; } |
| 56 | + |
| 57 | + [JsonProperty("confirmation_method")] |
| 58 | + public string ConfirmationMethod { get; set; } |
| 59 | + |
| 60 | + [JsonProperty("created")] |
| 61 | + [JsonConverter(typeof(StripeDateTimeConverter))] |
| 62 | + public DateTime? Created { get; set; } |
| 63 | + |
| 64 | + [JsonProperty("currency")] |
| 65 | + public string Currency { get; set; } |
| 66 | + |
| 67 | + #region Expandable Customer |
| 68 | + public string CustomerId { get; set; } |
| 69 | + |
| 70 | + [JsonIgnore] |
| 71 | + public StripeCustomer Customer { get; set; } |
| 72 | + |
| 73 | + [JsonProperty("customer")] |
| 74 | + internal object InternalCustomer |
| 75 | + { |
| 76 | + set |
| 77 | + { |
| 78 | + StringOrObject<StripeCustomer>.Map(value, s => this.CustomerId = s, o => this.Customer = o); |
| 79 | + } |
| 80 | + } |
| 81 | + #endregion |
| 82 | + |
| 83 | + [JsonProperty("description")] |
| 84 | + public string Description { get; set; } |
| 85 | + |
| 86 | + [JsonProperty("livemode")] |
| 87 | + public bool LiveMode { get; set; } |
| 88 | + |
| 89 | + [JsonProperty("metadata")] |
| 90 | + public Dictionary<string, string> Metadata { get; set; } |
| 91 | + |
| 92 | + [JsonProperty("next_source_action")] |
| 93 | + public PaymentIntentSourceAction NextSourceAction { get; set; } |
| 94 | + |
| 95 | + [JsonProperty("receipt_email")] |
| 96 | + public string ReceiptEmail { get; set; } |
| 97 | + |
| 98 | + [JsonProperty("return_url")] |
| 99 | + public string ReturnUrl { get; set; } |
| 100 | + |
| 101 | + #region Expandable Review |
| 102 | + public string ReviewId { get; set; } |
| 103 | + |
| 104 | + [JsonIgnore] |
| 105 | + public StripeReview Review { get; set; } |
| 106 | + |
| 107 | + [JsonProperty("review")] |
| 108 | + internal object InternalReview |
| 109 | + { |
| 110 | + set |
| 111 | + { |
| 112 | + StringOrObject<StripeReview>.Map(value, s => this.ReviewId = s, o => this.Review = o); |
| 113 | + } |
| 114 | + } |
| 115 | + #endregion |
| 116 | + |
| 117 | + [JsonProperty("shipping")] |
| 118 | + public StripeShipping Shipping { get; set; } |
| 119 | + |
| 120 | + #region Expandable Source |
| 121 | + public string SourceId { get; set; } |
| 122 | + |
| 123 | + [JsonIgnore] |
| 124 | + public Source Source { get; set; } |
| 125 | + |
| 126 | + [JsonProperty("source")] |
| 127 | + internal object InternalSource |
| 128 | + { |
| 129 | + set |
| 130 | + { |
| 131 | + StringOrObject<Source>.Map(value, s => this.SourceId = s, o => this.Source = o); |
| 132 | + } |
| 133 | + } |
| 134 | + #endregion |
| 135 | + |
| 136 | + [JsonProperty("statement_descriptor")] |
| 137 | + public string StatementDescriptor { get; set; } |
| 138 | + |
| 139 | + [JsonProperty("status")] |
| 140 | + public string Status { get; set; } |
| 141 | + |
| 142 | + [JsonProperty("transfer_data")] |
| 143 | + public PaymentIntentTransferData TransferData { get; set; } |
| 144 | + |
| 145 | + [JsonProperty("transfer_group")] |
| 146 | + public string TransferGroup { get; set; } |
| 147 | + } |
| 148 | +} |
0 commit comments