class DynamicsCRM::Metadata::EntityQueryExpression

Attributes

attribute_query[RW]
criteria[RW]
properties[RW]

Public Class Methods

new(options={}) click to toggle source
# File lib/dynamics_crm/metadata/entity_query_expression.rb, line 8
def initialize(options={})
  @criteria = options[:criteria]
  @properties = options[:properties]
  @attribute_query = options[:attribute_query]
end

Public Instance Methods

to_xml(options={}) click to toggle source
# File lib/dynamics_crm/metadata/entity_query_expression.rb, line 14
def to_xml(options={})
  namespace = options[:namespace] ? options[:namespace] : "b"

  xml = ""
  xml << @criteria.to_xml({namespace: namespace}) if @criteria
  xml << @properties.to_xml({namespace: namespace}) if @properties
  xml << @attribute_query.to_xml({namespace: namespace}) if @attribute_query
  xml << "<#{namespace}:ExtensionData i:nil='true' />"
  xml << "<#{namespace}:LabelQuery  i:nil='true' />"
  xml << "<#{namespace}:RelationshipQuery i:nil='true' />"
  xml
end