Class: B2bCenterApi::WebService::Types::AddressData

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

#addressString

Returns Адрес.

Returns:

  • (String)

    Адрес



27
28
29
# File 'lib/b2b_center_api/web_service/types/address_data.rb', line 27

def address
  @address
end

#commentString

Returns Название адреса.

Returns:

  • (String)

    Название адреса



30
31
32
# File 'lib/b2b_center_api/web_service/types/address_data.rb', line 30

def comment
  @comment
end

#countryInteger

Returns Цифровой код страны ISO_3166-1.

Returns:

  • (Integer)

    Цифровой код страны ISO_3166-1



14
15
16
# File 'lib/b2b_center_api/web_service/types/address_data.rb', line 14

def country
  @country
end

#firm_idInteger

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

Returns:

  • (Integer)

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



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

def firm_id
  @firm_id
end

#idInteger

Returns id адреса Для добавления устанавливаем id=0.

Returns:

  • (Integer)

    id адреса Для добавления устанавливаем id=0



8
9
10
# File 'lib/b2b_center_api/web_service/types/address_data.rb', line 8

def id
  @id
end

#is_fuzzy_addressInteger

Returns Является ли адрес неточным Возможные значения:

"0" — адрес, заданный обычным способом;
"1" — неточный адрес (может использоваться только в закупках по 223-ФЗ).

Returns:

  • (Integer)

    Является ли адрес неточным Возможные значения:

    "0" — адрес, заданный обычным способом;
    "1" — неточный адрес (может использоваться только в закупках по 223-ФЗ)
    


51
52
53
# File 'lib/b2b_center_api/web_service/types/address_data.rb', line 51

def is_fuzzy_address
  @is_fuzzy_address
end

#latString

Returns Широта, в градусах.

Returns:

  • (String)

    Широта, в градусах



33
34
35
# File 'lib/b2b_center_api/web_service/types/address_data.rb', line 33

def lat
  @lat
end

#lngString

Returns Долгота, в градусах.

Returns:

  • (String)

    Долгота, в градусах



36
37
38
# File 'lib/b2b_center_api/web_service/types/address_data.rb', line 36

def lng
  @lng
end

#okatoString

Returns Код ОКАТО.

Returns:

  • (String)

    Код ОКАТО



24
25
26
# File 'lib/b2b_center_api/web_service/types/address_data.rb', line 24

def okato
  @okato
end

#regionInteger

Returns Код региона по КЛАДРу В случае заполнения поля okato, в поле region можно передать “0”, в этом случае оно заполняется автоматически по коду ОКАТО.

Returns:

  • (Integer)

    Код региона по КЛАДРу В случае заполнения поля okato, в поле region можно передать “0”, в этом случае оно заполняется автоматически по коду ОКАТО



21
22
23
# File 'lib/b2b_center_api/web_service/types/address_data.rb', line 21

def region
  @region
end

#statusInteger

Returns Тип задания адреса Указывается только при вызове RemoteMarket.updateAddress. Возможные значения:

"0" — значения широты и долготы определятся
      автоматически на основании адреса;
"32" — значения широты и долготы.

Returns:

  • (Integer)

    Тип задания адреса Указывается только при вызове RemoteMarket.updateAddress. Возможные значения:

    "0" — значения широты и долготы определятся
          автоматически на основании адреса;
    "32" — значения широты и долготы
    


45
46
47
# File 'lib/b2b_center_api/web_service/types/address_data.rb', line 45

def status
  @status
end

Class Method Details

.from_response(response, client) ⇒ AddressData

Returns:



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/b2b_center_api/web_service/types/address_data.rb', line 54

def self.from_response(response, client)
  r = response.result[:address_data]
  return if r.nil?
  ad = AddressData.new
  ad.soap_client = client
  ad.id = convert(r[:id], :integer)
  ad.firm_id = convert(r[:firm_id], :integer)
  ad.country = convert(r[:country], :integer)
  ad.region = convert(r[:region], :integer)
  ad.okato = convert(r[:okato], :string)
  ad.address = convert(r[:address], :string)
  ad.comment = convert(r[:comment], :string)
  ad.lat = convert(r[:lat], :string)
  ad.lng = convert(r[:lng], :string)
  ad.status = convert(r[:status], :integer)
  ad.is_fuzzy_address = convert(r[:is_fuzzy_address], :integer)
  ad
end