Method: PureCloud::QueryRequest#initialize
- Defined in:
- lib/purecloud/models/query_request.rb
#initialize(attributes = {}) ⇒ QueryRequest
Returns a new instance of QueryRequest.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/purecloud/models/query_request.rb', line 54 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo} if attributes[:'queryPhrase'] self.query_phrase = attributes[:'queryPhrase'] end if attributes[:'pageNumber'] self.page_number = attributes[:'pageNumber'] end if attributes[:'pageSize'] self.page_size = attributes[:'pageSize'] end if attributes[:'facetNameRequests'] if (value = attributes[:'facetNameRequests']).is_a?(Array) self.facet_name_requests = value end end if attributes[:'sort'] if (value = attributes[:'sort']).is_a?(Array) self.sort = value end end if attributes[:'filters'] if (value = attributes[:'filters']).is_a?(Array) self.filters = value end end if attributes[:'attributeFilters'] if (value = attributes[:'attributeFilters']).is_a?(Array) self.attribute_filters = value end end end |