Exception: Mollie::SMS::Exceptions::DeliveryFailure

Inherits:
StandardError
  • Object
show all
Defined in:
lib/mollie/sms.rb

Overview

The exception class which is used to indicate a delivery failure, when the Mollie::SMS#deliver! method is used and delivery fails.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sms, response) ⇒ DeliveryFailure


41
42
43
# File 'lib/mollie/sms.rb', line 41

def initialize(sms, response)
  @sms, @response = sms, response
end

Instance Attribute Details

#responseResponse (readonly)


37
38
39
# File 'lib/mollie/sms.rb', line 37

def response
  @response
end

#smsSMS (readonly)


34
35
36
# File 'lib/mollie/sms.rb', line 34

def sms
  @sms
end

Instance Method Details

#messageString


46
47
48
# File 'lib/mollie/sms.rb', line 46

def message
  "(#{@response.message}) #{@sms.to_s}"
end