Class: Twilio::REST::Marketplace::V1::InstalledAddOnContext::InstalledAddOnUsageInstance

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, installed_add_on_sid: nil) ⇒ InstalledAddOnUsageInstance

Initialize the InstalledAddOnUsageInstance

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 InstalledAddOnUsage resource.

  • sid (String)

    The SID of the Call resource to fetch.



115
116
117
118
119
120
121
122
123
# File 'lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb', line 115

def initialize(version, payload , installed_add_on_sid: nil)
    super(version)
    
    # Marshaled Properties
    @properties = { 
        'total_submitted' => payload['total_submitted'],
        'billable_items' => payload['billable_items'],
    }
end

Instance Method Details

#billable_itemsArray<InstalledAddOnUsageList.MarketplaceV1InstalledAddOnInstalledAddOnUsageBillableItems>

Returns:



134
135
136
# File 'lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb', line 134

def billable_items
    @properties['billable_items']
end

#inspectObject

Provide a detailed, user friendly representation



146
147
148
# File 'lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb', line 146

def inspect
    "<Twilio.Marketplace.V1.InstalledAddOnUsageInstance>"
end

#to_sObject

Provide a user friendly representation



140
141
142
# File 'lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb', line 140

def to_s
    "<Twilio.Marketplace.V1.InstalledAddOnUsageInstance>"
end

#total_submittedFloat

Returns Total amount in local currency that was billed in this request. Aggregates all billable_items that were successfully submitted.

Returns:

  • (Float)

    Total amount in local currency that was billed in this request. Aggregates all billable_items that were successfully submitted.



128
129
130
# File 'lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb', line 128

def 
    @properties['total_submitted']
end