module TopsConnect::Communities

Public Instance Methods

charge_codes() click to toggle source

Method: GET Endpoint: ChargeCode_GetList Returns: Array<Hash>

# File lib/tops_connect/communities.rb, line 27
def charge_codes
  get('/chargecode').map do |charge_code|
    {
      key: charge_code['ChargeCodeKey'],
      code: charge_code['Code'],
      description: charge_code['Description'],
      name: charge_code['Name']
    }
  end
end
communities() click to toggle source

Method: GET Endpoint: Community_GetList Returns: Array<TopsConnect::Community>

# File lib/tops_connect/communities.rb, line 11
def communities
  get('/community').map do |community_data|
    TopsConnect::Community.new community_data
  end
end
community() click to toggle source

Method: GET Endpoint: Community_Get Returns: TopsConnect::Community

# File lib/tops_connect/communities.rb, line 20
def community
  TopsConnect::Community.new get("/community/#{@community_id}")
end