## # This code was generated by # \ / _ _ _| _ _ # | (_)\/(_)(_|\/| |(/_ v1.0.0 # / / # # frozen_string_literal: true module Twilio module REST class FlexApi < Domain class V1 < Version class GoodDataList < ListResource ## # Initialize the GoodDataList # @param [Version] version Version that contains the resource # @return [GoodDataList] GoodDataList def initialize(version) super(version) # Path Solution @solution = {} end ## # Provide a user friendly representation def to_s '#' end end class GoodDataPage < Page ## # Initialize the GoodDataPage # @param [Version] version Version that contains the resource # @param [Response] response Response from the API # @param [Hash] solution Path solution for the resource # @return [GoodDataPage] GoodDataPage def initialize(version, response, solution) super(version, response) # Path Solution @solution = solution end ## # Build an instance of GoodDataInstance # @param [Hash] payload Payload response from the API # @return [GoodDataInstance] GoodDataInstance def get_instance(payload) GoodDataInstance.new(@version, payload, ) end ## # Provide a user friendly representation def to_s '' end end class GoodDataContext < InstanceContext ## # Initialize the GoodDataContext # @param [Version] version Version that contains the resource # @return [GoodDataContext] GoodDataContext def initialize(version) super(version) # Path Solution @solution = {} @uri = "/Insights/Session" end ## # Create the GoodDataInstance # @param [String] token The Token HTTP request header # @return [GoodDataInstance] Created GoodDataInstance def create(token: :unset) headers = Twilio::Values.of({'Token' => token, }) payload = @version.create('POST', @uri, headers: headers) GoodDataInstance.new(@version, payload, ) end ## # Provide a user friendly representation def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#" end ## # Provide a detailed, user friendly representation def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#" end end class GoodDataInstance < InstanceResource ## # Initialize the GoodDataInstance # @param [Version] version Version that contains the resource # @param [Hash] payload payload that contains response from Twilio # @return [GoodDataInstance] GoodDataInstance def initialize(version, payload) super(version) # Marshaled Properties @properties = { 'workspace_id' => payload['workspace_id'], 'session_expiry' => payload['session_expiry'], 'session_id' => payload['session_id'], 'base_url' => payload['base_url'], 'url' => payload['url'], } # Context @instance_context = nil @params = {} end ## # Generate an instance context for the instance, the context is capable of # performing various actions. All instance actions are proxied to the context # @return [GoodDataContext] GoodDataContext for this GoodDataInstance def context unless @instance_context @instance_context = GoodDataContext.new(@version, ) end @instance_context end ## # @return [String] Unique ID to identify the user's workspace def workspace_id @properties['workspace_id'] end ## # @return [String] The session expiry date and time def session_expiry @properties['session_expiry'] end ## # @return [String] Unique session ID def session_id @properties['session_id'] end ## # @return [String] Base URL to fetch reports and dashboards def base_url @properties['base_url'] end ## # @return [String] The URL of this resource. def url @properties['url'] end ## # Create the GoodDataInstance # @param [String] token The Token HTTP request header # @return [GoodDataInstance] Created GoodDataInstance def create(token: :unset) context.create(token: token, ) end ## # Provide a user friendly representation def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "" end ## # Provide a detailed, user friendly representation def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "" end end end end end end