Class: GreenButtonData::RetailCustomer
- Defined in:
- lib/green-button-data/retail_customer.rb
Instance Attribute Summary collapse
-
#account_id ⇒ Object
readonly
Returns the value of attribute account_id.
-
#customer_agreement_id ⇒ Object
readonly
Returns the value of attribute customer_agreement_id.
-
#links ⇒ Object
readonly
Returns the value of attribute links.
-
#meter_interval_length ⇒ Object
readonly
Returns the value of attribute meter_interval_length.
-
#meter_serial_number ⇒ Object
readonly
Returns the value of attribute meter_serial_number.
-
#meter_type ⇒ Object
readonly
Returns the value of attribute meter_type.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from Entry
Instance Method Summary collapse
- #address_general ⇒ Object
- #agreement_id_service_uuid_map ⇒ Object
- #has_address? ⇒ Boolean
- #has_agreement_id_map? ⇒ Boolean
Methods inherited from Entry
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
Constructor Details
This class inherits a constructor from GreenButtonData::Entry
Instance Attribute Details
#account_id ⇒ Object (readonly)
Returns the value of attribute account_id.
3 4 5 |
# File 'lib/green-button-data/retail_customer.rb', line 3 def account_id @account_id end |
#customer_agreement_id ⇒ Object (readonly)
Returns the value of attribute customer_agreement_id.
3 4 5 |
# File 'lib/green-button-data/retail_customer.rb', line 3 def customer_agreement_id @customer_agreement_id end |
#links ⇒ Object (readonly)
Returns the value of attribute links.
3 4 5 |
# File 'lib/green-button-data/retail_customer.rb', line 3 def links @links end |
#meter_interval_length ⇒ Object (readonly)
Returns the value of attribute meter_interval_length.
3 4 5 |
# File 'lib/green-button-data/retail_customer.rb', line 3 def meter_interval_length @meter_interval_length end |
#meter_serial_number ⇒ Object (readonly)
Returns the value of attribute meter_serial_number.
3 4 5 |
# File 'lib/green-button-data/retail_customer.rb', line 3 def meter_serial_number @meter_serial_number end |
#meter_type ⇒ Object (readonly)
Returns the value of attribute meter_type.
3 4 5 |
# File 'lib/green-button-data/retail_customer.rb', line 3 def meter_type @meter_type end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/green-button-data/retail_customer.rb', line 3 def name @name end |
Instance Method Details
#address_general ⇒ Object
19 20 21 |
# File 'lib/green-button-data/retail_customer.rb', line 19 def address_general @main_address.to_s end |
#agreement_id_service_uuid_map ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/green-button-data/retail_customer.rb', line 23 def agreement_id_service_uuid_map result = {} if has_agreement_id_map? result[:customer_agreement_id] = customer_agreement_id result[:service_uuid] = service_uuid end result end |
#has_address? ⇒ Boolean
11 12 13 |
# File 'lib/green-button-data/retail_customer.rb', line 11 def has_address? present?(address_general) end |
#has_agreement_id_map? ⇒ Boolean
15 16 17 |
# File 'lib/green-button-data/retail_customer.rb', line 15 def has_agreement_id_map? present?(customer_agreement_id) end |