class Paypal::Permissions::FaultMessage
PayPal returned a well formatted error message
Attributes
ack[RW]
build[RW]
correlation_id[RW]
errors[RW]
timestamp[RW]
Public Class Methods
new(options = {})
click to toggle source
# File lib/paypal/permissions/fault_message.rb, line 36 def initialize(options = {}) @timestamp = options['timestamp'] @ack = options['ack'].to_s.downcase.to_sym @correlation_id = options['correlationId'] @build = options['build'] @errors = collect_errors(options) @message = @ack end
Private Instance Methods
collect_errors(options={})
click to toggle source
# File lib/paypal/permissions/fault_message.rb, line 47 def collect_errors(options={}) errors = [] error_number = 0 while options["error(#{error_number}).errorId"] errors << ::Paypal::Permissions::FaultMessage::ErrorInformation.new(options, error_number) error_number = error_number + 1 end errors end