From c4f00076445d29ba4cd1ba908ed86d3e8f13f498 Mon Sep 17 00:00:00 2001 From: Remi Jannel Date: Thu, 14 Mar 2019 17:24:12 -0700 Subject: [PATCH] Add support for API version 2019-03-14 --- invoice.go | 11 ----------- stripe.go | 2 +- sub.go | 14 ++++++++------ 3 files changed, 9 insertions(+), 18 deletions(-) diff --git a/invoice.go b/invoice.go index 2707a1a91f..42ba563771 100644 --- a/invoice.go +++ b/invoice.go @@ -126,10 +126,6 @@ type InvoiceListParams struct { CreatedRange *RangeQueryParams `form:"created_range"` DueDate *int64 `form:"due_date"` Subscription *string `form:"subscription"` - - // Those parameters are deprecated. Prefer using Created or CreatedRange - Date *int64 `form:"date"` - DateRange *RangeQueryParams `form:"date"` } // InvoiceLineListParams is the set of parameters that can be used when listing invoice line items. @@ -199,7 +195,6 @@ type Invoice struct { Discount *Discount `json:"discount"` DueDate int64 `json:"due_date"` EndingBalance int64 `json:"ending_balance"` - FinalizedAt int64 `json:"finalized_at"` Footer string `json:"footer"` HostedInvoiceURL string `json:"hosted_invoice_url"` ID string `json:"id"` @@ -226,12 +221,6 @@ type Invoice struct { Total int64 `json:"total"` TransferData *InvoiceTransferData `json:"transfer_data"` WebhooksDeliveredAt int64 `json:"webhooks_delivered_at"` - - // This property is considered deprecated. Prefer using ApplicationFeeAmount - ApplicationFee int64 `json:"application_fee"` - - // This property is considered deprecated. Prefer using created - Date int64 `json:"date"` } // InvoiceCustomField is a structure representing a custom field on an Invoice. diff --git a/stripe.go b/stripe.go index f0ec755d00..a4f227b1df 100644 --- a/stripe.go +++ b/stripe.go @@ -817,7 +817,7 @@ func StringValue(v *string) string { const apiURL = "https://api.stripe.com" // apiversion is the currently supported API version -const apiversion = "2019-02-19" +const apiversion = "2019-03-14" // clientversion is the binding version const clientversion = "57.8.0" diff --git a/sub.go b/sub.go index ff99328d12..61bd7f6cd7 100644 --- a/sub.go +++ b/sub.go @@ -11,12 +11,14 @@ type SubscriptionStatus string // List of values that SubscriptionStatus can take. const ( - SubscriptionStatusActive SubscriptionStatus = "active" - SubscriptionStatusAll SubscriptionStatus = "all" - SubscriptionStatusCanceled SubscriptionStatus = "canceled" - SubscriptionStatusPastDue SubscriptionStatus = "past_due" - SubscriptionStatusTrialing SubscriptionStatus = "trialing" - SubscriptionStatusUnpaid SubscriptionStatus = "unpaid" + SubscriptionStatusActive SubscriptionStatus = "active" + SubscriptionStatusAll SubscriptionStatus = "all" + SubscriptionStatusCanceled SubscriptionStatus = "canceled" + SubscriptionStatusIncomplete SubscriptionStatus = "incomplete" + SubscriptionStatusIncompleteExpired SubscriptionStatus = "incomplete_expired" + SubscriptionStatusPastDue SubscriptionStatus = "past_due" + SubscriptionStatusTrialing SubscriptionStatus = "trialing" + SubscriptionStatusUnpaid SubscriptionStatus = "unpaid" ) // SubscriptionBilling is the type of billing method for this subscription's invoices.