Class: PagSeguro::Installment::RequestSerializer
- Inherits:
-
Object
- Object
- PagSeguro::Installment::RequestSerializer
- Defined in:
- lib/pagseguro/installment/request_serializer.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
The data that will be serialized.
Instance Method Summary collapse
-
#initialize(data) ⇒ RequestSerializer
constructor
A new instance of RequestSerializer.
- #to_params ⇒ Object
Constructor Details
#initialize(data) ⇒ RequestSerializer
Returns a new instance of RequestSerializer.
7 8 9 |
# File 'lib/pagseguro/installment/request_serializer.rb', line 7 def initialize(data) @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
The data that will be serialized.
5 6 7 |
# File 'lib/pagseguro/installment/request_serializer.rb', line 5 def data @data end |
Instance Method Details
#to_params ⇒ Object
11 12 13 14 15 16 |
# File 'lib/pagseguro/installment/request_serializer.rb', line 11 def to_params params[:amount] = data[:amount] params[:cardBrand] = data[:card_brand] if data[:card_brand] params end |