Class: DeliveryFivePostClient::Resources::API::V1::Partners::ExtendStorageDays

Inherits:
Object
  • Object
show all
Defined in:
lib/delivery_five_post_client/resources/api/v1/partners/extend_storage_days.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ ExtendStorageDays

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 ExtendStorageDays.

Parameters:



60
61
62
# File 'lib/delivery_five_post_client/resources/api/v1/partners/extend_storage_days.rb', line 60

def initialize(client:)
  @client = client
end

Instance Method Details

#extend_storage_days(days:, order_id:, request_options: {}) ⇒ DeliveryFivePostClient::Models::API::V1::Partners::ExtendStorageDayExtendStorageDaysResponse

Продление срока хранения / Extend storage period

Parameters:

  • days (Integer) —

    Количество дней для продления / Number of days to extend

  • order_id (String) —

    UUID в формате v4 / UUID in v4 format

  • request_options (DeliveryFivePostClient::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



22
23
24
25
26
27
28
29
30
31
32
# File 'lib/delivery_five_post_client/resources/api/v1/partners/extend_storage_days.rb', line 22

def extend_storage_days(params)
  parsed, options =
    DeliveryFivePostClient::API::V1::Partners::ExtendStorageDayExtendStorageDaysParams.dump_request(params)
  @client.request(
    method: :post,
    path: "api/v1/partners/extendStorageDays",
    body: parsed,
    model: DeliveryFivePostClient::Models::API::V1::Partners::ExtendStorageDayExtendStorageDaysResponse,
    options: options
  )
end

#status(task_id:, request_options: {}) ⇒ DeliveryFivePostClient::Models::API::V1::Partners::TaskStatusResponse

Статус операции продления / Storage extension status

Parameters:

Returns:

See Also:



45
46
47
48
49
50
51
52
53
54
55
# File 'lib/delivery_five_post_client/resources/api/v1/partners/extend_storage_days.rb', line 45

def status(params)
  parsed, options =
    DeliveryFivePostClient::API::V1::Partners::ExtendStorageDayStatusParams.dump_request(params)
  @client.request(
    method: :post,
    path: "api/v1/partners/extendStorageDays/status",
    body: parsed,
    model: DeliveryFivePostClient::API::V1::Partners::TaskStatusResponse,
    options: options
  )
end