AddPEMSubscription_API
Description |
Parameters |
|
---|---|---|
Passed |
Returned |
|
This method creates a new subscription based on given parameters. The subscription's information is added to the Billing database, and specific provisioning information (for example, resource rates) is added to the PEMGATE table. | 19 | 1 |
Syntax
Copy
ItemResult PEMGATE::AddPEMSubscription_API(
Int Status;
Int ServStatus;
Int StartDate;
Int ExpirationDate;
Int AccountID;
Int PlanID;
Int Period;
Int PeriodType;
Str DomainName;
Double SetupFee;
Double SubscriptionFee;
Double RenewalFee;
Double TransferFee;
Double NonRefundableAmt;
Int RefundPeriod;
Int BillingPeriodType;
Int BillingPeriod;
Int LastBillDate;
Int NextBillDate.
)
returns
Copy
Int SubscriptionID – created subscription ID.
Special Notes
- Int Status – parent subscription status (10 – Ordered, 15 – Trial, 30 – Active, 40 – Graced, 50 – Expired, 60 – Terminated, 70 – Canceled, 80 – Suspended);
- Int ServStatus – parent subscription service status (10 – ''Not Provisioned'', 20 – ''Provisioning'', 30 – ''Stopped'', 40 – ''Starting'', 50 – ''Running'', 60 – ''Stopping'', 70 – ''Removing'', 80 – ''Changing Plan'', 90 – ''Removed'');
- Str StartDate – the date of the parent subscription start in Unix date format;
- Str ExpirationDate – expiration date of the parent subscription in Unix date format. Expiration Date = Start Date + Subscription Period;
- Int AccountID – ID of the customer account;
- Int PlanID – ID of subscription service plan;
- Int Period – subscription period duration (for example, 1 if subscription period is 1 year);
- Int PeriodType – subscription period type: 0 – Hour(s), 1 – Day(s), 2 – Month(s), 3 – Year(s);
- Str DomainName – domain name will be used as subscription name. If domain name is passed, it is validated according to internal rules;
- Double SetupFee – subscription setup fee;
- Double SubscriptionFee – subscription recurring fee;
- Double RenewalFee – subscription renewal fee;
- Double TransferFee – subscription transfer fee;
- Double NonRefundableAmt subscription non refundable sum;
Note: Fees for subscription are passed in "00.00" format and provider's default currency.
- Int RefundPeriod – subscription refund period duration in days, always passed 0;
- Int BillingPeriodType – subscription billing period type (4 – monthly on statement cycle date, 2 – fixed number of months, 3 – fixed number of years);
- Int BillingPeriod – subscription billing period duration (if BillingPeriodType=2 and BillingPeriod=1, subscription billing period is 1 month);
- Int LastBillDate – subscription last billing date in Unix date format;
- Int NextBillDate – subscription next billing date in Unix date format.