Class: Twilio::REST::Numbers::V2::RegulatoryComplianceList::BundleContext::ItemAssignmentInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Numbers::V2::RegulatoryComplianceList::BundleContext::ItemAssignmentInstance
- Defined in:
- lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Item Assignment resource.
-
#bundle_sid ⇒ String
The unique string that we created to identify the Bundle resource.
-
#context ⇒ ItemAssignmentContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date and time in GMT when the resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#delete ⇒ Boolean
Delete the ItemAssignmentInstance.
-
#fetch ⇒ ItemAssignmentInstance
Fetch the ItemAssignmentInstance.
-
#initialize(version, payload, bundle_sid: nil, sid: nil) ⇒ ItemAssignmentInstance
constructor
Initialize the ItemAssignmentInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#object_sid ⇒ String
The SID of an object bag that holds information of the different items.
-
#sid ⇒ String
The unique string that we created to identify the Item Assignment resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The absolute URL of the Identity resource.
Constructor Details
#initialize(version, payload, bundle_sid: nil, sid: nil) ⇒ ItemAssignmentInstance
Initialize the ItemAssignmentInstance
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb', line 261 def initialize(version, payload , bundle_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'bundle_sid' => payload['bundle_sid'], 'account_sid' => payload['account_sid'], 'object_sid' => payload['object_sid'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'url' => payload['url'], } # Context @instance_context = nil @params = { 'bundle_sid' => bundle_sid || @properties['bundle_sid'] ,'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Item Assignment resource.
304 305 306 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb', line 304 def account_sid @properties['account_sid'] end |
#bundle_sid ⇒ String
Returns The unique string that we created to identify the Bundle resource.
298 299 300 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb', line 298 def bundle_sid @properties['bundle_sid'] end |
#context ⇒ ItemAssignmentContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
283 284 285 286 287 288 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb', line 283 def context unless @instance_context @instance_context = ItemAssignmentContext.new(@version , @params['bundle_sid'], @params['sid']) end @instance_context end |
#date_created ⇒ Time
Returns The date and time in GMT when the resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
316 317 318 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb', line 316 def date_created @properties['date_created'] end |
#delete ⇒ Boolean
Delete the ItemAssignmentInstance
329 330 331 332 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb', line 329 def delete context.delete end |
#fetch ⇒ ItemAssignmentInstance
Fetch the ItemAssignmentInstance
337 338 339 340 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb', line 337 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
351 352 353 354 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb', line 351 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Numbers.V2.ItemAssignmentInstance #{values}>" end |
#object_sid ⇒ String
Returns The SID of an object bag that holds information of the different items.
310 311 312 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb', line 310 def object_sid @properties['object_sid'] end |
#sid ⇒ String
Returns The unique string that we created to identify the Item Assignment resource.
292 293 294 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb', line 292 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
344 345 346 347 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb', line 344 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Numbers.V2.ItemAssignmentInstance #{values}>" end |
#url ⇒ String
Returns The absolute URL of the Identity resource.
322 323 324 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb', line 322 def url @properties['url'] end |