Class: B2bCenterApi::WebService::Types::AuctionOffer

Inherits:
BaseType
  • Object
show all
Defined in:
lib/b2b_center_api/web_service/types/auction_offer.rb

Overview

Предложение

Constant Summary

Constants inherited from BaseType

BaseType::NO_INSPECT_ATTRS

Instance Attribute Summary collapse

Attributes inherited from BaseType

#date_fields, #soap_client

Class Method Summary collapse

Methods inherited from BaseType

#inspect, #to_h

Methods included from B2bCenterApi::WebService::TypeCast

included

Instance Attribute Details

#auction_idInteger

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

Returns:

  • (Integer)

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



7
8
9
# File 'lib/b2b_center_api/web_service/types/auction_offer.rb', line 7

def auction_id
  @auction_id
end

#betsInteger

Returns Количество ставок.

Returns:

  • (Integer)

    Количество ставок



29
30
31
# File 'lib/b2b_center_api/web_service/types/auction_offer.rb', line 29

def bets
  @bets
end

#filesB2bCenterApi::WebService::Types::B2bFile[]

Файлы предложения. Поле содержит список записей типа file, в случае если у текущего пользователя нет доступа к файлу, то поле file.name — не заполняется.



33
34
35
# File 'lib/b2b_center_api/web_service/types/auction_offer.rb', line 33

def files
  @files
end

#final_bet_dateTime

Returns Дата последней ставки.

Returns:

  • (Time)

    Дата последней ставки.



25
26
27
# File 'lib/b2b_center_api/web_service/types/auction_offer.rb', line 25

def final_bet_date
  @final_bet_date
end

#final_priceFloat

Returns Последняя ставка. Формат значения DECIMAL(15,2).

Returns:

  • (Float)

    Последняя ставка. Формат значения DECIMAL(15,2)



13
14
15
# File 'lib/b2b_center_api/web_service/types/auction_offer.rb', line 13

def final_price
  @final_price
end

#final_price_notaxFloat

Returns Последняя ставка без НДС. Формат значения DECIMAL(15,2).

Returns:

  • (Float)

    Последняя ставка без НДС. Формат значения DECIMAL(15,2)



15
16
17
# File 'lib/b2b_center_api/web_service/types/auction_offer.rb', line 15

def final_price_notax
  @final_price_notax
end

#final_price_unitFloat

Формат значения DECIMAL(15,2)

Returns:

  • (Float)

    Последняя ставка за единицу. Заполняется для непопозиционных процедур.



18
19
20
# File 'lib/b2b_center_api/web_service/types/auction_offer.rb', line 18

def final_price_unit
  @final_price_unit
end

#final_price_unit_notaxFloat

Формат значения DECIMAL(15,2)

Returns:

  • (Float)

    Последняя ставка за единицу без НДС. Заполняется для непопозиционных процедур.



21
22
23
# File 'lib/b2b_center_api/web_service/types/auction_offer.rb', line 21

def final_price_unit_notax
  @final_price_unit_notax
end

#final_taxFloat

Returns НДС последней ставки. Заполняется для непопозиционных процедур.

Returns:

  • (Float)

    НДС последней ставки. Заполняется для непопозиционных процедур



23
24
25
# File 'lib/b2b_center_api/web_service/types/auction_offer.rb', line 23

def final_tax
  @final_tax
end

#firm_idInteger

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

Returns:

  • (Integer)

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



9
10
11
# File 'lib/b2b_center_api/web_service/types/auction_offer.rb', line 9

def firm_id
  @firm_id
end

#haggling_filesHagglingFiles

Returns Файлы на переторжку (в случае, если конверты на данный этап переторжки были вскрыты).

Returns:

  • (HagglingFiles)

    Файлы на переторжку (в случае, если конверты на данный этап переторжки были вскрыты)



35
36
37
# File 'lib/b2b_center_api/web_service/types/auction_offer.rb', line 35

def haggling_files
  @haggling_files
end

#offer_fieldsAuctionOfferField

Returns Массив дополнительных полей предложения.

Returns:

  • (AuctionOfferField)

    Массив дополнительных полей предложения



37
38
39
# File 'lib/b2b_center_api/web_service/types/auction_offer.rb', line 37

def offer_fields
  @offer_fields
end

#offer_numInteger

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

Returns:

  • (Integer)

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



11
12
13
# File 'lib/b2b_center_api/web_service/types/auction_offer.rb', line 11

def offer_num
  @offer_num
end

#positions_offersAuctionPositionOffer

Returns Массив предложений участника по позициям.

Returns:

  • (AuctionPositionOffer)

    Массив предложений участника по позициям



39
40
41
# File 'lib/b2b_center_api/web_service/types/auction_offer.rb', line 39

def positions_offers
  @positions_offers
end

#user_emailString

Returns E-mail пользователя, отправившего заявку.

Returns:

  • (String)

    E-mail пользователя, отправившего заявку



43
44
45
# File 'lib/b2b_center_api/web_service/types/auction_offer.rb', line 43

def user_email
  @user_email
end

#user_fullnameString

Returns ФИО пользователя, отправившего заявку.

Returns:

  • (String)

    ФИО пользователя, отправившего заявку



41
42
43
# File 'lib/b2b_center_api/web_service/types/auction_offer.rb', line 41

def user_fullname
  @user_fullname
end

#user_phoneString

Returns Номер телефона пользователя, отправившего заявку.

Returns:

  • (String)

    Номер телефона пользователя, отправившего заявку



45
46
47
# File 'lib/b2b_center_api/web_service/types/auction_offer.rb', line 45

def user_phone
  @user_phone
end

#winnerBoolean

Returns 1 — победитель, 0 — не победитель. Формат значения INT(1).

Returns:

  • (Boolean)

    1 — победитель, 0 — не победитель. Формат значения INT(1)



27
28
29
# File 'lib/b2b_center_api/web_service/types/auction_offer.rb', line 27

def winner
  @winner
end

Class Method Details

.from_response(response, client, auction_id, firm_id, offer_num) ⇒ AuctionOffer

Returns:



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/b2b_center_api/web_service/types/auction_offer.rb', line 48

def self.from_response(response, client, auction_id, firm_id, offer_num)
  r = response.result[:auction_offer]
  return if r.nil?
  t = AuctionOffer.new
  t.soap_client = client
  t.auction_id = auction_id
  t.firm_id = firm_id
  t.offer_num = offer_num
  t.final_price = convert(r[:final_price], :float)
  t.final_price_notax = convert(r[:final_price_notax], :float)
  t.final_price_unit = convert(r[:final_price_unit], :float)
  t.final_price_unit_notax = convert(r[:final_price_unit_notax], :float)
  t.final_tax = convert(r[:final_tax], :float)
  t.final_bet_date = convert(r[:final_bet_date], :time)
  t.winner = convert(r[:winner], :boolean)
  t.bets = convert(r[:bets], :integer)
  t.files = B2bFile.from_part_response(r[:files])
  t.haggling_files = r[:haggling_files]
  t.offer_fields = r[:offer_fields]
  t.positions_offers = r[:positions_offers]
  t.user_fullname = convert(r[:user_fullname], :string)
  t.user_email = convert(r[:user_email], :string)
  t.user_phone = convert(r[:user_phone], :string)

  t
end