Class: Twilio::REST::Marketplace::V1::ModuleDataManagementContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Marketplace::V1::ModuleDataManagementContext
- Defined in:
- lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb
Instance Method Summary collapse
-
#fetch ⇒ ModuleDataManagementInstance
Fetch the ModuleDataManagementInstance.
-
#initialize(version, sid) ⇒ ModuleDataManagementContext
constructor
Initialize the ModuleDataManagementContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#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.
Constructor Details
#initialize(version, sid) ⇒ ModuleDataManagementContext
Initialize the ModuleDataManagementContext
49 50 51 52 53 54 55 56 57 |
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 49 def initialize(version, sid) super(version) # Path Solution @solution = { sid: sid, } @uri = "/Listing/#{@solution[:sid]}" end |
Instance Method Details
#fetch ⇒ ModuleDataManagementInstance
Fetch the ModuleDataManagementInstance
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 61 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) ModuleDataManagementInstance.new( @version, payload, sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
131 132 133 134 |
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 131 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Marketplace.V1.ModuleDataManagementContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
124 125 126 127 |
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 124 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Marketplace.V1.ModuleDataManagementContext #{context}>" end |
#update(module_info: :unset, description: :unset, documentation: :unset, policies: :unset, support: :unset, configuration: :unset, pricing: :unset) ⇒ ModuleDataManagementInstance
Update the ModuleDataManagementInstance
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb', line 87 def update( module_info: :unset, description: :unset, documentation: :unset, policies: :unset, support: :unset, configuration: :unset, pricing: :unset ) data = Twilio::Values.of({ 'ModuleInfo' => module_info, 'Description' => description, 'Documentation' => documentation, 'Policies' => policies, 'Support' => support, 'Configuration' => configuration, 'Pricing' => pricing, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.update('POST', @uri, data: data, headers: headers) ModuleDataManagementInstance.new( @version, payload, sid: @solution[:sid], ) end |