Documentation ¶
Index ¶
- Constants
- func UsageByFeature(a, b Usage) bool
- type CheckoutRequest
- type CheckoutResponse
- type ClockRequest
- type ClockResponse
- type Coupon
- type Divide
- type Error
- type Feature
- type InvoiceSettings
- type Model
- type OrgInfo
- type PaymentMethodsResponse
- type Period
- type Phase
- type PhaseResponse
- type PhasesResponse
- type Plan
- type PushResponse
- type PushResult
- type ReportRequest
- type ScheduleRequest
- type ScheduleResponse
- type Taxation
- type Tier
- type Usage
- type UsageResponse
- type WhoAmIResponse
- type WhoIsResponse
Constants ¶
View Source
const Inf = 1<<63 - 1
Variables ¶
This section is empty.
Functions ¶
func UsageByFeature ¶ added in v0.3.8
Types ¶
type CheckoutRequest ¶ added in v0.7.1
type CheckoutResponse ¶ added in v0.7.1
type CheckoutResponse struct {
URL string `json:"url"`
}
type ClockRequest ¶ added in v0.10.0
type ClockResponse ¶ added in v0.10.0
type Coupon ¶ added in v0.12.0
type Coupon struct { ID string `json:"id"` Metadata map[string]string Created time.Time AmountOff int `json:"amount_off,omitempty"` Currency string `json:"currency,omitempty"` Duration string `json:"duration,omitempty"` DurationInMonths int `json:"duration_in_months,omitempty"` MaxRedemptions int `json:"max_redemptions,omitempty"` Name string `json:"name,omitempty"` PercentOff float64 `json:"percent_off,omitempty"` RedeemBy time.Time TimesRedeemed int `json:"times_redeemed,omitempty"` Valid bool `json:"valid,omitempty"` }
type Error ¶ added in v0.5.0
type InvoiceSettings ¶ added in v0.7.1
type InvoiceSettings struct {
DefaultPaymentMethod string `json:"default_payment_method"`
}
type OrgInfo ¶ added in v0.6.0
type OrgInfo struct { Email string `json:"email"` Name string `json:"name"` Description string `json:"description"` Phone string `json:"phone"` Created time.Time `json:"created"` Metadata map[string]string `json:"metadata"` PaymentMethod string `json:"payment_method"` InvoiceSettings InvoiceSettings `json:"invoice_settings"` }
type PaymentMethodsResponse ¶ added in v0.9.0
type Period ¶ added in v0.10.0
type PhaseResponse ¶ added in v0.3.8
type PhaseResponse struct { Effective time.Time `json:"effective,omitempty"` End time.Time `json:"end,omitempty"` Features []refs.FeaturePlan `json:"features,omitempty"` Plans []refs.Plan `json:"plans,omitempty"` Fragments []refs.FeaturePlan `json:"fragments,omitempty"` Trial bool `json:"trial,omitempty"` Tax Taxation `json:"tax,omitempty"` Current Period `json:"current,omitempty"` // not set on PhasesResponse Coupon string `json:"coupon,omitempty"` CouponData *Coupon `json:"coupon_data,omitempty"` }
The PhaseResponse is a response with all current phase fields exposed as top-level fields. Clients that need all phase data should use the Phases field.
func (PhaseResponse) MarshalJSON ¶ added in v0.10.0
func (pr PhaseResponse) MarshalJSON() ([]byte, error)
type PhasesResponse ¶
type PhasesResponse struct { Current Period `json:"current,omitempty"` Phases []PhaseResponse `json:"phases"` }
type PushResponse ¶ added in v0.4.2
type PushResponse struct {
Results []PushResult `json:"results,omitempty"`
}
type PushResult ¶ added in v0.4.2
type PushResult struct { Feature refs.FeaturePlan `json:"feature"` Status string `json:"status"` Reason string `json:"reason"` }
type ReportRequest ¶
type ScheduleRequest ¶ added in v0.6.0
type ScheduleResponse ¶ added in v0.7.1
type ScheduleResponse struct{}
ScheduleResponse is the expected response from a schedule request. It is currently empty, reserved for furture use.
type Tier ¶ added in v0.4.2
type Tier struct { Upto int `json:"upto,omitempty"` Price float64 `json:"price,omitempty"` Base int `json:"base,omitempty"` }
func (*Tier) MarshalJSON ¶ added in v0.4.2
func (*Tier) UnmarshalJSON ¶ added in v0.4.2
type UsageResponse ¶
type WhoAmIResponse ¶ added in v0.5.0
type WhoIsResponse ¶
Click to show internal directories.
Click to hide internal directories.