Class: DeliveryFivePostClient::Resources::Webhooks
- Inherits:
-
Object
- Object
- DeliveryFivePostClient::Resources::Webhooks
- Defined in:
- lib/delivery_five_post_client/resources/webhooks.rb
Instance Method Summary collapse
-
#create_cargo_status(cargo_id:, change_date:, order_id:, sender_cargo_id:, status:, error_desc: nil, mile_type: nil, request_options: {}) ⇒ nil
Событие изменения статуса грузоместа / Cargo status change event.
-
#create_order_status(change_date:, execution_status:, order_id:, sender_order_id:, status:, error_desc: nil, mile_type: nil, request_options: {}) ⇒ nil
Событие изменения статуса заказа / Order status change event.
-
#initialize(client:) ⇒ Webhooks
constructor
private
A new instance of Webhooks.
Constructor Details
#initialize(client:) ⇒ Webhooks
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Webhooks.
77 78 79 |
# File 'lib/delivery_five_post_client/resources/webhooks.rb', line 77 def initialize(client:) @client = client end |
Instance Method Details
#create_cargo_status(cargo_id:, change_date:, order_id:, sender_cargo_id:, status:, error_desc: nil, mile_type: nil, request_options: {}) ⇒ nil
Событие изменения статуса грузоместа / Cargo status change event
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/delivery_five_post_client/resources/webhooks.rb', line 29 def create_cargo_status(params) parsed, = DeliveryFivePostClient::WebhookCreateCargoStatusParams.dump_request(params) @client.request( method: :post, path: "webhooks/cargo-status", body: parsed, model: NilClass, options: ) end |
#create_order_status(change_date:, execution_status:, order_id:, sender_order_id:, status:, error_desc: nil, mile_type: nil, request_options: {}) ⇒ nil
Событие изменения статуса заказа / Order status change event
63 64 65 66 67 68 69 70 71 72 |
# File 'lib/delivery_five_post_client/resources/webhooks.rb', line 63 def create_order_status(params) parsed, = DeliveryFivePostClient::WebhookCreateOrderStatusParams.dump_request(params) @client.request( method: :post, path: "webhooks/order-status", body: parsed, model: NilClass, options: ) end |