cancellationtime.go raw

   1  package gotransip
   2  
   3  // CancellationTime represents the possible ways of canceling a contract
   4  type CancellationTime string
   5  
   6  // CancellationRequest is used to generate a json body that contains the endTime property
   7  // the endTime could either be 'end' or 'immediately'
   8  type CancellationRequest struct {
   9  	EndTime CancellationTime `json:"endTime"`
  10  }
  11  
  12  var (
  13  	// CancellationTimeEnd specifies to cancel the contract when the contract was
  14  	// due to end anyway
  15  	CancellationTimeEnd CancellationTime = "end"
  16  	// CancellationTimeImmediately specifies to cancel the contract immediately
  17  	CancellationTimeImmediately CancellationTime = "immediately"
  18  )
  19