Class: ImlClient::Client
- Inherits:
-
Object
- Object
- ImlClient::Client
- Defined in:
- lib/iml_client/client.rb
Instance Method Summary collapse
- #calculate_price(params) ⇒ Object
- #create_order(params) ⇒ Object
- #exception_service_regions(params = {}) ⇒ Object
-
#initialize(login, password, options = {}) ⇒ Client
constructor
A new instance of Client.
- #locations(params = {}) ⇒ Object
- #order_statuses(params = {}) ⇒ Object
- #orders(params = {}) ⇒ Object
- #pickup_points(params = {}) ⇒ Object
- #post_codes ⇒ Object
- #regions ⇒ Object
- #services ⇒ Object
- #status_types ⇒ Object
- #test_mode? ⇒ Boolean
- #zones ⇒ Object
Constructor Details
#initialize(login, password, options = {}) ⇒ Client
Returns a new instance of Client.
8 9 10 11 12 13 |
# File 'lib/iml_client/client.rb', line 8 def initialize(login, password, = {}) @login = login @password = password = Util.symbolize_keys @test_mode = !![:test_mode] end |
Instance Method Details
#calculate_price(params) ⇒ Object
27 28 29 |
# File 'lib/iml_client/client.rb', line 27 def calculate_price(params) rest_api_client.calculate_price params end |
#create_order(params) ⇒ Object
23 24 25 |
# File 'lib/iml_client/client.rb', line 23 def create_order(params) rest_api_client.create_order params end |
#exception_service_regions(params = {}) ⇒ Object
35 36 37 |
# File 'lib/iml_client/client.rb', line 35 def exception_service_regions(params = {}) list_api_client.exception_service_regions params end |
#locations(params = {}) ⇒ Object
31 32 33 |
# File 'lib/iml_client/client.rb', line 31 def locations(params = {}) list_api_client.locations params end |
#order_statuses(params = {}) ⇒ Object
19 20 21 |
# File 'lib/iml_client/client.rb', line 19 def order_statuses(params = {}) rest_api_client.order_statuses params end |
#orders(params = {}) ⇒ Object
15 16 17 |
# File 'lib/iml_client/client.rb', line 15 def orders(params = {}) rest_api_client.orders params end |
#pickup_points(params = {}) ⇒ Object
43 44 45 |
# File 'lib/iml_client/client.rb', line 43 def pickup_points(params = {}) list_api_client.pickup_points params end |
#post_codes ⇒ Object
51 52 53 |
# File 'lib/iml_client/client.rb', line 51 def post_codes list_api_client.post_codes end |
#regions ⇒ Object
39 40 41 |
# File 'lib/iml_client/client.rb', line 39 def regions list_api_client.regions end |
#services ⇒ Object
55 56 57 |
# File 'lib/iml_client/client.rb', line 55 def services list_api_client.services end |
#status_types ⇒ Object
47 48 49 |
# File 'lib/iml_client/client.rb', line 47 def status_types list_api_client.status_types end |
#test_mode? ⇒ Boolean
63 64 65 |
# File 'lib/iml_client/client.rb', line 63 def test_mode? @test_mode end |
#zones ⇒ Object
59 60 61 |
# File 'lib/iml_client/client.rb', line 59 def zones list_api_client.zones end |