Class: PagSeguro::SubscriptionDiscount::RequestSerializer

Inherits:
Object
  • Object
show all
Defined in:
lib/pagseguro/subscription_discount/request_serializer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object) ⇒ RequestSerializer

Returns a new instance of RequestSerializer.



6
7
8
# File 'lib/pagseguro/subscription_discount/request_serializer.rb', line 6

def initialize(object)
  @object = object
end

Instance Attribute Details

#objectObject (readonly)

Returns the value of attribute object.



4
5
6
# File 'lib/pagseguro/subscription_discount/request_serializer.rb', line 4

def object
  @object
end

Instance Method Details

#to_xml_paramsObject



10
11
12
13
14
15
16
# File 'lib/pagseguro/subscription_discount/request_serializer.rb', line 10

def to_xml_params
  xml_builder.to_xml(
    save_with:
    Nokogiri::XML::Node::SaveOptions::NO_EMPTY_TAGS |
    Nokogiri::XML::Node::SaveOptions::FORMAT
  )
end