| POST | /authenticatedUrl |
|---|
import Foundation
import ServiceStack
public class AuthenticatedUrl : ServiceRequestBase
{
/**
* The cmc Id
*/
// @ApiMember(Description="The cmc Id", IsRequired=true)
public var cmcId:String?
/**
* The association Id
*/
// @ApiMember(Description="The association Id")
public var associationId:String?
/**
* The Account number of the property
*/
// @ApiMember(Description="The Account number of the property")
public var propertyAccountNumber:String?
/**
* The User's first name
*/
// @ApiMember(Description="The User's first name")
public var firstName:String?
/**
* The User's last name
*/
// @ApiMember(Description="The User's last name")
public var lastName:String?
/**
* The User's phone number
*/
// @ApiMember(Description="The User's phone number")
public var phone:String?
/**
* The User's email
*/
// @ApiMember(Description="The User's email", IsRequired=true)
public var email:String?
/**
* The vendor's confirmation url
*/
// @ApiMember(Description="The vendor's confirmation url")
public var confirmationUrl:String?
/**
* The nickname of the property
*/
// @ApiMember(Description="The nickname of the property")
public var propertyNickname:String?
/**
* The amount of the payment
*/
// @ApiMember(Description="The amount of the payment")
public var amount:Double?
/**
* The bank account number for the payment
*/
// @ApiMember(Description="The bank account number for the payment")
public var bankAccountNumber:String?
/**
* The bank's routing number
*/
// @ApiMember(Description="The bank's routing number")
public var routingNumber:String?
/**
* The frequency of the payment
*/
// @ApiMember(Description="The frequency of the payment")
public var paymentFrequency:String?
/**
* The stylesheet url
*/
// @ApiMember(Description="The stylesheet url")
public var styleSheet:String?
required public init(){ super.init() }
private enum CodingKeys : String, CodingKey {
case cmcId
case associationId
case propertyAccountNumber
case firstName
case lastName
case phone
case email
case confirmationUrl
case propertyNickname
case amount
case bankAccountNumber
case routingNumber
case paymentFrequency
case styleSheet
}
required public init(from decoder: Decoder) throws {
try super.init(from: decoder)
let container = try decoder.container(keyedBy: CodingKeys.self)
cmcId = try container.decodeIfPresent(String.self, forKey: .cmcId)
associationId = try container.decodeIfPresent(String.self, forKey: .associationId)
propertyAccountNumber = try container.decodeIfPresent(String.self, forKey: .propertyAccountNumber)
firstName = try container.decodeIfPresent(String.self, forKey: .firstName)
lastName = try container.decodeIfPresent(String.self, forKey: .lastName)
phone = try container.decodeIfPresent(String.self, forKey: .phone)
email = try container.decodeIfPresent(String.self, forKey: .email)
confirmationUrl = try container.decodeIfPresent(String.self, forKey: .confirmationUrl)
propertyNickname = try container.decodeIfPresent(String.self, forKey: .propertyNickname)
amount = try container.decodeIfPresent(Double.self, forKey: .amount)
bankAccountNumber = try container.decodeIfPresent(String.self, forKey: .bankAccountNumber)
routingNumber = try container.decodeIfPresent(String.self, forKey: .routingNumber)
paymentFrequency = try container.decodeIfPresent(String.self, forKey: .paymentFrequency)
styleSheet = try container.decodeIfPresent(String.self, forKey: .styleSheet)
}
public override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
var container = encoder.container(keyedBy: CodingKeys.self)
if cmcId != nil { try container.encode(cmcId, forKey: .cmcId) }
if associationId != nil { try container.encode(associationId, forKey: .associationId) }
if propertyAccountNumber != nil { try container.encode(propertyAccountNumber, forKey: .propertyAccountNumber) }
if firstName != nil { try container.encode(firstName, forKey: .firstName) }
if lastName != nil { try container.encode(lastName, forKey: .lastName) }
if phone != nil { try container.encode(phone, forKey: .phone) }
if email != nil { try container.encode(email, forKey: .email) }
if confirmationUrl != nil { try container.encode(confirmationUrl, forKey: .confirmationUrl) }
if propertyNickname != nil { try container.encode(propertyNickname, forKey: .propertyNickname) }
if amount != nil { try container.encode(amount, forKey: .amount) }
if bankAccountNumber != nil { try container.encode(bankAccountNumber, forKey: .bankAccountNumber) }
if routingNumber != nil { try container.encode(routingNumber, forKey: .routingNumber) }
if paymentFrequency != nil { try container.encode(paymentFrequency, forKey: .paymentFrequency) }
if styleSheet != nil { try container.encode(styleSheet, forKey: .styleSheet) }
}
}
// @DataContract
public class ServiceRequestBase : IHasVersion, Codable
{
required public init(){}
}
// @DataContract
public class ServiceResponseBase : Codable
{
/**
* Identifies whether the request executed successfully, however does not indicated requested data was found
*/
// @DataMember
// @ApiMember(Description="Identifies whether the request executed successfully, however does not indicated requested data was found")
public var isSuccessful:Bool?
/**
* The status code returned by the service
*/
// @DataMember
// @ApiMember(Description="The status code returned by the service")
public var statusCode:Int?
/**
* The status message returned by the service
*/
// @DataMember
// @ApiMember(Description="The status message returned by the service")
public var statusMessage:String?
// @DataMember
// @ApiMember(ExcludeInSchema=true)
public var serviceDebugFields:[String:String] = [:]
required public init(){}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /authenticatedUrl HTTP/1.1
Host: services.allianceassociationbank.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
CmcId: String,
AssociationId: String,
PropertyAccountNumber: String,
FirstName: String,
LastName: String,
Phone: String,
Email: String,
ConfirmationUrl: String,
PropertyNickname: String,
Amount: 0,
BankAccountNumber: String,
RoutingNumber: String,
PaymentFrequency: String,
StyleSheet: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
IsSuccessful: False,
StatusCode: 0,
StatusMessage: String,
ServiceDebugFields:
{
ApiServiceHost: WAB-WEBPW02,
ApiServiceHostVersion: 1.0.0.0
}
}