Class: Twilio::REST::Verify::V2::ServiceContext::EntityContext::ChallengeContext::NotificationInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Verify::V2::ServiceContext::EntityContext::ChallengeContext::NotificationInstance
- Defined in:
- lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The unique SID identifier of the Account.
-
#challenge_sid ⇒ String
The unique SID identifier of the Challenge.
-
#date_created ⇒ Time
The date that this Notification was created, given in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#entity_sid ⇒ String
The unique SID identifier of the Entity.
-
#identity ⇒ String
Customer unique identity for the Entity owner of the Challenge.
-
#initialize(version, payload, service_sid: nil, identity: nil, challenge_sid: nil) ⇒ NotificationInstance
constructor
Initialize the NotificationInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#priority ⇒ String
The priority of the notification.
-
#service_sid ⇒ String
The unique SID identifier of the Service.
-
#sid ⇒ String
A 34 character string that uniquely identifies this Notification.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#ttl ⇒ String
How long, in seconds, the notification is valid.
Constructor Details
#initialize(version, payload, service_sid: nil, identity: nil, challenge_sid: nil) ⇒ NotificationInstance
Initialize the NotificationInstance
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 108 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'] == nil ? payload['ttl'] : payload['ttl'].to_i, 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), } end |
Instance Method Details
#account_sid ⇒ String
Returns The unique SID identifier of the Account.
134 135 136 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 134 def account_sid @properties['account_sid'] end |
#challenge_sid ⇒ String
Returns The unique SID identifier of the Challenge.
158 159 160 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 158 def challenge_sid @properties['challenge_sid'] end |
#date_created ⇒ Time
Returns The date that this Notification was created, given in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
176 177 178 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 176 def date_created @properties['date_created'] end |
#entity_sid ⇒ String
Returns The unique SID identifier of the Entity.
146 147 148 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 146 def entity_sid @properties['entity_sid'] end |
#identity ⇒ String
Returns Customer unique identity for the Entity owner of the Challenge. This identifier should be immutable, not PII, length between 8 and 64 characters, and generated by your external system, such as your user’s UUID, GUID, or SID. It can only contain dash (-) separated alphanumeric characters.
152 153 154 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 152 def identity @properties['identity'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
188 189 190 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 188 def inspect "<Twilio.Verify.V2.NotificationInstance>" end |
#priority ⇒ String
Returns The priority of the notification. For ‘push` Challenges it’s always ‘high` which sends the notification immediately, and can wake up a sleeping device.
164 165 166 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 164 def priority @properties['priority'] end |
#service_sid ⇒ String
Returns The unique SID identifier of the Service.
140 141 142 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 140 def service_sid @properties['service_sid'] end |
#sid ⇒ String
Returns A 34 character string that uniquely identifies this Notification.
128 129 130 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 128 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
182 183 184 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 182 def to_s "<Twilio.Verify.V2.NotificationInstance>" end |
#ttl ⇒ String
Returns How long, in seconds, the notification is valid. Max: 5 minutes.
170 171 172 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 170 def ttl @properties['ttl'] end |