-
Notifications
You must be signed in to change notification settings - Fork 461
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge upstream and update generated code for v484
- Loading branch information
Showing
9 changed files
with
188 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v482 | ||
v484 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
// | ||
// | ||
// File generated from our OpenAPI spec | ||
// | ||
// | ||
|
||
// Package quotepreviewinvoice provides the /quotes/{quote}/preview_invoices APIs | ||
package quotepreviewinvoice | ||
|
||
import ( | ||
"net/http" | ||
|
||
stripe "github.com/stripe/stripe-go/v75" | ||
"github.com/stripe/stripe-go/v75/form" | ||
) | ||
|
||
// Client is used to invoke /quotes/{quote}/preview_invoices APIs. | ||
type Client struct { | ||
B stripe.Backend | ||
Key string | ||
} | ||
|
||
// List returns a list of quote preview invoices. | ||
func List(params *stripe.QuotePreviewInvoiceListParams) *Iter { | ||
return getC().List(params) | ||
} | ||
|
||
// List returns a list of quote preview invoices. | ||
func (c Client) List(listParams *stripe.QuotePreviewInvoiceListParams) *Iter { | ||
path := stripe.FormatURLPath( | ||
"/v1/quotes/%s/preview_invoices", | ||
stripe.StringValue(listParams.Quote), | ||
) | ||
return &Iter{ | ||
Iter: stripe.GetIter(listParams, func(p *stripe.Params, b *form.Values) ([]interface{}, stripe.ListContainer, error) { | ||
list := &stripe.QuotePreviewInvoiceList{} | ||
err := c.B.CallRaw(http.MethodGet, path, c.Key, b, p, list) | ||
|
||
ret := make([]interface{}, len(list.Data)) | ||
for i, v := range list.Data { | ||
ret[i] = v | ||
} | ||
|
||
return ret, list, err | ||
}), | ||
} | ||
} | ||
|
||
// Iter is an iterator for quote preview invoices. | ||
type Iter struct { | ||
*stripe.Iter | ||
} | ||
|
||
// QuotePreviewInvoice returns the quote preview invoice which the iterator is currently pointing to. | ||
func (i *Iter) QuotePreviewInvoice() *stripe.QuotePreviewInvoice { | ||
return i.Current().(*stripe.QuotePreviewInvoice) | ||
} | ||
|
||
// QuotePreviewInvoiceList returns the current list object which the iterator is | ||
// currently using. List objects will change as new API calls are made to | ||
// continue pagination. | ||
func (i *Iter) QuotePreviewInvoiceList() *stripe.QuotePreviewInvoiceList { | ||
return i.List().(*stripe.QuotePreviewInvoiceList) | ||
} | ||
|
||
func getC() Client { | ||
return Client{stripe.GetBackend(stripe.APIBackend), stripe.Key} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
// | ||
// | ||
// File generated from our OpenAPI spec | ||
// | ||
// | ||
|
||
// Package quotepreviewschedule provides the /quotes/{quote}/preview_subscription_schedules APIs | ||
package quotepreviewschedule | ||
|
||
import ( | ||
"net/http" | ||
|
||
stripe "github.com/stripe/stripe-go/v75" | ||
"github.com/stripe/stripe-go/v75/form" | ||
) | ||
|
||
// Client is used to invoke /quotes/{quote}/preview_subscription_schedules APIs. | ||
type Client struct { | ||
B stripe.Backend | ||
Key string | ||
} | ||
|
||
// List returns a list of quote preview schedules. | ||
func List(params *stripe.QuotePreviewScheduleListParams) *Iter { | ||
return getC().List(params) | ||
} | ||
|
||
// List returns a list of quote preview schedules. | ||
func (c Client) List(listParams *stripe.QuotePreviewScheduleListParams) *Iter { | ||
path := stripe.FormatURLPath( | ||
"/v1/quotes/%s/preview_subscription_schedules", | ||
stripe.StringValue(listParams.Quote), | ||
) | ||
return &Iter{ | ||
Iter: stripe.GetIter(listParams, func(p *stripe.Params, b *form.Values) ([]interface{}, stripe.ListContainer, error) { | ||
list := &stripe.QuotePreviewScheduleList{} | ||
err := c.B.CallRaw(http.MethodGet, path, c.Key, b, p, list) | ||
|
||
ret := make([]interface{}, len(list.Data)) | ||
for i, v := range list.Data { | ||
ret[i] = v | ||
} | ||
|
||
return ret, list, err | ||
}), | ||
} | ||
} | ||
|
||
// Iter is an iterator for quote preview schedules. | ||
type Iter struct { | ||
*stripe.Iter | ||
} | ||
|
||
// QuotePreviewSchedule returns the quote preview schedule which the iterator is currently pointing to. | ||
func (i *Iter) QuotePreviewSchedule() *stripe.QuotePreviewSchedule { | ||
return i.Current().(*stripe.QuotePreviewSchedule) | ||
} | ||
|
||
// QuotePreviewScheduleList returns the current list object which the iterator is | ||
// currently using. List objects will change as new API calls are made to | ||
// continue pagination. | ||
func (i *Iter) QuotePreviewScheduleList() *stripe.QuotePreviewScheduleList { | ||
return i.List().(*stripe.QuotePreviewScheduleList) | ||
} | ||
|
||
func getC() Client { | ||
return Client{stripe.GetBackend(stripe.APIBackend), stripe.Key} | ||
} |