Class: B2bCenterApi::WebService::Types::Lot
- Defined in:
- lib/b2b_center_api/web_service/types/lot.rb
Overview
Конкурс
Constant Summary
Constants inherited from BaseType
Instance Attribute Summary collapse
-
#addresses_ids ⇒ Object
@return[Integer] Места поставки товара или оказания услуги.
-
#classifier_ids ⇒ Object
@return[String] Категории классификатора Перечисление категорий классификатора через запятую.
-
#customer ⇒ Object
@return Сведения о заказчике.
-
#ext_id ⇒ Object
@return Альтернативный идентификатор лота.
-
#lot_id ⇒ Object
@return Номер лота: 1, 2, 3 и т.д.
-
#lot_name ⇒ Object
@return Название продукции (наименование лота).
-
#okved_codes ⇒ Object
@return[String] Коды ОКВЭД (обязательно для заполнения для организаций, работающих по 223-ФЗ).
-
#price_begin ⇒ Object
@return Начальная (максимальная) цена с НДС.
-
#price_begin_notax ⇒ Object
@return Начальная (максимальная) цена без НДС.
-
#quantity ⇒ Object
@return Количество.
-
#units ⇒ Object
@return Единицы измерения (код ОКЕИ).
Attributes inherited from BaseType
Class Method Summary collapse
Methods inherited from BaseType
Methods included from B2bCenterApi::WebService::TypeCast
Instance Attribute Details
#addresses_ids ⇒ Object
@return[Integer] Места поставки товара или оказания услуги. Список адресов организации возвращает метод RemoteMarket.getAddressesIds.
30 31 32 |
# File 'lib/b2b_center_api/web_service/types/lot.rb', line 30 def addresses_ids @addresses_ids end |
#classifier_ids ⇒ Object
@return[String] Категории классификатора Перечисление категорий классификатора через запятую. Например: “127512010,43222134”
12 13 14 |
# File 'lib/b2b_center_api/web_service/types/lot.rb', line 12 def classifier_ids @classifier_ids end |
#customer ⇒ Object
@return Сведения о заказчике. Формат значения VARCHAR(255)
33 34 35 |
# File 'lib/b2b_center_api/web_service/types/lot.rb', line 33 def customer @customer end |
#ext_id ⇒ Object
@return Альтернативный идентификатор лота
35 36 37 |
# File 'lib/b2b_center_api/web_service/types/lot.rb', line 35 def ext_id @ext_id end |
#lot_id ⇒ Object
@return Номер лота: 1, 2, 3 и т.д. (номер назначается автоматически при сохранении)
7 8 9 |
# File 'lib/b2b_center_api/web_service/types/lot.rb', line 7 def lot_id @lot_id end |
#lot_name ⇒ Object
@return Название продукции (наименование лота)
9 10 11 |
# File 'lib/b2b_center_api/web_service/types/lot.rb', line 9 def lot_name @lot_name end |
#okved_codes ⇒ Object
@return[String] Коды ОКВЭД (обязательно для заполнения для организаций, работающих по 223-ФЗ)
14 15 16 |
# File 'lib/b2b_center_api/web_service/types/lot.rb', line 14 def okved_codes @okved_codes end |
#price_begin ⇒ Object
@return Начальная (максимальная) цена с НДС. Если цена не указывается, то price_begin=price_begin_notax=0. Формат значения DECIMAL(18,2)
24 25 26 |
# File 'lib/b2b_center_api/web_service/types/lot.rb', line 24 def price_begin @price_begin end |
#price_begin_notax ⇒ Object
@return Начальная (максимальная) цена без НДС. Формат значения DECIMAL(18,2)
27 28 29 |
# File 'lib/b2b_center_api/web_service/types/lot.rb', line 27 def price_begin_notax @price_begin_notax end |
#quantity ⇒ Object
@return Количество. Формат значения DECIMAL(11,3)
17 18 19 |
# File 'lib/b2b_center_api/web_service/types/lot.rb', line 17 def quantity @quantity end |
#units ⇒ Object
@return Единицы измерения (код ОКЕИ). Формат значения VARCHAR(20)
20 21 22 |
# File 'lib/b2b_center_api/web_service/types/lot.rb', line 20 def units @units end |
Class Method Details
.from_response(response) ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/b2b_center_api/web_service/types/lot.rb', line 37 def self.from_response(response) return if response.nil? lots = to_array(response[:lot]).map do |f| lot = Lot.new lot.lot_id = convert(f[:lot_id], :integer) lot.lot_name = f[:lot_name] lot.classifier_ids = f[:classifier_ids].split(',') lot.okved_codes = ArrayOfIds.from_part_response(f[:okved_codes]) lot.quantity = convert(f[:quantity], :float) lot.units = f[:units] lot.price_begin = convert(f[:price_begin], :float) lot.price_begin_notax = convert(f[:price_begin_notax], :float) lot.addresses_ids = ArrayOfIds.from_part_response(f[:addresses_ids]).flatten.map(&:to_i) lot.customer = f[:customer] lot.ext_id = f[:ext_id] lot end lots end |