Documentation ¶
Overview ¶
Package margin provides the /billing/margins APIs
Index ¶
- func Get(id string, params *stripe.MarginParams) (*stripe.Margin, error)
- func New(params *stripe.MarginParams) (*stripe.Margin, error)
- func Update(id string, params *stripe.MarginParams) (*stripe.Margin, error)
- type Client
- func (c Client) Get(id string, params *stripe.MarginParams) (*stripe.Margin, error)
- func (c Client) List(listParams *stripe.MarginListParams) *Iter
- func (c Client) New(params *stripe.MarginParams) (*stripe.Margin, error)
- func (c Client) Update(id string, params *stripe.MarginParams) (*stripe.Margin, error)
- type Iter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(params *stripe.MarginParams) (*stripe.Margin, error)
Create a margin object to be used with invoices, invoice items, and invoice line items for a customer to represent a partner discount. A margin has a percent_off which is the percent that will be taken off the subtotal after all items and other discounts and promotions) of any invoices for a customer. Calculation of prorations do not include any partner margins applied on the original invoice item.
Types ¶
type Client ¶
Client is used to invoke /billing/margins APIs.
func (Client) List ¶
func (c Client) List(listParams *stripe.MarginListParams) *Iter
Retrieve a list of your margins.
func (Client) New ¶
Create a margin object to be used with invoices, invoice items, and invoice line items for a customer to represent a partner discount. A margin has a percent_off which is the percent that will be taken off the subtotal after all items and other discounts and promotions) of any invoices for a customer. Calculation of prorations do not include any partner margins applied on the original invoice item.
type Iter ¶
Iter is an iterator for margins.
func (*Iter) MarginList ¶
func (i *Iter) MarginList() *stripe.MarginList
MarginList returns the current list object which the iterator is currently using. List objects will change as new API calls are made to continue pagination.