GET | /call-center/1099/{AccountNumber}/{Year} |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports NAV.ServiceModel
Namespace Global
Namespace NAV.ServiceModel
Public Partial Class CallCenter1099Get
Implements IGet
Public Overridable Property AccountNumber As Decimal
Public Overridable Property Year As Integer
End Class
Public Partial Class CallCenter1099GetResponse
Public Sub New()
TransactionDetails = New List(Of TransactionDetail)
End Sub
Public Overridable Property AccountNumber As Decimal
Public Overridable Property Year As Integer
Public Overridable Property MerchandiseSales As Nullable(Of Decimal)
Public Overridable Property TotalActualWithholdingToDate As Nullable(Of Decimal)
Public Overridable Property TotalFutureWithholdingToDate As Nullable(Of Decimal)
Public Overridable Property TotalEarnings As Nullable(Of Decimal)
Public Overridable Property TransactionDetails As List(Of TransactionDetail)
Public Overridable Property ResponseStatus As ResponseStatus
End Class
Public Partial Class TransactionDetail
Public Overridable Property [Date] As Date
Public Overridable Property TransactionNumber As String
Public Overridable Property Description As String
Public Overridable Property Value1099 As Decimal
End Class
End Namespace
End Namespace
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /call-center/1099/{AccountNumber}/{Year} HTTP/1.1 Host: extensions.avon.ca Accept: text/csv
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"accountNumber":0,"year":0,"merchandiseSales":0,"totalActualWithholdingToDate":0,"totalFutureWithholdingToDate":0,"totalEarnings":0,"transactionDetails":[{"date":"0001-01-01T00:00:00.0000000","transactionNumber":"String","description":"String","value1099":0}],"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}