Class: ConstantContact::Components::CampaignPreview

Inherits:
Component
  • Object
show all
Defined in:
lib/constantcontact/components/email_marketing/campaign_preview.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Component

#to_hash, to_hash_value, #to_json

Instance Attribute Details

#from_emailObject

Returns the value of attribute from_email



10
11
12
# File 'lib/constantcontact/components/email_marketing/campaign_preview.rb', line 10

def from_email
  @from_email
end

#preview_email_contentObject

Returns the value of attribute preview_email_content



10
11
12
# File 'lib/constantcontact/components/email_marketing/campaign_preview.rb', line 10

def preview_email_content
  @preview_email_content
end

#preview_text_contentObject

Returns the value of attribute preview_text_content



10
11
12
# File 'lib/constantcontact/components/email_marketing/campaign_preview.rb', line 10

def preview_text_content
  @preview_text_content
end

#reply_to_emailObject

Returns the value of attribute reply_to_email



10
11
12
# File 'lib/constantcontact/components/email_marketing/campaign_preview.rb', line 10

def reply_to_email
  @reply_to_email
end

#subjectObject

Returns the value of attribute subject



10
11
12
# File 'lib/constantcontact/components/email_marketing/campaign_preview.rb', line 10

def subject
  @subject
end

Class Method Details

.create(props) ⇒ CampaignPreview

Factory method to create a CampaignPreview object from an array

Parameters:

  • props (Hash)
    • properties to create object from

Returns:



17
18
19
20
21
22
23
24
25
# File 'lib/constantcontact/components/email_marketing/campaign_preview.rb', line 17

def self.create(props)
  obj = CampaignPreview.new
  if props
    props.each do |key, value|
      obj.send("#{key}=", value) if obj.respond_to? key
    end
  end
  obj
end