| Requires any of the roles: | Agent, Administrator |
| POST,OPTIONS | /v1/Rfp/Availability |
|---|
import Foundation
import ServiceStack
public class AvailabilityUpsertRequest : Codable
{
public var resourceType:String
public var label:String
public var equipmentName:String
public var rolesCsv:String
public var internalRate:Double?
public var rentalRate:Double?
public var premiumPerHour:Double?
public var availableFrom:Date?
public var freedFromProjectLabel:String
required public init(){}
}
public class AvailabilityListResponse : Codable
{
public var responseStatus:ResponseStatus
public var rows:[AvailabilityRowView] = []
public var equipmentNames:[String] = []
public var crewRoles:[String] = []
public var summary:AvailabilityRefreshSummary
required public init(){}
}
public class AvailabilityRowView : Codable
{
public var resourceAvailabilityID:Int
public var resourceType:String
public var label:String
public var equipmentName:String
public var rolesCsv:String
public var internalRate:Double?
public var rentalRate:Double?
public var premiumPerHour:Double?
public var availableFrom:Date
public var freedFromProjectLabel:String
public var source:String
required public init(){}
}
public class AvailabilityRefreshSummary : Codable
{
public var derived:Int
public var deactivatedStale:Int
public var skippedManualPrecedence:Int
public var skippedNoRentalSource:Int
public var skippedNoDayRate:Int
public var notes:[String] = []
required public init(){}
}
Swift AvailabilityUpsertRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/Rfp/Availability HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"ResourceType":"String","Label":"String","EquipmentName":"String","RolesCsv":"String","InternalRate":0,"RentalRate":0,"PremiumPerHour":0,"AvailableFrom":"0001-01-01T00:00:00.0000000","FreedFromProjectLabel":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Rows":[{"ResourceAvailabilityID":0,"ResourceType":"String","Label":"String","EquipmentName":"String","RolesCsv":"String","InternalRate":0,"RentalRate":0,"PremiumPerHour":0,"AvailableFrom":"0001-01-01T00:00:00.0000000","FreedFromProjectLabel":"String","Source":"String"}],"EquipmentNames":["String"],"CrewRoles":["String"],"Summary":{"Derived":0,"DeactivatedStale":0,"SkippedManualPrecedence":0,"SkippedNoRentalSource":0,"SkippedNoDayRate":0,"Notes":["String"]}}