Class: Twilio::REST::Verify::V2::ServiceContext::EntityContext::ChallengeContext::NotificationInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb

Overview

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, service_sid: nil, identity: nil, challenge_sid: nil) ⇒ NotificationInstance

Initialize the NotificationInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • service_sid (String) (defaults to: nil)

    The unique SID identifier of the Service.

  • identity (String) (defaults to: nil)

    Customer unique identity for the Entity owner of the Challenge. This value must be between 8 and 64 characters long.

  • challenge_sid (String) (defaults to: nil)

    The unique SID identifier of the Challenge.



113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 113

def initialize(version, payload, service_sid: nil, identity: nil, challenge_sid: nil)
  super(version)

  # Marshaled Properties
  @properties = {
      'sid' => payload['sid'],
      'account_sid' => payload['account_sid'],
      'service_sid' => payload['service_sid'],
      'entity_sid' => payload['entity_sid'],
      'identity' => payload['identity'],
      'challenge_sid' => payload['challenge_sid'],
      'priority' => payload['priority'],
      'ttl' => payload['ttl'].to_i,
      'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
  }
end

Instance Method Details

#account_sidString

Returns Account Sid.

Returns:

  • (String)

    Account Sid.



138
139
140
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 138

def 
  @properties['account_sid']
end

#challenge_sidString

Returns Challenge Sid.

Returns:

  • (String)

    Challenge Sid.



162
163
164
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 162

def challenge_sid
  @properties['challenge_sid']
end

#date_createdTime

Returns The date this Notification was created.

Returns:

  • (Time)

    The date this Notification was created



180
181
182
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 180

def date_created
  @properties['date_created']
end

#entity_sidString

Returns Entity Sid.

Returns:

  • (String)

    Entity Sid.



150
151
152
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 150

def entity_sid
  @properties['entity_sid']
end

#identityString

Returns Unique external identifier of the Entity.

Returns:

  • (String)

    Unique external identifier of the Entity



156
157
158
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 156

def identity
  @properties['identity']
end

#inspectObject

Provide a detailed, user friendly representation



192
193
194
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 192

def inspect
  "<Twilio.Verify.V2.NotificationInstance>"
end

#priorityString

Returns The priority of the Notification.

Returns:

  • (String)

    The priority of the Notification.



168
169
170
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 168

def priority
  @properties['priority']
end

#service_sidString

Returns Service Sid.

Returns:

  • (String)

    Service Sid.



144
145
146
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 144

def service_sid
  @properties['service_sid']
end

#sidString

Returns A string that uniquely identifies this Notification.

Returns:

  • (String)

    A string that uniquely identifies this Notification.



132
133
134
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 132

def sid
  @properties['sid']
end

#to_sObject

Provide a user friendly representation



186
187
188
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 186

def to_s
  "<Twilio.Verify.V2.NotificationInstance>"
end

#ttlString

Returns How long, in seconds, the Notification is valid.

Returns:

  • (String)

    How long, in seconds, the Notification is valid.



174
175
176
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 174

def ttl
  @properties['ttl']
end