Class: Twilio::REST::Marketplace::V1::ModuleDataManagementInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Marketplace::V1::ModuleDataManagementInstance
- Defined in:
- lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb
Instance Method Summary collapse
-
#configuration ⇒ Hash
A JSON object for providing listing specific configuration.
-
#context ⇒ ModuleDataManagementContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#description ⇒ Hash
A JSON object describing the module and is displayed under the Description tab of the Module detail page.
-
#documentation ⇒ Hash
A JSON object for providing comprehensive information, instructions, and resources related to the module.
-
#fetch ⇒ ModuleDataManagementInstance
Fetch the ModuleDataManagementInstance.
-
#initialize(version, payload, sid: nil) ⇒ ModuleDataManagementInstance
constructor
Initialize the ModuleDataManagementInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
- #listings ⇒ Array<Hash>
-
#module_info ⇒ Hash
A JSON object containing essential attributes that define a module.
-
#policies ⇒ Hash
A JSON object describing the module’s privacy and legal policies and is displayed under the Policies tab of the Module detail page.
-
#pricing ⇒ Hash
A JSON object for providing Listing specific pricing information.
-
#sid ⇒ String
ModuleSid that identifies this Listing.
-
#support ⇒ Hash
A JSON object containing information on how customers can obtain support for the module.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(module_info: :unset, description: :unset, documentation: :unset, policies: :unset, support: :unset, configuration: :unset, pricing: :unset) ⇒ ModuleDataManagementInstance
Update the ModuleDataManagementInstance.
-
#url ⇒ String
URL to query the subresource.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ ModuleDataManagementInstance
Initialize the ModuleDataManagementInstance
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 |
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 360 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.
438 439 440 |
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 438 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
387 388 389 390 391 392 |
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 387 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.
408 409 410 |
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 408 def description @properties['description'] end |
#documentation ⇒ Hash
Returns A JSON object for providing comprehensive information, instructions, and resources related to the module.
432 433 434 |
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 432 def documentation @properties['documentation'] end |
#fetch ⇒ ModuleDataManagementInstance
Fetch the ModuleDataManagementInstance
457 458 459 460 |
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 457 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
502 503 504 505 |
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 502 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Marketplace.V1.ModuleDataManagementInstance #{values}>" end |
#listings ⇒ Array<Hash>
450 451 452 |
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 450 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.
426 427 428 |
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 426 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.
420 421 422 |
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 420 def policies @properties['policies'] end |
#pricing ⇒ Hash
Returns A JSON object for providing Listing specific pricing information.
444 445 446 |
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 444 def pricing @properties['pricing'] end |
#sid ⇒ String
Returns ModuleSid that identifies this Listing.
402 403 404 |
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 402 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.
414 415 416 |
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 414 def support @properties['support'] end |
#to_s ⇒ Object
Provide a user friendly representation
495 496 497 498 |
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 495 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
472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 |
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 472 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.
396 397 398 |
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 396 def url @properties['url'] end |