lib/gateway/Parsers/trailer_parser.rb in stone_ecommerce-1.0.3 vs lib/gateway/Parsers/trailer_parser.rb in stone_ecommerce-1.2.3
- old
+ new
@@ -1,15 +1,17 @@
-class TrailerParser
- def Parse(elements)
- if elements.length < 5
- throw('The expected parameter count is 5')
- end
+module Gateway
+ class TrailerParser
+ def Parse(elements)
+ if elements.length < 5
+ throw('The expected parameter count is 5')
+ end
- trailer = Trailer.new
- trailer.OrderDataCount = elements[1]
- trailer.CreditCardTransactionDataCount = elements[2]
- trailer.BoletoTransactionDataCount = elements[3]
- trailer.OnlineDebitTransactionDataCount = elements[4].chomp
+ trailer = Trailer.new
+ trailer.OrderDataCount = elements[1]
+ trailer.CreditCardTransactionDataCount = elements[2]
+ trailer.BoletoTransactionDataCount = elements[3]
+ trailer.OnlineDebitTransactionDataCount = elements[4].chomp
- return trailer
+ return trailer
+ end
end
end
\ No newline at end of file