class GreenButtonData::RetailCustomer

Attributes

account_id[R]
customer_agreement_id[R]
meter_interval_length[R]
meter_serial_number[R]
meter_type[R]
name[R]

Public Instance Methods

address_general() click to toggle source
# File lib/green-button-data/retail_customer.rb, line 19
def address_general
  @main_address.to_s
end
agreement_id_service_uuid_map() click to toggle source
# 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?() click to toggle source
# File lib/green-button-data/retail_customer.rb, line 11
def has_address?
  present?(address_general)
end
has_agreement_id_map?() click to toggle source
# File lib/green-button-data/retail_customer.rb, line 15
def has_agreement_id_map?
  present?(customer_agreement_id)
end

Private Instance Methods

blank?(data) click to toggle source
# File lib/green-button-data/retail_customer.rb, line 44
def blank?(data)
  data.respond_to?(:empty?) ? !!data.empty? : !data
end
present?(data) click to toggle source
# File lib/green-button-data/retail_customer.rb, line 40
def present?(data)
  !blank?(data)
end
service_uuid() click to toggle source
# File lib/green-button-data/retail_customer.rb, line 36
def service_uuid
  @id
end