Class: PaysonAPI::Response::PaymentUpdate

Inherits:
Object
  • Object
show all
Defined in:
lib/payson_api/response/payment_update.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ PaymentUpdate

Returns a new instance of PaymentUpdate.



6
7
8
9
# File 'lib/payson_api/response/payment_update.rb', line 6

def initialize(data)
  @envelope = Envelope.parse(data)
  @errors = RemoteError.parse(data)
end

Instance Attribute Details

#envelopeObject

Returns the value of attribute envelope.



4
5
6
# File 'lib/payson_api/response/payment_update.rb', line 4

def envelope
  @envelope
end

#errorsObject

Returns the value of attribute errors.



4
5
6
# File 'lib/payson_api/response/payment_update.rb', line 4

def errors
  @errors
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/payson_api/response/payment_update.rb', line 11

def success?
  @envelope.ack == 'SUCCESS'
end