Class: Adparlor::Facebook::GraphApi::CustomAudienceUser
- Inherits:
-
GraphObject
- Object
- GraphObject
- Adparlor::Facebook::GraphApi::CustomAudienceUser
- Includes:
- Fields::CustomAudienceUser, Traits::Methods
- Defined in:
- lib/adparlor/facebook/graph_api/custom_audience_user.rb
Constant Summary collapse
- FIELD_KEYS =
{ emails: 'EMAIL_SHA256', phone_numbers: 'PHONE_SHA256', facebook_uids: 'UID', mobile_adversiter_ids: 'MOBILE_ADVERTISER_ID', genders: ['GEN'], first_names: ['FN'], last_name: ['LN'], cities: ['CT'], states: ['ST'], zip_codes: ['ZIP'], mobile_device_ids: ['MADID'] }
Constants included from Fields::CustomAudienceUser
Fields::CustomAudienceUser::FIELDS, Fields::CustomAudienceUser::UPDATE_FIELDS
Constants included from Fields::FieldDecorator
Fields::FieldDecorator::GLOBAL_FIELDS
Instance Attribute Summary
Attributes inherited from GraphObject
Instance Method Summary collapse
Methods included from Traits::Methods
Methods inherited from GraphObject
#batch, create, #create, data_pass_through, destroy, get, #initialize, parse_data_for_collection, read, respond_for_data, #to_hash, #to_json, update
Methods included from Api
#base_uri, #conn, #conn_multi, #delete, #get, #post, #proxy_api_key
Methods included from Fields::FieldDecorator
Constructor Details
This class inherits a constructor from Adparlor::Facebook::GraphApi::GraphObject
Instance Method Details
#destroy(path, options = {}) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/adparlor/facebook/graph_api/custom_audience_user.rb', line 24 def destroy(path, = {}) if @custom_audience_id destroy_path = "/#{custom_audience_id}/users" else raise FbError.new('required parameter account_id missing', 500) unless @account_id account_id = remove_instance_variable(:@account_id) destroy_path = "act_#{account_id}/usersofanyaudience" end ready_payload super(destroy_path, ) end |
#path ⇒ Object
36 37 38 39 |
# File 'lib/adparlor/facebook/graph_api/custom_audience_user.rb', line 36 def path raise FbError.new('required parameter custom_audience_id missing', 500) unless custom_audience_id "/#{custom_audience_id}/users" end |
#update(path, options = {}) ⇒ Object
41 42 43 44 |
# File 'lib/adparlor/facebook/graph_api/custom_audience_user.rb', line 41 def update(path, = {}) ready_payload super(path, ) end |