Documentation
¶
Index ¶
- func BuildTariffCode(fuel, registers, product, area string) string
- func ParseTariffCode(tc string) (string, string, string, string, error)
- type Account
- type Agreement
- type Client
- func (c *Client) Account(ctx context.Context) (Account, error)
- func (c *Client) Consumption(ctx context.Context, mpan string, serial string, from time.Time, to time.Time) (Consumption, error)
- func (c *Client) Products(ctx context.Context, availableAt *time.Time) (Products, error)
- func (c *Client) TariffRates(ctx context.Context, prod, fuel, tariff, rate string, from time.Time, ...) (TariffRate, error)
- type Consumption
- type ElectricityMeterPoint
- type GasMeterPoints
- type Meter
- type Product
- type Products
- type Property
- type RateInterval
- type Register
- type TariffRate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildTariffCode ¶
Types ¶
type Consumption ¶
type ElectricityMeterPoint ¶
type ElectricityMeterPoint struct { MPAN string `json:"mpan"` ProfileClass int `json:"profile_class"` ConsumptionStandard int `json:"consumption_standard"` Meters []Meter `json:"meters"` Agreements []Agreement `json:"agreements"` }
func (ElectricityMeterPoint) ActiveAgreement ¶
func (em ElectricityMeterPoint) ActiveAgreement(at time.Time) *Agreement
func (ElectricityMeterPoint) ActiveMeters ¶
func (em ElectricityMeterPoint) ActiveMeters() []Meter
type GasMeterPoints ¶
type Product ¶
type Product struct { Code string `json:"code"` FullName string `json:"full_name"` DisplayName string `json:"display_name"` Description string `json:"description"` IsVariable bool `json:"is_variable"` IsGreen bool `json:"is_green"` IsTracker bool `json:"is_tracker"` IsPrepay bool `json:"is_prepay"` IsBusiness bool `json:"is_business"` IsRestricted bool `json:"is_restricted"` Term int `json:"term"` Brand string `json:"brand"` AvailableFrom time.Time `json:"available_from"` AvailableTo interface{} `json:"available_to"` Links []struct { Href string `json:"href"` Method string `json:"method"` Rel string `json:"rel"` } `json:"links"` }
type Products ¶
type Products struct { Count int `json:"count"` Next string `json:"next"` Previous string `json:"previous"` Results []Product `json:"results"` }
func (Products) FindByTariff ¶
type Property ¶
type Property struct { ID int `json:"id"` MovedInAt time.Time `json:"moved_in_at"` MovedOutAt *time.Time `json:"moved_out_at"` AddressLine1 string `json:"address_line_1"` AddressLine2 string `json:"address_line_2"` AddressLine3 string `json:"address_line_3"` Town string `json:"town"` County string `json:"county"` Postcode string `json:"postcode"` ElectricityMeterPoints []ElectricityMeterPoint `json:"electricity_meter_points"` GasMeterPoints []GasMeterPoints `json:"gas_meter_points"` }
type RateInterval ¶
type TariffRate ¶
type TariffRate struct { Count int `json:"count"` Next string `json:"next"` Previous string `json:"previous"` Results []RateInterval `json:"results"` }
Click to show internal directories.
Click to hide internal directories.