cancel_acct_plan_m
Summary
| API Name | cancel_acct_plan_m |
|---|---|
| Class | account_services_m |
| Update Version | 33 |
Description
Cancels a master (subscription) or supplemental (add-on) plan instance on a specified account. Cancellation stops future billing for the plan. When a master plan is canceled, all its child supplemental plans are also canceled but remain on the account in an unusable state so they can be restored if the parent plan is later reactivated. When all master plans on an account reach a terminal status (Cancelled, Terminated, or Suspended), the account itself is automatically deactivated after the number of days configured in the "Days Before Deactivation" client parameter. Use update_acct_plan_status_m to change plan status without full cancellation, or assign_acct_plan_m to add a replacement plan.
Inputs
| Name | Type | Length | Required | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| client_no | long | 22 | Yes |
Aria-assigned unique identifier indicating the Aria client providing service to this account. |
||||||||||||||||||||||||
| auth_key | string | 32 | No |
Aria-assigned unique key for authenticating the validity of the requestor. This key is passed with each method call. |
||||||||||||||||||||||||
| acct_no | long | 22 | Yes |
Aria-assigned account identifier. This value is unique across all Aria-managed accounts. Alternative required field: client_acct_id |
||||||||||||||||||||||||
| client_receipt_id | string | 50 | No |
Client-defined unique identifier used to track related system actions |
||||||||||||||||||||||||
| plan_instance_no | long | 22 | Yes |
The Master or Supplemental Plans' plan instance number. Alternative required field: client_plan_instance_id |
||||||||||||||||||||||||
| client_plan_instance_id | string | 100 | Yes |
The Master or Supplemental Plans' client-defined plan instance number. Alternative required field: plan_instance_no |
||||||||||||||||||||||||
| assignment_directive | long | 8 | No |
The rule to be applied to this assignment request, governing the proration rule is applied. Default behavior is to make the plan change (assign/deassign a plan to an account, change units on an existing plan, etc.) immediately based on client-defined default proration rule, resulting in appropriate prorated charge and credit. Allowed values:
|
||||||||||||||||||||||||
| comments | string | 500 | No |
Additional explanatory text relating to this API call. |
||||||||||||||||||||||||
| alt_proration_start_date | string | 10 | No |
The date, in yyyy-mm-dd format, from which the proration calculations begin. If this field is NULL, then the proration calculations begin from the current date. This date cannot be before the beginning of the current billing period. |
||||||||||||||||||||||||
| effective_date | string | 10 | No |
If the assignment directive is for a future date assignment, this is the date, in yyyy-mm-dd format, on which the plan change will be executed. If this field is NULL, then the plan change will not happen until it is manually executed or until the effective_date is updated. |
||||||||||||||||||||||||
| offset_interval | long | 4 | No |
If assigning a change on an anniversary day, the number of billing periods by which to delay that change. If the new plan is different from the old plan, and this value is greater than 0, then the billing date continues to be the annniversary date. |
||||||||||||||||||||||||
| invoice_unbilled_usage | string | 5 | No |
Specifies whether to invoice the unbilled usage if a plan is terminated in the middle of a billing period. Allowed values:
|
||||||||||||||||||||||||
| do_write | string | 5 | No |
Boolean indicator that specifies whether to actually perform the requested operation. If 'false' is passed in this field, Aria calculates, if applicable, any potential effects from this call such as proration, plan assignments, etc. and return all relevant data without actually performing the requested operation or making any changes to the account. This is useful to interfaces that want to present the user with a 'confirmation page' informing them of the potential effects of the requested operation prior to actually performing it. Do_write defaults to 'true' Allowed values:
|
||||||||||||||||||||||||
| proration_invoice_timing | long | 1 | No |
Determines whether to create a separate invoice for prorated charges immediately, or defer to the next anniversary date. Note that this will override the Proration Invoice Timing configuration saved with the plan in the product catalog. Allowed values:
|
||||||||||||||||||||||||
| include_plan_instance_queue | string | 5 | No |
Boolean indicator to return the queues created on this api call. Allowed values:
|
||||||||||||||||||||||||
| client_acct_id | string | 50 | Yes |
Client-defined account identifier. Alternative required field: acct_no |
Outputs
| Name | Type | Length | Required | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| error_code | long | No |
Aria-assigned error identifier. 0 indicates no error. |
|||||||||
| error_msg | string | No |
Description of any error that occurred. "OK" if there was no error. |
|||||||||
| proration_result_amount | double | No |
The currency amount of any resulting proration action performed as a result of the requested plan change. For plan assignments with an assignment directive of '1' (perform on anniversary date), or '2' (honor client default proration action) when the default configuration is to not do proration, or '3' (force no proration), the value returned in this field will always be '0'. When proration is performed the value returned in this field will either be a positive currency value (indicating a resulting charge to the account) or a negative currency value (indicating a credit to the account). If the value passed in field do_write is false then any positive or negative value returned in this field is notational only, demonstrating what proration effect would be applied to the account if the requested plan assignment/de-assignment were to be actually performed. Allowed values:
|
|||||||||
| invoice_no | long | No |
The Aria-assigned unique identifier of a given invoice. |
|||||||||
| acct_plan_line_items | object | No | ||||||||||
| total_charges_before_tax | double | No |
Total amount to be charged to the account before taxes have been calculated. |
|||||||||
| total_tax_charges | double | No |
Total taxes as calculated for the amount of the transaction. |
|||||||||
| total_charges_after_tax | double | No |
Total amount to be charged to the account after taxes have been calculated. |
|||||||||
| total_credit | double | No |
The total amount of the credit to be applied to the account |
|||||||||
| total_tax_credit | double | No |
The tax amount of the credit to be applies |
|||||||||
| total_credit_before_tax | double | No |
The credit to be applied before tax is taken into account |
|||||||||
| total | double | No |
The grand total of this invoice |
|||||||||
| proration_credit_result_amount | double | No |
The total pro-rated credit amount |
|||||||||
| proration_credit_amount | double | No |
The non-tax pro-rated credit amount |
|||||||||
| proration_tax_amount | double | No |
The pro-rated tax credit amount |
|||||||||
| plan_instance_queue | object | No |
This array contains a list of queued plans, their identifier, and type. |
|||||||||
| third_party_errors | object | No |
Errors from third-party systems like taxation engines are returned here. Aria-generated error codes are returned in the error_code and error_msg fields at the root level of the API return. |
acct_plan_line_items fields
| Name | Type | Length | Required | Description |
|---|---|---|---|---|
| bill_from_address_no | long | No |
Address sent as the bill-from address to the tax engine for tax calculations. Depending on the taxation configuration, this parameter may return the Aria-assigned unique identifier of the service location for the invoice line item Note that service locations can be associated with a service for a given plan instance on an account, with an item (NSO) purchased as part of a one-time order, or with a service as defined in the product catalog. |
|
| ship_from_address_no | long | No |
Address sent as the ship-from address to the tax engine for tax calculations. Depending on the taxation configuration, this parameter may return the Aria-assigned unique identifier of the service location for the invoice line item Note that service locations can be associated with a service for a given plan instance on an account, with an item (NSO) purchased as part of a one-time order, or with a service as defined in the product catalog. |
|
| bill_to_address_no | long | No |
Address sent as the bill-to address to the tax engine for tax calculations. This parameter will return the Aria-assigned unique identifier of the contact on the account used as the bill-to address for the invoice line item. |
|
| ship_to_address_no | long | No |
Address sent as the ship-to address to the tax engine for tax calculations. This parameter will return the Aria-assigned unique identifier of the contact on the account used as the ship-to address for the invoice line item. |
plan_instance_queue fields
| Name | Type | Length | Required | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| queue_id | long | No |
Aria queue_id for future plan changes that can be used for follow on actions. |
|||||||||||||
| queue_type_ind | long | No |
This designates the type of queued action. Allowed values:
|
|||||||||||||
| plan_instance_no | long | No |
Aria plan instance number |
third_party_errors fields
| Name | Type | Length | Required | Description |
|---|---|---|---|---|
| error_class | string | No |
The type of error code being represented, such as taxation |
|
| error_code | string | No |
The error code returned by the third party system |
|
| error_msg | string | No |
The error message returned by the third party system |