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.



128
129
130
131
132
133
134
135
136
# File 'lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb', line 128

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

Instance Method Details

#billable_itemsArray<MarketplaceV1InstalledAddOnBillingUsageResponseBillableItems>

Returns:

  • (Array<MarketplaceV1InstalledAddOnBillingUsageResponseBillableItems>)


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

def billable_items
    @properties['billable_items']
end

#inspectObject

Provide a detailed, user friendly representation



159
160
161
# File 'lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb', line 159

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

#to_sObject

Provide a user friendly representation



153
154
155
# File 'lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb', line 153

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

#total_submittedFloat

Returns Represents the total quantity submitted.

Returns:

  • (Float)

    Represents the total quantity submitted.



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

def 
    @properties['total_submitted']
end