Skip to content

Commit

Permalink
Add status_transitions filters to the List Orders params
Browse files Browse the repository at this point in the history
  • Loading branch information
spastorelli-stripe committed Sep 5, 2018
1 parent 999fc1d commit d4cab50
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions order.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,25 @@ type OrderList struct {

// OrderListParams is the set of parameters that can be used when listing orders.
type OrderListParams struct {
ListParams `form:"*"`
Created *int64 `form:"created"`
CreatedRange *RangeQueryParams `form:"created"`
Customer *string `form:"customer"`
IDs []*string `form:"ids"`
Status *string `form:"status"`
ListParams `form:"*"`
Created *int64 `form:"created"`
CreatedRange *RangeQueryParams `form:"created"`
Customer *string `form:"customer"`
IDs []*string `form:"ids"`
Status *string `form:"status"`
StatusTransitions *StatusTransitionsFilterParams `form:"status_transitions"`
}

// StatusTransitionsFilterParams are parameters that can used to filter on status_transition when listing orders.
type StatusTransitionsFilterParams struct {
Canceled *int64 `form:"canceled"`
CanceledRange *RangeQueryParams `form:"canceled"`
Fulfilled *int64 `form:"fulfilled"`
FulfilledRange *RangeQueryParams `form:"fulfilled"`
Paid *int64 `form:"paid"`
PaidRange *RangeQueryParams `form:"paid"`
Returned *int64 `form:"returned"`
ReturnedRange *RangeQueryParams `form:"returned"`
}

// StatusTransitions are the timestamps at which the order status was updated.
Expand Down

0 comments on commit d4cab50

Please sign in to comment.