Class: DpdApi::Order
Class Method Summary collapse
- .add_parcels(params = {}) ⇒ Object
- .cancel_order(params = {}) ⇒ Object
- .create_address(params = {}) ⇒ Object
- .create_order(params = {}) ⇒ Object
-
.invoice_file(params = {}) ⇒ Object
TODO: add :save for file.
- .order_status(params = {}) ⇒ Object
- .remove_parcels(params = {}) ⇒ Object
- .update_address(params = {}) ⇒ Object
Methods inherited from Base
Class Method Details
.add_parcels(params = {}) ⇒ Object
41 42 43 44 |
# File 'lib/dpd_api/order.rb', line 41 def add_parcels(params = {}) method = :add_parcels response(method, params) end |
.cancel_order(params = {}) ⇒ Object
11 12 13 14 |
# File 'lib/dpd_api/order.rb', line 11 def cancel_order(params = {}) method = :cancel_order response(method, params, namespace: :orders) end |
.create_address(params = {}) ⇒ Object
21 22 23 24 |
# File 'lib/dpd_api/order.rb', line 21 def create_address(params = {}) method = :create_address response(method, params, namespace: :orders) end |
.create_order(params = {}) ⇒ Object
6 7 8 9 |
# File 'lib/dpd_api/order.rb', line 6 def create_order(params = {}) method = :create_order response(method, params, namespace: :orders) end |
.invoice_file(params = {}) ⇒ Object
TODO: add :save for file
f = File.new(“/tmp/file.pdf”, “w”) f.write(Base64.decode64(invoice).force_encoding(‘UTF-8’)) f.close
36 37 38 39 |
# File 'lib/dpd_api/order.rb', line 36 def invoice_file(params = {}) method = :get_invoice_file response(method, params) end |
.order_status(params = {}) ⇒ Object
16 17 18 19 |
# File 'lib/dpd_api/order.rb', line 16 def order_status(params = {}) method = :get_order_status response(method, params, namespace: :order_status) end |
.remove_parcels(params = {}) ⇒ Object
46 47 48 49 |
# File 'lib/dpd_api/order.rb', line 46 def remove_parcels(params = {}) method = :remove_parcels response(method, params) end |
.update_address(params = {}) ⇒ Object
26 27 28 29 |
# File 'lib/dpd_api/order.rb', line 26 def update_address(params = {}) method = :update_address response(method, params, namespace: :orders) end |