বাজেট আদেশ

বাজেট অর্ডারের বেস খরচের সীমা পুনরুদ্ধার করুন

function getBaseSpendingLimit() {
  const budgetOrderIterator = AdsApp.budgetOrders().get();
  for (const budgetOrder of budgetOrderIterator) {
    let limitText = "";
    if (budgetOrder.getSpendingLimit() == null) {
      limitText = "unlimited";
    } else if (budgetOrder.getTotalAdjustments() == null) {
      limitText = budgetOrder.getSpendingLimit();
    } else {
      limitText = budgetOrder.getSpendingLimit() -
          budgetOrder.getTotalAdjustments();
    }
    console.log("Budget Order [" + budgetOrder.getName() +
        "] base spending limit: " + limitText);
  }
}

সক্রিয় বাজেট অর্ডার পুনরুদ্ধার করুন

function getActiveBudgetOrder() {
  // There will only be one active budget order at any given time.
  const budgetOrderIterator = AdsApp.budgetOrders()
      .withCondition('account_budget.status = "ACTIVE"')
      .get();
  for (const budgetOrder of budgetOrderIterator) {
    const budgetOrder = budgetOrderIterator.next();
    console.log(`Budget Order [${budgetOrder.getName()}] is currently active.`);
  }
}

সমস্ত বাজেট আদেশ পুনরুদ্ধার করুন

function getAllBudgetOrders() {
  const budgetOrderIterator = AdsApp.budgetOrders().get();
  return budgetOrderIterator;
}