Class: B2bCenterApi::WebService::Types::B2bFile

Inherits:
BaseType
  • Object
show all
Defined in:
lib/b2b_center_api/web_service/types/b2b_file.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

#descriptionString

Returns Описание файла.

Returns:

  • (String)

    Описание файла



10
11
12
# File 'lib/b2b_center_api/web_service/types/b2b_file.rb', line 10

def description
  @description
end

#nameString

Имя файла, например zayavka.doc. Файл расположен в корневой папке пользователя (доступ по FTP). Если пользователь не имеет прав для скачивания файла, то поле отсутствует. Формат значения VARCHAR(255)

Returns:

  • (String)


17
18
19
# File 'lib/b2b_center_api/web_service/types/b2b_file.rb', line 17

def name
  @name
end

#titleString

Returns Наименование файла. Формат значения VARCHAR(255).

Returns:

  • (String)

    Наименование файла. Формат значения 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[]

Returns:



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