Sha256: c624ea3dabaef3a42f457a73d396d7b333dde9e4f6533a50a52f1e42559f2461
Contents?: true
Size: 550 Bytes
Versions: 7
Compression:
Stored size: 550 Bytes
Contents
module AdaptivePayments class ResponseEnvelope < JsonModel attribute :ack_code, String, :param => "ack" attribute :build, String, :param => "build" attribute :correlation_id, String, :param => "correlationId" attribute :time, DateTime, :param => "timestamp" ["Success", "Failure", "Warning", "SuccessWithWarning", "FailureWithWarning"].each do |ack| method = ack.split(/(?=[A-Z])/).map{ |w| w.downcase }.join("_") + "?" define_method(method) { ack_code == ack } end end end
Version data entries
7 entries across 7 versions & 2 rubygems