Class: PagSeguro::SubscriptionChangePayment::RequestSerializer

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/pagseguro/subscription_change_payment/request_serializer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object) ⇒ RequestSerializer

Returns a new instance of RequestSerializer.



12
13
14
# File 'lib/pagseguro/subscription_change_payment/request_serializer.rb', line 12

def initialize(object)
  @object = object
end

Instance Attribute Details

#objectObject (readonly)

Returns the value of attribute object.



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

def object
  @object
end

Instance Method Details

#serializeObject



16
17
18
19
20
21
# File 'lib/pagseguro/subscription_change_payment/request_serializer.rb', line 16

def serialize
  build.to_xml(save_with:
    Nokogiri::XML::Node::SaveOptions::NO_EMPTY_TAGS |
    Nokogiri::XML::Node::SaveOptions::FORMAT
  )
end