Class: B2bCenterApi::WebService::Types::B2bFile
- Defined in:
- lib/b2b_center_api/web_service/types/b2b_file.rb
Overview
Файл
Constant Summary
Constants inherited from BaseType
Instance Attribute Summary collapse
-
#description ⇒ String
Описание файла.
-
#name ⇒ String
Имя файла, например zayavka.doc.
-
#title ⇒ String
Наименование файла.
Attributes inherited from BaseType
Class Method Summary collapse
Methods inherited from BaseType
Methods included from B2bCenterApi::WebService::TypeCast
Instance Attribute Details
#description ⇒ String
Returns Описание файла.
10 11 12 |
# File 'lib/b2b_center_api/web_service/types/b2b_file.rb', line 10 def description @description end |
#name ⇒ String
Имя файла, например zayavka.doc. Файл расположен в корневой папке пользователя (доступ по FTP). Если пользователь не имеет прав для скачивания файла, то поле отсутствует. Формат значения VARCHAR(255)
17 18 19 |
# File 'lib/b2b_center_api/web_service/types/b2b_file.rb', line 17 def name @name end |
#title ⇒ String
Returns Наименование файла. Формат значения VARCHAR(255).
7 8 9 |
# File 'lib/b2b_center_api/web_service/types/b2b_file.rb', line 7 def title @title end |
Class Method Details
.from_part_response(response) ⇒ B2bFile[]
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/b2b_center_api/web_service/types/b2b_file.rb', line 20 def self.from_part_response(response) return [] if response.nil? files = to_array(response[:file]).map do |f| file = B2bFile.new file.title = convert(f[:title], :string) file.description = convert(f[:description], :string) file.name = convert(f[:name], :string) file end files end |