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

  • sim_sid (String) (defaults to: nil)

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


151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# File 'lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb', line 151

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 the Super SIM belongs to.

Returns:

  • (String)

    The SID of the Account the Super SIM belongs to


175
176
177
# File 'lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb', line 175

def 
  @properties['account_sid']
end

#date_createdTime

Returns The ISO 8601 date and time in GMT when the resource was created.

Returns:

  • (Time)

    The ISO 8601 date and time in GMT when the resource was created


205
206
207
# File 'lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb', line 205

def date_created
  @properties['date_created']
end

#date_updatedTime

Returns The ISO 8601 date and time in GMT when the resource was last updated.

Returns:

  • (Time)

    The ISO 8601 date and time in GMT when the resource was last updated


211
212
213
# File 'lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb', line 211

def date_updated
  @properties['date_updated']
end

#end_timeTime

Returns The end time of the Billing Period.

Returns:

  • (Time)

    The end time of the Billing Period


193
194
195
# File 'lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb', line 193

def end_time
  @properties['end_time']
end

#inspectObject

Provide a detailed, user friendly representation


223
224
225
# File 'lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb', line 223

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

#period_typebilling_period.BpType

Returns The type of the Billing Period.

Returns:

  • (billing_period.BpType)

    The type of the Billing Period


199
200
201
# File 'lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb', line 199

def period_type
  @properties['period_type']
end

#sidString

Returns The SID of the Billing Period.

Returns:

  • (String)

    The SID of the Billing Period


169
170
171
# File 'lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb', line 169

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


181
182
183
# File 'lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb', line 181

def sim_sid
  @properties['sim_sid']
end

#start_timeTime

Returns The start time of the Billing Period.

Returns:

  • (Time)

    The start time of the Billing Period


187
188
189
# File 'lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb', line 187

def start_time
  @properties['start_time']
end

#to_sObject

Provide a user friendly representation


217
218
219
# File 'lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb', line 217

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