Class: Twilio::REST::Trusthub::V1::EndUserTypeInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Trusthub::V1::EndUserTypeInstance
- Defined in:
- lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb
Instance Method Summary collapse
-
#context ⇒ EndUserTypeContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#fetch ⇒ EndUserTypeInstance
Fetch the EndUserTypeInstance.
-
#fields ⇒ Array<Hash>
The required information for creating an End-User.
-
#friendly_name ⇒ String
A human-readable description that is assigned to describe the End-User Type resource.
-
#initialize(version, payload, sid: nil) ⇒ EndUserTypeInstance
constructor
Initialize the EndUserTypeInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#machine_name ⇒ String
A machine-readable description of the End-User Type resource.
-
#sid ⇒ String
The unique string that identifies the End-User Type resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The absolute URL of the End-User Type resource.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ EndUserTypeInstance
Initialize the EndUserTypeInstance
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 |
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb', line 208 def initialize(version, payload , sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'friendly_name' => payload['friendly_name'], 'machine_name' => payload['machine_name'], 'fields' => payload['fields'], 'url' => payload['url'], } # Context @instance_context = nil @params = { 'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#context ⇒ EndUserTypeContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
229 230 231 232 233 234 |
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb', line 229 def context unless @instance_context @instance_context = EndUserTypeContext.new(@version , @params['sid']) end @instance_context end |
#fetch ⇒ EndUserTypeInstance
Fetch the EndUserTypeInstance
269 270 271 272 |
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb', line 269 def fetch context.fetch end |
#fields ⇒ Array<Hash>
Returns The required information for creating an End-User. The required fields will change as regulatory needs change and will differ for businesses and individuals.
256 257 258 |
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb', line 256 def fields @properties['fields'] end |
#friendly_name ⇒ String
Returns A human-readable description that is assigned to describe the End-User Type resource. Examples can include first name, last name, email, business name, etc.
244 245 246 |
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb', line 244 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
283 284 285 286 |
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb', line 283 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Trusthub.V1.EndUserTypeInstance #{values}>" end |
#machine_name ⇒ String
Returns A machine-readable description of the End-User Type resource. Examples can include first_name, last_name, email, business_name, etc.
250 251 252 |
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb', line 250 def machine_name @properties['machine_name'] end |
#sid ⇒ String
Returns The unique string that identifies the End-User Type resource.
238 239 240 |
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb', line 238 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
276 277 278 279 |
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb', line 276 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Trusthub.V1.EndUserTypeInstance #{values}>" end |
#url ⇒ String
Returns The absolute URL of the End-User Type resource.
262 263 264 |
# File 'lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb', line 262 def url @properties['url'] end |