API Rechnung erstellen
Last updated
by
Jürgen Weisental
**Rechnung in Dikas erstellen**
/rest/online/\[API Key OnlineOrder\]/pay
Bsp.
{ "Positions": [ {
"ArticleName": "Whiskey Sour",
"Count": 1,
"SingleAmount": 2.21
}, {
"ArticleId": "100",
"Count": 1
}]
}
curl -H "Content-Type: application/json" -X POST -d "{ 'Positions': \[ { 'ArticleName': 'Whiskey Sour', 'Count': 1, 'SingleAmount': 2.21 }, { 'ArticleId': '100', 'Count': 1 }\]}" https://demo.portal.dikas.de/rest/online/kAPrRKFEgH7PfPpy1AxP/pay
Wird eine ArticleId übergeben und der SingleAmount 0 verwendet das
System den aktuellen Preis.
public class PaymentJob {
public string PaymentType { get; set; }
public List<Payments> Payments { get; set; }
public string Comment { get; set; }
public List<OnlinePosition> Positions { get; set; }
public string Currency { get; set; }
public BonAddress Address { get; set; }
public string ExternId { get; set; }
public double Amount { get; set; }
public string PersonalExtId {get; set;}
public string PersonalFirstname {get; set;}
public string PersonalLastname {get; set;}
public string PrinterId {get; set;}
public string WorplaceName {get; set;}
}
public class OnlinePosition {
public string ArticleId { get; set; }
public string ArticleName { get; set; }
public double Count { get; set; }
public double SingleAmount { get; set; }
public List<OnlineArticleExtra> ExtraOptions { get; set; }
public string ExtraDescription { get; set; }
}
public class OnlineArticleExtra {
public int Count { get; set; }
public string GroupName { get; set; }
public string Id { get; set; }
public string Name { get; set; }
public double Price { get; set; }
}
public class BonAddress {
public string Id { get; set; }
public string Company { get; set; }
public string Company2 { get; set; }
public string Country { get; set; }
public string Firstname { get; set; }
public string Lastname { get; set; }
public string MobilPhone { get; set; }
public string Phone { get; set; }
public string Street { get; set; }
public string Street2 { get; set; }
public string StreetId { get; set; }
public string Zip { get; set; }
public string City { get; set; }
public string EMail { get; set; }
}
public class Payments {
public string PaymentType { get; set; }
public double Amount { get; set; }
}
public class PayResult {
public bool IsOk { get; set; }
public string Message { get; set; }
public CashpointBon Data { get; set; }
}
public class CashpointBon {
public double Amount { get; set; }
public double AmountGiven { get; set; }
public int BonId { get; set; }
public string Comment { get; set; }
public string Source { get; set; }
public DateTime CreateDate { get; set; }
public string CustomerId { get; set; }
public string PaymentType { get; set; }
public string PersonalId { get; set; }
public string PersonalName { get; set; }
public List<CashPointPosition> Positions { get; set; }
public BonAddress Recipient { get; set; }
public string TableName { get; set; }
public string WorkplaceName { get; set; }
public string PDFLink {get;set;}
}
·