Class: Twilio::REST::Studio::V2::FlowValidateList

Inherits:
ListResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/studio/v2/flow_validate.rb

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ FlowValidateList

Initialize the FlowValidateList

Parameters:

  • Version that contains the resource



26
27
28
29
30
31
32
33
# File 'lib/twilio-ruby/rest/studio/v2/flow_validate.rb', line 26

def initialize(version)
    super(version)
    
    # Path Solution
    @solution = {  }
    @uri = "/Flows/Validate"
    
end

Instance Method Details

#to_sObject

Provide a user friendly representation



112
113
114
# File 'lib/twilio-ruby/rest/studio/v2/flow_validate.rb', line 112

def to_s
    '#<Twilio.Studio.V2.FlowValidateList>'
end

#update(friendly_name: nil, status: nil, definition: nil, commit_message: :unset) ⇒ FlowValidateInstance

Update the FlowValidateInstance

Parameters:

  • (defaults to: nil)

    The string that you assigned to describe the Flow.

  • (defaults to: nil)
  • (defaults to: nil)

    JSON representation of flow definition.

  • (defaults to: :unset)

    Description of change made in the revision.

Returns:

  • Updated FlowValidateInstance



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/twilio-ruby/rest/studio/v2/flow_validate.rb', line 41

def update(
    friendly_name: nil, 
    status: nil, 
    definition: nil, 
    commit_message: :unset
)

    data = Twilio::Values.of({
        'FriendlyName' => friendly_name,
        'Status' => status,
        'Definition' => Twilio.serialize_object(definition),
        'CommitMessage' => commit_message,
    })

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    
    
    payload = @version.update('POST', @uri, data: data, headers: headers)
    FlowValidateInstance.new(
        @version,
        payload,
    )
end

#update_with_metadata(friendly_name: nil, status: nil, definition: nil, commit_message: :unset) ⇒ FlowValidateInstance

Update the FlowValidateInstanceMetadata

Parameters:

  • (defaults to: nil)

    The string that you assigned to describe the Flow.

  • (defaults to: nil)
  • (defaults to: nil)

    JSON representation of flow definition.

  • (defaults to: :unset)

    Description of change made in the revision.

Returns:

  • Updated FlowValidateInstance



75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/twilio-ruby/rest/studio/v2/flow_validate.rb', line 75

def (
  friendly_name: nil, 
  status: nil, 
  definition: nil, 
  commit_message: :unset
)

    data = Twilio::Values.of({
        'FriendlyName' => friendly_name,
        'Status' => status,
        'Definition' => Twilio.serialize_object(definition),
        'CommitMessage' => commit_message,
    })

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    
    
    response = @version.('POST', @uri, data: data, headers: headers)
    flow_validate_instance = FlowValidateInstance.new(
        @version,
        response.body,
    )
    .new(
        @version,
        flow_validate_instance,
        response.headers,
        response.status_code
    )
end