Class: DopisOnlineClient::StatusRequest
- Inherits:
-
Object
- Object
- DopisOnlineClient::StatusRequest
- Includes:
- HTTMultiParty
- Defined in:
- lib/dopis_online_client/status_request.rb
Instance Attribute Summary collapse
-
#color ⇒ Object
readonly
Returns the value of attribute color.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#payment_type ⇒ Object
readonly
Returns the value of attribute payment_type.
-
#pdf_file ⇒ Object
readonly
Returns the value of attribute pdf_file.
-
#postage_type ⇒ Object
readonly
Returns the value of attribute postage_type.
-
#response_format ⇒ Object
readonly
Returns the value of attribute response_format.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
- #deliver ⇒ Object
-
#initialize(params) ⇒ StatusRequest
constructor
A new instance of StatusRequest.
Constructor Details
#initialize(params) ⇒ StatusRequest
Returns a new instance of StatusRequest.
8 9 10 11 12 13 |
# File 'lib/dopis_online_client/status_request.rb', line 8 def initialize(params) @format = params[:format] || :xml @tracking_number = params[:tracking_number] @date = params[:date] self.class.base_uri DopisOnlineClient.base_uri end |
Instance Attribute Details
#color ⇒ Object (readonly)
Returns the value of attribute color.
6 7 8 |
# File 'lib/dopis_online_client/status_request.rb', line 6 def color @color end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
6 7 8 |
# File 'lib/dopis_online_client/status_request.rb', line 6 def password @password end |
#payment_type ⇒ Object (readonly)
Returns the value of attribute payment_type.
6 7 8 |
# File 'lib/dopis_online_client/status_request.rb', line 6 def payment_type @payment_type end |
#pdf_file ⇒ Object (readonly)
Returns the value of attribute pdf_file.
6 7 8 |
# File 'lib/dopis_online_client/status_request.rb', line 6 def pdf_file @pdf_file end |
#postage_type ⇒ Object (readonly)
Returns the value of attribute postage_type.
6 7 8 |
# File 'lib/dopis_online_client/status_request.rb', line 6 def postage_type @postage_type end |
#response_format ⇒ Object (readonly)
Returns the value of attribute response_format.
6 7 8 |
# File 'lib/dopis_online_client/status_request.rb', line 6 def response_format @response_format end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
6 7 8 |
# File 'lib/dopis_online_client/status_request.rb', line 6 def username @username end |
Instance Method Details
#deliver ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/dopis_online_client/status_request.rb', line 15 def deliver response = self.class.post '/eprehledZak.php', :query => { :user => DopisOnlineClient.username, :passwd => DopisOnlineClient.password, :typvystupu => @format, :zasilka => @tracking_number, :datum => @date } response.body end |