Class: Twilio::REST::Marketplace::V1::ModuleDataManagementInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, sid: nil) ⇒ ModuleDataManagementInstance

Initialize the ModuleDataManagementInstance

Parameters:

  • version (Version) —

    Version that contains the resource

  • payload (Hash) —

    payload that contains response from Twilio

  • account_sid (String) —

    The SID of the Account that created this ModuleDataManagement resource.

  • sid (String) (defaults to: nil) —

    The SID of the Call resource to fetch.



301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 301

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'],
        'configuration' => payload['configuration'],
        'pricing' => payload['pricing'],
        'listings' => payload['listings'],
    }

    # Context
    @instance_context = nil
    @params = { 'sid' => sid  || @properties['sid']  , }
end

Instance Method Details

#configuration ⇒ Hash

Returns A JSON object for providing listing specific configuration. Contains button setup, notification url, among others.

Returns:

  • (Hash) —

    A JSON object for providing listing specific configuration. Contains button setup, notification url, among others.



379
380
381
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 379

def configuration
    @properties['configuration']
end

#context ⇒ ModuleDataManagementContext

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

Returns:



328
329
330
331
332
333
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 328

def context
    unless @instance_context
        @instance_context = ModuleDataManagementContext.new(@version , @params['sid'])
    end
    @instance_context
end

#description ⇒ Hash

Returns A JSON object describing the module and is displayed under the Description tab of the Module detail page. You can define the main body of the description, highlight key features or aspects of the module and if applicable, provide code samples for developers.

Returns:

  • (Hash) —

    A JSON object describing the module and is displayed under the Description tab of the Module detail page. You can define the main body of the description, highlight key features or aspects of the module and if applicable, provide code samples for developers



349
350
351
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 349

def description
    @properties['description']
end

#documentation ⇒ Hash

Returns A JSON object for providing comprehensive information, instructions, and resources related to the module.

Returns:

  • (Hash) —

    A JSON object for providing comprehensive information, instructions, and resources related to the module



373
374
375
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 373

def documentation
    @properties['documentation']
end

#fetch ⇒ ModuleDataManagementInstance

Fetch the ModuleDataManagementInstance

Returns:



398
399
400
401
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 398

def fetch

    context.fetch
end

#inspect ⇒ Object

Provide a detailed, user friendly representation



443
444
445
446
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 443

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

#listings ⇒ Array<Hash>

Returns:

  • (Array<Hash>)


391
392
393
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 391

def listings
    @properties['listings']
end

#module_info ⇒ Hash

Returns A JSON object containing essential attributes that define a module. This information is presented on the Module detail page in the Twilio Marketplace Catalog. You can pass the following attributes in the JSON object.

Returns:

  • (Hash) —

    A JSON object containing essential attributes that define a module. This information is presented on the Module detail page in the Twilio Marketplace Catalog. You can pass the following attributes in the JSON object



367
368
369
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 367

def module_info
    @properties['module_info']
end

#policies ⇒ Hash

Returns A JSON object describing the module's privacy and legal policies and is displayed under the Policies tab of the Module detail page. The maximum file size for Policies is 5MB.

Returns:

  • (Hash) —

    A JSON object describing the module's privacy and legal policies and is displayed under the Policies tab of the Module detail page. The maximum file size for Policies is 5MB



361
362
363
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 361

def policies
    @properties['policies']
end

#pricing ⇒ Hash

Returns A JSON object for providing Listing specific pricing information.

Returns:

  • (Hash) —

    A JSON object for providing Listing specific pricing information.



385
386
387
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 385

def pricing
    @properties['pricing']
end

#sid ⇒ String

Returns ModuleSid that identifies this Listing.

Returns:

  • (String) —

    ModuleSid that identifies this Listing.



343
344
345
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 343

def sid
    @properties['sid']
end

#support ⇒ Hash

Returns A JSON object containing information on how customers can obtain support for the module. Use this parameter to provide details such as contact information and support description.

Returns:

  • (Hash) —

    A JSON object containing information on how customers can obtain support for the module. Use this parameter to provide details such as contact information and support description.



355
356
357
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 355

def support
    @properties['support']
end

#to_s ⇒ Object

Provide a user friendly representation



436
437
438
439
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 436

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

#update(module_info: :unset, description: :unset, documentation: :unset, policies: :unset, support: :unset, configuration: :unset, pricing: :unset) ⇒ ModuleDataManagementInstance

Update the ModuleDataManagementInstance

Parameters:

  • module_info (String) (defaults to: :unset) —

    A JSON object containing essential attributes that define a Listing.

  • description (String) (defaults to: :unset) —

    A JSON object describing the Listing. You can define the main body of the description, highlight key features or aspects of the Listing, and provide code samples for developers if applicable.

  • documentation (String) (defaults to: :unset) —

    A JSON object for providing comprehensive information, instructions, and resources related to the Listing.

  • policies (String) (defaults to: :unset) —

    A JSON object describing the Listing's privacy and legal policies. The maximum file size for Policies is 5MB.

  • support (String) (defaults to: :unset) —

    A JSON object containing information on how Marketplace users can obtain support for the Listing. Use this parameter to provide details such as contact information and support description.

  • configuration (String) (defaults to: :unset) —

    A JSON object for providing Listing-specific configuration. Contains button setup, notification URL, and more.

  • pricing (String) (defaults to: :unset) —

    A JSON object for providing Listing's purchase options.

Returns:



413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 413

def update(
  module_info: :unset, 
  description: :unset, 
  documentation: :unset, 
  policies: :unset, 
  support: :unset, 
  configuration: :unset, 
  pricing: :unset
)

    context.update(
        module_info: module_info, 
        description: description, 
        documentation: documentation, 
        policies: policies, 
        support: support, 
        configuration: configuration, 
        pricing: pricing, 
    )
end

#url ⇒ String

Returns URL to query the subresource.

Returns:

  • (String) —

    URL to query the subresource.



337
338
339
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 337

def url
    @properties['url']
end