Class: EndiciaLabelServer::Parsers::ChangePassPhraseParser

Inherits:
ParserBase
  • Object
show all
Defined in:
lib/endicia_label_server/parsers/change_pass_phrase_parser.rb

Instance Attribute Summary collapse

Attributes inherited from ParserBase

#error_description, #status_code, #switches

Instance Method Summary collapse

Methods inherited from ParserBase

#element_tracker_switch, #end_element, #initialize, #start_element, #success?, #switch_active?

Constructor Details

This class inherits a constructor from EndiciaLabelServer::Parsers::ParserBase

Instance Attribute Details

#request_idObject

Returns the value of attribute request_id


4
5
6
# File 'lib/endicia_label_server/parsers/change_pass_phrase_parser.rb', line 4

def request_id
  @request_id
end

#requester_idObject

Returns the value of attribute requester_id


4
5
6
# File 'lib/endicia_label_server/parsers/change_pass_phrase_parser.rb', line 4

def requester_id
  @requester_id
end

#tokenObject

Returns the value of attribute token


4
5
6
# File 'lib/endicia_label_server/parsers/change_pass_phrase_parser.rb', line 4

def token
  @token
end

Instance Method Details

#value(value) ⇒ Object


6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/endicia_label_server/parsers/change_pass_phrase_parser.rb', line 6

def value(value)
  super

  string_value = value.as_s
  if switch_active? :RequesterID
    self.requester_id = string_value
  elsif switch_active? :RequestID
    self.request_id = string_value
  elsif switch_active? :Token
    self.token = string_value
  end
end