Class: Sendly::VerifySession
- Inherits:
-
Object
- Object
- Sendly::VerifySession
- Defined in:
- lib/sendly/verify.rb
Instance Attribute Summary collapse
-
#brand_color ⇒ Object
readonly
Returns the value of attribute brand_color.
-
#brand_name ⇒ Object
readonly
Returns the value of attribute brand_name.
-
#cancel_url ⇒ Object
readonly
Returns the value of attribute cancel_url.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#expires_at ⇒ Object
readonly
Returns the value of attribute expires_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#phone ⇒ Object
readonly
Returns the value of attribute phone.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#success_url ⇒ Object
readonly
Returns the value of attribute success_url.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#verification_id ⇒ Object
readonly
Returns the value of attribute verification_id.
Instance Method Summary collapse
-
#initialize(data) ⇒ VerifySession
constructor
A new instance of VerifySession.
- #to_h ⇒ Object
Constructor Details
#initialize(data) ⇒ VerifySession
Returns a new instance of VerifySession.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/sendly/verify.rb', line 98 def initialize(data) @id = data["id"] @url = data["url"] @status = data["status"] @success_url = data["success_url"] @cancel_url = data["cancel_url"] @brand_name = data["brand_name"] @brand_color = data["brand_color"] @phone = data["phone"] @verification_id = data["verification_id"] @token = data["token"] @metadata = data["metadata"] || {} @expires_at = data["expires_at"] @created_at = data["created_at"] end |
Instance Attribute Details
#brand_color ⇒ Object (readonly)
Returns the value of attribute brand_color.
94 95 96 |
# File 'lib/sendly/verify.rb', line 94 def brand_color @brand_color end |
#brand_name ⇒ Object (readonly)
Returns the value of attribute brand_name.
94 95 96 |
# File 'lib/sendly/verify.rb', line 94 def brand_name @brand_name end |
#cancel_url ⇒ Object (readonly)
Returns the value of attribute cancel_url.
94 95 96 |
# File 'lib/sendly/verify.rb', line 94 def cancel_url @cancel_url end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
94 95 96 |
# File 'lib/sendly/verify.rb', line 94 def created_at @created_at end |
#expires_at ⇒ Object (readonly)
Returns the value of attribute expires_at.
94 95 96 |
# File 'lib/sendly/verify.rb', line 94 def expires_at @expires_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
94 95 96 |
# File 'lib/sendly/verify.rb', line 94 def id @id end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
94 95 96 |
# File 'lib/sendly/verify.rb', line 94 def @metadata end |
#phone ⇒ Object (readonly)
Returns the value of attribute phone.
94 95 96 |
# File 'lib/sendly/verify.rb', line 94 def phone @phone end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
94 95 96 |
# File 'lib/sendly/verify.rb', line 94 def status @status end |
#success_url ⇒ Object (readonly)
Returns the value of attribute success_url.
94 95 96 |
# File 'lib/sendly/verify.rb', line 94 def success_url @success_url end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
94 95 96 |
# File 'lib/sendly/verify.rb', line 94 def token @token end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
94 95 96 |
# File 'lib/sendly/verify.rb', line 94 def url @url end |
#verification_id ⇒ Object (readonly)
Returns the value of attribute verification_id.
94 95 96 |
# File 'lib/sendly/verify.rb', line 94 def verification_id @verification_id end |
Instance Method Details
#to_h ⇒ Object
114 115 116 117 118 119 120 121 |
# File 'lib/sendly/verify.rb', line 114 def to_h { id: id, url: url, status: status, success_url: success_url, cancel_url: cancel_url, brand_name: brand_name, brand_color: brand_color, phone: phone, verification_id: verification_id, token: token, metadata: , expires_at: expires_at, created_at: created_at }.compact end |