This repository was archived by the owner on Mar 15, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
Invoice Items
bradrydzewski edited this page Jun 5, 2012
·
4 revisions
stripe.SetKey("vtUQeOtUnYr7PGCLQ96Ul4zqpDUO4sOE")
params := stripe.InvoiceItemParams {
Customer : "cus_Lt6VFhU30fptWh",
Amount : 2000,
Currency : "usd",
Desc : "One-time setup fee",
}
item, err := stripe.InvoiceItems.Create(¶ms)
Full list of parameters for creating an Invoice Item:
http://go.pkgdoc.org/github.com/bradrydzewski/go.stripe#InvoiceItemParams
Official Stripe Documentation:
https://stripe.com/docs/api#create_invoiceitem
stripe.SetKey("vtUQeOtUnYr7PGCLQ96Ul4zqpDUO4sOE")
item, err := stripe.InvoiceItems.Retrieve("ii_LL5ruCWcwjqQIQ")
stripe.SetKey("vtUQeOtUnYr7PGCLQ96Ul4zqpDUO4sOE")
params := stripe.InvoiceItemParams {
Amount : 1500,
Desc : "Customer for [email protected]"
}
item, err := stripe.InvoiceItems.Update("ii_LL5ruCWcwjqQIQ", ¶ms)
stripe.SetKey("vtUQeOtUnYr7PGCLQ96Ul4zqpDUO4sOE")
_, err := stripe.InvoiceItems.Delete("ii_LL5ruCWcwjqQIQ")
stripe.SetKey("vtUQeOtUnYr7PGCLQ96Ul4zqpDUO4sOE")
items, err := stripe.InvoiceItems.List()
List for the specified range:
// get a list of 10 invoice items, starting at position 40 in the list of invoice items
items, err := stripe.InvoiceItems.ListN(10, 40)
List for the specified Customer:
items, err := stripe.InvoiceItems.CustomerList("cus_Lt6VFhU30fptWh")
List for the specified Customer and range:
items, err := stripe.InvoiceItems.CustomerList("cus_Lt6VFhU30fptWh", 10, 40)