Class: Pepipost::Emailv1
- Inherits:
-
Object
- Object
- Pepipost::Emailv1
- Defined in:
- lib/pepipost/models/emailv_1.rb
Instance Attribute Summary collapse
-
#api_key ⇒ String
Your secret API Key.
-
#attributes ⇒ Attributes
TODO: Write general description for this method.
-
#email_details ⇒ EmailDetails
TODO: Write general description for this method.
-
#files ⇒ Files
TODO: Write general description for this method.
-
#recipients ⇒ Array<String>
TODO: Write general description for this method.
-
#settings ⇒ Settings
TODO: Write general description for this method.
-
#x_apiheader ⇒ Array<String>
TODO: Write general description for this method.
Instance Method Summary collapse
-
#key_map ⇒ Object
Defines the key map for json serialization.
- #method_missing(method_name) ⇒ Object
-
#to_json ⇒ Object
Creates JSON of the curent object.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name) ⇒ Object
31 32 33 |
# File 'lib/pepipost/models/emailv_1.rb', line 31 def method_missing(method_name) puts "there's no method called '#{method_name}'" end |
Instance Attribute Details
#api_key ⇒ String
Your secret API Key
5 6 7 |
# File 'lib/pepipost/models/emailv_1.rb', line 5 def api_key @api_key end |
#attributes ⇒ Attributes
TODO: Write general description for this method
25 26 27 |
# File 'lib/pepipost/models/emailv_1.rb', line 25 def attributes @attributes end |
#email_details ⇒ EmailDetails
TODO: Write general description for this method
9 10 11 |
# File 'lib/pepipost/models/emailv_1.rb', line 9 def email_details @email_details end |
#files ⇒ Files
TODO: Write general description for this method
29 30 31 |
# File 'lib/pepipost/models/emailv_1.rb', line 29 def files @files end |
#recipients ⇒ Array<String>
TODO: Write general description for this method
21 22 23 |
# File 'lib/pepipost/models/emailv_1.rb', line 21 def recipients @recipients end |
#settings ⇒ Settings
TODO: Write general description for this method
17 18 19 |
# File 'lib/pepipost/models/emailv_1.rb', line 17 def settings @settings end |
#x_apiheader ⇒ Array<String>
TODO: Write general description for this method
13 14 15 |
# File 'lib/pepipost/models/emailv_1.rb', line 13 def x_apiheader @x_apiheader end |
Instance Method Details
#key_map ⇒ Object
Defines the key map for json serialization
42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/pepipost/models/emailv_1.rb', line 42 def key_map hash = {} hash['api_key'] = api_key hash['email_details'] = email_details hash['X-APIHEADER'] = x_apiheader hash['settings'] = settings hash['recipients'] = recipients hash['attributes'] = attributes hash['files'] = files hash end |
#to_json ⇒ Object
Creates JSON of the curent object
36 37 38 39 |
# File 'lib/pepipost/models/emailv_1.rb', line 36 def to_json hash = key_map hash.to_json end |