class SoftLayer::NetworkMessageDelivery
Each SoftLayer NetworkMessageDelivery instance provides information about the username/password combination for a specific Network Message Delivery account.
This class roughly corresponds to the entity SoftLayer_Network_Message_Delivery in the API.
Attributes
The date this username/password pair was created. DEPRECATION WARNING: This attribute is deprecated in favor of #created_at and will be removed in the next major release.
The date this username/password pair was created.
The date of the last modification to this username/password pair. DEPRECATION WARNING: This attribute is deprecated in favor of #modified_at and will be removed in the next major release.
The date of the last modification to this username/password pair.
The password part of the username/password pair.
The username part of the username/password pair.
Protected Class Methods
# File lib/softlayer/NetworkMessageDelivery.rb, line 138 def self.default_object_mask { "mask(SoftLayer_Network_Message_Delivery)" => [ 'createDate', 'id', 'modifyDate', 'password', 'username' ] }.to_sl_object_mask end
Public Instance Methods
Retrieve the message delivery type description of a network message delivery account.
# File lib/softlayer/NetworkMessageDelivery.rb, line 57 sl_dynamic_attr :description do |resource| resource.should_update? do #only retrieved once per instance @description == nil end resource.to_update do type = self.service.getType type['description'] end end
Retrieve the message delivery type name of a network message delivery account.
# File lib/softlayer/NetworkMessageDelivery.rb, line 73 sl_dynamic_attr :name do |resource| resource.should_update? do #only retrieved once per instance @name == nil end resource.to_update do type = self.service.getType type['name'] end end
Updates the password for the current account password.
# File lib/softlayer/NetworkMessageDelivery.rb, line 104 def password=(password) raise ArgumentError, "The new password cannot be nil" unless password raise ArgumentError, "The new password cannot be empty" if password.empty? self.service.editObject({ "password" => password.to_s }) self.refresh_details() end
Returns the service for interacting with the network message delivery instance through the network API
# File lib/softlayer/NetworkMessageDelivery.rb, line 116 def service softlayer_client[:Network_Message_Delivery].object_with_id(self.id) end
Make an API request to SoftLayer and return the latest properties hash for this object.
# File lib/softlayer/NetworkMessageDelivery.rb, line 124 def softlayer_properties(object_mask = nil) my_service = self.service if(object_mask) my_service = my_service.object_mask(object_mask) else my_service = my_service.object_mask(self.class.default_object_mask) end my_service.getObject() end
Retrieve the vendor name for a network message delivery account.
# File lib/softlayer/NetworkMessageDelivery.rb, line 89 sl_dynamic_attr :vendor do |resource| resource.should_update? do #only retrieved once per instance @vendor == nil end resource.to_update do vendor = self.service.getVendor vendor['name'] end end