Class BetaReferralCustomerService
java.lang.Object
com.easypost.service.BetaReferralCustomerService
-
Method Summary
Modifier and TypeMethodDescriptionaddPaymentMethod
(String stripeCustomerId, String paymentMethodReference) Add Stripe payment method to referral customer.addPaymentMethod
(String stripeCustomerId, String paymentMethodReference, PaymentMethod.Priority primaryOrSecondary) Add Stripe payment method to referral customer.refundByAmount
(int refundAmount) Refund by amount for a recent payment.refundByPaymentLog
(String paymentLogId) Refund a payment by a payment log ID.
-
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
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
Refund a payment by a payment log ID.- Parameters:
paymentLogId
- ID of the payment log.- Returns:
- BetaPaymentRefund object.
- Throws:
EasyPostException
- When the request fails.
-