stripe-haskell-0.1.1.1: Stripe API for Haskell

Copyright(c) David Johnson, 2014
Maintainerdjohnson.m@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Web.Stripe.Invoice

Contents

Description

https://stripe.com/docs/api#invoices

import Web.Stripe         
import Web.Stripe.Customer
import Web.Stripe.Invoice
import Web.Stripe.InvoiceItem
import Web.Stripe.Plan

main :: IO ()
main = do
  let config = SecretKey "secret_key"
  result <- stripe config $ do
     Customer { customerId = cid } <- createEmptyCustomer
     Plan { } <- createPlan (PlanId "planid") 20 USD Day "testplan" []
     InvoiceItem { } <- createInvoiceItem cid 100 USD Nothing Nothing Nothing []
     createInvoice cid []
  case result of
    Right invoice -> print invoice
    Left  stripeError -> print stripeError

Synopsis

API

getInvoiceExpandable Source

Arguments

:: InvoiceId

Get an Invoice by InvoiceId

-> ExpandParams

ExpandParams of the objects for expansion

-> Stripe Invoice 

Retrieve an Invoice by InvoiceId with ExpandParams

getInvoices Source

Arguments

:: Maybe Limit

Defaults to 10 if Nothing specified

-> StartingAfter InvoiceItemId

Paginate starting after the following Customer

-> EndingBefore InvoiceItemId

Paginate ending before the following CustomerID

-> Stripe (StripeList Invoice) 

Retrieve a StripeList of Invoices

getInvoicesExpandable Source

Arguments

:: Maybe Limit

Defaults to 10 if Nothing specified

-> StartingAfter InvoiceItemId

Paginate starting after the following Customer

-> EndingBefore InvoiceItemId

Paginate ending before the following CustomerID

-> ExpandParams

ExpandParams of the objects for expansion

-> Stripe (StripeList Invoice) 

Retrieve a StripeList of Invoices with ExpandParams

getInvoiceLineItems Source

Arguments

:: InvoiceId

Get an Invoice by InvoiceId

-> Limit

Defaults to 10 if Nothing specified

-> StartingAfter InvoiceLineItemId

Paginate starting after the following InvoiceLineItemId

-> EndingBefore InvoiceLineItemId

Paginate ending before the following InvoiceLineItemId

-> Stripe (StripeList InvoiceLineItem) 

Retrieve an Invoice by InvoiceId

getUpcomingInvoice Source

Arguments

:: CustomerId

The InvoiceId of the Invoice to retrieve

-> Stripe Invoice 

Retrieve an upcoming Invoice for a Customer by CustomerId

getUpcomingInvoices Source

Arguments

:: CustomerId

The InvoiceId of the Invoice to retrieve

-> Stripe (StripeList Invoice) 

Retrieve a StripeList of Invoices

Types

data Period Source

Period for an InvoiceLineItem

Constructors

Period 

Fields

start :: UTCTime
 
end :: UTCTime
 

Instances