Class: Twilio::REST::Marketplace::V1::InstalledAddOnContext::InstalledAddOnUsageList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Marketplace::V1::InstalledAddOnContext::InstalledAddOnUsageList
- Defined in:
- lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb
Defined Under Namespace
Classes: MarketplaceV1InstalledAddOnInstalledAddOnUsage
Instance Method Summary collapse
-
#create(marketplace_v1_installed_add_on_installed_add_on_usage: nil) ⇒ InstalledAddOnUsageInstance
Create the InstalledAddOnUsageInstance.
-
#initialize(version, installed_add_on_sid: nil) ⇒ InstalledAddOnUsageList
constructor
Initialize the InstalledAddOnUsageList.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, installed_add_on_sid: nil) ⇒ InstalledAddOnUsageList
Initialize the InstalledAddOnUsageList
45 46 47 48 49 50 51 |
# File 'lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb', line 45 def initialize(version, installed_add_on_sid: nil) super(version) # Path Solution @solution = { installed_add_on_sid: installed_add_on_sid } @uri = "/InstalledAddOns/#{@solution[:installed_add_on_sid]}/Usage" end |
Instance Method Details
#create(marketplace_v1_installed_add_on_installed_add_on_usage: nil) ⇒ InstalledAddOnUsageInstance
Create the InstalledAddOnUsageInstance
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb', line 56 def create(marketplace_v1_installed_add_on_installed_add_on_usage: nil ) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) headers['Content-Type'] = 'application/json' payload = @version.create('POST', @uri, headers: headers, data: marketplace_v1_installed_add_on_installed_add_on_usage.to_json) InstalledAddOnUsageInstance.new( @version, payload, installed_add_on_sid: @solution[:installed_add_on_sid], ) end |
#to_s ⇒ Object
Provide a user friendly representation
77 78 79 |
# File 'lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb', line 77 def to_s '#<Twilio.Marketplace.V1.InstalledAddOnUsageList>' end |