class B2bCenterApi::WebService::Types::AuctionParticipant
Участник аукциона
Attributes
auction_id[RW]
@return [Integer] Номер аукциона/объявления
firm_id[RW]
@return [String] ID организации участника, если имена участников доступны,
либо строка вида "Participant N", где N — номер участника в списке участников, в противном случае.
offers_nums[RW]
@return [Integer Список отправленных заявок участником.
Возможные значения: 0 — основное предложение целое_число — альтернативное предложение №
Public Class Methods
from_response(response, client, auction_id)
click to toggle source
@return [Array] Массив {AuctionParticipant}
# File lib/b2b_center_api/web_service/types/auction_participant.rb, line 18 def self.from_response(response, client, auction_id) r = response.result[:participants] return if r.nil? mas = to_array(r[:participant]).map do |p| ap = AuctionParticipant.new ap.soap_client = client ap.auction_id = auction_id ap.firm_id = convert(p[:firm_id], :string) ap.offers_nums = ArrayOfIds.from_part_response(p[:offers_nums]).flatten.map(&:to_i) ap end mas end
Public Instance Methods
firm()
click to toggle source
@return [FirmInfo] Информация об организации
# File lib/b2b_center_api/web_service/types/auction_participant.rb, line 34 def firm return firm_id if firm_id.include? 'Participant' remote_market.get_firm_info(firm_id) end
offers()
click to toggle source
@return [AuctionOffer Массив предложений
# File lib/b2b_center_api/web_service/types/auction_participant.rb, line 40 def offers offers_nums.map { |offer_num| remote_auction.get_offer(auction_id, firm_id, offer_num) } end