Class: DynamicsCRM::XML::FetchExpression

Inherits:
Object
  • Object
show all
Defined in:
lib/dynamics_crm/xml/fetch_expression.rb

Instance Method Summary collapse

Constructor Details

#initialize(fetch_xml) ⇒ FetchExpression

Returns a new instance of FetchExpression.



5
6
7
# File 'lib/dynamics_crm/xml/fetch_expression.rb', line 5

def initialize(fetch_xml)
  @fetch = fetch_xml
end

Instance Method Details

#to_hashObject



20
21
22
# File 'lib/dynamics_crm/xml/fetch_expression.rb', line 20

def to_hash
  {:fetch_xml => @fetch}
end

#to_xml(options = {}) ⇒ Object

Using Entity vs entity causes the error: Value cannot be null. <Order> can be repeated multiple times orderType: 0 (Ascending) or 1 (Descending)



12
13
14
15
16
17
18
# File 'lib/dynamics_crm/xml/fetch_expression.rb', line 12

def to_xml(options={})
  %Q{
<a:Query>
    #{CGI.escapeHTML(@fetch)}
</a:Query>
  }
end