def baseRequest
      # if override key is platformId... delete programNumber...
      # if override key is period... delete nbDaysFromNow...
      baseRequest = { username: _username, password: _password }
      
      # First choice (program or platform)
      if @programNumber.nil? and @platformId.nil?
        # Fetch all programs if neither is provided
        baseRequest[:programNumber] = programs.map {|p|p.to_s}.join(",")
      elsif @programNumber.to_s =~ /\d+/ and @platformId.to_s =~ /\d+/
        baseRequest[:platformId] = @platformId # ignores programNumber
      elsif @programNumber.to_s =~ /\d+/ 
        baseRequest[:programNumber] = @programNumber
      elsif @platformId.to_s =~ /\d+/
        baseRequest[:platformId] = @platformId
      end
      
      # 2nd choice (time)
      if @nbDaysFromNow.nil? and @period.nil?
        # Default to 20 days of data (the maximum)
        baseRequest[:nbDaysFromNow] = 20
      elsif @nbDaysFromNow =~ /\d+/ and not @period.nil?
        raise "Cannot provide both nbDaysFromNow and period"
      elsif @nbDaysFromNow.to_s =~ /\d+/ 
        baseRequest[:nbDaysFromNow] = @nbDaysFromNow.to_i
      else
        baseRequest[:period] = @period
      end
      
      #baseRequest = baseRequest.merge({
        # @todo 
        #<xs:element minOccurs="0" name="referenceDate" type="tns:referenceDateType"/>
        #<xs:element minOccurs="0" name="locClass" type="xs:string"/>
        #<xs:element minOccurs="0" name="geographicArea" type="xs:string"/>
        #<xs:element minOccurs="0" name="compression" type="xs:int"/>
        #<xs:element minOccurs="0" name="mostRecentPassages" type="xs:boolean"/>
      #})
      baseRequest
      
    end
def baseRequest
      # if override key is platformId... delete programNumber...
      # if override key is period... delete nbDaysFromNow...
      baseRequest = { username: _username, password: _password }
      
      # First choice (program or platform)
      if @programNumber.nil? and @platformId.nil?
        # Fetch all programs if neither is provided
        baseRequest[:programNumber] = programs.map {|p|p.to_s}.join(",")
      elsif @programNumber.to_s =~ /\d+/ and @platformId.to_s =~ /\d+/
        baseRequest[:platformId] = @platformId # ignores programNumber
      elsif @programNumber.to_s =~ /\d+/ 
        baseRequest[:programNumber] = @programNumber
      elsif @platformId.to_s =~ /\d+/
        baseRequest[:platformId] = @platformId
      end
      
      # 2nd choice (time)
      if @nbDaysFromNow.nil? and @period.nil?
        # Default to 20 days of data (the maximum)
        baseRequest[:nbDaysFromNow] = 20
      elsif @nbDaysFromNow =~ /\d+/ and not @period.nil?
        raise "Cannot provide both nbDaysFromNow and period"
      elsif @nbDaysFromNow.to_s =~ /\d+/ 
        baseRequest[:nbDaysFromNow] = @nbDaysFromNow.to_i
      else
        baseRequest[:period] = @period
      end
      
      #baseRequest = baseRequest.merge({
        # @todo 
        #<xs:element minOccurs="0" name="referenceDate" type="tns:referenceDateType"/>
        #<xs:element minOccurs="0" name="locClass" type="xs:string"/>
        #<xs:element minOccurs="0" name="geographicArea" type="xs:string"/>
        #<xs:element minOccurs="0" name="compression" type="xs:int"/>
        #<xs:element minOccurs="0" name="mostRecentPassages" type="xs:boolean"/>
      #})
      baseRequest
      
    end
Constructor
 soap = Argos::Soap.new({username: "argos-system-user", password: "argos-system-pw"})
 Build baseRequest Hash
 The service requires programNumber or PlatformId, but if you do not provide any,
 this method will call the service (@see #programs) and get the current user's programs
 @return [Hash]