Class: Twilio::REST::PreviewIam::Versionless::OrganizationInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::PreviewIam::Versionless::OrganizationInstance
- Defined in:
- lib/twilio-ruby/rest/preview_iam/versionless/organization.rb
Instance Method Summary collapse
-
#accounts ⇒ accounts
Access the accounts.
-
#context ⇒ OrganizationContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#fetch ⇒ OrganizationInstance
Fetch the OrganizationInstance.
-
#initialize(version, organization_sid: nil) ⇒ OrganizationInstance
constructor
Initialize the OrganizationInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#resource_types ⇒ resource_types
Access the resource_types.
-
#role_assignments ⇒ role_assignments
Access the role_assignments.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#users ⇒ users
Access the users.
Constructor Details
#initialize(version, organization_sid: nil) ⇒ OrganizationInstance
Initialize the OrganizationInstance
203 204 205 206 207 208 209 210 |
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization.rb', line 203 def initialize(version , organization_sid: nil) super(version) # Context @instance_context = nil @params = { 'organization_sid' => organization_sid || @properties['organization_sid'] , } end |
Instance Method Details
#accounts ⇒ accounts
Access the accounts
248 249 250 |
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization.rb', line 248 def accounts context.accounts end |
#context ⇒ OrganizationContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
216 217 218 219 220 221 |
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization.rb', line 216 def context unless @instance_context @instance_context = OrganizationContext.new(@version , @params['organization_sid']) end @instance_context end |
#fetch ⇒ OrganizationInstance
Fetch the OrganizationInstance
226 227 228 229 |
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization.rb', line 226 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
268 269 270 271 |
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization.rb', line 268 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.PreviewIam.Versionless.OrganizationInstance #{values}>" end |
#resource_types ⇒ resource_types
Access the resource_types
234 235 236 |
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization.rb', line 234 def resource_types context.resource_types end |
#role_assignments ⇒ role_assignments
Access the role_assignments
241 242 243 |
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization.rb', line 241 def role_assignments context.role_assignments end |
#to_s ⇒ Object
Provide a user friendly representation
261 262 263 264 |
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization.rb', line 261 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.PreviewIam.Versionless.OrganizationInstance #{values}>" end |
#users ⇒ users
Access the users
255 256 257 |
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization.rb', line 255 def users context.users end |