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

created[R]

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.

created_at[R]

The date this username/password pair was created.

modified[R]

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.

modified_at[R]

The date of the last modification to this username/password pair.

password[R]

The password part of the username/password pair.

username[R]

The username part of the username/password pair.

Protected Class Methods

default_object_mask() click to toggle source
# 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

description(force_update=false) click to toggle source

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
name(force_update=false) click to toggle source

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
password=(password) click to toggle source

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
service() click to toggle source

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
softlayer_properties(object_mask = nil) click to toggle source

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
vendor(force_update=false) click to toggle source

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