Class: B2bCenterApi::RemoteAuction

Inherits:
Object
  • Object
show all
Defined in:
lib/b2b_center_api/remote_auction.rb

Overview

Методы класса RemoteAuction

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ RemoteAuction

Returns a new instance of RemoteAuction.



6
7
8
9
# File 'lib/b2b_center_api/remote_auction.rb', line 6

def initialize(client)
  @client = client
  @client_web = WebService::RemoteAuction.new(client)
end

Instance Method Details

#get_offer(auction_id, firm_id, offer_num) ⇒ WebService::Types::AuctionOffer

Получить предложение участника Метод возвращает информацию о предложении (альтернативном предложении) участника: последней ставке, имя файла с описанием предложения, информацию о том признан ли участник победителем. Возвращаемый методом файл доступен для скачивания из корневой FTP-папки организации.

Parameters:

  • auction_id (Integer)

    Номер аукциона/объявления

  • firm_id (Integer)

    ID организации (участник торговой процедуры)

  • offer_num (Integer)

    0 — основное предложение = целое_число — альтернативное предложение №

Returns:



27
28
29
30
# File 'lib/b2b_center_api/remote_auction.rb', line 27

def get_offer(auction_id, firm_id, offer_num)
  response = @client_web.command :get_offer, auction_id: auction_id, firm_id: firm_id, offer_num: offer_num
  WebService::Types::AuctionOffer.from_response(response, @client, auction_id, firm_id, offer_num)
end

#get_participants(auction_id) ⇒ WebService::Types::AuctionParticipant[]

Получить список участников

Parameters:

  • auction_id (Integer)

    Номер аукциона/объявления

Returns:



14
15
16
17
# File 'lib/b2b_center_api/remote_auction.rb', line 14

def get_participants(auction_id)
  response = @client_web.command :get_participants, auction_id: auction_id
  WebService::Types::AuctionParticipant.from_response(response, @client, auction_id)
end