addCampaign method allows you to add a Campaign to an existing AutoBill.
This method will automatically validate the Campaign, and its eligibility, before adding the Campaign, and updating the AutoBill, and will not change the billing date for the AutoBill.
Note: If neither product nor item is passed in with this call, Subscribe will apply the Campaign discount to all eligible items on the AutoBill.
Input
srd: sparse response description, a SOAP string (which must be a JSON object), in which you specify the elements you want returned.This parameter enables the calling system to constrain amethod call to return only components you specify. This gives you greater control over returned content, and improves response time within the Vindicia platform by reducing the processing needed for the call.
Some fields are required, either practically or in the WSDL, and will be returned regardless of the srd. A null srd returns the complete response.
autobill: the object of type AutoBill to which this Campaign should be added.
product: a Product to which the Campaign discount should be applied. (This product must already exist in Subscribe.) The discount will be applied to any AutoBillItem on the specified AutoBill that includes this product. Specify either item or product; but not both. (Optional.)
item: the AutoBillItem to which the Campaign discount should be applied. This item must already exist in Subscribe and be associated with the specified AutoBill. Specify either item or product; but not both. (Optional.)
applyToBillingPlan: a Boolean flag that, if set to true, will apply the Campaign to the BillingPlan on the AutoBill. (May be combined with a discounted AutoBillItem.) Default is false.
campaignCode: the Coupon or Promotion Code used to obtain a discount on the AutoBill. (Required.)
dryrun: a Boolean flag that, if set to true, will return the updated AutoBill, without recording the result in the Subscribe database. Use this method to compute the cost of an AutoBill without committing the change. (The projected billing amount will be returned in the Transaction object of the nextBilling data member of the returned AutoBill.)
If the AutoBill did not exist before, it will not exist afterward; if it did exist before, it will not change. (No payment method validations, authorizations or charges will be performed if dryrun is true.)
Output
return: an object of typeReturn that indicates the success or failure of the call.
autobill: the updated AutoBill.

