Method: PureCloud::CampaignSequence#initialize
- Defined in:
- lib/purecloud/models/campaign_sequence.rb
#initialize(attributes = {}) ⇒ CampaignSequence
Returns a new instance of CampaignSequence.
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/purecloud/models/campaign_sequence.rb', line 100 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo} if attributes[:'id'] self.id = attributes[:'id'] end if attributes[:'name'] self.name = attributes[:'name'] end if attributes[:'dateCreated'] self.date_created = attributes[:'dateCreated'] end if attributes[:'dateModified'] self.date_modified = attributes[:'dateModified'] end if attributes[:'version'] self.version = attributes[:'version'] end if attributes[:'campaigns'] if (value = attributes[:'campaigns']).is_a?(Array) self.campaigns = value end end if attributes[:'currentCampaign'] self.current_campaign = attributes[:'currentCampaign'] end if attributes[:'status'] self.status = attributes[:'status'] end if attributes[:'stopMessage'] self. = attributes[:'stopMessage'] end if attributes[:'repeat'] self.repeat = attributes[:'repeat'] else self.repeat = false end if attributes[:'selfUri'] self.self_uri = attributes[:'selfUri'] end end |