SubscriptionsApi class
Subscriptions API interface
Constructors
- SubscriptionsApi(PayPalHttpClient payPalHttpClient)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
activatePlan(
String planId) → Future< void> - Activates a plan.
-
activateSubscription(
String subscriptionId, String reason) → Future< void> - Activates the subscription.
-
cancelSubscription(
String subscriptionId, String reason) → Future< void> - Cancels the subscription. Parameter subscriptionId: The ID of the subscription
-
captureAuthorizedPaymentOnSubscription(
String subscriptionId, SubscriptionCaptureRequest request, {String? payPalRequestId}) → Future< Transaction> - Captures an authorized payment from the subscriber on the subscription.
-
createPlan(
PlanRequest planRequest, {String? payPalRequestId}) → Future< Plan> - Creates a plan that defines pricing and billing cycle details for subscriptions.
-
createSubscription(
SubscriptionRequest request, {String? payPalRequestId, Prefer? prefer}) → Future< Subscription> - Creates a subscription.
-
deactivatePlan(
String planId) → Future< void> - Deactivates a plan.
-
listPlans(
{String? productId, String? planIds, int? pageSize, int? page, bool? totalRequired}) → Future< PlanCollection> - Lists billing plans.
-
listTransactions(
String subscriptionId, String startTime, String endTime) → Future< TransactionsList> - Lists transactions for a subscription.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reviseSubscription(
String subscriptionId, SubscriptionReviseRequest request) → Future< SubscriptionReviseResponse> - Updates the quantity of the product or service in a subscription. You can also use this method to switch the plan and update the shipping_amount, shipping_address values for the subscription. This type of update requires the buyer's consent.
-
showPlanDetails(
String planId) → Future< Plan> - Shows details for a plan.
-
showSubscriptionDetails(
String subscriptionId, {List< String> ? fields}) → Future<Subscription> - Shows details for a subscription, by ID.
-
suspendSubscription(
String subscriptionId, Reason reason) → Future< void> - Suspends the subscription.
-
toString(
) → String -
A string representation of this object.
inherited
-
updatePlan(
String planId, List< Patch> patchRequests) → Future<void> - Updates a plan with the CREATED or ACTIVE status. For an INACTIVE plan, you can make only status updates. You can patch these attributes and objects:
-
updatePlanPricing(
String planId, PricingSchemesUpdateRequest pricingSchemes) → Future< void> - Updates pricing for a plan. For example, you can update a regular billing cycle from $5 per month to $7 per month.
-
updateSubscription(
String subscriptionId, List< Patch> patchRequests) → Future<void> - Updates a subscription which could be in ACTIVE or SUSPENDED status. You can override plan level default attributes by providing customised values for plan path in the patch request.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited