Class: DynamicsCRM::XML::Orders
- Inherits:
-
Object
- Object
- DynamicsCRM::XML::Orders
- Defined in:
- lib/dynamics_crm/xml/orders.rb
Overview
Represents Orders XML element.
Instance Attribute Summary collapse
-
#attribute_name ⇒ Object
Returns the value of attribute attribute_name.
-
#order_type ⇒ Object
Returns the value of attribute order_type.
Instance Method Summary collapse
-
#initialize ⇒ Orders
constructor
A new instance of Orders.
- #to_hash ⇒ Object
-
#to_xml ⇒ Object
Using Entity vs entity causes the error: Value cannot be null.
Constructor Details
#initialize ⇒ Orders
Returns a new instance of Orders.
8 9 10 |
# File 'lib/dynamics_crm/xml/orders.rb', line 8 def initialize @order_type = 0 end |
Instance Attribute Details
#attribute_name ⇒ Object
Returns the value of attribute attribute_name.
6 7 8 |
# File 'lib/dynamics_crm/xml/orders.rb', line 6 def attribute_name @attribute_name end |
#order_type ⇒ Object
Returns the value of attribute order_type.
6 7 8 |
# File 'lib/dynamics_crm/xml/orders.rb', line 6 def order_type @order_type end |
Instance Method Details
#to_hash ⇒ Object
26 27 28 29 30 31 |
# File 'lib/dynamics_crm/xml/orders.rb', line 26 def to_hash { :attribute_name => attribute_name, :order_type => order_type } end |
#to_xml ⇒ Object
Using Entity vs entity causes the error: Value cannot be null. <Order> can be repeated multiple times orderType: 0 (Ascending) or 1 (Descending)
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/dynamics_crm/xml/orders.rb', line 15 def to_xml %Q{ <a:Orders> <a:Order> <a:attributeName>#{attribute_name}</a:attributeName> <a:orderType>#{order_type}</a:orderType> </a:Order> </a:Orders> } end |