POST, GET | /api/C2BGetInstrumentInfo |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports AIM.WebService
Imports AIM
Namespace Global
Namespace AIM
<DataContract>
Public Partial Class C2BAccessoryGeneric
<DataMember>
Public Overridable Property AccessoryDesc As String
<DataMember>
Public Overridable Property Price As Decimal
<DataMember>
Public Overridable Property Required As Boolean
<DataMember>
Public Overridable Property [Default] As Boolean
<DataMember>
Public Overridable Property RequiresLocation As Boolean
<DataMember>
Public Overridable Property Type As String
<DataMember>
Public Overridable Property Topic As String
<DataMember>
Public Overridable Property Id As Long
<DataMember>
Public Overridable Property DisplayOrder As Integer
<DataMember>
Public Overridable Property Sku As String
<DataMember>
Public Overridable Property TaxAmount As Nullable(Of Decimal)
<DataMember>
Public Overridable Property CatNum As Nullable(Of Integer)
End Class
<DataContract>
Public Partial Class C2BGradeGeneric
<DataMember>
Public Overridable Property Level As Integer
<DataMember>
Public Overridable Property Grade As String
<DataMember>
Public Overridable Property DownPay As Decimal
<DataMember>
Public Overridable Property DownMaint As Decimal
<DataMember>
Public Overridable Property MoPay As Decimal
<DataMember>
Public Overridable Property MoMaint As Decimal
<DataMember>
Public Overridable Property Id As Long
<DataMember>
Public Overridable Property OutOfStock As Boolean
<DataMember>
Public Overridable Property RentPrice As Decimal
<DataMember>
Public Overridable Property CashPrice As Decimal
<DataMember>
Public Overridable Property DownPayTax As Nullable(Of Decimal)
<DataMember>
Public Overridable Property DownMaintTax As Nullable(Of Decimal)
<DataMember>
Public Overridable Property MoPayTax As Nullable(Of Decimal)
<DataMember>
Public Overridable Property MoMaintTax As Nullable(Of Decimal)
<DataMember>
Public Overridable Property RentPricePlusTax As Decimal
<DataMember>
Public Overridable Property RentPricePlusTaxLessDownpay As Decimal
<DataMember>
Public Overridable Property Months As Integer
End Class
<DataContract>
Public Partial Class C2BInstrumentGeneric
Public Sub New()
GradeList = New List(Of C2BGradeGeneric)
AccessoryList = New List(Of C2BAccessoryGeneric)
DeliveryList = New List(Of C2BAccessoryGeneric)
MaintenanceList = New List(Of C2BAccessoryGeneric)
End Sub
<DataMember>
Public Overridable Property InstrumentName As String
<DataMember>
Public Overridable Property Sku As String
<DataMember>
Public Overridable Property Topic As String
<DataMember>
Public Overridable Property Image As String
<DataMember>
Public Overridable Property Level As Integer
<DataMember>
Public Overridable Property RentPrice As Nullable(Of Decimal)
<DataMember>
Public Overridable Property CashPrice As Nullable(Of Decimal)
<DataMember>
Public Overridable Property Token As String
<DataMember>
Public Overridable Property InstrumentId As Long
<DataMember>
Public Overridable Property InstrumentTeacherId As Long
<DataMember>
Public Overridable Property GradeList As List(Of C2BGradeGeneric)
<DataMember>
Public Overridable Property HasGrades As Boolean
<DataMember>
Public Overridable Property DisplayOrder As Integer
<DataMember>
Public Overridable Property AccessoryList As List(Of C2BAccessoryGeneric)
<DataMember>
Public Overridable Property DeliveryList As List(Of C2BAccessoryGeneric)
<DataMember>
Public Overridable Property MaintenanceList As List(Of C2BAccessoryGeneric)
End Class
End Namespace
Namespace AIM.WebService
<DataContract>
Public Partial Class BaseRequest
'''<Summary>
'''This is your AIM API Key provided by Tri-Tech
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="This is your AIM API Key provided by Tri-Tech", IsRequired:=true, Name:="ApiKey", ParameterType:="header")>
Public Overridable Property ApiKey As String
<DataMember>
<ApiMember(DataType:="string", Name:="OAuthToken", ParameterType:="header")>
Public Overridable Property OAuthToken As String
End Class
<DataContract>
Public Partial Class BaseResponse
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="BaseResponseResult", Description:="", Name:="Status", ParameterType:="body")>
Public Overridable Property Status As BaseResponseResult
<DataContract>
Public Partial Class BaseResponseResult
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="", Name:="StatusCode", ParameterType:="body")>
Public Overridable Property StatusCode As String
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="", Name:="Login", ParameterType:="body")>
Public Overridable Property Login As String
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="", Name:="ErrorCode", ParameterType:="body")>
Public Overridable Property ErrorCode As String
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="", Name:="ErrorDisplayText", ParameterType:="body")>
Public Overridable Property ErrorDisplayText As String
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="", Name:="ErrorMessage", ParameterType:="body")>
Public Overridable Property ErrorMessage As String
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="", ExcludeInSchema:=true, Name:="DomainName", ParameterType:="body")>
Public Overridable Property DomainName As String
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="", ExcludeInSchema:=true, Name:="IPAddress", ParameterType:="body")>
Public Overridable Property IpAddress As String
End Class
End Class
<DataContract>
Public Partial Class BaseSecureRequest
Inherits BaseRequest
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="", Name:="Token", ParameterType:="Header")>
Public Overridable Property Token As String
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="", Name:="DeviceId", ParameterType:="Header")>
Public Overridable Property DeviceId As String
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="", IsRequired:=true, Name:="AppId", ParameterType:="Header")>
Public Overridable Property AppId As String
End Class
'''<Summary>
'''C2BGetInstrumentInfoRequires active-e Contracts Service.
'''</Summary>
<DataContract>
Public Partial Class C2BGetInstrumentInfoRequest
Inherits BaseSecureRequest
'''<Summary>
'''ID of the Teacher/Instrument record.
'''</Summary>
<DataMember>
<ApiMember(DataType:="integer", Description:="ID of the Teacher/Instrument record.", Format:="int64", Name:="RsiPk", ParameterType:="query")>
Public Overridable Property RsiPk As Nullable(Of Long)
'''<Summary>
'''ID of the Teacher record.
'''</Summary>
<DataMember>
<ApiMember(DataType:="integer", Description:="ID of the Teacher record.", Format:="int64", Name:="TeacherId", ParameterType:="query")>
Public Overridable Property TeacherId As Nullable(Of Long)
'''<Summary>
'''Optional Plan Code Override. If not sent, plancode from the school will be used.
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="Optional Plan Code Override. If not sent, plancode from the school will be used.", Name:="PlanCode", ParameterType:="query")>
Public Overridable Property PlanCode As String
'''<Summary>
'''If set to false, less details will be sent. Defaults to True.
'''</Summary>
<DataMember>
<ApiMember(DataType:="boolean", Description:="If set to false, less details will be sent. Defaults to True.", Name:="GetDetails", ParameterType:="query")>
Public Overridable Property GetDetails As Nullable(Of Boolean)
'''<Summary>
'''If set to true, Out of Stock items will be included.
'''</Summary>
<DataMember>
<ApiMember(DataType:="boolean", Description:="If set to true, Out of Stock items will be included.", Name:="IncludeOutOfStockItems", ParameterType:="query")>
Public Overridable Property IncludeOutOfStockItems As Nullable(Of Boolean)
'''<Summary>
'''If set to true, each instrument will include a list of accessory options. Defaults to False.
'''</Summary>
<DataMember>
<ApiMember(DataType:="boolean", Description:="If set to true, each instrument will include a list of accessory options. Defaults to False.", Name:="IncludeAccessoryOptions", ParameterType:="query")>
Public Overridable Property IncludeAccessoryOptions As Nullable(Of Boolean)
'''<Summary>
'''If set to true, each instrument will include a list of delivery options. Defaults to False.
'''</Summary>
<DataMember>
<ApiMember(DataType:="boolean", Description:="If set to true, each instrument will include a list of delivery options. Defaults to False.", Name:="IncludeDeliveryOptions", ParameterType:="query")>
Public Overridable Property IncludeDeliveryOptions As Nullable(Of Boolean)
'''<Summary>
'''If set to true, each instrument will include a list of maintenance options. Defaults to False.
'''</Summary>
<DataMember>
<ApiMember(DataType:="boolean", Description:="If set to true, each instrument will include a list of maintenance options. Defaults to False.", Name:="IncludeMaintenanceOptions", ParameterType:="query")>
Public Overridable Property IncludeMaintenanceOptions As Nullable(Of Boolean)
End Class
<DataContract>
Public Partial Class C2BGetInstrumentInfoResponse
Inherits BaseResponse
Public Sub New()
Instruments = New List(Of C2BInstrumentGeneric)
End Sub
<DataMember>
Public Overridable Property Instruments As List(Of C2BInstrumentGeneric)
End Class
End Namespace
End Namespace
VB.NET C2BGetInstrumentInfoRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/C2BGetInstrumentInfo HTTP/1.1
Host: active-ewebservice.biz
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<C2BGetInstrumentInfoRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AIM.WebService">
<ApiKey>String</ApiKey>
<OAuthToken>String</OAuthToken>
<AppId>String</AppId>
<DeviceId>String</DeviceId>
<Token>String</Token>
<GetDetails>false</GetDetails>
<IncludeAccessoryOptions>false</IncludeAccessoryOptions>
<IncludeDeliveryOptions>false</IncludeDeliveryOptions>
<IncludeMaintenanceOptions>false</IncludeMaintenanceOptions>
<IncludeOutOfStockItems>false</IncludeOutOfStockItems>
<PlanCode>String</PlanCode>
<RsiPk>0</RsiPk>
<TeacherId>0</TeacherId>
</C2BGetInstrumentInfoRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <C2BGetInstrumentInfoResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AIM.WebService"> <Status> <DomainName>String</DomainName> <ErrorCode>String</ErrorCode> <ErrorDisplayText>String</ErrorDisplayText> <ErrorMessage>String</ErrorMessage> <IpAddress>String</IpAddress> <Login>String</Login> <StatusCode>String</StatusCode> </Status> <Instruments xmlns:d2p1="http://schemas.datacontract.org/2004/07/AIM"> <d2p1:C2BInstrumentGeneric i:nil="true" /> </Instruments> </C2BGetInstrumentInfoResponse>