Class: Sendly::VerifySession

Inherits:
Object
  • Object
show all
Defined in:
lib/sendly/verify.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_colorObject (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_nameObject (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_urlObject (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_atObject (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_atObject (readonly)

Returns the value of attribute expires_at.



94
95
96
# File 'lib/sendly/verify.rb', line 94

def expires_at
  @expires_at
end

#idObject (readonly)

Returns the value of attribute id.



94
95
96
# File 'lib/sendly/verify.rb', line 94

def id
  @id
end

#metadataObject (readonly)

Returns the value of attribute metadata.



94
95
96
# File 'lib/sendly/verify.rb', line 94

def 
  @metadata
end

#phoneObject (readonly)

Returns the value of attribute phone.



94
95
96
# File 'lib/sendly/verify.rb', line 94

def phone
  @phone
end

#statusObject (readonly)

Returns the value of attribute status.



94
95
96
# File 'lib/sendly/verify.rb', line 94

def status
  @status
end

#success_urlObject (readonly)

Returns the value of attribute success_url.



94
95
96
# File 'lib/sendly/verify.rb', line 94

def success_url
  @success_url
end

#tokenObject (readonly)

Returns the value of attribute token.



94
95
96
# File 'lib/sendly/verify.rb', line 94

def token
  @token
end

#urlObject (readonly)

Returns the value of attribute url.



94
95
96
# File 'lib/sendly/verify.rb', line 94

def url
  @url
end

#verification_idObject (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_hObject



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