Class: TopsConnect::Community

Inherits:
Base
  • Object
show all
Defined in:
lib/tops_connect/community.rb

Instance Attribute Summary

Attributes inherited from Base

#data

Instance Method Summary collapse

Methods inherited from Base

#[], #initialize

Constructor Details

This class inherits a constructor from TopsConnect::Base

Instance Method Details

#cityObject



22
23
24
# File 'lib/tops_connect/community.rb', line 22

def city
  data['DefaultCity']
end

#community_idObject Also known as: code



13
14
15
# File 'lib/tops_connect/community.rb', line 13

def community_id
  data['CommunityID']
end

#community_keyObject Also known as: id



8
9
10
# File 'lib/tops_connect/community.rb', line 8

def community_key
  data['CommunityKey']
end

#last_synced_atObject



34
35
36
# File 'lib/tops_connect/community.rb', line 34

def last_synced_at
  Time.parse data['LastSyncTime'] if data['LastSyncTime']
end

#modified_dateObject Also known as: updated_at



38
39
40
41
42
# File 'lib/tops_connect/community.rb', line 38

def modified_date
  return unless data['Metadata']['ModifiedDate']

  Time.parse data['Metadata']['ModifiedDate']
end

#nameObject



18
19
20
# File 'lib/tops_connect/community.rb', line 18

def name
  data['Name']
end

#stateObject



26
27
28
# File 'lib/tops_connect/community.rb', line 26

def state
  data['DefaultState']
end

#zipObject



30
31
32
# File 'lib/tops_connect/community.rb', line 30

def zip
  data['DefaultZip']
end