/**
 * Communicates with the Symbian VeraCore SOAP API
 * the 'mkXXX' methods are meant for internal use but left public in case we unit test things.
 */
export class VeraCoreSoapApiClient {
  private unmarshaller: { unmarshalString: (input: string) => any }
  private marhsaller: { marshalString: (object: Object) => string }

  /**
   * Constructs a new instance
   * @param https the N/https module, or a mock of such...(this is a constructor param to facilitate future unit testing)
   * @param username login credential for the API
   * @param passwordGUID login credential for the API - must be a netsuite secure password GUID previously saved
   * @param endpointUrl the url to send SOAP messages to
   */
  constructor (private https: { post: (o: PostOptions) => ClientResponse, createSecureString: (any) => any }, private username, private passwordGUID,
    private endpointUrl = 'someurl/oms.asmx') {
    const context = new Jsonix.Context([omscom])
    this.unmarshaller = context.createUnmarshaller()
    this.marhsaller = context.createMarshaller()
  }