Class: PagSeguro::SubscriptionChangePayment

Inherits:
Object
  • Object
show all
Includes:
Extensions::Credentiable, Extensions::EnsureType, Extensions::MassAssignment
Defined in:
lib/pagseguro/subscription_change_payment.rb,
lib/pagseguro/subscription_change_payment/response.rb,
lib/pagseguro/subscription_change_payment/request_serializer.rb

Defined Under Namespace

Classes: RequestSerializer, Response

Instance Attribute Summary collapse

Attributes included from Extensions::Credentiable

#credentials

Instance Method Summary collapse

Methods included from Extensions::MassAssignment

#initialize

Methods included from Extensions::EnsureType

#ensure_type

Instance Attribute Details

#senderObject

Returns the value of attribute sender.



9
10
11
# File 'lib/pagseguro/subscription_change_payment.rb', line 9

def sender
  @sender
end

#subscription_codeObject

Returns the value of attribute subscription_code.



7
8
9
# File 'lib/pagseguro/subscription_change_payment.rb', line 7

def subscription_code
  @subscription_code
end

#subscription_payment_methodObject

Returns the value of attribute subscription_payment_method.



10
11
12
# File 'lib/pagseguro/subscription_change_payment.rb', line 10

def subscription_payment_method
  @subscription_payment_method
end

Instance Method Details

#errorsObject



24
25
26
# File 'lib/pagseguro/subscription_change_payment.rb', line 24

def errors
  @errors ||= Errors.new
end

#holder=(holder) ⇒ Object



16
17
18
# File 'lib/pagseguro/subscription_change_payment.rb', line 16

def holder=(holder)
  @holder = ensure_type(Holder, holder)
end

#updateObject



28
29
30
31
32
33
34
# File 'lib/pagseguro/subscription_change_payment.rb', line 28

def update
  request = Request.put_xml("pre-approvals/#{subscription_code}/payment-method", credentials, params)

  Response.new(request, self).serialize

  self
end