Class: B2bCenterApi::RemoteAuction
- Inherits:
-
Object
- Object
- B2bCenterApi::RemoteAuction
- Defined in:
- lib/b2b_center_api/remote_auction.rb
Overview
Методы класса RemoteAuction
Instance Method Summary collapse
-
#create(auction_data) ⇒ Integer
Создать новый аукцион.
-
#get_data(auction_id) ⇒ WebService::Types::AuctionData
Получить данные аукциона.
-
#get_group_ids(auction_id) ⇒ WebService::Types::ArrayOfIds[]
Получить список идентификаторов лотов многолотовой процедуры.
-
#get_offer(auction_id, firm_id, offer_num) ⇒ WebService::Types::AuctionOffer
Получить предложение участника Метод возвращает информацию о предложении (альтернативном предложении) участника: последней ставке, имя файла с описанием предложения, информацию о том признан ли участник победителем.
-
#get_participants(auction_id) ⇒ WebService::Types::AuctionParticipant[]
Получить список участников.
-
#initialize(client) ⇒ RemoteAuction
constructor
A new instance of RemoteAuction.
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
#create(auction_data) ⇒ Integer
Создать новый аукцион
14 15 16 17 18 |
# File 'lib/b2b_center_api/remote_auction.rb', line 14 def create(auction_data) auction_data = auction_data.to_h unless auction_data.is_a? Hash response = @client_web.command :create, data: auction_data response.result[:value] end |
#get_data(auction_id) ⇒ WebService::Types::AuctionData
Получить данные аукциона
23 24 25 26 |
# File 'lib/b2b_center_api/remote_auction.rb', line 23 def get_data(auction_id) response = @client_web.command :get_data, auction_id: auction_id WebService::Types::AuctionData.from_response(response, @client, auction_id) end |
#get_group_ids(auction_id) ⇒ WebService::Types::ArrayOfIds[]
Получить список идентификаторов лотов многолотовой процедуры
39 40 41 42 |
# File 'lib/b2b_center_api/remote_auction.rb', line 39 def get_group_ids(auction_id) response = @client_web.command :get_group_ids, auction_id: auction_id WebService::Types::ArrayOfIds.from_response(response) end |
#get_offer(auction_id, firm_id, offer_num) ⇒ WebService::Types::AuctionOffer
Получить предложение участника Метод возвращает информацию о предложении (альтернативном предложении) участника: последней ставке, имя файла с описанием предложения, информацию о том признан ли участник победителем. Возвращаемый методом файл доступен для скачивания из корневой FTP-папки организации.
52 53 54 55 |
# File 'lib/b2b_center_api/remote_auction.rb', line 52 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[]
Получить список участников
31 32 33 34 |
# File 'lib/b2b_center_api/remote_auction.rb', line 31 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 |