Class: Countir::AccountCode

Inherits:
Object
  • Object
show all
Defined in:
lib/countir/resources/account_code.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, account_name:, account_name_en:, phonetic_kana:, phonetic_romaji:, account_type:) ⇒ AccountCode

Returns a new instance of AccountCode.



5
6
7
8
9
10
11
12
# File 'lib/countir/resources/account_code.rb', line 5

def initialize(id:, account_name:, account_name_en:, phonetic_kana:, phonetic_romaji:, account_type:)
  self.id              = id
  self.    = 
  self. = 
  self.phonetic_kana   = phonetic_kana
  self.phonetic_romaji = phonetic_romaji
  self.    = 
end

Instance Attribute Details

#account_nameObject

Returns the value of attribute account_name.



3
4
5
# File 'lib/countir/resources/account_code.rb', line 3

def 
  @account_name
end

#account_name_enObject

Returns the value of attribute account_name_en.



3
4
5
# File 'lib/countir/resources/account_code.rb', line 3

def 
  @account_name_en
end

#account_typeObject

Returns the value of attribute account_type.



3
4
5
# File 'lib/countir/resources/account_code.rb', line 3

def 
  @account_type
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/countir/resources/account_code.rb', line 3

def id
  @id
end

#phonetic_kanaObject

Returns the value of attribute phonetic_kana.



3
4
5
# File 'lib/countir/resources/account_code.rb', line 3

def phonetic_kana
  @phonetic_kana
end

#phonetic_romajiObject

Returns the value of attribute phonetic_romaji.



3
4
5
# File 'lib/countir/resources/account_code.rb', line 3

def phonetic_romaji
  @phonetic_romaji
end

Class Method Details

.response_schema(data) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/countir/resources/account_code.rb', line 14

def self.response_schema(data)
  data.map do |r|
    self.new(
      id:              r["id"],
      account_name:    r["account_name"],
      account_name_en: r["account_name_en"],
      phonetic_kana:   r["phonetic_kana"],
      phonetic_romaji: r["phonetic_romaji"],
      account_type:    r["account_type"]
    )
  end
end