-
Notifications
You must be signed in to change notification settings - Fork 463
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1615 from stripe/latest-codegen-beta
API Updates for beta branch
- Loading branch information
Showing
16 changed files
with
492 additions
and
28 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
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 @@ | ||
v232 | ||
v237 |
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,77 @@ | ||
// | ||
// | ||
// File generated from our OpenAPI spec | ||
// | ||
// | ||
|
||
// Package cardbundle provides the /issuing/card_bundles APIs | ||
package cardbundle | ||
|
||
import ( | ||
"net/http" | ||
|
||
stripe "github.com/stripe/stripe-go/v74" | ||
"github.com/stripe/stripe-go/v74/form" | ||
) | ||
|
||
// Client is used to invoke /issuing/card_bundles APIs. | ||
type Client struct { | ||
B stripe.Backend | ||
Key string | ||
} | ||
|
||
// Get returns the details of an issuing card bundle. | ||
func Get(id string, params *stripe.IssuingCardBundleParams) (*stripe.IssuingCardBundle, error) { | ||
return getC().Get(id, params) | ||
} | ||
|
||
// Get returns the details of an issuing card bundle. | ||
func (c Client) Get(id string, params *stripe.IssuingCardBundleParams) (*stripe.IssuingCardBundle, error) { | ||
path := stripe.FormatURLPath("/v1/issuing/card_bundles/%s", id) | ||
cardbundle := &stripe.IssuingCardBundle{} | ||
err := c.B.Call(http.MethodGet, path, c.Key, params, cardbundle) | ||
return cardbundle, err | ||
} | ||
|
||
// List returns a list of issuing card bundles. | ||
func List(params *stripe.IssuingCardBundleListParams) *Iter { | ||
return getC().List(params) | ||
} | ||
|
||
// List returns a list of issuing card bundles. | ||
func (c Client) List(listParams *stripe.IssuingCardBundleListParams) *Iter { | ||
return &Iter{ | ||
Iter: stripe.GetIter(listParams, func(p *stripe.Params, b *form.Values) ([]interface{}, stripe.ListContainer, error) { | ||
list := &stripe.IssuingCardBundleList{} | ||
err := c.B.CallRaw(http.MethodGet, "/v1/issuing/card_bundles", 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 issuing card bundles. | ||
type Iter struct { | ||
*stripe.Iter | ||
} | ||
|
||
// IssuingCardBundle returns the issuing card bundle which the iterator is currently pointing to. | ||
func (i *Iter) IssuingCardBundle() *stripe.IssuingCardBundle { | ||
return i.Current().(*stripe.IssuingCardBundle) | ||
} | ||
|
||
// IssuingCardBundleList 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) IssuingCardBundleList() *stripe.IssuingCardBundleList { | ||
return i.List().(*stripe.IssuingCardBundleList) | ||
} | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
// | ||
// | ||
// File generated from our OpenAPI spec | ||
// | ||
// | ||
|
||
// Package carddesign provides the /issuing/card_designs APIs | ||
package carddesign | ||
|
||
import ( | ||
"net/http" | ||
|
||
stripe "github.com/stripe/stripe-go/v74" | ||
"github.com/stripe/stripe-go/v74/form" | ||
) | ||
|
||
// Client is used to invoke /issuing/card_designs APIs. | ||
type Client struct { | ||
B stripe.Backend | ||
Key string | ||
} | ||
|
||
// Get returns the details of an issuing card design. | ||
func Get(id string, params *stripe.IssuingCardDesignParams) (*stripe.IssuingCardDesign, error) { | ||
return getC().Get(id, params) | ||
} | ||
|
||
// Get returns the details of an issuing card design. | ||
func (c Client) Get(id string, params *stripe.IssuingCardDesignParams) (*stripe.IssuingCardDesign, error) { | ||
path := stripe.FormatURLPath("/v1/issuing/card_designs/%s", id) | ||
carddesign := &stripe.IssuingCardDesign{} | ||
err := c.B.Call(http.MethodGet, path, c.Key, params, carddesign) | ||
return carddesign, err | ||
} | ||
|
||
// Update updates an issuing card design's properties. | ||
func Update(id string, params *stripe.IssuingCardDesignParams) (*stripe.IssuingCardDesign, error) { | ||
return getC().Update(id, params) | ||
} | ||
|
||
// Update updates an issuing card design's properties. | ||
func (c Client) Update(id string, params *stripe.IssuingCardDesignParams) (*stripe.IssuingCardDesign, error) { | ||
path := stripe.FormatURLPath("/v1/issuing/card_designs/%s", id) | ||
carddesign := &stripe.IssuingCardDesign{} | ||
err := c.B.Call(http.MethodPost, path, c.Key, params, carddesign) | ||
return carddesign, err | ||
} | ||
|
||
// List returns a list of issuing card designs. | ||
func List(params *stripe.IssuingCardDesignListParams) *Iter { | ||
return getC().List(params) | ||
} | ||
|
||
// List returns a list of issuing card designs. | ||
func (c Client) List(listParams *stripe.IssuingCardDesignListParams) *Iter { | ||
return &Iter{ | ||
Iter: stripe.GetIter(listParams, func(p *stripe.Params, b *form.Values) ([]interface{}, stripe.ListContainer, error) { | ||
list := &stripe.IssuingCardDesignList{} | ||
err := c.B.CallRaw(http.MethodGet, "/v1/issuing/card_designs", 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 issuing card designs. | ||
type Iter struct { | ||
*stripe.Iter | ||
} | ||
|
||
// IssuingCardDesign returns the issuing card design which the iterator is currently pointing to. | ||
func (i *Iter) IssuingCardDesign() *stripe.IssuingCardDesign { | ||
return i.Current().(*stripe.IssuingCardDesign) | ||
} | ||
|
||
// IssuingCardDesignList 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) IssuingCardDesignList() *stripe.IssuingCardDesignList { | ||
return i.List().(*stripe.IssuingCardDesignList) | ||
} | ||
|
||
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
Oops, something went wrong.