コード例 #1
0
        /// <summary>
        /// Settlement
        /// </summary>
        /// <param name="settlement">Settlement</param>
        /// <returns>Settlement</returns>
        public Settlement settlement(Settlement settle)
        {
            settle.setRequiredFields(new List <string> {
                CardPaymentsConstants.authorizationId
            });
            settle.checkRequiredFields();
            settle.setRequiredFields(new List <string> {
                CardPaymentsConstants.merchantRefNum
            });
            settle.setOptionalFields(new List <string> {
                CardPaymentsConstants.amount,
                CardPaymentsConstants.dupCheck,
                CardPaymentsConstants.airlineTravelDetails
            });

            Request request = new Request(
                method: RequestType.POST,
                uri: this.prepareURI("/auths/" + settle.authorizationId() + "/settlements"),
                body: settle
                );

            dynamic response = this.client.processRequest(request);

            return(new Settlement(response));
        }