Skip to content

Commit

Permalink
Add support for API version 2019-03-14
Browse files Browse the repository at this point in the history
  • Loading branch information
remi-stripe committed Mar 19, 2019
1 parent 7b49564 commit c4f0007
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 18 deletions.
11 changes: 0 additions & 11 deletions invoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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"`
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion stripe.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
14 changes: 8 additions & 6 deletions sub.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit c4f0007

Please sign in to comment.