Class: Twilio::REST::Conversations::V2::ConversationList::PatchConversationByIdRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/twilio-ruby/rest/conversations/v2/conversation.rb,
lib/twilio-ruby/rest/conversations/v2/conversation.rb,
lib/twilio-ruby/rest/conversations/v2/conversation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ PatchConversationByIdRequest

Returns a new instance of PatchConversationByIdRequest.



243
244
245
246
247
248
# File 'lib/twilio-ruby/rest/conversations/v2/conversation.rb', line 243

def initialize(payload)
        @name = payload["name"]
        @status = payload["status"]
        @configuration = payload["configuration"]
        @metadata = payload["metadata"]
end

Instance Attribute Details

#configuration ⇒ Object

Parameters:

  • : (name) —

    [String] The name of the Conversation.

  • : (status) —

    [String] Lifecycle status of a Conversation.

  • : (configuration) —

    [ConversationList.PatchConversationByIdRequestConfiguration]

  • : (metadata) —

    [Hash<String, String>] Merge patch for customer-managed metadata (max 8 entries after merge). Provided keys are added or updated; keys set to null are removed; keys not mentioned are preserved.



242
243
244
# File 'lib/twilio-ruby/rest/conversations/v2/conversation.rb', line 242

def configuration
  @configuration
end

#metadata ⇒ Object

Parameters:

  • : (name) —

    [String] The name of the Conversation.

  • : (status) —

    [String] Lifecycle status of a Conversation.

  • : (configuration) —

    [ConversationList.PatchConversationByIdRequestConfiguration]

  • : (metadata) —

    [Hash<String, String>] Merge patch for customer-managed metadata (max 8 entries after merge). Provided keys are added or updated; keys set to null are removed; keys not mentioned are preserved.



242
243
244
# File 'lib/twilio-ruby/rest/conversations/v2/conversation.rb', line 242

def 
  @metadata
end

#name ⇒ Object

Parameters:

  • : (name) —

    [String] The name of the Conversation.

  • : (status) —

    [String] Lifecycle status of a Conversation.

  • : (configuration) —

    [ConversationList.PatchConversationByIdRequestConfiguration]

  • : (metadata) —

    [Hash<String, String>] Merge patch for customer-managed metadata (max 8 entries after merge). Provided keys are added or updated; keys set to null are removed; keys not mentioned are preserved.



242
243
244
# File 'lib/twilio-ruby/rest/conversations/v2/conversation.rb', line 242

def name
  @name
end

#status ⇒ Object

Parameters:

  • : (name) —

    [String] The name of the Conversation.

  • : (status) —

    [String] Lifecycle status of a Conversation.

  • : (configuration) —

    [ConversationList.PatchConversationByIdRequestConfiguration]

  • : (metadata) —

    [Hash<String, String>] Merge patch for customer-managed metadata (max 8 entries after merge). Provided keys are added or updated; keys set to null are removed; keys not mentioned are preserved.



242
243
244
# File 'lib/twilio-ruby/rest/conversations/v2/conversation.rb', line 242

def status
  @status
end

Instance Method Details

#to_json(options = {}) ⇒ Object



249
250
251
252
253
254
255
256
# File 'lib/twilio-ruby/rest/conversations/v2/conversation.rb', line 249

def to_json(options = {})
{
        "name": @name,
        "status": @status,
        "configuration": @configuration,
        "metadata": @metadata,
}.to_json(options)
end