Class: Twilio::REST::Api::V2010::AccountContext::UsageList::RecordList::ThisMonthInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Api::V2010::AccountContext::UsageList::RecordList::ThisMonthInstance
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that accrued the usage.
-
#api_version ⇒ String
The API version used to create the resource.
-
#as_of ⇒ String
Usage records up to date as of this timestamp, formatted as YYYY-MM-DDTHH:MM:SS+00:00.
- #category ⇒ Category
-
#count ⇒ String
The number of usage events, such as the number of calls.
-
#count_unit ⇒ String
The units in which ‘count` is measured, such as `calls` for calls or `messages` for SMS.
-
#description ⇒ String
A plain-language description of the usage category.
-
#end_date ⇒ Date
The last date for which usage is included in the UsageRecord.
-
#initialize(version, payload, account_sid: nil) ⇒ ThisMonthInstance
constructor
Initialize the ThisMonthInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#price ⇒ Float
The total price of the usage in the currency specified in ‘price_unit` and associated with the account.
-
#price_unit ⇒ String
The currency in which ‘price` is measured, in [ISO 4127](www.iso.org/iso/home/standards/currency_codes.htm) format, such as `usd`, `eur`, and `jpy`.
-
#start_date ⇒ Date
The first date for which usage is included in this UsageRecord.
-
#subresource_uris ⇒ Hash
A list of related resources identified by their URIs.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#uri ⇒ String
The URI of the resource, relative to ‘api.twilio.com`.
-
#usage ⇒ String
The amount used to bill usage and measured in units described in ‘usage_unit`.
-
#usage_unit ⇒ String
The units in which ‘usage` is measured, such as `minutes` for calls or `messages` for SMS.
Constructor Details
#initialize(version, payload, account_sid: nil) ⇒ ThisMonthInstance
Initialize the ThisMonthInstance
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
# File 'lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb', line 191 def initialize(version, payload , account_sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'api_version' => payload['api_version'], 'as_of' => payload['as_of'], 'category' => payload['category'], 'count' => payload['count'], 'count_unit' => payload['count_unit'], 'description' => payload['description'], 'end_date' => Twilio.deserialize_iso8601_date(payload['end_date']), 'price' => payload['price'], 'price_unit' => payload['price_unit'], 'start_date' => Twilio.deserialize_iso8601_date(payload['start_date']), 'subresource_uris' => payload['subresource_uris'], 'uri' => payload['uri'], 'usage' => payload['usage'], 'usage_unit' => payload['usage_unit'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that accrued the usage.
217 218 219 |
# File 'lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb', line 217 def account_sid @properties['account_sid'] end |
#api_version ⇒ String
Returns The API version used to create the resource.
223 224 225 |
# File 'lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb', line 223 def api_version @properties['api_version'] end |
#as_of ⇒ String
Returns Usage records up to date as of this timestamp, formatted as YYYY-MM-DDTHH:MM:SS+00:00. All timestamps are in GMT.
229 230 231 |
# File 'lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb', line 229 def as_of @properties['as_of'] end |
#category ⇒ Category
235 236 237 |
# File 'lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb', line 235 def category @properties['category'] end |
#count ⇒ String
Returns The number of usage events, such as the number of calls.
241 242 243 |
# File 'lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb', line 241 def count @properties['count'] end |
#count_unit ⇒ String
Returns The units in which ‘count` is measured, such as `calls` for calls or `messages` for SMS.
247 248 249 |
# File 'lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb', line 247 def count_unit @properties['count_unit'] end |
#description ⇒ String
Returns A plain-language description of the usage category.
253 254 255 |
# File 'lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb', line 253 def description @properties['description'] end |
#end_date ⇒ Date
Returns The last date for which usage is included in the UsageRecord. The date is specified in GMT and formatted as ‘YYYY-MM-DD`.
259 260 261 |
# File 'lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb', line 259 def end_date @properties['end_date'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
313 314 315 |
# File 'lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb', line 313 def inspect "<Twilio.Api.V2010.ThisMonthInstance>" end |
#price ⇒ Float
Returns The total price of the usage in the currency specified in ‘price_unit` and associated with the account.
265 266 267 |
# File 'lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb', line 265 def price @properties['price'] end |
#price_unit ⇒ String
Returns The currency in which ‘price` is measured, in [ISO 4127](www.iso.org/iso/home/standards/currency_codes.htm) format, such as `usd`, `eur`, and `jpy`.
271 272 273 |
# File 'lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb', line 271 def price_unit @properties['price_unit'] end |
#start_date ⇒ Date
Returns The first date for which usage is included in this UsageRecord. The date is specified in GMT and formatted as ‘YYYY-MM-DD`.
277 278 279 |
# File 'lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb', line 277 def start_date @properties['start_date'] end |
#subresource_uris ⇒ Hash
Returns A list of related resources identified by their URIs. For more information, see [List Subresources](www.twilio.com/docs/usage/api/usage-record#list-subresources).
283 284 285 |
# File 'lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb', line 283 def subresource_uris @properties['subresource_uris'] end |
#to_s ⇒ Object
Provide a user friendly representation
307 308 309 |
# File 'lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb', line 307 def to_s "<Twilio.Api.V2010.ThisMonthInstance>" end |
#uri ⇒ String
Returns The URI of the resource, relative to ‘api.twilio.com`.
289 290 291 |
# File 'lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb', line 289 def uri @properties['uri'] end |
#usage ⇒ String
Returns The amount used to bill usage and measured in units described in ‘usage_unit`.
295 296 297 |
# File 'lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb', line 295 def usage @properties['usage'] end |
#usage_unit ⇒ String
Returns The units in which ‘usage` is measured, such as `minutes` for calls or `messages` for SMS.
301 302 303 |
# File 'lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb', line 301 def usage_unit @properties['usage_unit'] end |