| POST | /PMI |
|---|
import java.math.*
import java.util.*
import net.servicestack.client.*
open class Pmi
{
var UniqueId:String? = null
var CreatedDateTime:Date? = null
var ClientId:Int? = null
var GroupId:Int? = null
var MemberInfo:Member? = null
var InvoiceCollection:ArrayList<Invoice> = ArrayList<Invoice>()
var CcPaymentInfo:CreditCardPayment? = null
var CreditInfo:CreateApplyCredit? = null
var AchPaymentInfo:AchPayment? = null
var LockboxId:Long? = null
var MemberSubscriptionInvoiceId:Long? = null
}
open class Member
{
var ClassName:String? = null
var UniqueId:String? = null
var CreatedDateTime:Date? = null
var ClientId:Int? = null
var GroupId:String? = null
var UserId:String? = null
var AlternateUserId:String? = null
var BhUserId:Int? = null
var FirstName:String? = null
var LastName:String? = null
var MiddleName:String? = null
var PreferredEmailAddress:String? = null
var OtherEmailAddress:String? = null
var PreferredPhoneNumber:String? = null
var PreferredAddress1:String? = null
var PreferredAddress2:String? = null
var PreferredCity:String? = null
var PreferredState:String? = null
var PreferredZip:String? = null
var PreferredCountry:String? = null
var AccessLevel:String? = null
var MemberStatus:String? = null
var MemberTypeClient:String? = null
var BillingType:String? = null
var FiscalYear:Int? = null
var WorkLocation:String? = null
var DOB:Date? = null
var Paperless:String? = null
var DisplayName:String? = null
var DisableLogin:String? = null
var RecurringInvoiceSettings:RecurringInvoiceSettings? = null
var FormFields:ArrayList<SubscriberFormField> = ArrayList<SubscriberFormField>()
var Attributes:ArrayList<AttributeItem> = ArrayList<AttributeItem>()
var GroupList:ArrayList<Chapter> = ArrayList<Chapter>()
}
open class RecurringInvoiceSettings
{
var DonationAmount:String? = null
}
open class SubscriberFormField
{
var Name:String? = null
var Value:String? = null
}
open class AttributeItem
{
var Name:String? = null
var Value:String? = null
}
open class Chapter
{
var GroupId:String? = null
}
open class Invoice : IInvoiceValidation
{
var UniqueId:String? = null
var ClientId:Int? = null
var GroupId:String? = null
var Description:String? = null
var OpportunityId:String? = null
var Installments:Int? = null
var Frequency:Int? = null
var InvoiceDueDate:Date? = null
var Deliver:Boolean? = null
var UserId:String? = null
var BhUserId:Int? = null
var CurrencyType:String? = null
var InvoiceItems:ArrayList<InvoiceItem> = ArrayList<InvoiceItem>()
var InvoiceNo:Int? = null
var InvoiceAmt:BigDecimal? = null
var ExternalInvBatchNo:String? = null
var ExemptFromLateFee:Boolean? = null
}
open class InvoiceItem : IInvoiceItemValidation
{
var UniqueId:String? = null
var ProductName:String? = null
var AmountDue:BigDecimal? = null
var ProductType:String? = null
var ActPatternTypeID:Int? = null
var TermStartDate:Date? = null
var TermEndDate:Date? = null
var RecognitionPeriod:Int? = null
var RevenueAccount:String? = null
var AccountsReceivableAccount:String? = null
var LiabilityAccount:String? = null
var CreditExpenseAccount:String? = null
var InvoiceClearingAccount:String? = null
var CostCenter:String? = null
var Region:String? = null
}
open class CreditCardPayment : CreditCardPayment()
{
var SubscriptionInfo:SubscriptionParameters? = null
}
open class SubscriptionParameters
{
var FormTemplateID:Int? = null
var SubscriptionInvoiceID:Int? = null
var ClientSubscriberId:String? = null
var SignupTypeID:Int? = null
var FrequencyID:Int? = null
var AutoRenew:Boolean? = null
var CompanyID:Long? = null
var UserID:Int? = null
var ChapMemPayID:Long? = null
var MemberSubscriptionInvID:Long? = null
var Fields:ArrayList<SubscriberFormField> = ArrayList<SubscriberFormField>()
var CreatedBy:Int? = null
var UpdatedBy:Int? = null
var AptifyUpdateType:Int? = null
var RenewedMemberSubscriptionInvID:Long? = null
var ChapId:Int? = null
}
open class CreateApplyCredit
{
var ClassName:String? = null
var UniqueId:String? = null
var CreatedDateTime:Date? = null
var ClientId:Int? = null
var GroupId:String? = null
var UserId:String? = null
var BhUserId:Int? = null
var CreditId:Int? = null
var CurrencyType:String? = null
var CreditType:String? = null
var Notes:String? = null
var InvoiceDetails:ArrayList<SalesForceCreditInvoiceDetails> = ArrayList<SalesForceCreditInvoiceDetails>()
}
open class SalesForceCreditInvoiceDetails
{
var Invoice:Long? = null
var AmountPaid:BigDecimal? = null
var Region:String? = null
var CostCenter:String? = null
}
open class AchPayment
{
var ClassName:String? = null
var UniqueId:String? = null
var CreatedDateTime:Date? = null
var ClientId:Int? = null
var GroupId:String? = null
var UserId:String? = null
var BhUserId:Int? = null
var Amount:BigDecimal? = null
var CurrencyType:String? = null
var Country:String? = null
var RoutingNumber:String? = null
var AccountNumber:String? = null
var AchReference:String? = null
var AccountType:String? = null
var IsSavingsAccount:Boolean? = null
var PayerName:String? = null
var CheckNumber:String? = null
var PreferredEmailAddress:String? = null
var Memo:String? = null
var InvoiceList:ArrayList<SalesForceMemberPaymentInvoiceDetail> = ArrayList<SalesForceMemberPaymentInvoiceDetail>()
var AutoPay:Boolean? = null
var StoreAchInfo:Boolean? = null
var EncryptionTypeId:Int? = null
}
open class SalesForceMemberPaymentInvoiceDetail
{
var ClassName:String? = null
var UniqueId:String? = null
var CreatedDateTime:Date? = null
var ClientId:Int? = null
var Invoice:Int? = null
var AmountPaid:String? = null
}
open class PmiReply : IHaveErrorField
{
var UniqueId:String? = null
var CreatedDateTime:Date? = null
var ClientId:Int? = null
var BillhighwayPaymentConfirmationNumber:String? = null
var BillhighwayUserId:Int? = null
var BhInvoiceBatchId:ArrayList<Int> = ArrayList<Int>()
var ChapMemPayid:Long? = null
var ErrorCode:Int? = null
var ErrorMessage:String? = null
var IsError:Boolean? = null
}
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 /PMI HTTP/1.1
Host: devapi.billhighway.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<Pmi xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.SalesForce">
<AchPaymentInfo>
<AccountNumber>String</AccountNumber>
<AccountType>String</AccountType>
<AchReference>String</AchReference>
<Amount>0</Amount>
<AutoPay>false</AutoPay>
<BhUserId>0</BhUserId>
<CheckNumber>String</CheckNumber>
<ClassName>String</ClassName>
<ClientId>0</ClientId>
<Country>String</Country>
<CreatedDateTime>0001-01-01T00:00:00</CreatedDateTime>
<CurrencyType>String</CurrencyType>
<EncryptionTypeId>0</EncryptionTypeId>
<GroupId>String</GroupId>
<InvoiceList>
<SalesForceMemberPaymentInvoiceDetail>
<AmountPaid>String</AmountPaid>
<ClassName>String</ClassName>
<ClientId>0</ClientId>
<CreatedDateTime>0001-01-01T00:00:00</CreatedDateTime>
<Invoice>0</Invoice>
<UniqueId>String</UniqueId>
</SalesForceMemberPaymentInvoiceDetail>
</InvoiceList>
<Memo>String</Memo>
<PayerName>String</PayerName>
<PreferredEmailAddress>String</PreferredEmailAddress>
<RoutingNumber>String</RoutingNumber>
<StoreAchInfo>false</StoreAchInfo>
<UniqueId>String</UniqueId>
<UserId>String</UserId>
</AchPaymentInfo>
<CcPaymentInfo>
<Address1>String</Address1>
<Address2>String</Address2>
<Amount>String</Amount>
<AutoPay>false</AutoPay>
<BhUserId>0</BhUserId>
<BillingCity>String</BillingCity>
<BillingState>String</BillingState>
<CardReferenceOrCardNumber>String</CardReferenceOrCardNumber>
<CardType>String</CardType>
<ClassName>String</ClassName>
<ClientId>0</ClientId>
<Country>String</Country>
<CreatedDateTime>0001-01-01T00:00:00</CreatedDateTime>
<CurrencyType>String</CurrencyType>
<Cvv>String</Cvv>
<ExpMonth>0</ExpMonth>
<ExpYear>0</ExpYear>
<GroupId>String</GroupId>
<InvoiceList>
<SalesForceMemberPaymentInvoiceDetail>
<AmountPaid>String</AmountPaid>
<ClassName>String</ClassName>
<ClientId>0</ClientId>
<CreatedDateTime>0001-01-01T00:00:00</CreatedDateTime>
<Invoice>0</Invoice>
<UniqueId>String</UniqueId>
</SalesForceMemberPaymentInvoiceDetail>
</InvoiceList>
<Location>String</Location>
<Memo>String</Memo>
<NameOnCard>String</NameOnCard>
<OpportunityId>String</OpportunityId>
<PostalCode>String</PostalCode>
<PreferredEmailAddress>String</PreferredEmailAddress>
<StoreCardInfo>false</StoreCardInfo>
<UniqueId>String</UniqueId>
<UserId>String</UserId>
</CcPaymentInfo>
<ClientId>0</ClientId>
<CreatedDateTime>0001-01-01T00:00:00</CreatedDateTime>
<CreditInfo>
<BhUserId>0</BhUserId>
<ClassName>String</ClassName>
<ClientId>0</ClientId>
<CreatedDateTime>0001-01-01T00:00:00</CreatedDateTime>
<CreditId>0</CreditId>
<CreditType>String</CreditType>
<CurrencyType>String</CurrencyType>
<GroupId>String</GroupId>
<InvoiceDetails>
<SalesForceCreditInvoiceDetails>
<AmountPaid>0</AmountPaid>
<CostCenter>String</CostCenter>
<Invoice>0</Invoice>
<Region>String</Region>
</SalesForceCreditInvoiceDetails>
</InvoiceDetails>
<Notes>String</Notes>
<UniqueId>String</UniqueId>
<UserId>String</UserId>
</CreditInfo>
<GroupId>0</GroupId>
<InvoiceCollection>
<Invoice>
<BhUserId>0</BhUserId>
<ClientId>0</ClientId>
<CurrencyType>String</CurrencyType>
<Deliver>false</Deliver>
<Description>String</Description>
<ExemptFromLateFee>false</ExemptFromLateFee>
<ExternalInvBatchNo>String</ExternalInvBatchNo>
<Frequency>0</Frequency>
<GroupId>String</GroupId>
<Installments>0</Installments>
<InvoiceAmt>0</InvoiceAmt>
<InvoiceDueDate>0001-01-01T00:00:00</InvoiceDueDate>
<InvoiceItems>
<InvoiceItem>
<AmountDue>String</AmountDue>
<ProductName>String</ProductName>
<RevenueAccount>String</RevenueAccount>
</InvoiceItem>
</InvoiceItems>
<InvoiceNo>0</InvoiceNo>
<OpportunityId>String</OpportunityId>
<UniqueId>String</UniqueId>
<UserId>String</UserId>
</Invoice>
</InvoiceCollection>
<LockboxId>0</LockboxId>
<MemberInfo>
<AccessLevel>String</AccessLevel>
<AlternateUserId>String</AlternateUserId>
<Attributes xmlns:d3p1="https://www.billhighway.com/api">
<d3p1:AttributeItem>
<d3p1:Name>String</d3p1:Name>
<d3p1:Value>String</d3p1:Value>
</d3p1:AttributeItem>
</Attributes>
<BhUserId>0</BhUserId>
<BillingType>String</BillingType>
<ClassName>String</ClassName>
<ClientId>0</ClientId>
<CreatedDateTime>0001-01-01T00:00:00</CreatedDateTime>
<DOB>0001-01-01T00:00:00</DOB>
<DisableLogin>String</DisableLogin>
<DisplayName>String</DisplayName>
<FirstName>String</FirstName>
<FiscalYear>0</FiscalYear>
<FormFields>
<SubscriberFormField>
<_x003C_Name_x003E_k__BackingField>String</_x003C_Name_x003E_k__BackingField>
<_x003C_Value_x003E_k__BackingField>String</_x003C_Value_x003E_k__BackingField>
</SubscriberFormField>
</FormFields>
<GroupId>String</GroupId>
<GroupList xmlns:d3p1="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common.DTO">
<d3p1:Chapter>
<d3p1:GroupId>String</d3p1:GroupId>
</d3p1:Chapter>
</GroupList>
<LastName>String</LastName>
<MemberStatus>String</MemberStatus>
<MemberTypeClient>String</MemberTypeClient>
<MiddleName>String</MiddleName>
<OtherEmailAddress>String</OtherEmailAddress>
<Paperless>String</Paperless>
<PreferredAddress1>String</PreferredAddress1>
<PreferredAddress2>String</PreferredAddress2>
<PreferredCity>String</PreferredCity>
<PreferredCountry>String</PreferredCountry>
<PreferredEmailAddress>String</PreferredEmailAddress>
<PreferredPhoneNumber>String</PreferredPhoneNumber>
<PreferredState>String</PreferredState>
<PreferredZip>String</PreferredZip>
<RecurringInvoiceSettings xmlns:d3p1="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common.DTO.Member">
<d3p1:DonationAmount>String</d3p1:DonationAmount>
</RecurringInvoiceSettings>
<UniqueId>String</UniqueId>
<UserId>String</UserId>
<WorkLocation>String</WorkLocation>
</MemberInfo>
<MemberSubscriptionInvoiceId>0</MemberSubscriptionInvoiceId>
<UniqueId>String</UniqueId>
</Pmi>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<PmiReply xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.SalesForce">
<BhInvoiceBatchId xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:int>0</d2p1:int>
</BhInvoiceBatchId>
<BillhighwayPaymentConfirmationNumber>String</BillhighwayPaymentConfirmationNumber>
<BillhighwayUserId>0</BillhighwayUserId>
<ChapMemPayid>0</ChapMemPayid>
<ClientId>0</ClientId>
<CreatedDateTime>0001-01-01T00:00:00</CreatedDateTime>
<ErrorCode>0</ErrorCode>
<ErrorMessage>String</ErrorMessage>
<UniqueId>String</UniqueId>
</PmiReply>