class Midpay::Strategy::PaymentInfo
Attributes
extra[RW]
pay[RW]
raw_data[RW]
success[RW]
Public Class Methods
new(pay) { |self| ... }
click to toggle source
# File lib/midpay/strategy.rb, line 9 def initialize pay, &block @pay = pay @raw_data = {} @extra = {} @success = nil yield(self) if block_given? end
Public Instance Methods
success?()
click to toggle source
# File lib/midpay/strategy.rb, line 34 def success? !!success end
to_hash()
click to toggle source
# File lib/midpay/strategy.rb, line 21 def to_hash { :pay => pay, :raw_data => raw_data, :extra => extra, :success => success? } end
to_json()
click to toggle source
# File lib/midpay/strategy.rb, line 30 def to_json to_hash.to_json end
valid?()
click to toggle source
# File lib/midpay/strategy.rb, line 17 def valid? !pay.to_s.empty? && raw_data.is_a?(::Hash) && !raw_data.empty? end