Class: Sendly::CheckVerificationResponse

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ CheckVerificationResponse

Returns a new instance of CheckVerificationResponse.



80
81
82
83
84
85
86
# File 'lib/sendly/verify.rb', line 80

def initialize(data)
  @id = data["id"]
  @status = data["status"]
  @phone = data["phone"]
  @verified_at = data["verified_at"]
  @remaining_attempts = data["remaining_attempts"]
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



78
79
80
# File 'lib/sendly/verify.rb', line 78

def id
  @id
end

#phoneObject (readonly)

Returns the value of attribute phone.



78
79
80
# File 'lib/sendly/verify.rb', line 78

def phone
  @phone
end

#remaining_attemptsObject (readonly)

Returns the value of attribute remaining_attempts.



78
79
80
# File 'lib/sendly/verify.rb', line 78

def remaining_attempts
  @remaining_attempts
end

#statusObject (readonly)

Returns the value of attribute status.



78
79
80
# File 'lib/sendly/verify.rb', line 78

def status
  @status
end

#verified_atObject (readonly)

Returns the value of attribute verified_at.



78
79
80
# File 'lib/sendly/verify.rb', line 78

def verified_at
  @verified_at
end

Instance Method Details

#verified?Boolean

Returns:

  • (Boolean)


88
89
90
# File 'lib/sendly/verify.rb', line 88

def verified?
  status == "verified"
end