Class: PepipostSdkRuby::Settings

Inherits:
Object
  • Object
show all
Defined in:
lib/pepipost_sdk_ruby/models/settings.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSettings

Returns a new instance of Settings.



33
34
35
36
37
38
# File 'lib/pepipost_sdk_ruby/models/settings.rb', line 33

def initialize
  @footer = true
  @clicktrack = true
  @opentrack = true
  @unsubscribe = true
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name) ⇒ Object



40
41
42
# File 'lib/pepipost_sdk_ruby/models/settings.rb', line 40

def method_missing(method_name)
  puts "there's no method called '#{method_name}'"
end

Instance Attribute Details

#attachmentidString

TODO: Write general description for this method

Returns:

  • (String)


27
28
29
# File 'lib/pepipost_sdk_ruby/models/settings.rb', line 27

def attachmentid
  @attachmentid
end

#bccString

TODO: Write general description for this method

Returns:

  • (String)


23
24
25
# File 'lib/pepipost_sdk_ruby/models/settings.rb', line 23

def bcc
  @bcc
end

#clicktrackBoolean

TODO: Write general description for this method

Returns:

  • (Boolean)


11
12
13
# File 'lib/pepipost_sdk_ruby/models/settings.rb', line 11

def clicktrack
  @clicktrack
end

TODO: Write general description for this method

Returns:

  • (Boolean)


7
8
9
# File 'lib/pepipost_sdk_ruby/models/settings.rb', line 7

def footer
  @footer
end

#opentrackBoolean

TODO: Write general description for this method

Returns:

  • (Boolean)


15
16
17
# File 'lib/pepipost_sdk_ruby/models/settings.rb', line 15

def opentrack
  @opentrack
end

#templateNumeric

TODO: Write general description for this method

Returns:

  • (Numeric)


31
32
33
# File 'lib/pepipost_sdk_ruby/models/settings.rb', line 31

def template
  @template
end

#unsubscribeBoolean

TODO: Write general description for this method

Returns:

  • (Boolean)


19
20
21
# File 'lib/pepipost_sdk_ruby/models/settings.rb', line 19

def unsubscribe
  @unsubscribe
end

Instance Method Details

#key_mapObject

Defines the key map for json serialization



51
52
53
54
55
56
57
58
59
60
61
# File 'lib/pepipost_sdk_ruby/models/settings.rb', line 51

def key_map
  hash = {}
  hash['footer'] = footer
  hash['clicktrack'] = clicktrack
  hash['opentrack'] = opentrack
  hash['unsubscribe'] = unsubscribe
  hash['bcc'] = bcc
  hash['attachmentid'] = attachmentid
  hash['template'] = template
  hash
end

#to_jsonObject

Creates JSON of the curent object



45
46
47
48
# File 'lib/pepipost_sdk_ruby/models/settings.rb', line 45

def to_json
  hash = key_map
  hash.to_json
end