Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientOption ¶
type ClientOption interface {
Apply(*Session)
}
func WithCookieJar ¶
func WithCookieJar(jar *cookiejar.Jar) ClientOption
type ClientOptionFunc ¶
type ClientOptionFunc func(*Session)
func (ClientOptionFunc) Apply ¶
func (fnc ClientOptionFunc) Apply(s *Session)
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (*Session) Usage ¶
func (s *Session) Usage(ccsn string, opts UsageOptions) ([]UsageRecord, []byte, error)
Usage looks up a specific compasscard usage
type UsageRecord ¶
type UsageRecord struct { DateTime time.Time Transaction string Product string LineItem string Amount float64 BalanceDetails float64 OrderDate string Payment string OrderNumber string AuthCode string Total string }
func Parse ¶
func Parse(raw []byte) ([]UsageRecord, error)
Parse converts a compass card csv response into UsageRecords
Click to show internal directories.
Click to hide internal directories.