Class: Twilio::REST::FlexApi::V1::GoodDataInstance

Inherits:
InstanceResource show all
Defined in:
lib/twilio-ruby/rest/flex_api/v1/good_data.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload) ⇒ GoodDataInstance

Initialize the GoodDataInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'lib/twilio-ruby/rest/flex_api/v1/good_data.rb', line 107

def initialize(version, payload)
  super(version)

  # Marshaled Properties
  @properties = {
      'workspace_id' => payload['workspace_id'],
      'session_expiry' => payload['session_expiry'],
      'session_id' => payload['session_id'],
      'url' => payload['url'],
  }

  # Context
  @instance_context = nil
  @params = {}
end

Instance Method Details

#contextGoodDataContext

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context

Returns:



127
128
129
130
131
132
# File 'lib/twilio-ruby/rest/flex_api/v1/good_data.rb', line 127

def context
  unless @instance_context
    @instance_context = GoodDataContext.new(@version, )
  end
  @instance_context
end

#create(token: :unset) ⇒ GoodDataInstance

Create the GoodDataInstance

Parameters:

  • token (String) (defaults to: :unset)

    The Token HTTP request header

Returns:



162
163
164
# File 'lib/twilio-ruby/rest/flex_api/v1/good_data.rb', line 162

def create(token: :unset)
  context.create(token: token, )
end

#inspectObject

Provide a detailed, user friendly representation



175
176
177
178
# File 'lib/twilio-ruby/rest/flex_api/v1/good_data.rb', line 175

def inspect
  values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
  "<Twilio.FlexApi.V1.GoodDataInstance #{values}>"
end

#session_expiryString

Returns The session expiry date and time.

Returns:

  • (String)

    The session expiry date and time



142
143
144
# File 'lib/twilio-ruby/rest/flex_api/v1/good_data.rb', line 142

def session_expiry
  @properties['session_expiry']
end

#session_idString

Returns Unique session ID.

Returns:

  • (String)

    Unique session ID



148
149
150
# File 'lib/twilio-ruby/rest/flex_api/v1/good_data.rb', line 148

def session_id
  @properties['session_id']
end

#to_sObject

Provide a user friendly representation



168
169
170
171
# File 'lib/twilio-ruby/rest/flex_api/v1/good_data.rb', line 168

def to_s
  values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
  "<Twilio.FlexApi.V1.GoodDataInstance #{values}>"
end

#urlString

Returns The URL of this resource.

Returns:

  • (String)

    The URL of this resource.



154
155
156
# File 'lib/twilio-ruby/rest/flex_api/v1/good_data.rb', line 154

def url
  @properties['url']
end

#workspace_idString

Returns Unique workspace ID in gooddata.

Returns:

  • (String)

    Unique workspace ID in gooddata



136
137
138
# File 'lib/twilio-ruby/rest/flex_api/v1/good_data.rb', line 136

def workspace_id
  @properties['workspace_id']
end