Class: PepipostSdkRuby::Settings
- Inherits:
-
Object
- Object
- PepipostSdkRuby::Settings
- Defined in:
- lib/pepipost_sdk_ruby/models/settings.rb
Instance Attribute Summary collapse
-
#attachmentid ⇒ String
TODO: Write general description for this method.
-
#bcc ⇒ String
TODO: Write general description for this method.
-
#clicktrack ⇒ Boolean
TODO: Write general description for this method.
-
#footer ⇒ Boolean
TODO: Write general description for this method.
-
#opentrack ⇒ Boolean
TODO: Write general description for this method.
-
#template ⇒ Numeric
TODO: Write general description for this method.
-
#unsubscribe ⇒ Boolean
TODO: Write general description for this method.
Instance Method Summary collapse
-
#initialize ⇒ Settings
constructor
A new instance of Settings.
-
#key_map ⇒ Object
Defines the key map for json serialization.
- #method_missing(method_name) ⇒ Object
-
#to_json ⇒ Object
Creates JSON of the curent object.
Constructor Details
#initialize ⇒ Settings
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
#attachmentid ⇒ String
TODO: Write general description for this method
27 28 29 |
# File 'lib/pepipost_sdk_ruby/models/settings.rb', line 27 def @attachmentid end |
#bcc ⇒ String
TODO: Write general description for this method
23 24 25 |
# File 'lib/pepipost_sdk_ruby/models/settings.rb', line 23 def bcc @bcc end |
#clicktrack ⇒ Boolean
TODO: Write general description for this method
11 12 13 |
# File 'lib/pepipost_sdk_ruby/models/settings.rb', line 11 def clicktrack @clicktrack end |
#footer ⇒ Boolean
TODO: Write general description for this method
7 8 9 |
# File 'lib/pepipost_sdk_ruby/models/settings.rb', line 7 def @footer end |
#opentrack ⇒ Boolean
TODO: Write general description for this method
15 16 17 |
# File 'lib/pepipost_sdk_ruby/models/settings.rb', line 15 def opentrack @opentrack end |
#template ⇒ Numeric
TODO: Write general description for this method
31 32 33 |
# File 'lib/pepipost_sdk_ruby/models/settings.rb', line 31 def template @template end |
#unsubscribe ⇒ Boolean
TODO: Write general description for this method
19 20 21 |
# File 'lib/pepipost_sdk_ruby/models/settings.rb', line 19 def unsubscribe @unsubscribe end |
Instance Method Details
#key_map ⇒ Object
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'] = hash['clicktrack'] = clicktrack hash['opentrack'] = opentrack hash['unsubscribe'] = unsubscribe hash['bcc'] = bcc hash['attachmentid'] = hash['template'] = template hash end |
#to_json ⇒ Object
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 |