class PagSeguro::ManualSubscriptionCharger

Constants

API_VERSION

Attributes

items[R]

Set items

reference[RW]

Set reference

subscription_code[RW]

Set subscription code of a manual subscription

transaction_code[RW]

Set transaction code, it is within the response

Public Instance Methods

create() click to toggle source
# File lib/pagseguro/manual_subscription_charger.rb, line 37
def create
  request = Request.post_xml('pre-approvals/payment', API_VERSION, credentials, xml_params)

  Response.new(request, self).serialize

  self
end
errors() click to toggle source

Set errors

# File lib/pagseguro/manual_subscription_charger.rb, line 22
def errors
  @errors ||= Errors.new
end
items=(items=[]) click to toggle source
# File lib/pagseguro/manual_subscription_charger.rb, line 26
def items=(items=[])
  @items = items.map do |item|
             ensure_type(Item, item)
           end
end
update_attributes(attrs) click to toggle source

Update all attributes

# File lib/pagseguro/manual_subscription_charger.rb, line 33
def update_attributes(attrs)
  attrs.each { |name, value| send("#{name}=", value) }
end

Private Instance Methods

after_initialize() click to toggle source
# File lib/pagseguro/manual_subscription_charger.rb, line 55
def after_initialize
  @errors = Errors.new
end
before_initialize() click to toggle source
# File lib/pagseguro/manual_subscription_charger.rb, line 51
def before_initialize
  @items ||= Items.new
end
xml_params() click to toggle source
# File lib/pagseguro/manual_subscription_charger.rb, line 47
def xml_params
  RequestSerializer.new(self).to_xml_params
end