Class: B2bCenterApi::WebService::Types::OkdpRow

Inherits:
BaseType
  • Object
show all
Defined in:
lib/b2b_center_api/web_service/types/okdp_rows.rb

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

#idInteger

Returns ID.

Returns:

  • (Integer)

    ID



6
7
8
# File 'lib/b2b_center_api/web_service/types/okdp_rows.rb', line 6

def id
  @id
end

#nameString

Returns Наименование.

Returns:

  • (String)

    Наименование



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

def name
  @name
end

#parent_idInteger

Returns родительский ID.

Returns:

  • (Integer)

    родительский ID



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

def parent_id
  @parent_id
end

Class Method Details

.from_response(response) ⇒ OkdpRow

Returns:



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/b2b_center_api/web_service/types/okdp_rows.rb', line 12

def self.from_response(response)
  r = response.result
  return if r.nil?
  Array(r[:okdp_rows]).map do |okdp|
    o = OkdpRow.new
    o.id = okdp[:id]
    o.parent_id = okdp[:parent_id]
    o.name = okdp[:name]
    o
  end
end