Add support for resource attribute assignment during object initialzation
Closed this issue · 0 comments
brndnblck commented
Changes should be made in TwitterAds::DSL
and applied globally.
Should allow syntax like this:
# create your campaign
attributes = {
funding_instrument_id: account.funding_instruments.first.id,
daily_budget_amount_local_micro: 1_000_000,
name: 'my first campaign',
paused: true,
start_time: Time.now.utc
}
campaign = TwitterAds::Campaign.new(account, attributes).save
It should not allow setting read-only fields, derived fields or undefined properties.