Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to API version 2018-09-24 #1302

Merged
merged 1 commit into from
Sep 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ image: Visual Studio 2017
environment:
STRIPE_TEST_SK: sk_test_eBgAzVoEpJKfYjD9nf2YoyMM
# If you bump this, don't forget to bump `MinimumMockVersion` in `BaseStripeTest.cs` as well.
STRIPE_MOCK_VERSION: 0.30.0
STRIPE_MOCK_VERSION: 0.33.0

deploy:
- provider: NuGet
Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Entities/Account.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ public class Account : StripeEntityWithId, ISupportMetadata
public string BusinessLogoFileId { get; set; }

[JsonIgnore]
public FileUpload BusinessLogo { get; set; }
public File BusinessLogo { get; set; }

[JsonProperty("business_logo")]
internal object InternalBusinessLogo
{
set
{
StringOrObject<FileUpload>.Map(value, s => this.BusinessLogoFileId = s, o => this.BusinessLogo = o);
StringOrObject<File>.Map(value, s => this.BusinessLogoFileId = s, o => this.BusinessLogo = o);
}
}
#endregion
Expand Down
38 changes: 19 additions & 19 deletions src/Stripe.net/Entities/Evidence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ public class Evidence : StripeEntity
public string CancellationPolicyFileId { get; set; }

[JsonIgnore]
public FileUpload CancellationPolicyFile { get; set; }
public File CancellationPolicyFile { get; set; }

[JsonProperty("cancellation_policy")]
internal object InternalCancellationPolicy
{
set
{
StringOrObject<FileUpload>.Map(value, s => this.CancellationPolicyFileId = s, o => this.CancellationPolicyFile = o);
StringOrObject<File>.Map(value, s => this.CancellationPolicyFileId = s, o => this.CancellationPolicyFile = o);
}
}
#endregion
Expand All @@ -37,14 +37,14 @@ internal object InternalCancellationPolicy
public string CustomerCommunicationFileId { get; set; }

[JsonIgnore]
public FileUpload CustomerCommunicationFile { get; set; }
public File CustomerCommunicationFile { get; set; }

[JsonProperty("customer_communication")]
internal object InternalCustomerCommunication
{
set
{
StringOrObject<FileUpload>.Map(value, s => this.CustomerCommunicationFileId = s, o => this.CustomerCommunicationFile = o);
StringOrObject<File>.Map(value, s => this.CustomerCommunicationFileId = s, o => this.CustomerCommunicationFile = o);
}
}
#endregion
Expand All @@ -62,14 +62,14 @@ internal object InternalCustomerCommunication
public string CustomerSignatureFileId { get; set; }

[JsonIgnore]
public FileUpload CustomerSignatureFile { get; set; }
public File CustomerSignatureFile { get; set; }

[JsonProperty("customer_signature")]
internal object InternalCustomerSignatureFile
{
set
{
StringOrObject<FileUpload>.Map(value, s => this.CustomerSignatureFileId = s, o => this.CustomerSignatureFile = o);
StringOrObject<File>.Map(value, s => this.CustomerSignatureFileId = s, o => this.CustomerSignatureFile = o);
}
}
#endregion
Expand All @@ -78,14 +78,14 @@ internal object InternalCustomerSignatureFile
public string DuplicateChargeDocumentationFileId { get; set; }

[JsonIgnore]
public FileUpload DuplicateChargeDocumentationFile { get; set; }
public File DuplicateChargeDocumentationFile { get; set; }

[JsonProperty("duplicate_charge_documentation")]
internal object InternalDuplicateChargeDocumentationFile
{
set
{
StringOrObject<FileUpload>.Map(value, s => this.DuplicateChargeDocumentationFileId = s, o => this.DuplicateChargeDocumentationFile = o);
StringOrObject<File>.Map(value, s => this.DuplicateChargeDocumentationFileId = s, o => this.DuplicateChargeDocumentationFile = o);
}
}
#endregion
Expand All @@ -103,14 +103,14 @@ internal object InternalDuplicateChargeDocumentationFile
public string ReceiptFileId { get; set; }

[JsonIgnore]
public FileUpload ReceiptFile { get; set; }
public File ReceiptFile { get; set; }

[JsonProperty("receipt")]
internal object InternalReceiptFile
{
set
{
StringOrObject<FileUpload>.Map(value, s => this.ReceiptFileId = s, o => this.ReceiptFile = o);
StringOrObject<File>.Map(value, s => this.ReceiptFileId = s, o => this.ReceiptFile = o);
}
}
#endregion
Expand All @@ -119,14 +119,14 @@ internal object InternalReceiptFile
public string RefundPolicyFileId { get; set; }

[JsonIgnore]
public FileUpload RefundPolicyFile { get; set; }
public File RefundPolicyFile { get; set; }

[JsonProperty("refund_policy")]
internal object InternalRefundPolicyFile
{
set
{
StringOrObject<FileUpload>.Map(value, s => this.RefundPolicyFileId = s, o => this.RefundPolicyFile = o);
StringOrObject<File>.Map(value, s => this.RefundPolicyFileId = s, o => this.RefundPolicyFile = o);
}
}
#endregion
Expand All @@ -144,14 +144,14 @@ internal object InternalRefundPolicyFile
public string ServiceDocumentationFileId { get; set; }

[JsonIgnore]
public FileUpload ServiceDocumentationFile { get; set; }
public File ServiceDocumentationFile { get; set; }

[JsonProperty("service_documentation")]
internal object InternalServiceDocumentationFile
{
set
{
StringOrObject<FileUpload>.Map(value, s => this.ServiceDocumentationFileId = s, o => this.ServiceDocumentationFile = o);
StringOrObject<File>.Map(value, s => this.ServiceDocumentationFileId = s, o => this.ServiceDocumentationFile = o);
}
}
#endregion
Expand All @@ -169,14 +169,14 @@ internal object InternalServiceDocumentationFile
public string ShippingDocumentationFileId { get; set; }

[JsonIgnore]
public FileUpload ShippingDocumentationFile { get; set; }
public File ShippingDocumentationFile { get; set; }

[JsonProperty("shipping_documentation")]
internal object InternalShippingDocumentationFile
{
set
{
StringOrObject<FileUpload>.Map(value, s => this.ShippingDocumentationFileId = s, o => this.ShippingDocumentationFile = o);
StringOrObject<File>.Map(value, s => this.ShippingDocumentationFileId = s, o => this.ShippingDocumentationFile = o);
}
}
#endregion
Expand All @@ -188,19 +188,19 @@ internal object InternalShippingDocumentationFile
public string UncategorizedFileId { get; set; }

[JsonIgnore]
public FileUpload UncategorizedFile { get; set; }
public File UncategorizedFile { get; set; }

[JsonProperty("uncategorized_file")]
internal object InternalUncategorizedFile
{
set
{
StringOrObject<FileUpload>.Map(value, s => this.UncategorizedFileId = s, o => this.UncategorizedFile = o);
StringOrObject<File>.Map(value, s => this.UncategorizedFileId = s, o => this.UncategorizedFile = o);
}
}
#endregion

[JsonProperty("uncategorized_text")]
public string UncategorizedText { get; set; }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Newtonsoft.Json;
using Stripe.Infrastructure;

public class FileUpload : StripeEntityWithId
public class File : StripeEntityWithId
{
[JsonProperty("object")]
public string Object { get; set; }
Expand All @@ -25,6 +25,9 @@ public class FileUpload : StripeEntityWithId
[JsonProperty("size")]
public int Size { get; set; }

[JsonProperty("title")]
public string Title { get; set; }

[JsonProperty("type")]
public string Type { get; set; }

Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Entities/FileLink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ public class FileLink : StripeEntityWithId, ISupportMetadata
/// The file object this link points to (if expanded).
/// </summary>
[JsonIgnore]
public FileUpload File { get; set; }
public File File { get; set; }

[JsonProperty("file")]
internal object InternalFile
{
set
{
StringOrObject<FileUpload>.Map(value, s => this.FileId = s, o => this.File = o);
StringOrObject<File>.Map(value, s => this.FileId = s, o => this.File = o);
}
}
#endregion
Expand Down
6 changes: 3 additions & 3 deletions src/Stripe.net/Entities/Issuing/EvidenceFraudulent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ public class EvidenceFraudulent : StripeEntity
public string UncategorizedFileId { get; set; }

[JsonIgnore]
public FileUpload UncategorizedFile { get; set; }
public File UncategorizedFile { get; set; }

[JsonProperty("uncategorized_file")]
internal object InternalUncategorizedFile
{
set
{
StringOrObject<FileUpload>.Map(value, s => this.UncategorizedFileId = s, o => this.UncategorizedFile = o);
StringOrObject<File>.Map(value, s => this.UncategorizedFileId = s, o => this.UncategorizedFile = o);
}
}
#endregion
}
}
}
6 changes: 3 additions & 3 deletions src/Stripe.net/Entities/Issuing/EvidenceOther.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ public class EvidenceOther : StripeEntity
public string UncategorizedFileId { get; set; }

[JsonIgnore]
public FileUpload UncategorizedFile { get; set; }
public File UncategorizedFile { get; set; }

[JsonProperty("uncategorized_file")]
internal object InternalUncategorizedFile
{
set
{
StringOrObject<FileUpload>.Map(value, s => this.UncategorizedFileId = s, o => this.UncategorizedFile = o);
StringOrObject<File>.Map(value, s => this.UncategorizedFileId = s, o => this.UncategorizedFile = o);
}
}
#endregion
}
}
}
10 changes: 5 additions & 5 deletions src/Stripe.net/Entities/LegalEntityVerification.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ public class LegalEntityVerification : StripeEntity
public string DocumentId { get; set; }

[JsonIgnore]
public FileUpload Document { get; set; }
public File Document { get; set; }

[JsonProperty("document")]
internal object InternalDocument
{
set
{
StringOrObject<FileUpload>.Map(value, s => this.DocumentId = s, o => this.Document = o);
StringOrObject<File>.Map(value, s => this.DocumentId = s, o => this.Document = o);
}
}
#endregion
Expand All @@ -31,19 +31,19 @@ internal object InternalDocument
public string DocumentIdBack { get; set; }

[JsonIgnore]
public FileUpload DocumentBack { get; set; }
public File DocumentBack { get; set; }

[JsonProperty("document_back")]
internal object InternalDocumentBack
{
set
{
StringOrObject<FileUpload>.Map(value, s => this.DocumentIdBack = s, o => this.DocumentBack = o);
StringOrObject<File>.Map(value, s => this.DocumentIdBack = s, o => this.DocumentBack = o);
}
}
#endregion

[JsonProperty("status")]
public string Status { get; set; }
}
}
}
2 changes: 1 addition & 1 deletion src/Stripe.net/Entities/Reporting/ReportRun.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class ReportRun : StripeEntityWithId
public string ReportType { get; set; }

[JsonProperty("result")]
public FileUpload Result { get; set; }
public File Result { get; set; }

[JsonProperty("status")]
public string Status { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Stripe.net/Entities/Sigma/ScheduledQueryRun.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class ScheduledQueryRun : StripeEntityWithId
public string Error { get; set; }

[JsonProperty("file")]
public FileUpload File { get; set; }
public File File { get; set; }

[JsonProperty("result_available_until")]
[JsonConverter(typeof(DateTimeConverter))]
Expand Down
28 changes: 14 additions & 14 deletions src/Stripe.net/Infrastructure/Public/StripeConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

public static class StripeConfiguration
{
public static string StripeApiVersion = "2018-08-23";
public static string StripeApiVersion = "2018-09-24";

private static string apiKey;
private static string apiBase;
private static string uploadsBase;
private static string connectBase;
private static string filesBase;

static StripeConfiguration()
{
Expand Down Expand Up @@ -60,34 +60,34 @@ public static void SetApiBase(string baseUrl)
apiBase = baseUrl;
}

internal static string GetUploadsBase()
internal static string GetConnectBase()
{
if (string.IsNullOrEmpty(uploadsBase))
if (string.IsNullOrEmpty(connectBase))
{
uploadsBase = Urls.DefaultBaseUploadsUrl;
connectBase = Urls.DefaultBaseConnectUrl;
}

return uploadsBase;
return connectBase;
}

public static void SetUploadsBase(string baseUrl)
public static void SetConnectBase(string baseUrl)
{
uploadsBase = baseUrl;
connectBase = baseUrl;
}

internal static string GetConnectBase()
internal static string GetFilesBase()
{
if (string.IsNullOrEmpty(connectBase))
if (string.IsNullOrEmpty(filesBase))
{
connectBase = Urls.DefaultBaseConnectUrl;
filesBase = Urls.DefaultBaseFilesUrl;
}

return connectBase;
return filesBase;
}

public static void SetConnectBase(string baseUrl)
public static void SetFilesBase(string baseUrl)
{
connectBase = baseUrl;
filesBase = baseUrl;
}
}
}
Loading