Skip to content

Latest commit

 

History

History
49 lines (41 loc) · 2.08 KB

allocate-components.md

File metadata and controls

49 lines (41 loc) · 2.08 KB

Allocate Components

Structure

AllocateComponents

Fields

Name Type Tags Description
ProrationUpgradeScheme *string Optional -
ProrationDowngradeScheme *string Optional -
Allocations []models.CreateAllocation Optional -
AccrueCharge *bool Optional -
UpgradeCharge models.Optional[models.CreditType] Optional The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: full, prorated, none.
DowngradeCredit models.Optional[models.CreditType] Optional The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: full, prorated, none.
PaymentCollectionMethod *models.CollectionMethod Optional (Optional) If not passed, the allocation(s) will use the payment collection method on the subscription
InitiateDunning *bool Optional If true, if the immediate component payment fails, initiate dunning for the subscription.
Otherwise, leave the charges on the subscription to pay for at renewal.

Example (as JSON)

{
  "proration_upgrade_scheme": "proration_upgrade_scheme2",
  "proration_downgrade_scheme": "proration_downgrade_scheme0",
  "allocations": [
    {
      "quantity": 26.48,
      "component_id": 242,
      "memo": "memo6",
      "proration_downgrade_scheme": "proration_downgrade_scheme0",
      "proration_upgrade_scheme": "proration_upgrade_scheme2",
      "accrue_charge": false
    },
    {
      "quantity": 26.48,
      "component_id": 242,
      "memo": "memo6",
      "proration_downgrade_scheme": "proration_downgrade_scheme0",
      "proration_upgrade_scheme": "proration_upgrade_scheme2",
      "accrue_charge": false
    }
  ],
  "accrue_charge": false,
  "upgrade_charge": "full"
}