Sha256: 74e4475d7af967826b17906792b714cfa25db72118830523e92f1bfd596243ad

Contents?: true

Size: 1.12 KB

Versions: 2

Compression:

Stored size: 1.12 KB

Contents

class ExternalPaymentStatus
  attr_accessor :result, :success, :error

  # :internal => :external
  def self.attribute_map
  {
      :result => :result, :success => :success, :error => :error

  }
  end

  def initialize(attributes = {})
    # Morph attribute keys into undescored rubyish style
    if attributes.to_s != ""

      if ExternalPaymentStatus.attribute_map["result".to_sym] != nil
        name = "result".to_sym
        value = attributes["result"]
        send("#{name}=", value) if self.respond_to?(name)
	      end
      if ExternalPaymentStatus.attribute_map["success".to_sym] != nil
        name = "success".to_sym
        value = attributes["success"]
        send("#{name}=", value) if self.respond_to?(name)
	      end
      if ExternalPaymentStatus.attribute_map["error".to_sym] != nil
        name = "error".to_sym
        value = attributes["error"]
        send("#{name}=", value) if self.respond_to?(name)
	      end
      end
  end

  def to_body
    body = {}
    ExternalPaymentStatus.attribute_map.each_pair do |key,value|
      body[value] = self.send(key) unless self.send(key).nil?
    end
    body
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
subtledata-0.0.5 models/externalpaymentstatus.rb
subtledata-0.0.3 models/externalpaymentstatus.rb