Skip to content

Commit

Permalink
version 2.0.0. Changes long to double in certain entities, this break…
Browse files Browse the repository at this point in the history
…s previous compatibility.
  • Loading branch information
ppone committed Jan 17, 2020
1 parent 333079b commit 2e0b333
Show file tree
Hide file tree
Showing 22 changed files with 38 additions and 38 deletions.
4 changes: 2 additions & 2 deletions invoicedapi.tests/Entities/CustomerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,8 @@ public void TestNewPli()

const string jsonRequest = @"{
'name': 'Paper',
'quantity': 1,
'unit_cost': 100
'quantity': 1.0,
'unit_cost': 100.0
}";

var mockHttp = new MockHttpMessageHandler();
Expand Down
4 changes: 2 additions & 2 deletions invoicedapi/Entities/Balance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public Balance() : base() {
}

[JsonProperty("available_credits")]
public long? AvailableCredits { get; set; }
public double? AvailableCredits { get; set; }

[JsonProperty("history")]
public IList<BalanceHistory> History { get; set; }
Expand All @@ -22,7 +22,7 @@ public Balance() : base() {
public bool? PastDue { get; set; }

[JsonProperty("total_outstanding")]
public long? TotalOutstanding { get; set; }
public double? TotalOutstanding { get; set; }

protected override string EntityId() {
return "Balance";
Expand Down
2 changes: 1 addition & 1 deletion invoicedapi/Entities/BalanceHistory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public BalanceHistory() : base() {
public long? Timestamp { get; set; }

[JsonProperty("balance")]
public long? Balance { get; set; }
public double? Balance { get; set; }

protected override string EntityId() {
return "BalanceHistory";
Expand Down
2 changes: 1 addition & 1 deletion invoicedapi/Entities/CatalogItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ protected override string EntityId() {
public string Currency { get; set; }

[JsonProperty("unit_cost")]
public long? UnitCost { get; set; }
public double? UnitCost { get; set; }

[JsonProperty("description")]
public string Description { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion invoicedapi/Entities/ChargeRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public ChargeRequest() : base() {
public string Currency { get; set; }

[JsonProperty("amount")]
public long? Amount { get; set; }
public double? Amount { get; set; }

[JsonProperty("invoiced_token")]
public string InvoicedToken { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion invoicedapi/Entities/ChargeSplit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public ChargeSplit() : base() {
public long? Invoice { get; set; }

[JsonProperty("amount")]
public long? Amount { get; set; }
public double? Amount { get; set; }

protected override string EntityId() {
return "ChargeSplit";
Expand Down
2 changes: 1 addition & 1 deletion invoicedapi/Entities/Coupon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ protected override string EntityId() {
public string Currency { get; set; }

[JsonProperty("value")]
public long? Value { get; set; }
public double? Value { get; set; }

[JsonProperty("is_percent")]
public bool? IsPercent { get; set; }
Expand Down
6 changes: 3 additions & 3 deletions invoicedapi/Entities/CreditNote.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ protected override bool HasSends() {
public string Notes { get; set; }

[JsonProperty("subtotal")]
public long? Subtotal { get; set; }
public double? Subtotal { get; set; }

[JsonProperty("discounts")]
public IList<Discount> Discounts { get; set; }
Expand All @@ -84,10 +84,10 @@ protected override bool HasSends() {
public IList<Tax> Taxes { get; set; }

[JsonProperty("total")]
public long? Total { get; set; }
public double? Total { get; set; }

[JsonProperty("balance")]
public long? Balance { get; set; }
public double? Balance { get; set; }

[JsonProperty("url")]
public string Url { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion invoicedapi/Entities/Customer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ protected override bool HasSends() {
public bool? CreditHold { get; set; }

[JsonProperty("credit_limit")]
public long? CreditLimit { get; set; }
public double? CreditLimit { get; set; }

[JsonProperty("owner")]
public long? Owner { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion invoicedapi/Entities/Discount.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public Discount() : base(){
public string Obj { get; set; }

[JsonProperty("amount")]
public long? Amount { get; set; }
public double? Amount { get; set; }

[JsonProperty("coupon")]
public Coupon Coupon { get; set; }
Expand Down
6 changes: 3 additions & 3 deletions invoicedapi/Entities/Estimate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ protected override bool HasSends() {
public string Notes { get; set; }

[JsonProperty("subtotal")]
public long? Subtotal { get; set; }
public double? Subtotal { get; set; }

[JsonProperty("discounts")]
public IList<Discount> Discounts { get; set; }
Expand All @@ -90,10 +90,10 @@ protected override bool HasSends() {
public IList<Tax> Taxes { get; set; }

[JsonProperty("total")]
public long? Total { get; set; }
public double? Total { get; set; }

[JsonProperty("deposit")]
public long? Deposit { get; set; }
public double? Deposit { get; set; }

[JsonProperty("deposit_paid")]
public bool? DepositPaid { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions invoicedapi/Entities/Installment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ public Installment() : base() {
public long? Date { get; set; }

[JsonProperty("amount")]
public long? Amount { get; set; }
public double? Amount { get; set; }

[JsonProperty("balance")]
public long? Balance { get; set; }
public double? Balance { get; set; }

protected override string EntityId() {
return this.Id.ToString();
Expand Down
6 changes: 3 additions & 3 deletions invoicedapi/Entities/Invoice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ protected override bool HasSends() {
public string Notes { get; set; }

[JsonProperty("subtotal")]
public long? Subtotal { get; set; }
public double? Subtotal { get; set; }

[JsonProperty("discounts")]
public IList<Discount> Discounts { get; set; }
Expand All @@ -106,10 +106,10 @@ protected override bool HasSends() {
public IList<Tax> Taxes { get; set; }

[JsonProperty("total")]
public long? Total { get; set; }
public double? Total { get; set; }

[JsonProperty("balance")]
public long? Balance { get; set; }
public double? Balance { get; set; }

[JsonProperty("payment_plan")]
public long? PaymentPlan { get; set; }
Expand Down
6 changes: 3 additions & 3 deletions invoicedapi/Entities/LineItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ public LineItem() : base() {
public string Description { get; set; }

[JsonProperty("quantity")]
public long? Quantity { get; set; }
public double? Quantity { get; set; }

[JsonProperty("unit_cost")]
public long? UnitCost { get; set; }
public double? UnitCost { get; set; }

[JsonProperty("amount")]
public long? Amount { get; set; }
public double? Amount { get; set; }

[JsonProperty("discountable")]
public bool? Discountable { get; set; }
Expand Down
6 changes: 3 additions & 3 deletions invoicedapi/Entities/PendingLineItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ protected override string EntityId() {
public string Description { get; set; }

[JsonProperty("quantity")]
public long? Quantity { get; set; }
public double? Quantity { get; set; }

[JsonProperty("amount")]
public long? Amount { get; set; }
public double? Amount { get; set; }

[JsonProperty("unit_cost")]
public long? UnitCost { get; set; }
public double? UnitCost { get; set; }

[JsonProperty("discountable")]
public bool? Discountable { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion invoicedapi/Entities/Plan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public virtual bool HasStringId() {
public string Currency { get; set; }

[JsonProperty("amount")]
public long? Amount { get; set; }
public double? Amount { get; set; }

[JsonProperty("pricing_mode")]
public string PricingMode { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions invoicedapi/Entities/Subscription.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ protected override string EntityId() {
public IList<object> Taxes { get; set; }

[JsonProperty("recurring_total")]
public long? RecurringTotal { get; set; }
public double? RecurringTotal { get; set; }

[JsonProperty("mrr")]
public long? Mrr { get; set; }
public double? Mrr { get; set; }

[JsonProperty("url")]
public string Url { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions invoicedapi/Entities/SubscriptionPreview.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ public SubscriptionPreview() : base(){
public Invoice FirstInvoice { get; set; }

[JsonProperty("mrr")]
public long? Mrr { get; set; }
public double? Mrr { get; set; }

[JsonProperty("recurring_total")]
public long? RecurringTotal { get; set; }
public double? RecurringTotal { get; set; }

protected override string EntityId() {
return "SubscriptionPreview";
Expand Down
2 changes: 1 addition & 1 deletion invoicedapi/Entities/Tax.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public Tax() : base(){
public string Obj { get; set; }

[JsonProperty("amount")]
public long? Amount { get; set; }
public double? Amount { get; set; }

[JsonProperty("tax_rate")]
public TaxRate TaxRate { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion invoicedapi/Entities/TaxRate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public virtual bool HasStringId() {
public string Currency { get; set; }

[JsonProperty("value")]
public long? Value { get; set; }
public double? Value { get; set; }

[JsonProperty("is_percent")]
public bool? IsPercent { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion invoicedapi/Entities/Transaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ protected override string EntityId() {
public string Currency { get; set; }

[JsonProperty("amount")]
public long? Amount { get; set; }
public double? Amount { get; set; }

[JsonProperty("notes")]
public string Notes { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions invoicedapi/invoicedapi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<PropertyGroup>
<Description>Invoiced is a sync .NET client, and a portable class library for the Invoiced API. (Official Library)</Description>
<AssemblyTitle>Invoiced</AssemblyTitle>
<VersionPrefix>1.0.1</VersionPrefix>
<Version>1.0.1</Version>
<VersionPrefix>2.0.0</VersionPrefix>
<Version>2.0.0</Version>
<Authors>Invoiced</Authors>
<TargetFrameworks>;netstandard2.0</TargetFrameworks>
<AssemblyName>Invoiced</AssemblyName>
Expand Down

0 comments on commit 2e0b333

Please sign in to comment.