Class: SoftLayer::UserCustomer
- Includes:
- DynamicAttribute
- Defined in:
- lib/softlayer/UserCustomer.rb
Overview
Each SoftLayer UserCustomer instance provides information relating to a single SoftLayer customer portal user
This class roughly corresponds to the entity SoftLayer_User_Customer in the API.
Instance Attribute Summary
Attributes inherited from ModelBase
Instance Method Summary collapse
-
#additional_emails ⇒ Object
A portal user’s additional email addresses.
-
#alternate_phone ⇒ Object
:attr_reader: A portal user’s secondary phone number.
-
#api_authentication_keys ⇒ Object
A portal user’s API Authentication keys.
-
#created ⇒ Object
:attr_reader: The date a portal user’s record was created.
-
#display_name ⇒ Object
:attr_reader: The portal user’s display name.
-
#email ⇒ Object
:attr_reader: A portal user’s email address.
-
#external_bindings ⇒ Object
The external authentication bindings that link an external identifier to a SoftLayer user.
-
#first_name ⇒ Object
:attr_reader: A portal user’s first name.
-
#last_name ⇒ Object
:attr_reader: A portal user’s last name.
-
#modified ⇒ Object
:attr_reader: The date a portal user’s record was last modified.
-
#office_phone ⇒ Object
:attr_reader: A portal user’s office phone number.
-
#password_expires ⇒ Object
:attr_reader: The expiration date for the user’s password.
-
#service ⇒ Object
Returns the service for interacting with this user customer through the network API.
-
#status_changed ⇒ Object
:attr_reader: The date a portal users record’s last status change.
-
#username ⇒ Object
:attr_reader: A portal user’s username.
Methods included from DynamicAttribute
Methods inherited from ModelBase
#[], #has_sl_property?, #initialize, #refresh_details, sl_attr, #to_ary
Constructor Details
This class inherits a constructor from SoftLayer::ModelBase
Instance Method Details
#additional_emails ⇒ Object
A portal user’s additional email addresses. These email addresses are contacted when updates are made to support tickets.
76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/softlayer/UserCustomer.rb', line 76 sl_dynamic_attr :additional_emails do |resource| resource.should_update? do #only retrieved once per instance @additional_emails == nil end resource.to_update do additional_emails = self.service.getAdditionalEmails additional_emails.collect { |additional_email| additional_email['email'] } end end |
#alternate_phone ⇒ Object
:attr_reader: A portal user’s secondary phone number.
21 |
# File 'lib/softlayer/UserCustomer.rb', line 21 sl_attr :alternate_phone, 'alternatePhone' |
#api_authentication_keys ⇒ Object
A portal user’s API Authentication keys. There is a max limit of two API keys per user.
91 92 93 94 95 96 97 98 99 100 |
# File 'lib/softlayer/UserCustomer.rb', line 91 sl_dynamic_attr :api_authentication_keys do |resource| resource.should_update? do #only retrieved once per instance @api_authentication_keys == nil end resource.to_update do self.service.object_mask("mask[authenticationKey,ipAddressRestriction]").getApiAuthenticationKeys end end |
#created ⇒ Object
:attr_reader: The date a portal user’s record was created.
26 |
# File 'lib/softlayer/UserCustomer.rb', line 26 sl_attr :created, 'createDate' |
#display_name ⇒ Object
:attr_reader: The portal user’s display name.
31 |
# File 'lib/softlayer/UserCustomer.rb', line 31 sl_attr :display_name, 'displayName' |
#email ⇒ Object
:attr_reader: A portal user’s email address.
36 |
# File 'lib/softlayer/UserCustomer.rb', line 36 sl_attr :email |
#external_bindings ⇒ Object
The external authentication bindings that link an external identifier to a SoftLayer user.
104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/softlayer/UserCustomer.rb', line 104 sl_dynamic_attr :external_bindings do |resource| resource.should_update? do #only retrieved once per instance @external_bindings == nil end resource.to_update do external_bindings = self.service.object_mask(UserCustomerExternalBinding.default_object_mask).getExternalBindings external_bindings.collect { |external_binding| UserCustomerExternalBinding.new(soflayer_client, external_binding) } end end |
#first_name ⇒ Object
:attr_reader: A portal user’s first name.
41 |
# File 'lib/softlayer/UserCustomer.rb', line 41 sl_attr :first_name, 'firstName' |
#last_name ⇒ Object
:attr_reader: A portal user’s last name.
46 |
# File 'lib/softlayer/UserCustomer.rb', line 46 sl_attr :last_name, 'lastName' |
#modified ⇒ Object
:attr_reader: The date a portal user’s record was last modified.
51 |
# File 'lib/softlayer/UserCustomer.rb', line 51 sl_attr :modified, 'modifyDate' |
#office_phone ⇒ Object
:attr_reader: A portal user’s office phone number.
56 |
# File 'lib/softlayer/UserCustomer.rb', line 56 sl_attr :office_phone, 'officePhone' |
#password_expires ⇒ Object
:attr_reader: The expiration date for the user’s password.
61 |
# File 'lib/softlayer/UserCustomer.rb', line 61 sl_attr :password_expires, 'passwordExpireDate' |
#service ⇒ Object
Returns the service for interacting with this user customer through the network API
119 120 121 |
# File 'lib/softlayer/UserCustomer.rb', line 119 def service softlayer_client[:User_Customer].object_with_id(self.id) end |
#status_changed ⇒ Object
:attr_reader: The date a portal users record’s last status change.
66 |
# File 'lib/softlayer/UserCustomer.rb', line 66 sl_attr :status_changed, 'statusDate' |
#username ⇒ Object
:attr_reader: A portal user’s username.
71 |
# File 'lib/softlayer/UserCustomer.rb', line 71 sl_attr :username |