Class: TurkishBanks::Branch

Inherits:
TurkishBank show all
Defined in:
lib/turkish_banks/branch.rb

Constant Summary

Constants inherited from TurkishBank

TurkishBank::BANKS_URL

Instance Attribute Summary collapse

Attributes inherited from TurkishBank

#banks, #last_update_date

Instance Method Summary collapse

Methods inherited from TurkishBank

#get_branches_of, #get_information_of

Constructor Details

#initialize(branch) ⇒ Branch

Returns a new instance of Branch.



5
6
7
8
9
10
11
12
13
14
# File 'lib/turkish_banks/branch.rb', line 5

def initialize(branch)
  @name          = branch["sAd"]
  @code          = branch["sKd"]
  @bank_code     = branch["bKd"]
  @city_code     = branch["sIlKd"]
  @city          = branch["sIlAd"]
  @district_code = branch["sIlcKd"]
  @district      = branch["sIlcAd"]
  @phone         = branch["tlf"]
end

Instance Attribute Details

#bank_codeObject

Returns the value of attribute bank_code.



3
4
5
# File 'lib/turkish_banks/branch.rb', line 3

def bank_code
  @bank_code
end

#cityObject

Returns the value of attribute city.



3
4
5
# File 'lib/turkish_banks/branch.rb', line 3

def city
  @city
end

#city_codeObject

Returns the value of attribute city_code.



3
4
5
# File 'lib/turkish_banks/branch.rb', line 3

def city_code
  @city_code
end

#codeObject

Returns the value of attribute code.



3
4
5
# File 'lib/turkish_banks/branch.rb', line 3

def code
  @code
end

#districtObject

Returns the value of attribute district.



3
4
5
# File 'lib/turkish_banks/branch.rb', line 3

def district
  @district
end

#district_codeObject

Returns the value of attribute district_code.



3
4
5
# File 'lib/turkish_banks/branch.rb', line 3

def district_code
  @district_code
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/turkish_banks/branch.rb', line 3

def name
  @name
end

#phoneObject

Returns the value of attribute phone.



3
4
5
# File 'lib/turkish_banks/branch.rb', line 3

def phone
  @phone
end