Skip to content

Latest commit

 

History

History
52 lines (42 loc) · 2.06 KB

File metadata and controls

52 lines (42 loc) · 2.06 KB

Plan Collection

The list of plans with details.

Structure

PlanCollection

Fields

Name Type Tags Description Getter Setter
Plans List<BillingPlan> Optional An array of plans.

Constraints: Minimum Items: 0, Maximum Items: 32767
List getPlans() setPlans(List plans)
TotalItems Integer Optional The total number of items.

Constraints: >= 0, <= 500000000
Integer getTotalItems() setTotalItems(Integer totalItems)
TotalPages Integer Optional The total number of pages.

Constraints: >= 0, <= 100000000
Integer getTotalPages() setTotalPages(Integer totalPages)
Links List<LinkDescription> Optional, Read-only An array of request-related HATEOAS links.

Constraints: Minimum Items: 1, Maximum Items: 10
List getLinks() setLinks(List links)

Example

import com.paypal.sdk.models.BillingPlan;
import com.paypal.sdk.models.PlanCollection;
import com.paypal.sdk.models.SubscriptionPlanStatus;
import java.util.Arrays;

PlanCollection planCollection = new PlanCollection.Builder()
    .plans(Arrays.asList(
        new BillingPlan.Builder()
            .productId("product_id0")
            .name("name4")
            .status(SubscriptionPlanStatus.INACTIVE)
            .description("description4")
            .build(),
        new BillingPlan.Builder()
            .productId("product_id0")
            .name("name4")
            .status(SubscriptionPlanStatus.INACTIVE)
            .description("description4")
            .build(),
        new BillingPlan.Builder()
            .productId("product_id0")
            .name("name4")
            .status(SubscriptionPlanStatus.INACTIVE)
            .description("description4")
            .build()
    ))
    .totalItems(244)
    .totalPages(24)
    .build();