Class: SoftLayer::UserCustomerExternalBinding

Inherits:
ModelBase
  • Object
show all
Includes:
DynamicAttribute
Defined in:
lib/softlayer/UserCustomerExternalBinding.rb

Overview

Each SoftLayer UserCustomerExternalBinding instance provides information for a single user customer’s external binding.

This class roughly corresponds to the entity SoftLayer_User_Customer_External_Binding in the API.

Instance Attribute Summary

Attributes inherited from ModelBase

#softlayer_client

Instance Method Summary collapse

Methods included from DynamicAttribute

included

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

#activeObject

:attr_reader: The flag that determines whether the external binding is active will be used for authentication or not.



22
# File 'lib/softlayer/UserCustomerExternalBinding.rb', line 22

sl_attr :active

#createdObject

:attr_reader: created The date that the external authentication binding was created. DEPRECATION WARNING: This attribute is deprecated in favor of created_at and will be removed in the next major release.



34
# File 'lib/softlayer/UserCustomerExternalBinding.rb', line 34

sl_attr :created, 'createDate'

#created_atObject

:attr_reader: created_at The date that the external authentication binding was created.



27
# File 'lib/softlayer/UserCustomerExternalBinding.rb', line 27

sl_attr :created_at, 'createDate'

#noteObject

Retrieve an optional note for identifying the external binding. :call-seq:

note(force_update=false)


46
47
48
49
50
51
52
53
54
55
# File 'lib/softlayer/UserCustomerExternalBinding.rb', line 46

sl_dynamic_attr :note do |resource|
  resource.should_update? do
    #only retrieved once per instance
    @note == nil
  end

  resource.to_update do
    self.service.getNote
  end
end

#passwordObject

:attr_reader: The password used to authenticate the external id at an external authentication source.



40
# File 'lib/softlayer/UserCustomerExternalBinding.rb', line 40

sl_attr :password

#serviceObject

Returns the service for interacting with this user customer external binding through the network API



93
94
95
# File 'lib/softlayer/UserCustomerExternalBinding.rb', line 93

def service
  softlayer_client[:User_Customer_External_Binding].object_with_id(self.id)
end

#typeObject

Retrieve the user friendly name of a type of external authentication binding. :call-seq:

type(force_update=false)


61
62
63
64
65
66
67
68
69
70
71
# File 'lib/softlayer/UserCustomerExternalBinding.rb', line 61

sl_dynamic_attr :type do |resource|
  resource.should_update? do
    #only retrieved once per instance
    @type == nil
  end

  resource.to_update do
    type = self.service.getType
    type['name']
  end
end

#vendorObject

Retrieve the user friendly name of an external binding vendor. :call-seq:

vendor(force_update=false)


77
78
79
80
81
82
83
84
85
86
87
# File 'lib/softlayer/UserCustomerExternalBinding.rb', line 77

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