Class: Twilio::REST::Supersim::V1::SimContext::BillingPeriodInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, sim_sid: nil) ⇒ BillingPeriodInstance

Initialize the BillingPeriodInstance

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

  • sid (String)

    The SID of the Call resource to fetch.



253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
# File 'lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb', line 253

def initialize(version, payload , sim_sid: nil)
    super(version)
    
    
    # Marshaled Properties
    @properties = { 
        'sid' => payload['sid'],
        'account_sid' => payload['account_sid'],
        'sim_sid' => payload['sim_sid'],
        'start_time' => Twilio.deserialize_iso8601_datetime(payload['start_time']),
        'end_time' => Twilio.deserialize_iso8601_datetime(payload['end_time']),
        'period_type' => payload['period_type'],
        'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
        'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
    }
end

Instance Method Details

#account_sidString

Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) the Super SIM belongs to.

Returns:



279
280
281
# File 'lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb', line 279

def 
    @properties['account_sid']
end

#date_createdTime

Returns The date and time in GMT when the resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.

Returns:



309
310
311
# File 'lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb', line 309

def date_created
    @properties['date_created']
end

#date_updatedTime

Returns The date and time in GMT when the resource was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.

Returns:



315
316
317
# File 'lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb', line 315

def date_updated
    @properties['date_updated']
end

#end_timeTime

Returns The end time of the Billing Period specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.

Returns:



297
298
299
# File 'lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb', line 297

def end_time
    @properties['end_time']
end

#inspectObject

Provide a detailed, user friendly representation



327
328
329
# File 'lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb', line 327

def inspect
    "<Twilio.Supersim.V1.BillingPeriodInstance>"
end

#period_typeBpType

Returns:

  • (BpType)


303
304
305
# File 'lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb', line 303

def period_type
    @properties['period_type']
end

#sidString

Returns The SID of the Billing Period.

Returns:

  • (String)

    The SID of the Billing Period.



273
274
275
# File 'lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb', line 273

def sid
    @properties['sid']
end

#sim_sidString

Returns The SID of the Super SIM the Billing Period belongs to.

Returns:

  • (String)

    The SID of the Super SIM the Billing Period belongs to.



285
286
287
# File 'lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb', line 285

def sim_sid
    @properties['sim_sid']
end

#start_timeTime

Returns The start time of the Billing Period specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.

Returns:



291
292
293
# File 'lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb', line 291

def start_time
    @properties['start_time']
end

#to_sObject

Provide a user friendly representation



321
322
323
# File 'lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb', line 321

def to_s
    "<Twilio.Supersim.V1.BillingPeriodInstance>"
end