forked from LiveCarta/PayPal-PHP-Server-SDK
* Automated commit message * Automated commit message * add changelog --------- Co-authored-by: PayPalServerSDKs <server-sdks@paypal.com>
4.4 KiB
4.4 KiB
Subscription
The subscription details.
Structure
Subscription
Fields
| Name | Type | Tags | Description | Getter | Setter |
|---|---|---|---|---|---|
id |
?string |
Optional | The PayPal-generated ID for the subscription. Constraints: Minimum Length: 3, Maximum Length: 50 |
getId(): ?string | setId(?string id): void |
planId |
?string |
Optional | The ID of the plan. Constraints: Minimum Length: 3, Maximum Length: 50 |
getPlanId(): ?string | setPlanId(?string planId): void |
startTime |
?string |
Optional | The date and time, in Internet date and time format. Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates. Constraints: Minimum Length: 20, Maximum Length: 64, Pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$ |
getStartTime(): ?string | setStartTime(?string startTime): void |
quantity |
?string |
Optional | The quantity of the product in the subscription. Constraints: Minimum Length: 1, Maximum Length: 32, Pattern: ^([0-9]+|([0-9]+)?[.][0-9]+)$ |
getQuantity(): ?string | setQuantity(?string quantity): void |
shippingAmount |
?Money |
Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getShippingAmount(): ?Money | setShippingAmount(?Money shippingAmount): void |
subscriber |
?Subscriber |
Optional | The subscriber response information. | getSubscriber(): ?Subscriber | setSubscriber(?Subscriber subscriber): void |
billingInfo |
?SubscriptionBillingInformation |
Optional | The billing details for the subscription. If the subscription was or is active, these fields are populated. | getBillingInfo(): ?SubscriptionBillingInformation | setBillingInfo(?SubscriptionBillingInformation billingInfo): void |
createTime |
?string |
Optional | The date and time, in Internet date and time format. Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates. Constraints: Minimum Length: 20, Maximum Length: 64, Pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$ |
getCreateTime(): ?string | setCreateTime(?string createTime): void |
updateTime |
?string |
Optional | The date and time, in Internet date and time format. Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates. Constraints: Minimum Length: 20, Maximum Length: 64, Pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$ |
getUpdateTime(): ?string | setUpdateTime(?string updateTime): void |
customId |
?string |
Optional | The custom id for the subscription. Can be invoice id. Constraints: Minimum Length: 1, Maximum Length: 127, Pattern: ^[\x20-\x7E]+ |
getCustomId(): ?string | setCustomId(?string customId): void |
planOverridden |
?bool |
Optional | Indicates whether the subscription has overridden any plan attributes. | getPlanOverridden(): ?bool | setPlanOverridden(?bool planOverridden): void |
plan |
?PlanDetails |
Optional | The plan details. | getPlan(): ?PlanDetails | setPlan(?PlanDetails plan): void |
links |
?(LinkDescription[]) |
Optional | An array of request-related HATEOAS links. | getLinks(): ?array | setLinks(?array links): void |
Example (as JSON)
{
"id": "id4",
"plan_id": "plan_id6",
"start_time": "start_time8",
"quantity": "quantity0",
"shipping_amount": {
"currency_code": "currency_code0",
"value": "value6"
}
}