Class: Service

Inherits:
JSONable show all
Defined in:
lib/Entities/service.rb

Instance Method Summary collapse

Methods inherited from JSONable

#from_json!, #to_h, #to_json

Constructor Details

#initialize(h = nil) ⇒ Service

Returns a new instance of Service.



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/Entities/service.rb', line 4

def initialize(h = nil)

  if(h != nil)
    h.each {
        |k,v|

      propNameFormatted = k.to_s + "="


      if(Service.instance_methods(false).include?(propNameFormatted.to_sym))
        public_send("#{k}=",v)
      end
    }
  end

end

Instance Method Details

#CustomFields=(customFields) ⇒ Object

Hash type



37
38
39
# File 'lib/Entities/service.rb', line 37

def CustomFields=(customFields) #Hash type
  @customFields = customFields
end

#Description=(description) ⇒ Object



29
30
31
# File 'lib/Entities/service.rb', line 29

def Description=(description)
  @description = description
end

#getCustomFieldsObject



58
59
60
# File 'lib/Entities/service.rb', line 58

def getCustomFields
  return @customFields
end

#getDescriptionObject



50
51
52
# File 'lib/Entities/service.rb', line 50

def getDescription
  return @description
end

#getIdObject

Getters



42
43
44
# File 'lib/Entities/service.rb', line 42

def getId
  return @id
end

#getIdentificationNameObject



54
55
56
# File 'lib/Entities/service.rb', line 54

def getIdentificationName
  return @identificationName
end

#getNameObject



46
47
48
# File 'lib/Entities/service.rb', line 46

def getName
  return @name
end

#Id=(id) ⇒ Object



21
22
23
# File 'lib/Entities/service.rb', line 21

def Id=(id)
  @id = id
end

#IdentificationName=(identificationName) ⇒ Object



33
34
35
# File 'lib/Entities/service.rb', line 33

def IdentificationName=(identificationName)
  @identificationName = identificationName
end

#Name=(name) ⇒ Object



25
26
27
# File 'lib/Entities/service.rb', line 25

def Name=(name)
  @name = name
end