After successfully creating an Adrule, you cannot fetch it's evaluation_spec :
ad_account.adrules_library.first.evaluation_spec raises JSON::ParserError :
...
I, [2022-06-13T12:55:35.905899 #133] INFO -- response: {"id":"120330000147955510","name":"pause_rule","evaluation_spec":{"evaluation_type":"SCHEDULE","filters":[{"field":"impressions","value":"10","operator":"GREATER_THAN"},{"field":"entity_type","value":"ADSET","operator":"EQUAL"},{"field":"time_preset","value":"THIS_MONTH","operator":"EQUAL"}]},"execution_spec":{"execution_type":"PAUSE"},"schedule_spec":{"schedule_type":"SEMI_HOURLY"}}
/home/effilab/vendor/bundle/ruby/3.1.0/gems/json-2.6.2/lib/json/common.rb:216:in `parse': 859: unexpected token at 'ADSET' (JSON::ParserError)
Which SDK version are you using?
facebookbusiness (0.13.0.0)
What's the issue?
After successfully creating an Adrule, you cannot fetch it's evaluation_spec :
ad_account.adrules_library.first.evaluation_spec
raises JSON::ParserError :Steps/Sample code to reproduce the issue
Create an adrule :
And then get its evaluation_spec
ad_account.adrules_library.first.evaluation_spec