lib/purecloud/models/location.rb in purecloud-0.35.1 vs lib/purecloud/models/location.rb in purecloud-0.36.1

- old
+ new

@@ -1,5 +1,21 @@ +=begin +PureCloud API + +PureCloud API + +OpenAPI spec version: v1 +Contact: chuck.pulfer@inin.com +Generated by: https://github.com/swagger-api/swagger-codegen.git + +License: ININ +http://www.inin.com + +Terms of Service: http://www.inin.com + +=end + require 'date' module PureCloud class Location # The globally unique identifier for the object. @@ -15,11 +31,11 @@ attr_accessor :emergency_number attr_accessor :notes - attr_accessor :_path + attr_accessor :path # Current activity status of the location. attr_accessor :state attr_accessor :sublocation_order @@ -45,11 +61,11 @@ :'emergency_number' => :'emergencyNumber', :'notes' => :'notes', - :'_path' => :'path', + :'path' => :'path', :'state' => :'state', :'sublocation_order' => :'sublocationOrder', @@ -68,11 +84,11 @@ :'address' => :'String', :'address_fields' => :'LocationAddressFields', :'address_verified' => :'BOOLEAN', :'emergency_number' => :'LocationEmergencyNumber', :'notes' => :'String', - :'_path' => :'Array<String>', + :'path' => :'Array<String>', :'state' => :'String', :'sublocation_order' => :'Array<String>', :'version' => :'Float', :'self_uri' => :'String' @@ -116,11 +132,11 @@ self.notes = attributes[:'notes'] end if attributes[:'path'] if (value = attributes[:'path']).is_a?(Array) - self._path = value + self.path = value end end if attributes[:'state'] self.state = attributes[:'state'] @@ -160,11 +176,11 @@ address == o.address && address_fields == o.address_fields && address_verified == o.address_verified && emergency_number == o.emergency_number && notes == o.notes && - _path == o._path && + path == o.path && state == o.state && sublocation_order == o.sublocation_order && version == o.version && self_uri == o.self_uri end @@ -174,11 +190,11 @@ self == o end # Calculate hash code according to all attributes. def hash - [id, name, address, address_fields, address_verified, emergency_number, notes, _path, state, sublocation_order, version, self_uri].hash + [id, name, address, address_fields, address_verified, emergency_number, notes, path, state, sublocation_order, version, self_uri].hash end # build the object from hash def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) @@ -210,14 +226,17 @@ when :Integer value.to_i when :Float value.to_f when :BOOLEAN - if value =~ /^(true|t|yes|y|1)$/i + if value.to_s =~ /^(true|t|yes|y|1)$/i true else false end + when :Object + # generic object (usually a Hash), return directly + value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type]