Class: GreenButtonData::Authorization

Inherits:
Entry
  • Object
show all
Includes:
Enumerations, Utilities
Defined in:
lib/green-button-data/authorization.rb

Constant Summary

Constants included from Enumerations

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

#token, #usage_point_id

Instance Method Summary collapse

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 inherited from Entry

#initialize

Methods included from Fetchable

included

Constructor Details

This class inherits a constructor from GreenButtonData::Entry

Instance Attribute Details

#authorization_uriObject

Returns the value of attribute authorization_uri.



8
9
10
# File 'lib/green-button-data/authorization.rb', line 8

def authorization_uri
  @authorization_uri
end

#authorized_periodObject

Returns the value of attribute authorized_period.



8
9
10
# File 'lib/green-button-data/authorization.rb', line 8

def authorized_period
  @authorized_period
end

#expires_atObject

Returns the value of attribute expires_at.



8
9
10
# File 'lib/green-button-data/authorization.rb', line 8

def expires_at
  @expires_at
end

#idObject (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/green-button-data/authorization.rb', line 6

def id
  @id
end

#published_periodObject

Returns the value of attribute published_period.



8
9
10
# File 'lib/green-button-data/authorization.rb', line 8

def published_period
  @published_period
end

#resource_uriObject

Returns the value of attribute resource_uri.



8
9
10
# File 'lib/green-button-data/authorization.rb', line 8

def resource_uri
  @resource_uri
end

#statusObject

Returns the value of attribute status.



8
9
10
# File 'lib/green-button-data/authorization.rb', line 8

def status
  @status
end

Instance Method Details

#active?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/green-button-data/authorization.rb', line 15

def active?
  @status > 0
end