Class: Twilio::REST::Marketplace::V1::InstalledAddOnContext::InstalledAddOnUsageList

Inherits:
ListResource
  • Object
show all
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

Constructor Details

#initialize(version, installed_add_on_sid: nil) ⇒ InstalledAddOnUsageList

Initialize the InstalledAddOnUsageList

Parameters:

  • version (Version)

    Version that contains the resource



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

Parameters:

Returns:



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_sObject

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