| GET | /v1.1/Donations/Get/{id} | ||
|---|---|---|---|
| GET | /v1.2/Donations/Get/{id} |
import Foundation
import ServiceStack
public class GetDonation : GetDonation, IReturnLegacyException
{
required public init(){ super.init() }
required public init(from decoder: Decoder) throws {
try super.init(from: decoder)
}
public override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
}
}
public class DonationReceiptsResponse : Codable
{
public var id:Int?
public var status:String?
public var campaignName:String?
public var campaignId:Int?
public var date:String?
public var amount:Double?
public var creditCard:CreditCardUsed?
public var location:DonationLocation?
public var transaction:DonationTransaction?
required public init(){}
}
public class CreditCardUsed : Codable
{
public var cardHolderName:String?
public var icon:String?
public var captureSource:String?
public var last4Digits:String?
public var type:String?
required public init(){}
}
public class DonationLocation : Codable
{
public var longitude:Double?
public var latitude:Double?
required public init(){}
}
public class DonationTransaction : Codable
{
public var id:Int?
public var status:String?
public var detailUri:String?
public var cancelUri:String?
public var createdBy:Int?
public var clientId:Int?
public var groupId:Int?
required public init(){}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1.1/Donations/Get/{id} HTTP/1.1
Host: devapi.billhighway.com
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"Id":0,"Status":"String","CampaignName":"String","CampaignId":0,"Date":"String","Amount":0,"CreditCard":{"CardHolderName":"String","Icon":"String","CaptureSource":"String","Last4Digits":"String","Type":"String"},"Location":{"Longitude":0,"Latitude":0},"Transaction":{"Id":0,"Status":"String","DetailUri":"String","CancelUri":"String","CreatedBy":0,"ClientId":0,"GroupId":0}}