Class: Telesign::Status::Response

Inherits:
ApiResponse show all
Defined in:
lib/telesign/status/response.rb

Defined Under Namespace

Modules: StatusCode

Instance Method Summary collapse

Methods inherited from ApiResponse

#after_initialize, #initialize, #raise_exceptions, response_method

Constructor Details

This class inherits a constructor from Telesign::ApiResponse

Instance Method Details

#answered?Boolean Also known as: delivered?

Returns:

  • (Boolean)


26
27
28
# File 'lib/telesign/status/response.rb', line 26

def answered?
  [ StatusCode::ANSWERED, StatusCode::SMS_DELIVERED ].include?(status_code)
end

#verification_code_valid?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/telesign/status/response.rb', line 31

def verification_code_valid?
  @response.verificationCodeValid == "0"
end