Class: Mailosaur::Models::OtpResult

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/Mailosaur/models/otp_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_json

Constructor Details

#initialize(data = {}) ⇒ OtpResult

Returns a new instance of OtpResult.



4
5
6
7
# File 'lib/Mailosaur/models/otp_result.rb', line 4

def initialize(data = {})
  @code = data['code']
  @expires = data['expires']
end

Instance Attribute Details

#codeString

Returns The current one-time password.

Returns:

  • (String)

    The current one-time password.



10
11
12
# File 'lib/Mailosaur/models/otp_result.rb', line 10

def code
  @code
end

#expiresString

Returns The expiry date/time of the current one-time password.

Returns:

  • (String)

    The expiry date/time of the current one-time password.



13
14
15
# File 'lib/Mailosaur/models/otp_result.rb', line 13

def expires
  @expires
end