GET | /api/activity | ||
---|---|---|---|
GET | /api/activity/{lastrowversion} |
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*
/**
* Retrieves a list of activities of SupplierConnect schedule(s) for a given time window. This will return SupplierConnect schedule request(s), and the associated other details such as statuses
*/
@Api(Description="Retrieves a list of activities of SupplierConnect schedule(s) for a given time window. This will return SupplierConnect schedule request(s), and the associated other details such as statuses")
open class GetRequestActivity
{
/**
* Row version of the last/latest record processed/returned in the previous request
*/
@DataMember(Name="LastRowVersion")
@SerializedName("LastRowVersion")
@ApiMember(Description="Row version of the last/latest record processed/returned in the previous request", IsRequired=true, Name="LastRowVersion")
open var LastRowVersion:String? = null
}
@ApiResponse(Description="Returns the list of the schedule requests for the given list of Ids")
open class GetSchedulesResponse
{
open var Success:Boolean? = null
open var Message:String? = null
open var ScheduleRequests:ArrayList<ScheduleDetails>? = null
open var ResponseStatus:ResponseStatus? = null
open var LastRowVersion:String? = null
}
open class ScheduleDetails : SupplierConnectSchedule()
{
open var ReferenceId:UUID? = null
open var Index:Int? = null
open var StatusId:UUID? = null
open var Status:String? = null
open var StatusMessage:String? = null
open var RequestedBy:String? = null
open var RequestedDate:Date? = null
open var CommunicationId:UUID? = null
}
open class SupplierConnectSchedule
{
open var RequestId:UUID? = null
open var PreviousRequestId:UUID? = null
open var LicenseeId:UUID? = null
open var LicenseeName:String? = null
open var ScheduleDateTime:Date? = null
open var Requester:SupplierConnectContactInfo? = null
open var Supplier:SupplierConnectContactInfo? = null
open var Project:SupplierConnectProjectInfo? = null
open var PurchaseOrder:SupplierConnectPurchaseOrderInfo? = null
open var Activity:SupplierConnectActivityReference? = null
open var Params:ArrayList<SupplierConnectScheduleParams>? = null
open var Attachments:ArrayList<EmailAttachment>? = null
}
open class SupplierConnectContactInfo
{
open var Id:UUID? = null
open var Name:String? = null
open var Email:String? = null
open var Phone:String? = null
open var ContactReference:SupplierConnectObjectReference? = null
}
open class SupplierConnectObjectReference
{
open var RmsTableContextId:UUID? = null
open var AlternateKey:String? = null
open var DataSourceInstanceId:UUID? = null
}
open class SupplierConnectProjectInfo
{
open var Id:UUID? = null
open var Name:String? = null
open var Reference:String? = null
open var Description:String? = null
open var Address:String? = null
open var HouseType:String? = null
open var Elevation:String? = null
open var Supervisor:SupplierConnectContactInfo? = null
open var CustomerName:String? = null
open var ProjectReference:SupplierConnectObjectReference? = null
}
open class SupplierConnectPurchaseOrderInfo
{
open var Id:UUID? = null
open var Reference:String? = null
open var Description:String? = null
open var ProjectId:UUID? = null
open var PurchaseOrderReference:SupplierConnectObjectReference? = null
}
open class SupplierConnectActivityReference
{
open var Name:String? = null
open var Notes:String? = null
}
open class SupplierConnectScheduleParams
{
open var Name:String? = null
open var Value:String? = null
}
open class EmailAttachment
{
open var FileName:String? = null
open var ContentType:String? = null
open var Path:String? = null
open var Url:String? = null
open var Length:Long? = null
open var FileStream:InputStream? = null
open var StreamContent:String? = null
open var AttachmentType:AttachmentType? = null
open var ProcessedAndUploadedAsBlob:Boolean? = null
}
enum class AttachmentType
{
Url,
FileStream,
}
Kotlin GetRequestActivity DTOs
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.
GET /api/activity HTTP/1.1 Host: production-eros-gateway-api-supplierconnect.azurewebsites.net Accept: text/jsv
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { Success: False, Message: String, ScheduleRequests: [ { Index: 0, Status: String, StatusMessage: String, RequestedBy: String, RequestedDate: 0001-01-01, LicenseeName: String, ScheduleDateTime: 0001-01-01, Requester: { Name: String, Email: String, Phone: String, ContactReference: { AlternateKey: String } }, Supplier: { Name: String, Email: String, Phone: String, ContactReference: { AlternateKey: String } }, Project: { Name: String, Reference: String, Description: String, Address: String, HouseType: String, Elevation: String, Supervisor: { Name: String, Email: String, Phone: String, ContactReference: { AlternateKey: String } }, CustomerName: String, ProjectReference: { AlternateKey: String } }, PurchaseOrder: { Reference: String, Description: String, PurchaseOrderReference: { AlternateKey: String } }, Activity: { Name: String, Notes: String }, Params: [ { Name: String, Value: String } ], Attachments: [ { FileName: String, ContentType: String, Path: String, Url: String, Length: 0, StreamContent: String, AttachmentType: Url, ProcessedAndUploadedAsBlob: False } ] } ], ResponseStatus: { ErrorCode: String, Message: String, StackTrace: String, Errors: [ { ErrorCode: String, FieldName: String, Message: String, Meta: { String: String } } ], Meta: { String: String } }, LastRowVersion: String }