Class: DynamicsCRM::XML::PageInfo
- Inherits:
-
Object
- Object
- DynamicsCRM::XML::PageInfo
- Defined in:
- lib/dynamics_crm/xml/page_info.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
Returns the value of attribute count.
-
#page_number ⇒ Object
Returns the value of attribute page_number.
-
#paging_cookie ⇒ Object
Returns the value of attribute paging_cookie.
-
#return_total_record_count ⇒ Object
Returns the value of attribute return_total_record_count.
Instance Method Summary collapse
-
#initialize(count: 20, page_number: 1, paging_cookie: nil, return_total_record_count: false) ⇒ PageInfo
constructor
A new instance of PageInfo.
- #to_hash ⇒ Object
-
#to_xml ⇒ Object
Using Entity vs entity causes the error: Value cannot be null.
Constructor Details
#initialize(count: 20, page_number: 1, paging_cookie: nil, return_total_record_count: false) ⇒ PageInfo
Returns a new instance of PageInfo.
6 7 8 9 10 11 |
# File 'lib/dynamics_crm/xml/page_info.rb', line 6 def initialize(count: 20, page_number: 1, paging_cookie: nil, return_total_record_count: false) @count = count @page_number = page_number @paging_cookie = @return_total_record_count = return_total_record_count end |
Instance Attribute Details
#count ⇒ Object
Returns the value of attribute count.
4 5 6 |
# File 'lib/dynamics_crm/xml/page_info.rb', line 4 def count @count end |
#page_number ⇒ Object
Returns the value of attribute page_number.
4 5 6 |
# File 'lib/dynamics_crm/xml/page_info.rb', line 4 def page_number @page_number end |
#paging_cookie ⇒ Object
Returns the value of attribute paging_cookie.
4 5 6 |
# File 'lib/dynamics_crm/xml/page_info.rb', line 4 def @paging_cookie end |
#return_total_record_count ⇒ Object
Returns the value of attribute return_total_record_count.
4 5 6 |
# File 'lib/dynamics_crm/xml/page_info.rb', line 4 def return_total_record_count @return_total_record_count end |
Instance Method Details
#to_hash ⇒ Object
31 32 33 34 35 36 37 38 |
# File 'lib/dynamics_crm/xml/page_info.rb', line 31 def to_hash { :count => count, :page_number => page_number, :paging_cookie => , :return_total_record_count => return_total_record_count } end |
#to_xml ⇒ Object
Using Entity vs entity causes the error: Value cannot be null.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/dynamics_crm/xml/page_info.rb', line 14 def to_xml = if .nil? '<b:PagingCookie i:nil="true" />' else %(<b:PagingCookie>#{CGI.escapeHTML()}</b:PagingCookie>) end %( <b:PageInfo> <b:Count>#{count}</b:Count> <b:PageNumber>#{page_number}</b:PageNumber> #{} <b:ReturnTotalRecordCount>#{return_total_record_count}</b:ReturnTotalRecordCount> </b:PageInfo> ) end |