| POST | /signup/api/nat/{natID}/group/{groupID}/subscription | ||
|---|---|---|---|
| POST | /signup/api/nat/{natID}/group/{groupID}/{userType}/user/{userID}/subscription |
namespace BH.CloudAPI.Common4.DTO.SalesForce
open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type SubscriberFormField() =
member val Name:String = null with get,set
member val Value:String = null with get,set
[<AllowNullLiteral>]
type SubscriberFormData() =
member val FormTemplateID:Int32 = new Int32() with get,set
member val SignupTypeID:Int32 = new Int32() with get,set
member val FormFields:ResizeArray<SubscriberFormField> = new ResizeArray<SubscriberFormField>() with get,set
[<AllowNullLiteral>]
type SubscriptionInformation() =
member val FrequencyID:Int32 = new Int32() with get,set
member val SubscriptionInvoiceID:Int32 = new Int32() with get,set
member val AutoRenew:Boolean = new Boolean() with get,set
member val HasAgreedToTerms:Boolean = new Boolean() with get,set
member val ClientSubscriberId:String = null with get,set
member val RenewedMemberSubscriptionInvID:Int32 = new Int32() with get,set
[<AllowNullLiteral>]
type ClientVerification() =
member val Provider:String = null with get,set
member val VerificationCode:String = null with get,set
[<AllowNullLiteral>]
type CcPaymentInformation() =
member val CardNumber:String = null with get,set
member val Cvv:String = null with get,set
member val ExpMonth:Int32 = new Int32() with get,set
member val ExpYear:Int32 = new Int32() with get,set
member val CardholderName:String = null with get,set
member val Country:String = null with get,set
member val BillingAddress:String = null with get,set
member val Address1:String = null with get,set
member val Address2:String = null with get,set
member val City:String = null with get,set
member val StateProvince:String = null with get,set
member val PostalCode:String = null with get,set
[<AllowNullLiteral>]
type AchPaymentInformation() =
member val AccountHolderName:String = null with get,set
member val CheckNumber:String = null with get,set
member val RoutingNumber:String = null with get,set
member val AccountNumber:String = null with get,set
member val AccountType:String = null with get,set
[<AllowNullLiteral>]
type CampaignInformation() =
member val CampaignId:Int32 = new Int32() with get,set
member val CampaignName:String = null with get,set
member val Amount:Decimal = new Decimal() with get,set
member val ChapPayID:String = null with get,set
[<AllowNullLiteral>]
type BillMeLaterInformation() =
member val IsBillMeLaterPayment:Boolean = new Boolean() with get,set
member val IsBillMeLaterSubscription:Boolean = new Boolean() with get,set
member val MemberSubscriptionInvId:Int32 = new Int32() with get,set
member val Campaigns:ResizeArray<CampaignInformation> = new ResizeArray<CampaignInformation>() with get,set
[<AllowNullLiteral>]
type SubscriptionCreateRq() =
member val NatID:Int32 = new Int32() with get,set
member val GroupID:Int32 = new Int32() with get,set
member val ClientGroupID:String = null with get,set
member val UserType:String = null with get,set
member val UserID:String = null with get,set
member val FormData:SubscriberFormData = null with get,set
member val SubscriptionInfo:SubscriptionInformation = null with get,set
member val VerificationInfo:ClientVerification = null with get,set
member val CcPaymentInfo:CcPaymentInformation = null with get,set
member val AchPaymentInfo:AchPaymentInformation = null with get,set
member val BillMeLater:BillMeLaterInformation = null with get,set
member val Campaigns:ResizeArray<CampaignInformation> = new ResizeArray<CampaignInformation>() with get,set
[<AllowNullLiteral>]
type SubscriptionCreateRs() =
member val IsSuccess:Boolean = new Boolean() with get,set
member val UniqueId:String = null with get,set
member val CreatedDateTime:DateTime = new DateTime() with get,set
member val ClientId:Int32 = new Int32() with get,set
member val BillhighwayUserId:Int32 = new Int32() with get,set
member val ConfirmationNumber:String = null with get,set
member val PaymentConfirmationNumber:Int64 = new Int64() with get,set
member val SubscriptionConfirmationNumber:Int64 = new Int64() with get,set
member val ErrorCode:String = null with get,set
member val Message:String = null with get,set
member val FriendlyMessage:String = null with get,set
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 /signup/api/nat/{natID}/group/{groupID}/subscription HTTP/1.1
Host: devapi.billhighway.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<SubscriptionCreateRq xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.Subscriptions.Request">
<AchPaymentInfo xmlns:d2p1="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.Subscriptions">
<d2p1:AccountHolderName>String</d2p1:AccountHolderName>
<d2p1:AccountNumber>String</d2p1:AccountNumber>
<d2p1:AccountType>String</d2p1:AccountType>
<d2p1:CheckNumber>String</d2p1:CheckNumber>
<d2p1:RoutingNumber>String</d2p1:RoutingNumber>
</AchPaymentInfo>
<BillMeLater xmlns:d2p1="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.Subscriptions">
<d2p1:Campaigns>
<d2p1:CampaignInformation>
<d2p1:Amount>0</d2p1:Amount>
<d2p1:CampaignId>0</d2p1:CampaignId>
<d2p1:CampaignName>String</d2p1:CampaignName>
<d2p1:ChapPayID>String</d2p1:ChapPayID>
</d2p1:CampaignInformation>
</d2p1:Campaigns>
<d2p1:IsBillMeLaterPayment>false</d2p1:IsBillMeLaterPayment>
<d2p1:IsBillMeLaterSubscription>false</d2p1:IsBillMeLaterSubscription>
<d2p1:MemberSubscriptionInvId>0</d2p1:MemberSubscriptionInvId>
</BillMeLater>
<Campaigns xmlns:d2p1="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.Subscriptions">
<d2p1:CampaignInformation>
<d2p1:Amount>0</d2p1:Amount>
<d2p1:CampaignId>0</d2p1:CampaignId>
<d2p1:CampaignName>String</d2p1:CampaignName>
<d2p1:ChapPayID>String</d2p1:ChapPayID>
</d2p1:CampaignInformation>
</Campaigns>
<CcPaymentInfo xmlns:d2p1="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.Subscriptions">
<d2p1:Address1>String</d2p1:Address1>
<d2p1:Address2>String</d2p1:Address2>
<d2p1:BillingAddress>String</d2p1:BillingAddress>
<d2p1:CardNumber>String</d2p1:CardNumber>
<d2p1:CardholderName>String</d2p1:CardholderName>
<d2p1:City>String</d2p1:City>
<d2p1:Country>String</d2p1:Country>
<d2p1:Cvv>String</d2p1:Cvv>
<d2p1:ExpMonth>0</d2p1:ExpMonth>
<d2p1:ExpYear>0</d2p1:ExpYear>
<d2p1:PostalCode>String</d2p1:PostalCode>
<d2p1:StateProvince>String</d2p1:StateProvince>
</CcPaymentInfo>
<ClientGroupID>String</ClientGroupID>
<FormData xmlns:d2p1="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.Subscriptions">
<d2p1:FormFields>
<d2p1:SubscriberFormField>
<d2p1:_x003C_FormTemplateFieldID_x003E_k__BackingField>0</d2p1:_x003C_FormTemplateFieldID_x003E_k__BackingField>
<d2p1:_x003C_Name_x003E_k__BackingField>String</d2p1:_x003C_Name_x003E_k__BackingField>
<d2p1:_x003C_Value_x003E_k__BackingField>String</d2p1:_x003C_Value_x003E_k__BackingField>
</d2p1:SubscriberFormField>
</d2p1:FormFields>
<d2p1:FormTemplateID>0</d2p1:FormTemplateID>
<d2p1:SignupTypeID>0</d2p1:SignupTypeID>
</FormData>
<GroupID>0</GroupID>
<NatID>0</NatID>
<SubscriptionInfo xmlns:d2p1="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.Subscriptions">
<d2p1:AutoRenew>false</d2p1:AutoRenew>
<d2p1:ClientSubscriberId>String</d2p1:ClientSubscriberId>
<d2p1:FrequencyID>0</d2p1:FrequencyID>
<d2p1:HasAgreedToTerms>false</d2p1:HasAgreedToTerms>
<d2p1:RenewedMemberSubscriptionInvID>0</d2p1:RenewedMemberSubscriptionInvID>
<d2p1:SubscriptionInvoiceID>0</d2p1:SubscriptionInvoiceID>
</SubscriptionInfo>
<UserID>String</UserID>
<UserType>String</UserType>
<VerificationInfo xmlns:d2p1="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.Subscriptions">
<d2p1:Provider>String</d2p1:Provider>
<d2p1:VerificationCode>String</d2p1:VerificationCode>
</VerificationInfo>
</SubscriptionCreateRq>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <SubscriptionCreateRs xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.Subscriptions.Response"> <BillhighwayUserId>0</BillhighwayUserId> <ClientId>0</ClientId> <ConfirmationNumber>String</ConfirmationNumber> <CreatedDateTime>0001-01-01T00:00:00</CreatedDateTime> <ErrorCode>String</ErrorCode> <FriendlyMessage>String</FriendlyMessage> <IsSuccess>false</IsSuccess> <Message>String</Message> <PaymentConfirmationNumber>0</PaymentConfirmationNumber> <SubscriptionConfirmationNumber>0</SubscriptionConfirmationNumber> <UniqueId>String</UniqueId> </SubscriptionCreateRs>