Class: GreenButtonData::RetailCustomer

Inherits:
Entry
  • Object
show all
Defined in:
lib/green-button-data/retail_customer.rb

Instance Attribute Summary

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

Constructor Details

This class inherits a constructor from GreenButtonData::Entry

Instance Method Details

#address_generalObject



11
12
13
# File 'lib/green-button-data/retail_customer.rb', line 11

def address_general
  @main_address.to_s
end

#agreement_id_service_uuid_mapObject



15
16
17
18
19
20
# File 'lib/green-button-data/retail_customer.rb', line 15

def agreement_id_service_uuid_map
  {
    customer_agreement_id: customer_agreement_id,
    service_uuid: service_uuid
  }
end

#has_address?Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/green-button-data/retail_customer.rb', line 3

def has_address?
  present?(address_general)
end

#has_agreement_id_map?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/green-button-data/retail_customer.rb', line 7

def has_agreement_id_map?
  present?(customer_agreement_id)
end