Class: PickpointApi::Session
- Inherits:
-
Object
- Object
- PickpointApi::Session
- Includes:
- ApiActions, Constants, Exceptions
- Defined in:
- lib/pickpoint_api/session.rb
Constant Summary
Constants included from Constants
Constants::ACTIONS, Constants::API_HOST, Constants::API_PORT, Constants::API_PROD_PATH, Constants::API_TEST_PATH, Constants::DATE_FORMAT
Constants included from Exceptions
Exceptions::ApiError, Exceptions::CourierError, Exceptions::InvalidSessionState, Exceptions::LoginError, Exceptions::LogoutError, Exceptions::UnknownApiAction
Instance Attribute Summary collapse
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#test ⇒ Object
readonly
Returns the value of attribute test.
Instance Method Summary collapse
-
#initialize(hash = {}) ⇒ Session
constructor
A new instance of Session.
Methods included from ApiActions
#city_list, #courier, #courier_cancel, #create_sending, #create_shipment, #enclose_info, #get_delivery_cost, #get_invoices_change_state, #get_money_return_order, #get_product_return_order, #get_reestr, #get_return_invoices_list, #get_states, #get_zone, #login, #logout, #make_label, #make_reestr, #make_reestr_number, #make_return, #make_zlabel, #postamat_list, #sending_info, #track_sending, #track_sendings
Constructor Details
#initialize(hash = {}) ⇒ Session
Returns a new instance of Session.
11 12 13 14 |
# File 'lib/pickpoint_api/session.rb', line 11 def initialize(hash = {}) @state = :new @test = hash[:test] == true end |
Instance Attribute Details
#state ⇒ Object (readonly)
Returns the value of attribute state.
8 9 10 |
# File 'lib/pickpoint_api/session.rb', line 8 def state @state end |
#test ⇒ Object (readonly)
Returns the value of attribute test.
9 10 11 |
# File 'lib/pickpoint_api/session.rb', line 9 def test @test end |