Class: GreenButtonData::ReadingType
Constant Summary
Enumerations::ACCUMULATION, Enumerations::AUTHORIZATION_STATUS, Enumerations::COMMODITY, Enumerations::CURRENCY, Enumerations::DATA_CUSTODIAN_APPLICATION_STATUS, Enumerations::DATA_QUALIFIER, Enumerations::ESPI_SERVICE_STATUS, Enumerations::FLOW_DIRECTION, Enumerations::MEASUREMENT, Enumerations::PHASE_CODE, Enumerations::QUALITY_OF_READING, Enumerations::SERVICE, Enumerations::THIRD_PARTY_APPLICATION_STATUS, Enumerations::THIRD_PARTY_APPLICATION_TYPE, Enumerations::THIRD_PARTY_APPLICATION_USE, Enumerations::TIME_ATTRIBUTE, Enumerations::TIME_PERIOD_OF_INTEREST, Enumerations::UNIT_MULTIPLIER, Enumerations::UNIT_SYMBOL
Instance Attribute Summary collapse
Attributes inherited from Entry
#id, #token, #usage_point_id
Instance Method Summary
collapse
Methods inherited from Entry
#initialize
Methods included from Utilities
#attributes_to_hash, #class_from_name, #epoch_to_time, #first_sunday_of, #last_weekday_of, #normalize_epoch, #nth_weekday_of, #parse_datetime, #weekday_offset
Methods included from Fetchable
included
Instance Attribute Details
#consumption_tier ⇒ Object
Returns the value of attribute consumption_tier.
5
6
7
|
# File 'lib/green-button-data/reading_type.rb', line 5
def consumption_tier
@consumption_tier
end
|
#cpp ⇒ Object
Returns the value of attribute cpp.
5
6
7
|
# File 'lib/green-button-data/reading_type.rb', line 5
def cpp
@cpp
end
|
#tou ⇒ Object
Returns the value of attribute tou.
5
6
7
|
# File 'lib/green-button-data/reading_type.rb', line 5
def tou
@tou
end
|
Instance Method Details
#accumulation_behaviour ⇒ Object
7
8
9
|
# File 'lib/green-button-data/reading_type.rb', line 7
def accumulation_behaviour
get_enum_symbol ACCUMULATION, @accumulation_behaviour
end
|
#commodity ⇒ Object
11
12
13
|
# File 'lib/green-button-data/reading_type.rb', line 11
def commodity
get_enum_symbol COMMODITY, @commodity
end
|
#currency ⇒ Object
15
16
17
|
# File 'lib/green-button-data/reading_type.rb', line 15
def currency
get_enum_symbol CURRENCY, @currency
end
|
#data_qualifier ⇒ Object
19
20
21
|
# File 'lib/green-button-data/reading_type.rb', line 19
def data_qualifier
get_enum_symbol DATA_QUALIFIER, @data_qualifier
end
|
#default_quality ⇒ Object
23
24
25
|
# File 'lib/green-button-data/reading_type.rb', line 23
def default_quality
get_enum_symbol QUALITY_OF_READING, @default_quality
end
|
#flow_direction ⇒ Object
27
28
29
|
# File 'lib/green-button-data/reading_type.rb', line 27
def flow_direction
get_enum_symbol FLOW_DIRECTION, @flow_direction
end
|
#interval_length ⇒ Object
31
32
33
|
# File 'lib/green-button-data/reading_type.rb', line 31
def interval_length
@interval_length
end
|
#kind ⇒ Object
35
36
37
|
# File 'lib/green-button-data/reading_type.rb', line 35
def kind
get_enum_symbol MEASUREMENT, @kind
end
|
#measuring_period ⇒ Object
39
40
41
|
# File 'lib/green-button-data/reading_type.rb', line 39
def measuring_period
get_enum_symbol TIME_ATTRIBUTE, @measuring_period
end
|
#phase ⇒ Object
43
44
45
|
# File 'lib/green-button-data/reading_type.rb', line 43
def phase
get_enum_symbol PHASE_CODE, @phase
end
|
#scale_factor ⇒ Object
47
48
49
|
# File 'lib/green-button-data/reading_type.rb', line 47
def scale_factor
10.0 ** @power_of_ten_multiplier
end
|
#time_attribute ⇒ Object
51
52
53
|
# File 'lib/green-button-data/reading_type.rb', line 51
def time_attribute
get_enum_symbol TIME_PERIOD_OF_INTEREST, @time_attribute
end
|
#to_h ⇒ Object
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
# File 'lib/green-button-data/reading_type.rb', line 62
def to_h
{
accumulation_behaviour: accumulation_behaviour,
commodity: commodity,
consumption_tier: consumption_tier,
cpp: cpp,
currency: currency,
data_qualifier: data_qualifier,
default_quality: default_quality,
flow_direction: flow_direction,
kind: kind,
measuring_period: measuring_period,
phase: phase,
scale_factor: scale_factor,
time_attribute: time_attribute,
tou: tou,
unit_of_measurement: unit_of_measurement
}
end
|
#unit_of_measurement ⇒ Object
Also known as:
unit, uom
55
56
57
|
# File 'lib/green-button-data/reading_type.rb', line 55
def unit_of_measurement
get_enum_symbol UNIT_SYMBOL, @uom
end
|