Package com.easypost.service
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.Creates a client secret to use with Stripe when adding a bank account.createBankAccountClientSecret
(String returnUrl) Creates a client secret to use with Stripe when adding a bank account.Creates a client secret to use with Stripe when adding a credit card.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.
-
createCreditCardClientSecret
Creates a client secret to use with Stripe when adding a credit card.- Returns:
- ClientSecret containing the client secret.
- Throws:
EasyPostException
- When the request fails.
-
createBankAccountClientSecret
Creates a client secret to use with Stripe when adding a bank account.- Returns:
- ClientSecret containing the client secret.
- Throws:
EasyPostException
- When the request fails.
-
createBankAccountClientSecret
Creates a client secret to use with Stripe when adding a bank account.- Parameters:
returnUrl
- Optional return URL for the bank account setup.- Returns:
- ClientSecret containing the client secret.
- Throws:
EasyPostException
- When the request fails.
-