From 02e368561785a41a67708d78fec4e936c859ddc9 Mon Sep 17 00:00:00 2001 From: Olivier Bellone Date: Thu, 13 Dec 2018 14:37:37 -0800 Subject: [PATCH] Rename some properties for consistency --- src/Stripe.net/Entities/Accounts/Account.cs | 12 +- .../Accounts/LegalEntityVerification.cs | 24 ++- src/Stripe.net/Entities/Disputes/Evidence.cs | 155 ++++++++++++++---- 3 files changed, 157 insertions(+), 34 deletions(-) diff --git a/src/Stripe.net/Entities/Accounts/Account.cs b/src/Stripe.net/Entities/Accounts/Account.cs index ee46c9d95b..70a8707bf1 100644 --- a/src/Stripe.net/Entities/Accounts/Account.cs +++ b/src/Stripe.net/Entities/Accounts/Account.cs @@ -14,8 +14,16 @@ public class Account : StripeEntity, IHasId, IHasMetadata, IHasObject, IPaymentS public string Object { get; set; } #region Expandable BusinessLogo - public string BusinessLogoFileId { get; set; } + /// + /// (ID of a ) A logo for this account (at least 128px x 128px). + /// Expandable. + /// + public string BusinessLogoId { get; set; } + + /// + /// (Expanded) A logo for this account (at least 128px x 128px). + /// [JsonIgnore] public File BusinessLogo { get; set; } @@ -24,7 +32,7 @@ internal object InternalBusinessLogo { set { - StringOrObject.Map(value, s => this.BusinessLogoFileId = s, o => this.BusinessLogo = o); + StringOrObject.Map(value, s => this.BusinessLogoId = s, o => this.BusinessLogo = o); } } #endregion diff --git a/src/Stripe.net/Entities/Accounts/LegalEntityVerification.cs b/src/Stripe.net/Entities/Accounts/LegalEntityVerification.cs index 73fa58d61f..f3247bea31 100644 --- a/src/Stripe.net/Entities/Accounts/LegalEntityVerification.cs +++ b/src/Stripe.net/Entities/Accounts/LegalEntityVerification.cs @@ -12,8 +12,18 @@ public class LegalEntityVerification : StripeEntity public string DetailsCode { get; set; } #region Expandable Document + + /// + /// (ID of a ) A photo (jpg or png) of the front of an identifying + /// document, either a passport or local ID card. + /// Expandable. + /// public string DocumentId { get; set; } + /// + /// (Expanded) A photo (jpg or png) of the front of an identifying document, either a + /// passport or local ID card. + /// [JsonIgnore] public File Document { get; set; } @@ -28,8 +38,18 @@ internal object InternalDocument #endregion #region Expandable Document Back - public string DocumentIdBack { get; set; } + /// + /// (ID of a ) A photo (jpg or png) of the back of an identifying + /// document, either a passport or local ID card. + /// Expandable. + /// + public string DocumentBackId { get; set; } + + /// + /// (Expanded) A photo (jpg or png) of the back of an identifying document, either a + /// passport or local ID card. + /// [JsonIgnore] public File DocumentBack { get; set; } @@ -38,7 +58,7 @@ internal object InternalDocumentBack { set { - StringOrObject.Map(value, s => this.DocumentIdBack = s, o => this.DocumentBack = o); + StringOrObject.Map(value, s => this.DocumentBackId = s, o => this.DocumentBack = o); } } #endregion diff --git a/src/Stripe.net/Entities/Disputes/Evidence.cs b/src/Stripe.net/Entities/Disputes/Evidence.cs index e95aa36a0c..135e5c96c4 100644 --- a/src/Stripe.net/Entities/Disputes/Evidence.cs +++ b/src/Stripe.net/Entities/Disputes/Evidence.cs @@ -12,17 +12,26 @@ public class Evidence : StripeEntity public string BillingAddress { get; set; } #region Expandable Cancellation Policy - public string CancellationPolicyFileId { get; set; } + /// + /// (ID of a ) Your subscription cancellation policy, as shown to the + /// customer. + /// Expandable. + /// + public string CancellationPolicyId { get; set; } + + /// + /// (Expanded) Your subscription cancellation policy, as shown to the customer. + /// [JsonIgnore] - public File CancellationPolicyFile { get; set; } + public File CancellationPolicy { get; set; } [JsonProperty("cancellation_policy")] internal object InternalCancellationPolicy { set { - StringOrObject.Map(value, s => this.CancellationPolicyFileId = s, o => this.CancellationPolicyFile = o); + StringOrObject.Map(value, s => this.CancellationPolicyId = s, o => this.CancellationPolicy = o); } } #endregion @@ -34,17 +43,30 @@ internal object InternalCancellationPolicy public string CancellationRebuttal { get; set; } #region Expandable Customer Communication - public string CustomerCommunicationFileId { get; set; } + /// + /// (ID of a ) Any communication with the customer that you feel is + /// relevant to your case. Examples include emails proving that the customer received the + /// product or service, or demonstrating their use of or satisfaction with the product or + /// service. + /// Expandable. + /// + public string CustomerCommunicationId { get; set; } + + /// + /// (Expanded) Any communication with the customer that you feel is relevant to your case. + /// Examples include emails proving that the customer received the product or service, or + /// demonstrating their use of or satisfaction with the product or service. + /// [JsonIgnore] - public File CustomerCommunicationFile { get; set; } + public File CustomerCommunication { get; set; } [JsonProperty("customer_communication")] internal object InternalCustomerCommunication { set { - StringOrObject.Map(value, s => this.CustomerCommunicationFileId = s, o => this.CustomerCommunicationFile = o); + StringOrObject.Map(value, s => this.CustomerCommunicationId = s, o => this.CustomerCommunication = o); } } #endregion @@ -59,33 +81,55 @@ internal object InternalCustomerCommunication public string CustomerPurchaseIPAddress { get; set; } #region Expandable Customer Signature - public string CustomerSignatureFileId { get; set; } + /// + /// (ID of a ) A relevant document or contract showing the customer’s + /// signature. + /// Expandable. + /// + public string CustomerSignatureId { get; set; } + + /// + /// (Expanded) A relevant document or contract showing the customer’s signature. + /// [JsonIgnore] - public File CustomerSignatureFile { get; set; } + public File CustomerSignature { get; set; } [JsonProperty("customer_signature")] - internal object InternalCustomerSignatureFile + internal object InternalCustomerSignature { set { - StringOrObject.Map(value, s => this.CustomerSignatureFileId = s, o => this.CustomerSignatureFile = o); + StringOrObject.Map(value, s => this.CustomerSignatureId = s, o => this.CustomerSignature = o); } } #endregion #region Expandable Duplicate Charge Documentation - public string DuplicateChargeDocumentationFileId { get; set; } + /// + /// (ID of a ) Documentation for the prior charge that can uniquely + /// identify the charge, such as a receipt, shipping label, work order, etc. This document + /// should be paired with a similar document from the disputed payment that proves the two + /// payments are separate. + /// Expandable. + /// + public string DuplicateChargeDocumentationId { get; set; } + + /// + /// (Expanded) Documentation for the prior charge that can uniquely identify the charge, + /// such as a receipt, shipping label, work order, etc. This document should be paired with + /// a similar document from the disputed payment that proves the two payments are separate. + /// [JsonIgnore] - public File DuplicateChargeDocumentationFile { get; set; } + public File DuplicateChargeDocumentation { get; set; } [JsonProperty("duplicate_charge_documentation")] - internal object InternalDuplicateChargeDocumentationFile + internal object InternalDuplicateChargeDocumentation { set { - StringOrObject.Map(value, s => this.DuplicateChargeDocumentationFileId = s, o => this.DuplicateChargeDocumentationFile = o); + StringOrObject.Map(value, s => this.DuplicateChargeDocumentationId = s, o => this.DuplicateChargeDocumentation = o); } } #endregion @@ -100,33 +144,50 @@ internal object InternalDuplicateChargeDocumentationFile public string ProductDescription { get; set; } #region Expandable Receipt - public string ReceiptFileId { get; set; } + /// + /// (ID of a ) Any receipt or message sent to the customer notifying them + /// of the charge. + /// Expandable. + /// + public string ReceiptId { get; set; } + + /// + /// (Expanded) Any receipt or message sent to the customer notifying them of the charge. + /// [JsonIgnore] - public File ReceiptFile { get; set; } + public File Receipt { get; set; } [JsonProperty("receipt")] - internal object InternalReceiptFile + internal object InternalReceipt { set { - StringOrObject.Map(value, s => this.ReceiptFileId = s, o => this.ReceiptFile = o); + StringOrObject.Map(value, s => this.ReceiptId = s, o => this.Receipt = o); } } #endregion #region Expandable Refund Policy - public string RefundPolicyFileId { get; set; } + /// + /// (ID of a ) Your refund policy, as shown to the customer. + /// Expandable. + /// + public string RefundPolicyId { get; set; } + + /// + /// (Expanded) Your refund policy, as shown to the customer. + /// [JsonIgnore] - public File RefundPolicyFile { get; set; } + public File RefundPolicy { get; set; } [JsonProperty("refund_policy")] - internal object InternalRefundPolicyFile + internal object InternalRefundPolicy { set { - StringOrObject.Map(value, s => this.RefundPolicyFileId = s, o => this.RefundPolicyFile = o); + StringOrObject.Map(value, s => this.RefundPolicyId = s, o => this.RefundPolicy = o); } } #endregion @@ -141,17 +202,29 @@ internal object InternalRefundPolicyFile public string ServiceDate { get; set; } #region Expandable Service Documentation - public string ServiceDocumentationFileId { get; set; } + /// + /// (ID of a ) Documentation showing proof that a service was provided to + /// the customer. This could include a copy of a signed contract, work order, or other form + /// of written agreement. + /// Expandable. + /// + public string ServiceDocumentationId { get; set; } + + /// + /// (Expanded) Documentation showing proof that a service was provided to the customer. + /// This could include a copy of a signed contract, work order, or other form of written + /// agreement. + /// [JsonIgnore] - public File ServiceDocumentationFile { get; set; } + public File ServiceDocumentation { get; set; } [JsonProperty("service_documentation")] - internal object InternalServiceDocumentationFile + internal object InternalServiceDocumentation { set { - StringOrObject.Map(value, s => this.ServiceDocumentationFileId = s, o => this.ServiceDocumentationFile = o); + StringOrObject.Map(value, s => this.ServiceDocumentationId = s, o => this.ServiceDocumentation = o); } } #endregion @@ -166,17 +239,31 @@ internal object InternalServiceDocumentationFile public string ShippingDate { get; set; } #region Expandable Shipping Documentation - public string ShippingDocumentationFileId { get; set; } + /// + /// (ID of a ) Documentation showing proof that a product was shipped to + /// the customer at the same address the customer provided to you. This could include a copy + /// of the shipment receipt, shipping label, etc. It should show the customer’s full + /// shipping address, if possible. + /// Expandable. + /// + public string ShippingDocumentationId { get; set; } + + /// + /// (Expanded) Documentation showing proof that a product was shipped to the customer at + /// the same address the customer provided to you. This could include a copy of the shipment + /// receipt, shipping label, etc. It should show the customer’s full shipping address, if + /// possible. + /// [JsonIgnore] - public File ShippingDocumentationFile { get; set; } + public File ShippingDocumentation { get; set; } [JsonProperty("shipping_documentation")] - internal object InternalShippingDocumentationFile + internal object InternalShippingDocumentation { set { - StringOrObject.Map(value, s => this.ShippingDocumentationFileId = s, o => this.ShippingDocumentationFile = o); + StringOrObject.Map(value, s => this.ShippingDocumentationId = s, o => this.ShippingDocumentation = o); } } #endregion @@ -185,8 +272,16 @@ internal object InternalShippingDocumentationFile public string ShippingTrackingNumber { get; set; } #region Expandable Uncategorized File + + /// + /// (ID of a ) Any additional evidence or statements. + /// Expandable. + /// public string UncategorizedFileId { get; set; } + /// + /// (Expanded) Any additional evidence or statements. + /// [JsonIgnore] public File UncategorizedFile { get; set; }