Class: SmartlistSparkpost::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/smartlist_sparkpost.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



32
33
34
# File 'lib/smartlist_sparkpost.rb', line 32

def initialize
  set_defaults
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



20
21
22
# File 'lib/smartlist_sparkpost.rb', line 20

def api_key
  @api_key
end

#campaign_idObject

Returns the value of attribute campaign_id.



26
27
28
# File 'lib/smartlist_sparkpost.rb', line 26

def campaign_id
  @campaign_id
end

#html_content_onlyObject

Returns the value of attribute html_content_only.



30
31
32
# File 'lib/smartlist_sparkpost.rb', line 30

def html_content_only
  @html_content_only
end

#ip_poolObject

Returns the value of attribute ip_pool.



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

def ip_pool
  @ip_pool
end

#track_clicksObject

Returns the value of attribute track_clicks.



24
25
26
# File 'lib/smartlist_sparkpost.rb', line 24

def track_clicks
  @track_clicks
end

#track_opensObject

Returns the value of attribute track_opens.



23
24
25
# File 'lib/smartlist_sparkpost.rb', line 23

def track_opens
  @track_opens
end

#transactionalObject

Returns the value of attribute transactional.



28
29
30
# File 'lib/smartlist_sparkpost.rb', line 28

def transactional
  @transactional
end

#versionObject

Returns the value of attribute version.



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

def version
  @version
end

Instance Method Details

#set_defaultsObject



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/smartlist_sparkpost.rb', line 36

def set_defaults
  if ENV.has_key?('SPARKPOST_API_KEY')
    @api_key = ENV['SPARKPOST_API_KEY']
  else
    @api_key = ''
  end

  @sandbox = false

  @track_opens = false
  @track_clicks = false

  @campaign_id = nil

  @transactional = false
  @ip_pool = nil
  @html_content_only = false
  @version = 'v1'
end