Class BetaReferralCustomerService

java.lang.Object
com.easypost.service.BetaReferralCustomerService

public class BetaReferralCustomerService extends Object
  • Method Details

    • addPaymentMethod

      public PaymentMethodObject addPaymentMethod(String stripeCustomerId, String paymentMethodReference) throws EasyPostException
      Add Stripe payment method to referral customer.
      Parameters:
      stripeCustomerId - ID of the Stripe account.
      paymentMethodReference - Reference of Stripe payment method.
      Returns:
      PaymentMethodObject object.
      Throws:
      EasyPostException - When the request fails.
    • addPaymentMethod

      public PaymentMethodObject addPaymentMethod(String stripeCustomerId, String paymentMethodReference, PaymentMethod.Priority primaryOrSecondary) throws EasyPostException
      Add Stripe payment method to referral customer.
      Parameters:
      stripeCustomerId - ID of the Stripe account.
      paymentMethodReference - Reference of Stripe payment method.
      primaryOrSecondary - Primary or secondary of this payment method.
      Returns:
      PaymentMethodObject object.
      Throws:
      EasyPostException - When the request fails.
    • refundByAmount

      public BetaPaymentRefund refundByAmount(int refundAmount) throws EasyPostException
      Refund by amount for a recent payment.
      Parameters:
      refundAmount - Amount to be refunded by cents.
      Returns:
      BetaPaymentRefund object.
      Throws:
      EasyPostException - When the request fails.
    • refundByPaymentLog

      public BetaPaymentRefund refundByPaymentLog(String paymentLogId) throws EasyPostException
      Refund a payment by a payment log ID.
      Parameters:
      paymentLogId - ID of the payment log.
      Returns:
      BetaPaymentRefund object.
      Throws:
      EasyPostException - When the request fails.