def to_request obj, type
      payment = {
        seller_id:        GetnetApi.seller_id.to_s,
        amount:           self.amount.to_i,
        currency:         self.currency.to_s,
        order:            self.order.to_request,
        customer:         self.customer.to_request(:payment),
      }

      if type == :boleto
          payment.merge!({"boleto" => obj.to_request,})
      elsif :credit
          payment.merge!({"credit" => obj.to_request,})
      end

      return payment
    end
def to_request obj, type
      payment = {
        seller_id:        GetnetApi.seller_id.to_s,
        amount:           self.amount.to_i,
        currency:         self.currency.to_s,
        order:            self.order.to_request,
        customer:         self.customer.to_request(:payment),
      }

      if type == :boleto
          payment.merge!({"boleto" => obj.to_request,})
      elsif :credit
          payment.merge!({"credit" => obj.to_request,})
      end

      return payment
    end
Nova instancia da classe Cliente
 @param [Hash] campos
 Montar o Hash de dados do usuario no padrão utilizado pela Getnet