Ejemplo n.º 1
0
        /// <summary>
        /// update SEPABankAccount
        /// </summary>
        /// <param name="SEPABankAccount">SEPABankAccount</param>
        /// <returns>SEPABankAccount</returns>
        public SEPABankAccounts update(SEPABankAccounts account)
        {
            account.setRequiredFields(new List <string> {
                CustomerVaultConstants.profileId
            });
            account.checkRequiredFields();
            account.setOptionalFields(new List <string> {
                CustomerVaultConstants.nickName,
                CustomerVaultConstants.merchantRefNum,
                CustomerVaultConstants.accountHolderName,
                CustomerVaultConstants.iban,
                CustomerVaultConstants.bic,
                CustomerVaultConstants.billingAddressId,
            });

            Request request = new Request(
                method: RequestType.PUT,
                uri: this.prepareURI("/profiles/" + account.profileId() + "/sepabankaccounts/" + account.id()),
                body: account
                );
            dynamic response = this.client.processRequest(request);

            SEPABankAccounts returnVal = new SEPABankAccounts(response);

            returnVal.profileId(account.profileId());
            return(returnVal);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///Delete SEPABankAccount
        /// </summary>
        /// <param name="SEPABankAccount">SEPABankAccount</param>
        /// <returns>bool</returns>
        public bool delete(SEPABankAccounts account)
        {
            account.setRequiredFields(new List <string> {
                CustomerVaultConstants.profileId,
                CustomerVaultConstants.id
            });
            account.checkRequiredFields();

            Request request = new Request(
                method: RequestType.DELETE,
                uri: this.prepareURI("/profiles/" + account.profileId() + "/sepabankaccounts/" + account.id())
                );

            this.client.processRequest(request);
            return(true);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Get SEPABankAccount
        /// </summary>
        /// <param name="SEPABankAccount">SEPABankAccount</param>
        /// <returns>SEPABankAccount</returns>
        public SEPABankAccounts get(SEPABankAccounts account)
        {
            account.setRequiredFields(new List <string> {
                CustomerVaultConstants.billingAddressId,
                CustomerVaultConstants.id
            });
            account.checkRequiredFields();
            Request request = new Request(
                method: RequestType.GET,
                uri: this.prepareURI("/profiles/" + account.profileId() + "/sepabankaccounts/" + account.id())
                );

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

            SEPABankAccounts returnVal = new SEPABankAccounts(response);

            returnVal.profileId(account.profileId());
            return(returnVal);
        }