Describes a subscription plan. A subscription plan represents what you want to sell in a subscription model, and includes references to each of the associated subscription plan variations. For more information, see Subscription Plans and Variations.
CatalogSubscriptionPlan
Name | Type | Tags | Description | Getter | Setter |
---|---|---|---|---|---|
name |
string |
Required | The name of the plan. | getName(): string | setName(string name): void |
phases |
?(SubscriptionPhase[]) |
Optional | A list of SubscriptionPhase containing the SubscriptionPhase for this plan. This field it required. Not including this field will throw a REQUIRED_FIELD_MISSING error |
getPhases(): ?array | setPhases(?array phases): void |
subscriptionPlanVariations |
?(CatalogObject[]) |
Optional | The list of subscription plan variations available for this product | getSubscriptionPlanVariations(): ?array | setSubscriptionPlanVariations(?array subscriptionPlanVariations): void |
eligibleItemIds |
?(string[]) |
Optional | The list of IDs of CatalogItems that are eligible for subscription by this SubscriptionPlan's variations. |
getEligibleItemIds(): ?array | setEligibleItemIds(?array eligibleItemIds): void |
eligibleCategoryIds |
?(string[]) |
Optional | The list of IDs of CatalogCategory that are eligible for subscription by this SubscriptionPlan's variations. |
getEligibleCategoryIds(): ?array | setEligibleCategoryIds(?array eligibleCategoryIds): void |
allItems |
?bool |
Optional | If true, all items in the merchant's catalog are subscribable by this SubscriptionPlan. | getAllItems(): ?bool | setAllItems(?bool allItems): void |
{
"name": "name6",
"phases": [
{
"uid": "uid0",
"cadence": "QUARTERLY",
"periods": 112,
"recurring_price_money": {
"amount": 66,
"currency": "TMT"
},
"ordinal": 78,
"pricing": {
"type": "STATIC",
"discount_ids": [
"discount_ids5",
"discount_ids6"
],
"price_money": {
"amount": 202,
"currency": "CNY"
}
}
},
{
"uid": "uid0",
"cadence": "QUARTERLY",
"periods": 112,
"recurring_price_money": {
"amount": 66,
"currency": "TMT"
},
"ordinal": 78,
"pricing": {
"type": "STATIC",
"discount_ids": [
"discount_ids5",
"discount_ids6"
],
"price_money": {
"amount": 202,
"currency": "CNY"
}
}
},
{
"uid": "uid0",
"cadence": "QUARTERLY",
"periods": 112,
"recurring_price_money": {
"amount": 66,
"currency": "TMT"
},
"ordinal": 78,
"pricing": {
"type": "STATIC",
"discount_ids": [
"discount_ids5",
"discount_ids6"
],
"price_money": {
"amount": 202,
"currency": "CNY"
}
}
}
],
"subscription_plan_variations": [
{
"type": "MODIFIER",
"id": "id4",
"updated_at": "updated_at0",
"version": 208,
"is_deleted": false,
"custom_attribute_values": {
"key0": {
"name": "name8",
"string_value": "string_value2",
"custom_attribute_definition_id": "custom_attribute_definition_id4",
"type": "STRING",
"number_value": "number_value8"
},
"key1": {
"name": "name8",
"string_value": "string_value2",
"custom_attribute_definition_id": "custom_attribute_definition_id4",
"type": "STRING",
"number_value": "number_value8"
},
"key2": {
"name": "name8",
"string_value": "string_value2",
"custom_attribute_definition_id": "custom_attribute_definition_id4",
"type": "STRING",
"number_value": "number_value8"
}
},
"catalog_v1_ids": [
{
"catalog_v1_id": "catalog_v1_id4",
"location_id": "location_id4"
},
{
"catalog_v1_id": "catalog_v1_id4",
"location_id": "location_id4"
},
{
"catalog_v1_id": "catalog_v1_id4",
"location_id": "location_id4"
}
]
},
{
"type": "MODIFIER",
"id": "id4",
"updated_at": "updated_at0",
"version": 208,
"is_deleted": false,
"custom_attribute_values": {
"key0": {
"name": "name8",
"string_value": "string_value2",
"custom_attribute_definition_id": "custom_attribute_definition_id4",
"type": "STRING",
"number_value": "number_value8"
},
"key1": {
"name": "name8",
"string_value": "string_value2",
"custom_attribute_definition_id": "custom_attribute_definition_id4",
"type": "STRING",
"number_value": "number_value8"
},
"key2": {
"name": "name8",
"string_value": "string_value2",
"custom_attribute_definition_id": "custom_attribute_definition_id4",
"type": "STRING",
"number_value": "number_value8"
}
},
"catalog_v1_ids": [
{
"catalog_v1_id": "catalog_v1_id4",
"location_id": "location_id4"
},
{
"catalog_v1_id": "catalog_v1_id4",
"location_id": "location_id4"
},
{
"catalog_v1_id": "catalog_v1_id4",
"location_id": "location_id4"
}
]
}
],
"eligible_item_ids": [
"eligible_item_ids8",
"eligible_item_ids7"
],
"eligible_category_ids": [
"eligible_category_ids5",
"eligible_category_ids6",
"eligible_category_ids7"
],
"all_items": false
}