Class: DeliveryFivePostClient::Resources::API::V2::Points

Inherits:
Object
  • Object
show all
Defined in:
lib/delivery_five_post_client/resources/api/v2/points.rb,
lib/delivery_five_post_client/resources/api/v2/points/sl.rb

Defined Under Namespace

Classes: Sl

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Points

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

Parameters:



64
65
66
67
# File 'lib/delivery_five_post_client/resources/api/v2/points.rb', line 64

def initialize(client:)
  @client = client
  @sl = DeliveryFivePostClient::Resources::API::V2::Points::Sl.new(client: client)
end

Instance Attribute Details

#sl ⇒ DeliveryFivePostClient::Resources::API::V2::Points::Sl (readonly)



9
10
11
# File 'lib/delivery_five_post_client/resources/api/v2/points.rb', line 9

def sl
  @sl
end

Instance Method Details

#get_c2c_pickup_points(city: nil, from_location_id: nil, region: nil, request_options: {}) ⇒ Array<DeliveryFivePostClient::Models::API::V2::PickupPoint>

Получение точек выдачи для C2C / Get pickup points for C2C

Parameters:

  • city (String) —

    Город / City

  • from_location_id (String) —

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

  • region (String) —

    Регион / Region

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

Returns:

See Also:



26
27
28
29
30
31
32
33
34
35
# File 'lib/delivery_five_post_client/resources/api/v2/points.rb', line 26

def get_c2c_pickup_points(params = {})
  parsed, options = DeliveryFivePostClient::API::V2::PointGetC2cPickupPointsParams.dump_request(params)
  @client.request(
    method: :post,
    path: "api/v2/points/pickup",
    body: parsed,
    model: DeliveryFivePostClient::Internal::Type::ArrayOf[DeliveryFivePostClient::API::V2::PickupPoint],
    options: options
  )
end

#get_c2c_placement_points(city: nil, region: nil, request_options: {}) ⇒ Array<DeliveryFivePostClient::Models::API::V2::PickupPoint>

Получение точек размещения для C2C / Get placement points for C2C

Parameters:

Returns:

See Also:



50
51
52
53
54
55
56
57
58
59
# File 'lib/delivery_five_post_client/resources/api/v2/points.rb', line 50

def get_c2c_placement_points(params = {})
  parsed, options = DeliveryFivePostClient::API::V2::PointGetC2cPlacementPointsParams.dump_request(params)
  @client.request(
    method: :post,
    path: "api/v2/points/placement",
    body: parsed,
    model: DeliveryFivePostClient::Internal::Type::ArrayOf[DeliveryFivePostClient::API::V2::PickupPoint],
    options: options
  )
end