b2b_center_api 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3964983ce45b0a82401789d570ebd8d9da01846e
|
4
|
+
data.tar.gz: d40839bc1df5d6db225f24d1c7e12ab0757c26af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8663a5edeca6807ce502c91fc0d613faa26a5be3bd26d9982cd6b5f9ba5e2bf31fff352006fcc72f4685a1d9e56ad59a42e0a1865f4246a853cdf914f20818a9
|
7
|
+
data.tar.gz: 24aa3dc836c41bc9422f2634d9787d2914920c1bf9fdd0e7b9d5a233109dab5c034d48d5f5fc114c1056252aed390b9a7ee5301a48caadea8fd64a9635cf3a3e
|
@@ -8,6 +8,14 @@ module B2bCenterApi
|
|
8
8
|
@client_web = WebService::RemoteTender.new(client)
|
9
9
|
end
|
10
10
|
|
11
|
+
# Получить данные конкурса
|
12
|
+
# @param tender_id [Integer] Номер конкурса
|
13
|
+
# @return [WebService::Types::TenderData]
|
14
|
+
def get_data(tender_id)
|
15
|
+
response = @client_web.command :get_data, tender_id: tender_id
|
16
|
+
WebService::Types::TenderData.from_response(response, @client, tender_id)
|
17
|
+
end
|
18
|
+
|
11
19
|
# Получить список участников
|
12
20
|
# @param tender_id [Integer] Номер конкурса
|
13
21
|
# @return [WebService::Types::TenderParticipant[]]
|
@@ -0,0 +1,59 @@
|
|
1
|
+
module B2bCenterApi
|
2
|
+
module WebService
|
3
|
+
module Types
|
4
|
+
# Конкурс
|
5
|
+
class Lot < WebService::BaseType
|
6
|
+
# @return[Integer] Номер лота: 1, 2, 3 и т.д. (номер назначается автоматически при сохранении)
|
7
|
+
attr_accessor :lot_id
|
8
|
+
# @return[String] Название продукции (наименование лота)
|
9
|
+
attr_accessor :lot_name
|
10
|
+
# @return[String[]] Категории классификатора
|
11
|
+
# Перечисление категорий классификатора через запятую. Например: "127512010,43222134"
|
12
|
+
attr_accessor :classifier_ids
|
13
|
+
# @return[String[]] Коды ОКВЭД (обязательно для заполнения для организаций, работающих по 223-ФЗ)
|
14
|
+
attr_accessor :okved_codes
|
15
|
+
# @return[Float] Количество.
|
16
|
+
# Формат значения DECIMAL(11,3)
|
17
|
+
attr_accessor :quantity
|
18
|
+
# @return[String] Единицы измерения (код ОКЕИ).
|
19
|
+
# Формат значения VARCHAR(20)
|
20
|
+
attr_accessor :units
|
21
|
+
# @return[Float] Начальная (максимальная) цена с НДС.
|
22
|
+
# Если цена не указывается, то price_begin=price_begin_notax=0.
|
23
|
+
# Формат значения DECIMAL(18,2)
|
24
|
+
attr_accessor :price_begin
|
25
|
+
# @return[Float] Начальная (максимальная) цена без НДС.
|
26
|
+
# Формат значения DECIMAL(18,2)
|
27
|
+
attr_accessor :price_begin_notax
|
28
|
+
# @return[Integer[]] Места поставки товара или оказания услуги.
|
29
|
+
# Список адресов организации возвращает метод RemoteMarket.getAddressesIds.
|
30
|
+
attr_accessor :addresses_ids
|
31
|
+
# @return[String] Сведения о заказчике.
|
32
|
+
# Формат значения VARCHAR(255)
|
33
|
+
attr_accessor :customer
|
34
|
+
# @return[String] Альтернативный идентификатор лота
|
35
|
+
attr_accessor :ext_id
|
36
|
+
|
37
|
+
def self.from_response(response)
|
38
|
+
return if response.nil?
|
39
|
+
lots = to_array(response[:lot]).map do |f|
|
40
|
+
lot = Lot.new
|
41
|
+
lot.lot_id = convert(f[:lot_id], :integer)
|
42
|
+
lot.lot_name = f[:lot_name]
|
43
|
+
lot.classifier_ids = f[:classifier_ids].split(',')
|
44
|
+
lot.okved_codes = ArrayOfIds.from_part_response(f[:okved_codes])
|
45
|
+
lot.quantity = convert(f[:quantity], :float)
|
46
|
+
lot.units = f[:units]
|
47
|
+
lot.price_begin = convert(f[:price_begin], :float)
|
48
|
+
lot.price_begin_notax = convert(f[:price_begin_notax], :float)
|
49
|
+
lot.addresses_ids = ArrayOfIds.from_part_response(f[:addresses_ids]).flatten.map(&:to_i)
|
50
|
+
lot.customer = f[:customer]
|
51
|
+
lot.ext_id = f[:ext_id]
|
52
|
+
lot
|
53
|
+
end
|
54
|
+
lots
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,197 @@
|
|
1
|
+
module B2bCenterApi
|
2
|
+
module WebService
|
3
|
+
module Types
|
4
|
+
# Конкурс
|
5
|
+
class TenderData < WebService::BaseType
|
6
|
+
# @return [Integer] id конкурса
|
7
|
+
# При создании нового конкурса это поле можно опустить, либо =0
|
8
|
+
attr_accessor :id
|
9
|
+
# @return [Integer] Тип конкурса
|
10
|
+
# Возможные значения
|
11
|
+
# 0 — закрытый конкурс
|
12
|
+
# 1 — открытый конкурс
|
13
|
+
# 2 — закрытые конкурентные переговоры
|
14
|
+
# 3 — открытые конкурентные переговоры
|
15
|
+
attr_accessor :open
|
16
|
+
# @return [String] Предмет конкурса
|
17
|
+
attr_accessor :common_name
|
18
|
+
# @return[B2bCenterApi::WebService::Types::Lot[]] Лоты
|
19
|
+
attr_accessor :lots
|
20
|
+
# @return[String] Дата начала поставки товаров, проведения работ, оказания услуг.
|
21
|
+
# Формат значения dd.mm.YYYY
|
22
|
+
attr_accessor :date_job_begin
|
23
|
+
# @return[String] Дата окончания поставки товаров, проведения работ, оказания услуг.
|
24
|
+
# Формат значения dd.mm.YYYY
|
25
|
+
attr_accessor :date_job_end
|
26
|
+
# @return[String] Дата вскрытия конвертов. Формат значения dd.mm.YYYY HH:ii:ss
|
27
|
+
attr_accessor :date_unsealing
|
28
|
+
# @return [Integer] Часовой пояс
|
29
|
+
# Возможные значения
|
30
|
+
# 0 — "Время московское"
|
31
|
+
# 1 — "Время московское +1 час"
|
32
|
+
# и т.д.
|
33
|
+
attr_accessor :date_unsealing_comment
|
34
|
+
# @return[String] Информация о конкурсной комиссии
|
35
|
+
attr_accessor :committee
|
36
|
+
# @return[String] Требования к участникам конкурса
|
37
|
+
attr_accessor :participants
|
38
|
+
# @return[String] Крайний срок подачи предквалификационных документов.
|
39
|
+
# Если поле отсутствует, либо = “”, то конкурс проводится без предквалификационного отбора.
|
40
|
+
# Формат значения dd.mm.YYYY HH:ii:ss
|
41
|
+
attr_accessor :date_qualification
|
42
|
+
# @return[String] Квалификационные требования к участнику
|
43
|
+
attr_accessor :qualification_documents
|
44
|
+
# @return[String] Комплект конкурсной документации
|
45
|
+
attr_accessor :tender_documents
|
46
|
+
# @return[String] Обеспечение конкурсных заявок, кроме банковских гарантий
|
47
|
+
attr_accessor :applications_deposit
|
48
|
+
# @return[String] Конкурсные заявки — требования к оформлению
|
49
|
+
attr_accessor :competitive_offers
|
50
|
+
# @return[String] Вскрытие конвертов с конкурсными заявками
|
51
|
+
attr_accessor :unsealing
|
52
|
+
# @return[Integer] Ценовой конкурс
|
53
|
+
# Возможные значения
|
54
|
+
# 1 — ценовой конкурс
|
55
|
+
# 0 — нет
|
56
|
+
attr_accessor :price_only
|
57
|
+
# @return[String] Победитель конкурса
|
58
|
+
attr_accessor :winner
|
59
|
+
# @return[String] Начальная (лимитная) цена
|
60
|
+
attr_accessor :initial_price
|
61
|
+
# @return[Integer] Валюта:
|
62
|
+
# Возможные значения
|
63
|
+
# 0 — руб,
|
64
|
+
# 1 — USD,
|
65
|
+
# 2 — EUR,
|
66
|
+
# 4 — UAH
|
67
|
+
attr_accessor :protocol_currency
|
68
|
+
# @return[String] Дополнительная информация о конкурсе
|
69
|
+
attr_accessor :additional_information
|
70
|
+
# @return[Integer] Флаг проведения переторжки:
|
71
|
+
# Возможные значения
|
72
|
+
# 0 — без переторжки
|
73
|
+
# 1 —с переторжкой
|
74
|
+
attr_accessor :haggling
|
75
|
+
# @return[Integer] Подразделение
|
76
|
+
# Значение по умолчанию
|
77
|
+
# 0 — «вне подразделений»
|
78
|
+
attr_accessor :sel_dep_id
|
79
|
+
# @return[Integer] Ответственный пользователь
|
80
|
+
# Значение по умолчанию
|
81
|
+
# устанавливается текущий пользователь
|
82
|
+
attr_accessor :responsible_user_id
|
83
|
+
# @return[Integer] Банковской гарантией обеспечиваются следующие обязательства участников конкурса
|
84
|
+
# Возможные значения
|
85
|
+
# 0 бит — обязательство не изменять и не отзывать Конкурсную заявку в течение срока ее действия
|
86
|
+
# после истечения срока окончания приема Конкурсных заявок;
|
87
|
+
# 1 бит — Обязательство не предоставлять заведомо ложные сведения или намеренно не искажать информацию
|
88
|
+
# или документы, приведенные в составе Конкурсной заявки;
|
89
|
+
# 2 бит — Обязательство подписать Протокол о результатах конкурса, в случае признания Участника конкурса
|
90
|
+
# Победителем конкурса и должного его уведомления об этом;
|
91
|
+
# 3 бит — Обязательство заключить Договор в установленном настоящей Конкурсной документацией порядке
|
92
|
+
# Если поле guarantee = 0, либо отсутствует, то банковская гарантия не используется.
|
93
|
+
attr_accessor :guarantee
|
94
|
+
# @return[Double] Размер обеспечения банковской гарантии в процентах
|
95
|
+
attr_accessor :guarantee_amount
|
96
|
+
# @return[String] Дата начала действия гарантии. Формат значения dd.mm.YYYY
|
97
|
+
attr_accessor :guarantee_valid_from
|
98
|
+
# @return[String] Срок действия гарантии до. Формат значения dd.mm.YYYY
|
99
|
+
attr_accessor :guarantee_valid_to
|
100
|
+
# @return[Integer] Тип цены, который будет использоваться при оценке предложений участников и выборе победителя
|
101
|
+
# Возможны варианты:
|
102
|
+
# 0 — цена с НДС
|
103
|
+
# 1 — цена без НДС
|
104
|
+
attr_accessor :price_main
|
105
|
+
# @return[Integer] Альтернативные предложения
|
106
|
+
# 1 — Альтернативные предложения разрешены
|
107
|
+
attr_accessor :alternative_offers
|
108
|
+
# @return[String] URL конкурса на площадке B2B.
|
109
|
+
# Поле возвращается при вызове метода RemoteTender.getData.
|
110
|
+
# В других случаях значение этого поля игнорируется.
|
111
|
+
# Формат значения VARCHAR(255)
|
112
|
+
attr_accessor :url
|
113
|
+
# @return[String] Дата и время рассмотрения заявок (обязательно для организаций, работающих по 223-ФЗ).
|
114
|
+
# Формат значения dd.mm.YYYY HH:ii:ss
|
115
|
+
attr_accessor :consideration_date
|
116
|
+
# @return[String] Место рассмотрения заявок (обязательно для организаций, работающих по 223-ФЗ).
|
117
|
+
# Формат значения VARCHAR(255)
|
118
|
+
attr_accessor :consideration_place
|
119
|
+
# @return[String] Телефон ответственного пользователя (только для организаций, работающих по 223-ФЗ).
|
120
|
+
# Формат значения VARCHAR(255)
|
121
|
+
attr_accessor :responsible_user_phone
|
122
|
+
# @return[String] E-mail ответственного пользователя (только для организаций, работающих по 223-ФЗ).
|
123
|
+
# Формат значения VARCHAR(255)
|
124
|
+
attr_accessor :responsible_user_email
|
125
|
+
# @return[Integer] ID организации заказчика (только когда организатор конкурса не является заказчиком)
|
126
|
+
attr_accessor :customer_firm_id
|
127
|
+
# @return[String] Фактический адрес заказчика (только для организаций, работающих по 223-ФЗ).
|
128
|
+
# Формат значения VARCHAR(255)
|
129
|
+
attr_accessor :customer_fact_address
|
130
|
+
# @return[String] Почтовый адрес заказчика (только для организаций, работающих по 223-ФЗ).
|
131
|
+
# Формат значения VARCHAR(255)
|
132
|
+
attr_accessor :customer_post_address
|
133
|
+
# @return[Time] Дата и время подведения итогов (обязательно для организаций, работающих по 223-ФЗ).
|
134
|
+
# Формат значения dd.mm.YYYY HH:ii:ss
|
135
|
+
attr_accessor :summarizing_date
|
136
|
+
# @return[String] Место подведения итогов (обязательно для организаций, работающих по 223-ФЗ).
|
137
|
+
# Формат значения VARCHAR(255)
|
138
|
+
attr_accessor :summarizing_place
|
139
|
+
|
140
|
+
# @return [TenderData]
|
141
|
+
def self.from_response(response, client, tender_id)
|
142
|
+
r = response.result[:tender_data]
|
143
|
+
return if r.nil?
|
144
|
+
|
145
|
+
t = TenderData.new
|
146
|
+
t.soap_client = client
|
147
|
+
t.id = tender_id
|
148
|
+
t.open = convert(r[:open], :integer)
|
149
|
+
t.common_name = r[:common_name]
|
150
|
+
t.lots = Lot.from_response(r[:lots])
|
151
|
+
t.date_job_begin = convert(r[:date_job_begin], :date)
|
152
|
+
t.date_job_end = convert(r[:date_job_end], :date)
|
153
|
+
t.date_unsealing = convert(r[:date_unsealing], :time)
|
154
|
+
t.date_unsealing_comment = convert(r[:date_unsealing_comment], :integer)
|
155
|
+
t.committee = r[:committee]
|
156
|
+
t.participants = r[:participants]
|
157
|
+
t.date_qualification = convert(r[:date_qualification], :time)
|
158
|
+
t.qualification_documents = r[:qualification_documents]
|
159
|
+
t.tender_documents = r[:tender_documents]
|
160
|
+
t.applications_deposit = r[:applications_deposit]
|
161
|
+
t.competitive_offers = r[:competitive_offers]
|
162
|
+
t.unsealing = r[:unsealing]
|
163
|
+
t.price_only = convert(r[:price_only], :integer)
|
164
|
+
t.winner = r[:winner]
|
165
|
+
t.initial_price = convert(r[:initial_price], :float)
|
166
|
+
t.protocol_currency = convert(r[:protocol_currency], :integer)
|
167
|
+
t.additional_information = r[:additional_information]
|
168
|
+
t.haggling = convert(r[:haggling], :integer)
|
169
|
+
t.sel_dep_id = convert(r[:sel_dep_id], :integer)
|
170
|
+
t.responsible_user_id = convert(r[:responsible_user_id], :integer)
|
171
|
+
t.guarantee = convert(r[:guarantee], :integer)
|
172
|
+
t.guarantee_amount = convert(r[:guarantee_amount], :float)
|
173
|
+
t.guarantee_valid_from = convert(r[:guarantee_valid_from], :date)
|
174
|
+
t.guarantee_valid_to = convert(r[:guarantee_valid_to], :date)
|
175
|
+
t.price_main = convert(r[:price_main], :integer)
|
176
|
+
t.alternative_offers = convert(r[:alternative_offers], :integer)
|
177
|
+
t.url = r[:url]
|
178
|
+
t.consideration_date = convert(r[:consideration_date], :time)
|
179
|
+
t.consideration_place = r[:consideration_place]
|
180
|
+
t.responsible_user_phone = r[:responsible_user_phone]
|
181
|
+
t.responsible_user_email = r[:responsible_user_email]
|
182
|
+
t.customer_firm_id = convert(r[:customer_firm_id], :integer)
|
183
|
+
t.customer_fact_address = r[:customer_fact_address]
|
184
|
+
t.customer_post_address = r[:customer_post_address]
|
185
|
+
t.summarizing_date = convert(r[:summarizing_date], :time)
|
186
|
+
t.summarizing_place = r[:summarizing_place]
|
187
|
+
t
|
188
|
+
end
|
189
|
+
|
190
|
+
# @return [TenderParticipant[]] Информация об организации
|
191
|
+
def tender_participants
|
192
|
+
remote_tender.get_participants(id)
|
193
|
+
end
|
194
|
+
end
|
195
|
+
end
|
196
|
+
end
|
197
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: b2b_center_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Archakov Aleksandr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -101,6 +101,8 @@ files:
|
|
101
101
|
- lib/b2b_center_api/web_service/types/auction_participant.rb
|
102
102
|
- lib/b2b_center_api/web_service/types/b2b_file.rb
|
103
103
|
- lib/b2b_center_api/web_service/types/firm_info.rb
|
104
|
+
- lib/b2b_center_api/web_service/types/lot.rb
|
105
|
+
- lib/b2b_center_api/web_service/types/tender_data.rb
|
104
106
|
- lib/b2b_center_api/web_service/types/tender_lot_result.rb
|
105
107
|
- lib/b2b_center_api/web_service/types/tender_lot_results.rb
|
106
108
|
- lib/b2b_center_api/web_service/types/tender_offer.rb
|
@@ -128,11 +130,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
130
|
version: '0'
|
129
131
|
requirements: []
|
130
132
|
rubyforge_project:
|
131
|
-
rubygems_version: 2.2.
|
133
|
+
rubygems_version: 2.2.2
|
132
134
|
signing_key:
|
133
135
|
specification_version: 4
|
134
136
|
summary: B2B Center API
|
135
137
|
test_files:
|
136
138
|
- spec/b2b_center_api_spec.rb
|
137
139
|
- spec/spec_helper.rb
|
138
|
-
has_rdoc:
|