| GET | /api/settlement/{Id} | Get specific Settlement by Settlement Id |
|---|
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports DX.STF.Application.ClientApi.Messages.Settlement
Imports DX.STF.Models.Dto.GS1
Namespace Global
Namespace DX.STF.Application.ClientApi.Messages.Settlement
'''<Summary>
'''Settlement
'''</Summary>
<Api(Description:="Settlement")>
<ApiResponse(Description:="Settlement data", IsDefaultResponse:=true, StatusCode:=200)>
<ApiResponse(Description:="No Content", ResponseType:=GetType(IReturnVoid), StatusCode:=204)>
<ApiResponse(Description:="Specified argument was out of the range of valid values.", ResponseType:=GetType(ArgumentOutOfRangeException), StatusCode:=400)>
Public Partial Class GetSettlementById
Implements IGetDocumentById
'''<Summary>
'''Settlement ID or Token
'''</Summary>
<ApiMember(Description:="Settlement ID or Token", ExcludeInSchema:=true, ParameterType:="path")>
Public Overridable Property Id As Guid
End Class
End Namespace
Namespace DX.STF.Models.Dto.GS1
Public Partial Class Address
Public Overridable Property StreetAddressOne As String
Public Overridable Property StreetAddressTwo As String
Public Overridable Property StreetAddressThree As String
Public Overridable Property City As String
Public Overridable Property PostalCode As String
Public Overridable Property ProvinceCode As String
Public Overridable Property CountryCode As String
End Class
Public Partial Class AdjustmentAndDiscountSummary
Public Overridable Property AmountTotal As Decimal
Public Overridable Property AmountNett As Decimal
Public Overridable Property AmountVat As Decimal
Public Overridable Property ReasonMessage As String
End Class
Public Partial Class AvpList
Public Overridable Property Code As String
Public Overridable Property Value As String
End Class
Public Partial Class BaseDocument
Public Overridable Property CurrencyCode As String
Public Overridable Property CreationDateTime As Date
Public Overridable Property DocumentActionCode As DocumentAction
Public Overridable Property DocumentStatusCode As DocumentStatus
Public Overridable Property DocumentStructureVersion As String
Public Overridable Property LastUpdateDateTime As Date?
Public Overridable Property RevisionNumber As Long?
Public Overridable Property AvpList As List(Of AvpList) = New List(Of AvpList)
End Class
Public Partial Class CommunicationChannel
Public Overridable Property CommunicationChannelCode As String
Public Overridable Property CommunicationChannelName As String
Public Overridable Property CommunicationValue As String
End Class
Public Partial Class Contact
Public Overridable Property ContactTypeCode As String
Public Overridable Property PersonName As String
Public Overridable Property DepartmentName As String
Public Overridable Property JobTitle As String
Public Overridable Property Responsibility As String
Public Overridable Property CommunicationChannel As List(Of CommunicationChannel) = New List(Of CommunicationChannel)
End Class
<DataContract>
Public Partial Class ContactInformation
End Class
Public Partial Class ContentOwner
Public Overridable Property Gln As String
Public Overridable Property AdditionalPartyIdentification As List(Of AvpList) = New List(Of AvpList)
End Class
Public Enum DocumentAction
ADD
CHANGE_BY_REFRESH
DELETE
REJECTED
End Enum
<DataContract>
Public Partial Class DocumentIdentification
<DataMember(Name:="identifier")>
Public Overridable Property Identifier As String
<DataMember(Name:="type")>
Public Overridable Property Type As String
<DataMember(Name:="creationDateAndTime")>
Public Overridable Property CreationDateAndTime As Date
End Class
Public Partial Class DocumentReference
Public Overridable Property CreationDateTime As Date?
Public Overridable Property RevisionNumber As Long?
Public Overridable Property LineItemNumber As Long?
Public Overridable Property EntityIdentification As String
End Class
Public Enum DocumentStatus
ADDITIONAL_TRANSMISSION
COPY
ORIGINAL
End Enum
Public Partial Class Ecom_PartyIdentification
Public Overridable Property AdditionalPartyIdentification As List(Of AvpList) = New List(Of AvpList)
Public Overridable Property Gln As String
End Class
Public Partial Class Ecom_PartyIdentificationType
Public Overridable Property Gln As String
Public Overridable Property Name As String
Public Overridable Property AdditionalPartyIdentification As List(Of AvpList) = New List(Of AvpList)
End Class
Public Partial Class FinancialAccount
Public Overridable Property Number As String
Public Overridable Property NumberTypeCode As String
Public Overridable Property Name As String
End Class
Public Partial Class FinancialInstitutionInformation
Public Overridable Property FinancialInstitutionBranchName As String
Public Overridable Property FinancialInstitutionName As String
Public Overridable Property FinancialRoutingNumber As FinancialRoutingNumber
Public Overridable Property FinancialAccount As FinancialAccount
Public Overridable Property SwiftCode As String
Public Overridable Property ExportersCode As String
End Class
Public Partial Class FinancialRoutingNumber
Public Overridable Property Number As String
Public Overridable Property NumberTypeCode As String
End Class
<DataContract>
Public Partial Class Header
<DataMember(Name:="documentIdentification")>
Public Overridable Property DocumentIdentification As DocumentIdentification
<DataMember(Name:="sender")>
Public Overridable Property Sender As Partner
<DataMember(Name:="receiver")>
Public Overridable Property Receiver As Partner
End Class
<DataContract>
Public Partial Class Identifier
<DataMember(Name:="authority")>
Public Overridable Property Authority As String
<DataMember(Name:="text")>
Public Overridable Property Text As String
End Class
Public Partial Class InvoiceDocumentReference
Inherits DocumentReference
Public Overridable Property InvoiceTypeCode As String
Public Overridable Property ContentOwner As ContentOwner
End Class
<DataContract>
Public Partial Class Partner
<DataMember(Name:="identifier")>
Public Overridable Property Identifier As Identifier
<DataMember(Name:="contactInformation")>
Public Overridable Property ContactInformation As List(Of ContactInformation) = New List(Of ContactInformation)
End Class
Public Partial Class PaymentMethod
Public Overridable Property AutomatedClearingHousePaymentFormat As String
Public Overridable Property PaymentMethodCode As String
Public Overridable Property PaymentMethodIdentification As String
End Class
Public Partial Class Settlement
Inherits BaseDocument
Public Overridable Property BatchIdentification As String
Public Overridable Property PaymentEffectiveDate As Date
Public Overridable Property SettlementCurrency As String
Public Overridable Property SettlementHandlingTypeCode As String
Public Overridable Property TotalAmount As Decimal?
Public Overridable Property PaymentMethod As PaymentMethod
Public Overridable Property Payee As TransactionalParty
Public Overridable Property Payer As TransactionalParty
Public Overridable Property RemitTo As TransactionalParty
Public Overridable Property settlementIdentification As String
Public Overridable Property SettlementLineItem As List(Of SettlementLineItem) = New List(Of SettlementLineItem)
Public Overridable Property Extension As SettlementExtension
End Class
Public Partial Class SettlementAdjustment
Public Overridable Property AdjustmentAmount As Decimal?
Public Overridable Property FinancialAdjusmentReasonPartyRoleCode As String
Public Overridable Property FinancialAdjustmentReasonCode As String
Public Overridable Property TransactionalReference As TransactionalReference
End Class
Public Partial Class SettlementExtension
Public Overridable Property SettlementExtensionLineItem As List(Of SettlementExtensionLineItem) = New List(Of SettlementExtensionLineItem)
Public Overridable Property AdjustmentAndDiscountSummary As List(Of AdjustmentAndDiscountSummary) = New List(Of AdjustmentAndDiscountSummary)
Public Overridable Property TotalAmountSplit As TotalAmountSplit
End Class
Public Partial Class SettlementExtensionLineItem
Public Overridable Property Number As Integer
Public Overridable Property DocumentType As String
Public Overridable Property DocumentNumber As String
Public Overridable Property ItemText As String
End Class
Public Partial Class SettlementLineItem
Public Overridable Property AmountPaid As Decimal?
Public Overridable Property LineItemNumber As Long
Public Overridable Property OriginalAmount As Decimal?
Public Overridable Property SettlementAdjustment As List(Of SettlementAdjustment) = New List(Of SettlementAdjustment)
Public Overridable Property AvpList As AvpList
Public Overridable Property DebitCreditAdvice As DocumentReference
Public Overridable Property Invoice As InvoiceDocumentReference
Public Overridable Property RequestForPayment As DocumentReference
Public Overridable Property SettlementParty As List(Of SettlementParty) = New List(Of SettlementParty)
End Class
Public Partial Class SettlementMessage
Public Overridable Property Header As Header
Public Overridable Property Settlement As Settlement
End Class
Public Partial Class SettlementParty
Inherits Ecom_PartyIdentification
Public Overridable Property PartyRoleCode As String
End Class
Public Partial Class TotalAmountSplit
Public Overridable Property AmountTotal As Decimal
Public Overridable Property AmountNett As Decimal
Public Overridable Property AmountVat As Decimal
End Class
Public Partial Class TransactionalParty
Inherits Ecom_PartyIdentificationType
Public Overridable Property Contact As List(Of Contact) = New List(Of Contact)
Public Overridable Property Address As Address
Public Overridable Property CommunicationChannel As List(Of AvpList) = New List(Of AvpList)
Public Overridable Property FinancialInstitutionInformation As FinancialInstitutionInformation
Public Overridable Property DutyFeeTaxRegistration As String
Public Overridable Property EntityIdentification As String
End Class
Public Partial Class TransactionalReference
Inherits DocumentReference
Public Overridable Property TransactionalReferenceTypeCode As String
End Class
End Namespace
End Namespace
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.
GET /api/settlement/{Id} HTTP/1.1
Host: stf-api-uat.data-xchange.co.za
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<SettlementMessage xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DX.STF.Models.Dto.GS1">
<Header>
<documentIdentification>
<creationDateAndTime>0001-01-01T00:00:00</creationDateAndTime>
<identifier>String</identifier>
<type>String</type>
</documentIdentification>
<receiver>
<contactInformation>
<ContactInformation />
</contactInformation>
<identifier>
<authority>String</authority>
<text>String</text>
</identifier>
</receiver>
<sender>
<contactInformation>
<ContactInformation />
</contactInformation>
<identifier>
<authority>String</authority>
<text>String</text>
</identifier>
</sender>
</Header>
<Settlement>
<AvpList>
<AvpList>
<Code>String</Code>
<Value>String</Value>
</AvpList>
</AvpList>
<CreationDateTime>0001-01-01T00:00:00</CreationDateTime>
<CurrencyCode>String</CurrencyCode>
<DocumentActionCode>ADD</DocumentActionCode>
<DocumentStatusCode>ADDITIONAL_TRANSMISSION</DocumentStatusCode>
<DocumentStructureVersion>String</DocumentStructureVersion>
<LastUpdateDateTime>0001-01-01T00:00:00</LastUpdateDateTime>
<RevisionNumber>0</RevisionNumber>
<BatchIdentification>String</BatchIdentification>
<Extension>
<AdjustmentAndDiscountSummary>
<AdjustmentAndDiscountSummary>
<AmountNett>0</AmountNett>
<AmountTotal>0</AmountTotal>
<AmountVat>0</AmountVat>
<ReasonMessage>String</ReasonMessage>
</AdjustmentAndDiscountSummary>
</AdjustmentAndDiscountSummary>
<SettlementExtensionLineItem>
<SettlementExtensionLineItem>
<DocumentNumber>String</DocumentNumber>
<DocumentType>String</DocumentType>
<ItemText>String</ItemText>
<Number>0</Number>
</SettlementExtensionLineItem>
</SettlementExtensionLineItem>
<TotalAmountSplit>
<AmountNett>0</AmountNett>
<AmountTotal>0</AmountTotal>
<AmountVat>0</AmountVat>
</TotalAmountSplit>
</Extension>
<Payee>
<AdditionalPartyIdentification>
<AvpList>
<Code>String</Code>
<Value>String</Value>
</AvpList>
</AdditionalPartyIdentification>
<Gln>String</Gln>
<Name>String</Name>
<Address>
<City>String</City>
<CountryCode>String</CountryCode>
<PostalCode>String</PostalCode>
<ProvinceCode>String</ProvinceCode>
<StreetAddressOne>String</StreetAddressOne>
<StreetAddressThree>String</StreetAddressThree>
<StreetAddressTwo>String</StreetAddressTwo>
</Address>
<CommunicationChannel>
<AvpList>
<Code>String</Code>
<Value>String</Value>
</AvpList>
</CommunicationChannel>
<Contact>
<Contact>
<CommunicationChannel>
<CommunicationChannel>
<CommunicationChannelCode>String</CommunicationChannelCode>
<CommunicationChannelName>String</CommunicationChannelName>
<CommunicationValue>String</CommunicationValue>
</CommunicationChannel>
</CommunicationChannel>
<ContactTypeCode>String</ContactTypeCode>
<DepartmentName>String</DepartmentName>
<JobTitle>String</JobTitle>
<PersonName>String</PersonName>
<Responsibility>String</Responsibility>
</Contact>
</Contact>
<DutyFeeTaxRegistration>String</DutyFeeTaxRegistration>
<EntityIdentification>String</EntityIdentification>
<FinancialInstitutionInformation>
<ExportersCode>String</ExportersCode>
<FinancialAccount>
<Name>String</Name>
<Number>String</Number>
<NumberTypeCode>String</NumberTypeCode>
</FinancialAccount>
<FinancialInstitutionBranchName>String</FinancialInstitutionBranchName>
<FinancialInstitutionName>String</FinancialInstitutionName>
<FinancialRoutingNumber>
<Number>String</Number>
<NumberTypeCode>String</NumberTypeCode>
</FinancialRoutingNumber>
<SwiftCode>String</SwiftCode>
</FinancialInstitutionInformation>
</Payee>
<Payer>
<AdditionalPartyIdentification>
<AvpList>
<Code>String</Code>
<Value>String</Value>
</AvpList>
</AdditionalPartyIdentification>
<Gln>String</Gln>
<Name>String</Name>
<Address>
<City>String</City>
<CountryCode>String</CountryCode>
<PostalCode>String</PostalCode>
<ProvinceCode>String</ProvinceCode>
<StreetAddressOne>String</StreetAddressOne>
<StreetAddressThree>String</StreetAddressThree>
<StreetAddressTwo>String</StreetAddressTwo>
</Address>
<CommunicationChannel>
<AvpList>
<Code>String</Code>
<Value>String</Value>
</AvpList>
</CommunicationChannel>
<Contact>
<Contact>
<CommunicationChannel>
<CommunicationChannel>
<CommunicationChannelCode>String</CommunicationChannelCode>
<CommunicationChannelName>String</CommunicationChannelName>
<CommunicationValue>String</CommunicationValue>
</CommunicationChannel>
</CommunicationChannel>
<ContactTypeCode>String</ContactTypeCode>
<DepartmentName>String</DepartmentName>
<JobTitle>String</JobTitle>
<PersonName>String</PersonName>
<Responsibility>String</Responsibility>
</Contact>
</Contact>
<DutyFeeTaxRegistration>String</DutyFeeTaxRegistration>
<EntityIdentification>String</EntityIdentification>
<FinancialInstitutionInformation>
<ExportersCode>String</ExportersCode>
<FinancialAccount>
<Name>String</Name>
<Number>String</Number>
<NumberTypeCode>String</NumberTypeCode>
</FinancialAccount>
<FinancialInstitutionBranchName>String</FinancialInstitutionBranchName>
<FinancialInstitutionName>String</FinancialInstitutionName>
<FinancialRoutingNumber>
<Number>String</Number>
<NumberTypeCode>String</NumberTypeCode>
</FinancialRoutingNumber>
<SwiftCode>String</SwiftCode>
</FinancialInstitutionInformation>
</Payer>
<PaymentEffectiveDate>0001-01-01T00:00:00</PaymentEffectiveDate>
<PaymentMethod>
<AutomatedClearingHousePaymentFormat>String</AutomatedClearingHousePaymentFormat>
<PaymentMethodCode>String</PaymentMethodCode>
<PaymentMethodIdentification>String</PaymentMethodIdentification>
</PaymentMethod>
<RemitTo>
<AdditionalPartyIdentification>
<AvpList>
<Code>String</Code>
<Value>String</Value>
</AvpList>
</AdditionalPartyIdentification>
<Gln>String</Gln>
<Name>String</Name>
<Address>
<City>String</City>
<CountryCode>String</CountryCode>
<PostalCode>String</PostalCode>
<ProvinceCode>String</ProvinceCode>
<StreetAddressOne>String</StreetAddressOne>
<StreetAddressThree>String</StreetAddressThree>
<StreetAddressTwo>String</StreetAddressTwo>
</Address>
<CommunicationChannel>
<AvpList>
<Code>String</Code>
<Value>String</Value>
</AvpList>
</CommunicationChannel>
<Contact>
<Contact>
<CommunicationChannel>
<CommunicationChannel>
<CommunicationChannelCode>String</CommunicationChannelCode>
<CommunicationChannelName>String</CommunicationChannelName>
<CommunicationValue>String</CommunicationValue>
</CommunicationChannel>
</CommunicationChannel>
<ContactTypeCode>String</ContactTypeCode>
<DepartmentName>String</DepartmentName>
<JobTitle>String</JobTitle>
<PersonName>String</PersonName>
<Responsibility>String</Responsibility>
</Contact>
</Contact>
<DutyFeeTaxRegistration>String</DutyFeeTaxRegistration>
<EntityIdentification>String</EntityIdentification>
<FinancialInstitutionInformation>
<ExportersCode>String</ExportersCode>
<FinancialAccount>
<Name>String</Name>
<Number>String</Number>
<NumberTypeCode>String</NumberTypeCode>
</FinancialAccount>
<FinancialInstitutionBranchName>String</FinancialInstitutionBranchName>
<FinancialInstitutionName>String</FinancialInstitutionName>
<FinancialRoutingNumber>
<Number>String</Number>
<NumberTypeCode>String</NumberTypeCode>
</FinancialRoutingNumber>
<SwiftCode>String</SwiftCode>
</FinancialInstitutionInformation>
</RemitTo>
<SettlementCurrency>String</SettlementCurrency>
<SettlementHandlingTypeCode>String</SettlementHandlingTypeCode>
<SettlementLineItem>
<SettlementLineItem>
<AmountPaid>0</AmountPaid>
<AvpList>
<Code>String</Code>
<Value>String</Value>
</AvpList>
<DebitCreditAdvice>
<CreationDateTime>0001-01-01T00:00:00</CreationDateTime>
<EntityIdentification>String</EntityIdentification>
<LineItemNumber>0</LineItemNumber>
<RevisionNumber>0</RevisionNumber>
</DebitCreditAdvice>
<Invoice>
<CreationDateTime>0001-01-01T00:00:00</CreationDateTime>
<EntityIdentification>String</EntityIdentification>
<LineItemNumber>0</LineItemNumber>
<RevisionNumber>0</RevisionNumber>
<ContentOwner>
<AdditionalPartyIdentification>
<AvpList>
<Code>String</Code>
<Value>String</Value>
</AvpList>
</AdditionalPartyIdentification>
<Gln>String</Gln>
</ContentOwner>
<InvoiceTypeCode>String</InvoiceTypeCode>
</Invoice>
<LineItemNumber>0</LineItemNumber>
<OriginalAmount>0</OriginalAmount>
<RequestForPayment>
<CreationDateTime>0001-01-01T00:00:00</CreationDateTime>
<EntityIdentification>String</EntityIdentification>
<LineItemNumber>0</LineItemNumber>
<RevisionNumber>0</RevisionNumber>
</RequestForPayment>
<SettlementAdjustment>
<SettlementAdjustment>
<AdjustmentAmount>0</AdjustmentAmount>
<FinancialAdjusmentReasonPartyRoleCode>String</FinancialAdjusmentReasonPartyRoleCode>
<FinancialAdjustmentReasonCode>String</FinancialAdjustmentReasonCode>
<TransactionalReference>
<CreationDateTime>0001-01-01T00:00:00</CreationDateTime>
<EntityIdentification>String</EntityIdentification>
<LineItemNumber>0</LineItemNumber>
<RevisionNumber>0</RevisionNumber>
<TransactionalReferenceTypeCode>String</TransactionalReferenceTypeCode>
</TransactionalReference>
</SettlementAdjustment>
</SettlementAdjustment>
<SettlementParty>
<SettlementParty>
<AdditionalPartyIdentification>
<AvpList>
<Code>String</Code>
<Value>String</Value>
</AvpList>
</AdditionalPartyIdentification>
<Gln>String</Gln>
<PartyRoleCode>String</PartyRoleCode>
</SettlementParty>
</SettlementParty>
</SettlementLineItem>
</SettlementLineItem>
<TotalAmount>0</TotalAmount>
<settlementIdentification>String</settlementIdentification>
</Settlement>
</SettlementMessage>