| GET,PUT,POST,DELETE | /{Workspace}/LaborItem | ||
|---|---|---|---|
| GET,PUT,POST,DELETE | /{Workspace}/LaborItem/{ObjectId} |
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class LaborItem:
object_id: Optional[str] = None
workspace: Optional[str] = None
item_type_id: Optional[str] = None
price: Optional[float] = None
item_type_name: Optional[str] = None
time_worked: Optional[float] = None
time_charged: Optional[float] = None
start_time: Optional[str] = None
end_time: Optional[str] = None
user_id: Optional[str] = None
rate: Optional[float] = None
owning_task_id: Optional[str] = None
start_status: Optional[str] = None
end_status: Optional[str] = None
start_event_id: Optional[str] = None
end_event_id: Optional[str] = None
qty: Optional[float] = None
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /{Workspace}/LaborItem HTTP/1.1
Host: dev.fieldsquared.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ObjectId: String,
Workspace: String,
ItemTypeId: String,
Price: 0,
ItemTypeName: String,
TimeWorked: 0,
TimeCharged: 0,
StartTime: String,
EndTime: String,
UserId: String,
Rate: 0,
OwningTaskId: String,
StartStatus: String,
EndStatus: String,
StartEventId: String,
EndEventId: String,
Qty: 0
}