Class BillingService

java.lang.Object
com.easypost.service.BillingService

public class BillingService extends Object
  • Method Details

    • deletePaymentMethod

      public void deletePaymentMethod(PaymentMethod.Priority priority) throws EasyPostException
      Delete a payment method.
      Parameters:
      priority - Which type of payment method to delete.
      Throws:
      EasyPostException - when the request fails.
    • fundWallet

      public void fundWallet(String amount) throws EasyPostException
      Fund your wallet from the primary payment method.
      Parameters:
      amount - Amount to fund.
      Throws:
      EasyPostException - when the request fails.
    • fundWallet

      public void fundWallet(String amount, PaymentMethod.Priority priority) throws EasyPostException
      Fund your wallet from a specific payment method.
      Parameters:
      amount - Amount to fund.
      priority - which type of payment method to use to fund the wallet.
      Throws:
      EasyPostException - when the request fails.
    • retrievePaymentMethods

      public PaymentMethod retrievePaymentMethods() throws EasyPostException
      List all payment methods for this account.
      Returns:
      an EasyPost.PaymentMethod summary object.
      Throws:
      EasyPostException - when the request fails or billing has not been set up.