Class: KiriminAja::Services::CourierService
- Inherits:
-
Object
- Object
- KiriminAja::Services::CourierService
- Defined in:
- lib/kiriminaja/services/courier/courier.rb
Instance Method Summary collapse
- #detail(courier_code) ⇒ Object
- #group ⇒ Object
-
#initialize(http) ⇒ CourierService
constructor
A new instance of CourierService.
- #list ⇒ Object
- #set_whitelist_services(services) ⇒ Object
Constructor Details
#initialize(http) ⇒ CourierService
Returns a new instance of CourierService.
6 7 8 |
# File 'lib/kiriminaja/services/courier/courier.rb', line 6 def initialize(http) @http = http end |
Instance Method Details
#detail(courier_code) ⇒ Object
18 19 20 |
# File 'lib/kiriminaja/services/courier/courier.rb', line 18 def detail(courier_code) @http.post_json("/api/mitra/courier_services", { courier_code: courier_code }) end |
#group ⇒ Object
14 15 16 |
# File 'lib/kiriminaja/services/courier/courier.rb', line 14 def group @http.post_json("/api/mitra/couriers_group") end |
#list ⇒ Object
10 11 12 |
# File 'lib/kiriminaja/services/courier/courier.rb', line 10 def list @http.post_json("/api/mitra/couriers") end |
#set_whitelist_services(services) ⇒ Object
22 23 24 |
# File 'lib/kiriminaja/services/courier/courier.rb', line 22 def set_whitelist_services(services) @http.post_json("/api/mitra/v3/set_whitelist_services", { services: services }) end |