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



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

def city
  data['DefaultCity']
end

#community_idObject Also known as: code



10
11
12
# File 'lib/tops_connect/community.rb', line 10

def community_id
  data['CommunityID']
end

#community_keyObject Also known as: id



5
6
7
# File 'lib/tops_connect/community.rb', line 5

def community_key
  data['CommunityKey']
end

#last_synced_atObject



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

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

#modified_dateObject Also known as: updated_at



35
36
37
38
39
# File 'lib/tops_connect/community.rb', line 35

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

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

#nameObject



15
16
17
# File 'lib/tops_connect/community.rb', line 15

def name
  data['Name']
end

#stateObject



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

def state
  data['DefaultState']
end

#zipObject



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

def zip
  data['DefaultZip']
end