16 , _account_service(services.account_service())
17 , _post_budget_service(services.post_budget_service())
18 , _banner_budget_service(services.banner_budget_service())
27 update_budget(_post_budget_service, op);
29 case budget_type::banner:
30 update_budget(_banner_budget_service, op);
35 template <protocol::budget_type budget_type_v>
39 FC_ASSERT(budget_svc.
is_exists(op.uuid),
"Budget with id ${id} doesn't exist", (
"id", op.uuid));
41 const auto& budget = budget_svc.
get(op.uuid);
42 FC_ASSERT(budget.owner == op.owner,
"These is not [${o}/${id}] budget", (
"o", op.owner)(
"id", op.uuid));
45 budget_svc.
update(budget, [&](
auto& b) { fc::from_string(b.json_metadata, op.json_metadata); });
47 boost::ignore_unused_variable_warning(budget);
void do_apply(const operation_type &op)
update_budget_evaluator(data_service_factory_i &services)
virtual void check_account_existence(const account_name_type &, const optional< const char * > &context_type_name=optional< const char * >()) const =0
virtual bool is_exists(const uuid_type &uuid) const =0
virtual const adv_budget_object< budget_type_v > & get(const oid< adv_budget_object< budget_type_v >> &) const =0
virtual void update(const modifier_type &modifier)=0
Updates advertising budget metadata.