Class: DocuSign::Notification
- Inherits:
-
DocuSignModel
- Object
- DocuSignModel
- DocuSign::Notification
- Defined in:
- lib/docu_sign/notification.rb
Constant Summary collapse
- ATTRIBUTES =
[:use_account_defaults, :reminders, :expirations]
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Notification
constructor
A new instance of Notification.
- #to_savon ⇒ Object
Methods inherited from DocuSignModel
Constructor Details
#initialize(attributes = {}) ⇒ Notification
Returns a new instance of Notification.
8 9 10 11 12 |
# File 'lib/docu_sign/notification.rb', line 8 def initialize(attributes = {}) ATTRIBUTES.each do |attr| self.send("#{attr}=", attributes[attr]) end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class DocuSign::DocuSignModel
Instance Method Details
#to_savon ⇒ Object
14 15 16 17 18 19 |
# File 'lib/docu_sign/notification.rb', line 14 def to_savon { "UseAccountDefaults" => self.use_account_defaults?, "Reminders" => (self.reminders.is_a?(Hash) ? {"ReminderEnabled" => self.reminders[:reminder_enabled], "ReminderDelay" => self.reminders[:reminder_delay], "ReminderFrequency" => self.reminders[:reminder_frequency]} : nil), "Expirations" => (self.expirations.is_a?(Hash) ? {"ExpireEnabled" => self.expirations[:expire_enabled], "ExpireAfter" => self.expirations[:expire_after], "ExpireWarn" => self.expirations[:expire_warn]} : nil) }.delete_if{|key, value| value.nil?} end |