## # This code was generated by # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ # # Twilio - Marketplace # This is the public Twilio REST API. # # NOTE: This class is auto generated by OpenAPI Generator. # https://openapi-generator.tech # Do not edit the class manually. # module Twilio module REST class Marketplace < MarketplaceBase class V1 < Version class ModuleDataManagementList < ListResource ## # Initialize the ModuleDataManagementList # @param [Version] version Version that contains the resource # @return [ModuleDataManagementList] ModuleDataManagementList def initialize(version) super(version) # Path Solution @solution = { } end # Provide a user friendly representation def to_s '#' end end class ModuleDataManagementContext < InstanceContext ## # Initialize the ModuleDataManagementContext # @param [Version] version Version that contains the resource # @param [String] sid # @return [ModuleDataManagementContext] ModuleDataManagementContext def initialize(version, sid) super(version) # Path Solution @solution = { sid: sid, } @uri = "/Listing/#{@solution[:sid]}" end ## # Fetch the ModuleDataManagementInstance # @return [ModuleDataManagementInstance] Fetched ModuleDataManagementInstance def fetch payload = @version.fetch('GET', @uri) ModuleDataManagementInstance.new( @version, payload, sid: @solution[:sid], ) end ## # Update the ModuleDataManagementInstance # @param [String] module_info # @param [String] description # @param [String] documentation # @param [String] policies # @param [String] support # @return [ModuleDataManagementInstance] Updated ModuleDataManagementInstance def update( module_info: :unset, description: :unset, documentation: :unset, policies: :unset, support: :unset ) data = Twilio::Values.of({ 'ModuleInfo' => module_info, 'Description' => description, 'Documentation' => documentation, 'Policies' => policies, 'Support' => support, }) payload = @version.update('POST', @uri, data: data) ModuleDataManagementInstance.new( @version, payload, sid: @solution[:sid], ) 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 ModuleDataManagementPage < Page ## # Initialize the ModuleDataManagementPage # @param [Version] version Version that contains the resource # @param [Response] response Response from the API # @param [Hash] solution Path solution for the resource # @return [ModuleDataManagementPage] ModuleDataManagementPage def initialize(version, response, solution) super(version, response) # Path Solution @solution = solution end ## # Build an instance of ModuleDataManagementInstance # @param [Hash] payload Payload response from the API # @return [ModuleDataManagementInstance] ModuleDataManagementInstance def get_instance(payload) ModuleDataManagementInstance.new(@version, payload) end ## # Provide a user friendly representation def to_s '' end end class ModuleDataManagementInstance < InstanceResource ## # Initialize the ModuleDataManagementInstance # @param [Version] version Version that contains the resource # @param [Hash] payload payload that contains response from Twilio # @param [String] account_sid The SID of the # {Account}[https://www.twilio.com/docs/iam/api/account] that created this ModuleDataManagement # resource. # @param [String] sid The SID of the Call resource to fetch. # @return [ModuleDataManagementInstance] ModuleDataManagementInstance def initialize(version, payload , sid: nil) super(version) # Marshaled Properties @properties = { 'url' => payload['url'], 'sid' => payload['sid'], 'description' => payload['description'], 'support' => payload['support'], 'policies' => payload['policies'], 'module_info' => payload['module_info'], 'documentation' => payload['documentation'], } # Context @instance_context = nil @params = { 'sid' => sid || @properties['sid'] , } 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 [ModuleDataManagementContext] CallContext for this CallInstance def context unless @instance_context @instance_context = ModuleDataManagementContext.new(@version , @params['sid']) end @instance_context end ## # @return [String] def url @properties['url'] end ## # @return [String] def sid @properties['sid'] end ## # @return [Hash] def description @properties['description'] end ## # @return [Hash] def support @properties['support'] end ## # @return [Hash] def policies @properties['policies'] end ## # @return [Hash] def module_info @properties['module_info'] end ## # @return [Hash] def documentation @properties['documentation'] end ## # Fetch the ModuleDataManagementInstance # @return [ModuleDataManagementInstance] Fetched ModuleDataManagementInstance def fetch context.fetch end ## # Update the ModuleDataManagementInstance # @param [String] module_info # @param [String] description # @param [String] documentation # @param [String] policies # @param [String] support # @return [ModuleDataManagementInstance] Updated ModuleDataManagementInstance def update( module_info: :unset, description: :unset, documentation: :unset, policies: :unset, support: :unset ) context.update( module_info: module_info, description: description, documentation: documentation, policies: policies, support: support, ) 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