class PagSeguro::SubscriptionPaymentOrder

Constants

STATUSES

Attributes

amount[RW]
code[RW]
discount[R]
errors[RW]
gross_amount[RW]
last_event_date[RW]
scheduling_date[RW]
status[RW]

Public Class Methods

load_from_xml(xml) click to toggle source
# File lib/pagseguro/subscription_payment_order.rb, line 47
def self.load_from_xml(xml)
  new ResponseSerializer.new(xml).serialize
end

Public Instance Methods

discount=(discount) click to toggle source
# File lib/pagseguro/subscription_payment_order.rb, line 25
def discount=(discount)
  @discount = ensure_type(PagSeguro::SubscriptionDiscount, discount)
end
status_code() click to toggle source
# File lib/pagseguro/subscription_payment_order.rb, line 39
def status_code
  STATUSES[@status.to_sym]
end
transactions() click to toggle source
# File lib/pagseguro/subscription_payment_order.rb, line 29
def transactions
  @transactions ||= SubscriptionTransactions.new
end
transactions=(attrs) click to toggle source
# File lib/pagseguro/subscription_payment_order.rb, line 33
def transactions=(attrs)
  attrs.each do |params|
    transactions << SubscriptionTransaction.new(params)
  end
end
update_attributes(attrs) click to toggle source
# File lib/pagseguro/subscription_payment_order.rb, line 43
def update_attributes(attrs)
  attrs.each {|name, value| send("#{name}=", value)  }
end

Private Instance Methods

after_initialize() click to toggle source
# File lib/pagseguro/subscription_payment_order.rb, line 53
def after_initialize
  @errors ||= Errors.new
end