Class: B2bCenterApi::WebService::Types::FirmData

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

#bank_kppString

Returns КПП.

Returns:

  • (String)

    КПП



19
20
21
# File 'lib/b2b_center_api/web_service/types/firm_data.rb', line 19

def bank_kpp
  @bank_kpp
end

#idInteger

Returns ID организации.

Returns:

  • (Integer)

    ID организации



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

def id
  @id
end

#innString

Returns ИНН.

Returns:

  • (String)

    ИНН



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

def inn
  @inn
end

#ogrnString

Returns ОГРН организации.

Returns:

  • (String)

    ОГРН организации.



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

def ogrn
  @ogrn
end

#okpoString

Returns Код ОКПО.

Returns:

  • (String)

    Код ОКПО



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

def okpo
  @okpo
end

#org_nameString

Returns Полное наименование организации.

Returns:

  • (String)

    Полное наименование организации.



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

def org_name
  @org_name
end

#org_name_shortString

Returns Краткое наименование организации.

Returns:

  • (String)

    Краткое наименование организации



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

def org_name_short
  @org_name_short
end

Class Method Details

.from_response(response, client) ⇒ FirmData

Returns:



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/b2b_center_api/web_service/types/firm_data.rb', line 22

def self.from_response(response, client)
  r = response.result[:firm_data]
  return if r.nil?
  fd = FirmData.new
  fd.soap_client = client
  fd.id = r[:id]
  fd.org_name = convert(r[:org_name], :string)
  fd.org_name_short = convert(r[:org_name_short], :string)
  fd.okpo = convert(r[:okpo], :string)
  fd.inn = convert(r[:inn], :string)
  fd.ogrn = convert(r[:ogrn], :string)
  fd.bank_kpp = convert(r[:bank_kpp], :string)

  fd
end