A resource representing a bank account that can be used to fund a payment.

See PayPal Developer documentation for more information.

Inheritance: PayPalRelationalObject
Example #1
0
 public static BankAccount GetBankAccount()
 {
     var bankAccount = new BankAccount();
     bankAccount.account_name = "Test Account";
     bankAccount.account_number = "01234567890123456789";
     bankAccount.account_number_type = "BBAN";
     bankAccount.account_type = "CHECKING";
     bankAccount.check_type = "PERSONAL";
     bankAccount.billing_address = AddressTest.GetAddress();
     bankAccount.links = LinksTest.GetLinksList();
     return bankAccount;
 }
Example #2
0
        /// <summary>
        /// Creates a new Bank Account Resource.
        /// </summary>
        /// <param name="apiContext">APIContext used for the API call.</param>
        /// <param name="bankAccount">The BankAccount object specifying the details of the PayPal resource to create.</param>
        /// <returns>BankAccount</returns>
        public static BankAccount Create(APIContext apiContext, BankAccount bankAccount)
        {
            // Validate the arguments to be used in the request
            ArgumentValidator.ValidateAndSetupAPIContext(apiContext);

            // Configure and send the request
            var resourcePath = "v1/vault/bank-accounts";
            return PayPalResource.ConfigureAndExecute<BankAccount>(apiContext, HttpMethod.POST, resourcePath, bankAccount.ConvertToJson());
        }
Example #3
0
 /// <summary>
 /// Delete the bank account resource for the given identifier.
 /// </summary>
 /// <param name="apiContext">APIContext used for the API call.</param>
 public void Delete(APIContext apiContext)
 {
     BankAccount.Delete(apiContext, this.id);
 }
Example #4
0
 /// <summary>
 /// Update information in a previously saved bank account. Only the modified fields need to be passed in the request.
 /// </summary>
 /// <param name="apiContext">APIContext used for the API call.</param>
 /// <param name="patchRequest">PatchRequest</param>
 /// <returns>BankAccount</returns>
 public BankAccount Update(APIContext apiContext, PatchRequest patchRequest)
 {
     return(BankAccount.Update(apiContext, this.id, patchRequest));
 }
Example #5
0
 /// <summary>
 /// Creates a new Bank Account Resource.
 /// </summary>
 /// <param name="apiContext">APIContext used for the API call.</param>
 /// <returns>BankAccount</returns>
 public BankAccount Create(APIContext apiContext)
 {
     return(BankAccount.Create(apiContext, this));
 }