Class: B2bCenterApi::WebService::Types::ArrayOfIds

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

Overview

Массив ID или других строк

Constant Summary

Constants inherited from BaseType

BaseType::NO_INSPECT_ATTRS

Instance Attribute Summary

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

Class Method Details

.from_part_response(response) ⇒ String[]

Returns:

  • (String[])


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

def self.from_part_response(response)
  return [] if response.nil?
  to_array(response).map { |n| convert(n[:string], :string) }
end

.from_response(response) ⇒ Object



12
13
14
15
16
# File 'lib/b2b_center_api/web_service/types/array_of_ids.rb', line 12

def self.from_response(response)
  r = response.result
  return if r.nil?
  Array(r[:ids])
end