Class: Cb::Models::CoverLetter

Inherits:
Object
  • Object
show all
Defined in:
lib/cb/models/implementations/cover_letter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_cover_letter) ⇒ CoverLetter

Returns a new instance of CoverLetter.



16
17
18
19
20
21
22
# File 'lib/cb/models/implementations/cover_letter.rb', line 16

def initialize(api_cover_letter)
  @id = api_cover_letter['CoverLetterDID'] || api_cover_letter['ExternalId']
  @name = api_cover_letter['CoverLetterName'] || api_cover_letter['Name']
  @text = api_cover_letter['CoverLetterText'] || api_cover_letter['Text']
  @created = api_cover_letter['CreatedDate'] || api_cover_letter['CreatedDT']
  @modified = api_cover_letter['ModifiedDate'] || api_cover_letter['ModifiedDT']
end

Instance Attribute Details

#createdObject (readonly)

Returns the value of attribute created.



14
15
16
# File 'lib/cb/models/implementations/cover_letter.rb', line 14

def created
  @created
end

#idObject (readonly)

Returns the value of attribute id.



14
15
16
# File 'lib/cb/models/implementations/cover_letter.rb', line 14

def id
  @id
end

#modifiedObject (readonly)

Returns the value of attribute modified.



14
15
16
# File 'lib/cb/models/implementations/cover_letter.rb', line 14

def modified
  @modified
end

#nameObject (readonly)

Returns the value of attribute name.



14
15
16
# File 'lib/cb/models/implementations/cover_letter.rb', line 14

def name
  @name
end

#textObject (readonly)

Returns the value of attribute text.



14
15
16
# File 'lib/cb/models/implementations/cover_letter.rb', line 14

def text
  @text
end