Class: RubyOmx::ReturnHistoryRequest

Inherits:
Request show all
Defined in:
lib/ruby_omx/request/return_history_request.rb

Instance Attribute Summary collapse

Attributes inherited from Request

#raw_xml

Instance Method Summary collapse

Methods inherited from Response

format, parse_xml

Methods inherited from Node

#accessors, #as_hash

Constructor Details

#initialize(attrs = {}) ⇒ ReturnHistoryRequest

Returns a new instance of ReturnHistoryRequest.



5
6
7
8
9
10
11
12
# File 'lib/ruby_omx/request/return_history_request.rb', line 5

def initialize(attrs={})
  return super unless attrs.any?      
  raise MissingRequestOptions if attrs[:start_date].nil? || attrs[:end_date].nil?
  super
  self.version = attrs[:version] ||= '1.00'  		
  self.udi_parameters << RubyOmx::UDIParameter.new({:key=>'StartDate', :value=>attrs[:start_date]})
  self.udi_parameters << RubyOmx::UDIParameter.new({:key=>'EndDate', :value=>attrs[:end_date] })
end

Instance Attribute Details

#end_dateObject

Returns the value of attribute end_date.



14
15
16
# File 'lib/ruby_omx/request/return_history_request.rb', line 14

def end_date
  @end_date
end

#start_dateObject

Returns the value of attribute start_date.



14
15
16
# File 'lib/ruby_omx/request/return_history_request.rb', line 14

def start_date
  @start_date
end