Class: Fiddler::Parsers::TicketParser
Constant Summary
Constants inherited
from BaseParser
BaseParser::ERROR_CODES, BaseParser::SUCCESS_CODES
Class Method Summary
collapse
Methods inherited from BaseParser
check_response_code
Class Method Details
.parse_multiple(response) ⇒ Object
10
11
12
13
14
15
16
17
18
19
|
# File 'lib/fiddler/parsers/ticket_parser.rb', line 10
def self.parse_multiple(response)
response = check_response_code(response)
response = check_for_errors(response)
ticket_token_responses = tokenize_response(response)
tickets = Array.new
ticket_token_responses.each do |token_response|
tickets << ticket_from_response(token_response)
end
tickets
end
|
.parse_single(response) ⇒ Object
4
5
6
7
8
|
# File 'lib/fiddler/parsers/ticket_parser.rb', line 4
def self.parse_single(response)
response = check_response_code(response)
response = check_for_errors(response)
ticket_from_response(response)
end
|