facebookbusiness 0.8.0.4 → 0.10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/facebook_ads/ad_objects/ad.rb +4 -1
- data/lib/facebook_ads/ad_objects/ad_account.rb +17 -30
- data/lib/facebook_ads/ad_objects/ad_account_delivery_estimate.rb +1 -0
- data/lib/facebook_ads/ad_objects/ad_account_matched_search_applications_edge_data.rb +1 -0
- data/lib/facebook_ads/ad_objects/ad_account_targeting_unified.rb +1 -0
- data/lib/facebook_ads/ad_objects/ad_asset_feed_spec.rb +4 -0
- data/lib/facebook_ads/ad_objects/ad_campaign_activity.rb +8 -2
- data/lib/facebook_ads/ad_objects/ad_campaign_delivery_estimate.rb +1 -0
- data/lib/facebook_ads/ad_objects/ad_creative.rb +5 -0
- data/lib/facebook_ads/ad_objects/ad_creative_link_data_call_to_action.rb +3 -0
- data/lib/facebook_ads/ad_objects/{offline_terms_of_service.rb → ad_creative_omnichannel_link_spec.rb} +5 -4
- data/lib/facebook_ads/ad_objects/ad_preview.rb +3 -0
- data/lib/facebook_ads/ad_objects/ad_report_run.rb +1 -0
- data/lib/facebook_ads/ad_objects/ad_rule_evaluation_spec.rb +1 -2
- data/lib/facebook_ads/ad_objects/ad_set.rb +6 -2
- data/lib/facebook_ads/ad_objects/ad_study.rb +0 -11
- data/lib/facebook_ads/ad_objects/ad_study_objective.rb +1 -0
- data/lib/facebook_ads/ad_objects/ad_video.rb +4 -12
- data/lib/facebook_ads/ad_objects/adgroup_activity.rb +2 -0
- data/lib/facebook_ads/ad_objects/adgroup_placement_specific_review_feedback.rb +1 -0
- data/lib/facebook_ads/ad_objects/ads_action_stats.rb +2 -0
- data/lib/facebook_ads/ad_objects/ads_insights.rb +2 -1
- data/lib/facebook_ads/ad_objects/ads_pixel.rb +4 -0
- data/lib/facebook_ads/ad_objects/album.rb +0 -10
- data/lib/facebook_ads/ad_objects/application.rb +1 -10
- data/lib/facebook_ads/ad_objects/automotive_model.rb +25 -0
- data/lib/facebook_ads/ad_objects/business.rb +19 -0
- data/lib/facebook_ads/ad_objects/business_asset_group.rb +1 -0
- data/lib/facebook_ads/ad_objects/business_unit.rb +0 -1
- data/lib/facebook_ads/ad_objects/campaign.rb +10 -2
- data/lib/facebook_ads/ad_objects/{user_payment_modules_options.rb → catalog_item_channels_to_integrity_status.rb} +3 -5
- data/lib/facebook_ads/ad_objects/catalog_sub_vertical_list.rb +3 -0
- data/lib/facebook_ads/ad_objects/comment.rb +1 -0
- data/lib/facebook_ads/ad_objects/commerce_merchant_settings.rb +1 -0
- data/lib/facebook_ads/ad_objects/{friend_list.rb → contextual_bundling_spec.rb} +4 -5
- data/lib/facebook_ads/ad_objects/custom_audience.rb +8 -10
- data/lib/facebook_ads/ad_objects/extended_credit.rb +0 -1
- data/lib/facebook_ads/ad_objects/group.rb +22 -22
- data/lib/facebook_ads/ad_objects/ig_media.rb +0 -1
- data/lib/facebook_ads/ad_objects/ig_user.rb +6 -1
- data/lib/facebook_ads/ad_objects/image_copyright.rb +302 -0
- data/lib/facebook_ads/ad_objects/insights_result.rb +1 -1
- data/lib/facebook_ads/ad_objects/instagram_user.rb +0 -3
- data/lib/facebook_ads/ad_objects/link.rb +0 -10
- data/lib/facebook_ads/ad_objects/live_video.rb +12 -12
- data/lib/facebook_ads/ad_objects/messenger_profile.rb +1 -0
- data/lib/facebook_ads/ad_objects/page.rb +33 -6
- data/lib/facebook_ads/ad_objects/page_call_to_action.rb +3 -0
- data/lib/facebook_ads/ad_objects/page_commerce_eligibility.rb +38 -0
- data/lib/facebook_ads/ad_objects/page_post.rb +0 -10
- data/lib/facebook_ads/ad_objects/{event_tour.rb → payment_engine_payment.rb} +35 -18
- data/lib/facebook_ads/ad_objects/payment_subscription.rb +3 -3
- data/lib/facebook_ads/ad_objects/photo.rb +0 -10
- data/lib/facebook_ads/ad_objects/post.rb +12 -40
- data/lib/facebook_ads/ad_objects/product_catalog.rb +15 -2
- data/lib/facebook_ads/ad_objects/product_feed.rb +1 -1
- data/lib/facebook_ads/ad_objects/product_feed_schedule.rb +2 -0
- data/lib/facebook_ads/ad_objects/product_item.rb +8 -1
- data/lib/facebook_ads/ad_objects/{user_payment_methods_info.rb → product_item_ar_data.rb} +23 -8
- data/lib/facebook_ads/ad_objects/server_side/action_source.rb +48 -0
- data/lib/facebook_ads/ad_objects/server_side/content.rb +23 -4
- data/lib/facebook_ads/ad_objects/server_side/event.rb +32 -6
- data/lib/facebook_ads/ad_objects/server_side/util.rb +14 -1
- data/lib/facebook_ads/ad_objects/targeting.rb +0 -2
- data/lib/facebook_ads/ad_objects/unified_thread.rb +0 -1
- data/lib/facebook_ads/ad_objects/user.rb +14 -13
- data/lib/facebook_ads/ad_objects/{read_only_analytics_user_property_config.rb → whats_app_business_profile.rb} +2 -3
- data/lib/facebook_ads/edge.rb +2 -1
- data/lib/facebook_ads/version.rb +2 -2
- metadata +19 -18
- data/lib/facebook_ads/ad_objects/ad_account_creation_request.rb +0 -71
- data/lib/facebook_ads/ad_objects/ad_account_roas.rb +0 -65
@@ -144,6 +144,19 @@ module FacebookAds
|
|
144
144
|
api.has_param :bulk_pagination, 'bool'
|
145
145
|
api.has_param :filter, 'object'
|
146
146
|
end
|
147
|
+
edge.post 'AutomotiveModel' do |api|
|
148
|
+
api.has_param :automotive_model_id, 'string'
|
149
|
+
api.has_param :body_style, { enum: -> { AutomotiveModel::BODY_STYLE }}
|
150
|
+
api.has_param :currency, 'string'
|
151
|
+
api.has_param :description, 'string'
|
152
|
+
api.has_param :images, { list: 'object' }
|
153
|
+
api.has_param :make, 'string'
|
154
|
+
api.has_param :model, 'string'
|
155
|
+
api.has_param :price, 'int'
|
156
|
+
api.has_param :title, 'string'
|
157
|
+
api.has_param :url, 'string'
|
158
|
+
api.has_param :year, 'int'
|
159
|
+
end
|
147
160
|
end
|
148
161
|
|
149
162
|
has_edge :batch do |edge|
|
@@ -306,8 +319,8 @@ module FacebookAds
|
|
306
319
|
api.has_param :quoted_fields_mode, { enum: -> { ProductFeed::QUOTED_FIELDS_MODE }}
|
307
320
|
api.has_param :rules, { list: 'string' }
|
308
321
|
api.has_param :schedule, 'string'
|
322
|
+
api.has_param :selected_override_fields, { list: 'string' }
|
309
323
|
api.has_param :update_schedule, 'string'
|
310
|
-
api.has_param :whitelisted_properties, { list: 'string' }
|
311
324
|
end
|
312
325
|
end
|
313
326
|
|
@@ -347,8 +360,8 @@ module FacebookAds
|
|
347
360
|
api.has_param :return_only_approved_products, 'bool'
|
348
361
|
end
|
349
362
|
edge.post 'ProductItem' do |api|
|
350
|
-
api.has_param :additional_image_files, { list: 'file' }
|
351
363
|
api.has_param :additional_image_urls, { list: 'string' }
|
364
|
+
api.has_param :additional_uploaded_image_ids, { list: 'string' }
|
352
365
|
api.has_param :additional_variant_attributes, 'hash'
|
353
366
|
api.has_param :android_app_name, 'string'
|
354
367
|
api.has_param :android_class, 'string'
|
@@ -126,7 +126,7 @@ module FacebookAds
|
|
126
126
|
field :feed_type, { enum: -> { FEED_TYPE }}
|
127
127
|
field :override_value, 'string'
|
128
128
|
field :rules, { list: 'string' }
|
129
|
-
field :
|
129
|
+
field :selected_override_fields, { list: 'string' }
|
130
130
|
|
131
131
|
has_edge :automotive_models do |edge|
|
132
132
|
edge.get 'AutomotiveModel' do |api|
|
@@ -92,6 +92,7 @@ module FacebookAds
|
|
92
92
|
"FB_APRL_CLOTHING",
|
93
93
|
"FB_APRL_COSTUME",
|
94
94
|
"FB_APRL_CSTM",
|
95
|
+
"FB_APRL_FORMAL",
|
95
96
|
"FB_APRL_HANDBAG",
|
96
97
|
"FB_APRL_JEWELRY",
|
97
98
|
"FB_APRL_SHOE",
|
@@ -293,6 +294,7 @@ module FacebookAds
|
|
293
294
|
field :additional_variant_attributes, 'hash'
|
294
295
|
field :age_group, { enum: -> { AGE_GROUP }}
|
295
296
|
field :applinks, 'CatalogItemAppLinks'
|
297
|
+
field :ar_data, 'ProductItemArData'
|
296
298
|
field :availability, { enum: -> { AVAILABILITY }}
|
297
299
|
field :brand, 'string'
|
298
300
|
field :capability_to_review_status, 'hash'
|
@@ -323,6 +325,7 @@ module FacebookAds
|
|
323
325
|
field :mobile_link, 'string'
|
324
326
|
field :name, 'string'
|
325
327
|
field :ordering_index, 'int'
|
328
|
+
field :parent_product_id, 'string'
|
326
329
|
field :pattern, 'string'
|
327
330
|
field :price, 'string'
|
328
331
|
field :product_catalog, 'ProductCatalog'
|
@@ -343,7 +346,7 @@ module FacebookAds
|
|
343
346
|
field :start_date, 'string'
|
344
347
|
field :url, 'string'
|
345
348
|
field :visibility, { enum: -> { VISIBILITY }}
|
346
|
-
field :
|
349
|
+
field :additional_uploaded_image_ids, { list: 'string' }
|
347
350
|
field :android_app_name, 'string'
|
348
351
|
field :android_class, 'string'
|
349
352
|
field :android_package, 'string'
|
@@ -368,6 +371,10 @@ module FacebookAds
|
|
368
371
|
field :windows_phone_app_name, 'string'
|
369
372
|
field :windows_phone_url, 'string'
|
370
373
|
|
374
|
+
has_edge :channels_to_integrity_status do |edge|
|
375
|
+
edge.get 'CatalogItemChannelsToIntegrityStatus'
|
376
|
+
end
|
377
|
+
|
371
378
|
has_edge :product_sets do |edge|
|
372
379
|
edge.get 'ProductSet'
|
373
380
|
end
|
@@ -25,15 +25,30 @@ module FacebookAds
|
|
25
25
|
# on github and we'll fix in our codegen framework. We'll not be able to accept
|
26
26
|
# pull request for this class.
|
27
27
|
|
28
|
-
class
|
28
|
+
class ProductItemArData < AdObject
|
29
|
+
SURFACES = [
|
30
|
+
"B2C_MARKETPLACE",
|
31
|
+
"C2C_MARKETPLACE",
|
32
|
+
"DA",
|
33
|
+
"DAILY_DEALS",
|
34
|
+
"DAILY_DEALS_LEGACY",
|
35
|
+
"IG_PRODUCT_TAGGING",
|
36
|
+
"MARKETPLACE",
|
37
|
+
"MARKETPLACE_ADS_DEPRECATED",
|
38
|
+
"MARKETPLACE_SHOPS",
|
39
|
+
"OFFLINE_CONVERSIONS",
|
40
|
+
"SHOPS",
|
41
|
+
"UNIVERSAL_CHECKOUT",
|
42
|
+
]
|
29
43
|
|
30
|
-
|
31
|
-
field :
|
32
|
-
field :
|
33
|
-
field :
|
34
|
-
field :
|
35
|
-
field :
|
36
|
-
field :
|
44
|
+
|
45
|
+
field :container_effect, 'string'
|
46
|
+
field :effect_icon, 'string'
|
47
|
+
field :effect_parameters, 'object'
|
48
|
+
field :picker_icon, 'string'
|
49
|
+
field :product_ar_link, 'object'
|
50
|
+
field :state, 'string'
|
51
|
+
field :surfaces, { list: { enum: -> { SURFACES }} }
|
37
52
|
has_no_id
|
38
53
|
has_no_get
|
39
54
|
has_no_post
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# Copyright (c) 2017-present, Facebook, Inc. All rights reserved.
|
2
|
+
#
|
3
|
+
# You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
|
4
|
+
# copy, modify, and distribute this software in source code or binary form for use
|
5
|
+
# in connection with the web services and APIs provided by Facebook.
|
6
|
+
#
|
7
|
+
# As with any software that integrates with the Facebook platform, your use of
|
8
|
+
# this software is subject to the Facebook Platform Policy
|
9
|
+
# [http://developers.facebook.com/policy/]. This copyright notice shall be
|
10
|
+
# included in all copies or substantial portions of the software.
|
11
|
+
#
|
12
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
13
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
14
|
+
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
15
|
+
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
16
|
+
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
17
|
+
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
18
|
+
|
19
|
+
module FacebookAds
|
20
|
+
module ServerSide
|
21
|
+
ActionSource = Set[
|
22
|
+
|
23
|
+
# Conversion happened over email.
|
24
|
+
'email',
|
25
|
+
|
26
|
+
# Conversion was made on your website.
|
27
|
+
'website',
|
28
|
+
|
29
|
+
# Conversion was made using your app.
|
30
|
+
'app',
|
31
|
+
|
32
|
+
# Conversion was made over the phone.
|
33
|
+
'phone_call',
|
34
|
+
|
35
|
+
# Conversion was made via a messaging app, SMS, or online messaging feature.
|
36
|
+
'chat',
|
37
|
+
|
38
|
+
# Conversion was made in person at your physical store.
|
39
|
+
'physical_store',
|
40
|
+
|
41
|
+
# Conversion happened automatically, for example, a subscription renewal that's set on auto-pay each month.
|
42
|
+
'system_generated',
|
43
|
+
|
44
|
+
# Conversion happened in a way that is not listed.
|
45
|
+
'other'
|
46
|
+
]
|
47
|
+
end
|
48
|
+
end
|
@@ -28,7 +28,8 @@ module FacebookAds
|
|
28
28
|
:title,
|
29
29
|
:description,
|
30
30
|
:brand,
|
31
|
-
:category
|
31
|
+
:category,
|
32
|
+
:delivery_category
|
32
33
|
|
33
34
|
# Initializes the object
|
34
35
|
# @param [String] product_id
|
@@ -38,7 +39,8 @@ module FacebookAds
|
|
38
39
|
# @param [String] description
|
39
40
|
# @param [String] brand
|
40
41
|
# @param [String] category
|
41
|
-
|
42
|
+
# @param [String] delivery_category
|
43
|
+
def initialize(product_id: nil, quantity: nil, item_price: nil, title: nil, description: nil, brand: nil, category: nil, delivery_category: nil)
|
42
44
|
unless product_id.nil?
|
43
45
|
self.product_id = String(product_id)
|
44
46
|
end
|
@@ -60,6 +62,9 @@ module FacebookAds
|
|
60
62
|
unless category.nil?
|
61
63
|
self.category = String(category)
|
62
64
|
end
|
65
|
+
unless delivery_category.nil?
|
66
|
+
self.delivery_category = String(delivery_category)
|
67
|
+
end
|
63
68
|
end
|
64
69
|
|
65
70
|
# build the object using the input hash
|
@@ -97,6 +102,10 @@ module FacebookAds
|
|
97
102
|
if attributes.has_key?(:'category')
|
98
103
|
self.category = attributes[:'category']
|
99
104
|
end
|
105
|
+
|
106
|
+
if attributes.has_key?(:'delivery_category')
|
107
|
+
self.delivery_category = attributes[:'delivery_category']
|
108
|
+
end
|
100
109
|
end
|
101
110
|
|
102
111
|
# Checks equality by comparing each attribute.
|
@@ -108,7 +117,8 @@ module FacebookAds
|
|
108
117
|
title == o.title &&
|
109
118
|
description == o.description &&
|
110
119
|
brand == o.brand &&
|
111
|
-
category == o.category
|
120
|
+
category == o.category &&
|
121
|
+
delivery_category == o.delivery_category
|
112
122
|
end
|
113
123
|
|
114
124
|
# @see the `==` method
|
@@ -126,7 +136,8 @@ module FacebookAds
|
|
126
136
|
title,
|
127
137
|
description,
|
128
138
|
brand,
|
129
|
-
category
|
139
|
+
category,
|
140
|
+
delivery_category
|
130
141
|
].hash
|
131
142
|
end
|
132
143
|
|
@@ -156,6 +167,9 @@ module FacebookAds
|
|
156
167
|
unless category.nil?
|
157
168
|
hash['category'] = category
|
158
169
|
end
|
170
|
+
unless delivery_category.nil?
|
171
|
+
hash['delivery_category'] = delivery_category
|
172
|
+
end
|
159
173
|
hash.to_s
|
160
174
|
end
|
161
175
|
|
@@ -183,6 +197,11 @@ module FacebookAds
|
|
183
197
|
unless category.nil?
|
184
198
|
hash['category'] = category
|
185
199
|
end
|
200
|
+
unless delivery_category.nil?
|
201
|
+
hash['delivery_category'] = FacebookAds::ServerSide::Util.normalize_delivery_category(
|
202
|
+
delivery_category
|
203
|
+
)
|
204
|
+
end
|
186
205
|
hash
|
187
206
|
end
|
188
207
|
end
|
@@ -64,6 +64,9 @@ module FacebookAds
|
|
64
64
|
# For more details see https://developers.facebook.com/docs/marketing-apis/data-processing-options
|
65
65
|
attr_accessor :data_processing_options_state
|
66
66
|
|
67
|
+
# Where the conversion occurred.
|
68
|
+
attr_accessor :action_source
|
69
|
+
|
67
70
|
# @param [String] event_name
|
68
71
|
# @param [int] event_time
|
69
72
|
# @param [String] event_source_url
|
@@ -74,6 +77,7 @@ module FacebookAds
|
|
74
77
|
# @param [Array<String>] data_processing_options
|
75
78
|
# @param [int] data_processing_options_country
|
76
79
|
# @param [int] data_processing_options_state
|
80
|
+
# @param String action_source
|
77
81
|
def initialize(event_name: nil,
|
78
82
|
event_time: nil,
|
79
83
|
event_source_url: nil,
|
@@ -83,7 +87,8 @@ module FacebookAds
|
|
83
87
|
custom_data: nil,
|
84
88
|
data_processing_options: nil,
|
85
89
|
data_processing_options_country: nil,
|
86
|
-
data_processing_options_state: nil
|
90
|
+
data_processing_options_state: nil,
|
91
|
+
action_source: nil)
|
87
92
|
|
88
93
|
unless event_name.nil?
|
89
94
|
self.event_name = event_name
|
@@ -115,6 +120,9 @@ module FacebookAds
|
|
115
120
|
unless data_processing_options_state.nil?
|
116
121
|
self.data_processing_options_state = data_processing_options_state
|
117
122
|
end
|
123
|
+
unless action_source.nil?
|
124
|
+
self.action_source = action_source
|
125
|
+
end
|
118
126
|
end
|
119
127
|
|
120
128
|
# build the object using the input hash
|
@@ -154,15 +162,19 @@ module FacebookAds
|
|
154
162
|
end
|
155
163
|
|
156
164
|
if attributes.has_key?(:'data_processing_options')
|
157
|
-
self.
|
165
|
+
self.data_processing_options = attributes[:'data_processing_options']
|
158
166
|
end
|
159
167
|
|
160
168
|
if attributes.has_key?(:'data_processing_options_country')
|
161
|
-
self.
|
169
|
+
self.data_processing_options_country = attributes[:'data_processing_options_country']
|
162
170
|
end
|
163
171
|
|
164
172
|
if attributes.has_key?(:'data_processing_options_state')
|
165
|
-
self.
|
173
|
+
self.data_processing_options_state = attributes[:'data_processing_options_state']
|
174
|
+
end
|
175
|
+
|
176
|
+
if attributes.has_key?(:'action_source')
|
177
|
+
self.action_source = attributes[:'action_source']
|
166
178
|
end
|
167
179
|
end
|
168
180
|
|
@@ -207,7 +219,8 @@ module FacebookAds
|
|
207
219
|
custom_data == o.custom_data &&
|
208
220
|
data_processing_options == o.data_processing_options &&
|
209
221
|
data_processing_options_country == o.data_processing_options_country &&
|
210
|
-
data_processing_options_state == o.data_processing_options_state
|
222
|
+
data_processing_options_state == o.data_processing_options_state &&
|
223
|
+
action_source == o.action_source
|
211
224
|
end
|
212
225
|
|
213
226
|
# @see the `==` method
|
@@ -218,7 +231,11 @@ module FacebookAds
|
|
218
231
|
# Calculates hash code according to all attributes.
|
219
232
|
# @return [Fixnum] Hash code
|
220
233
|
def hash
|
221
|
-
[
|
234
|
+
[
|
235
|
+
event_name, event_time, event_source_url, opt_out, event_id, user_data, custom_data,
|
236
|
+
data_processing_options, data_processing_options_country, data_processing_options_state,
|
237
|
+
action_source,
|
238
|
+
].hash
|
222
239
|
end
|
223
240
|
|
224
241
|
def to_s
|
@@ -253,6 +270,9 @@ module FacebookAds
|
|
253
270
|
unless data_processing_options_state.nil?
|
254
271
|
hash['data_processing_options_state'] = data_processing_options_state.to_s
|
255
272
|
end
|
273
|
+
unless action_source.nil?
|
274
|
+
hash['action_source'] = action_source
|
275
|
+
end
|
256
276
|
hash.to_s
|
257
277
|
end
|
258
278
|
|
@@ -290,6 +310,12 @@ module FacebookAds
|
|
290
310
|
unless data_processing_options_state.nil?
|
291
311
|
hash['data_processing_options_state'] = data_processing_options_state
|
292
312
|
end
|
313
|
+
unless action_source.nil?
|
314
|
+
hash['action_source'] = FacebookAds::ServerSide::Util.normalize(
|
315
|
+
action_source,
|
316
|
+
'action_source'
|
317
|
+
)
|
318
|
+
end
|
293
319
|
hash
|
294
320
|
end
|
295
321
|
|
@@ -52,6 +52,8 @@ module FacebookAds
|
|
52
52
|
normalized_input = input;
|
53
53
|
|
54
54
|
case field_type
|
55
|
+
when 'action_source'
|
56
|
+
return normalize_action_source input
|
55
57
|
when 'country'
|
56
58
|
normalized_input = normalize_country input
|
57
59
|
when 'ct'
|
@@ -152,7 +154,7 @@ module FacebookAds
|
|
152
154
|
def self.normalize_email(email)
|
153
155
|
|
154
156
|
if EMAIL_REGEX.match(email) == nil
|
155
|
-
|
157
|
+
raise ArgumentError, "Invalid email format for the passed email: '#{email}'. Please check the passed email format."
|
156
158
|
end
|
157
159
|
|
158
160
|
return email
|
@@ -290,6 +292,17 @@ module FacebookAds
|
|
290
292
|
delivery_category;
|
291
293
|
end
|
292
294
|
|
295
|
+
# Normalizes the input action_source and returns valid value (or throw exception if invalid).
|
296
|
+
def self.normalize_action_source(action_source)
|
297
|
+
unless FacebookAds::ServerSide::ActionSource.include?(action_source)
|
298
|
+
values = FacebookAds::ServerSide::ActionSource.to_a.join(',')
|
299
|
+
raise ArgumentError.new(
|
300
|
+
"Invalid action_source passed: #{action_source}. Please use one of the defined values: #{values}"
|
301
|
+
)
|
302
|
+
end
|
303
|
+
|
304
|
+
action_source
|
305
|
+
end
|
293
306
|
end
|
294
307
|
end
|
295
308
|
end
|
@@ -49,14 +49,10 @@ module FacebookAds
|
|
49
49
|
|
50
50
|
|
51
51
|
field :about, 'string'
|
52
|
-
field :address, 'Location'
|
53
|
-
field :admin_notes, { list: 'PageAdminNote' }
|
54
52
|
field :age_range, 'AgeRange'
|
55
|
-
field :auth_method, 'string'
|
56
53
|
field :birthday, 'string'
|
57
54
|
field :cover, 'UserCoverPhoto'
|
58
55
|
field :currency, 'Currency'
|
59
|
-
field :devices, { list: 'UserDevice' }
|
60
56
|
field :education, { list: 'object' }
|
61
57
|
field :email, 'string'
|
62
58
|
field :favorite_athletes, { list: 'Experience' }
|
@@ -79,15 +75,12 @@ module FacebookAds
|
|
79
75
|
field :locale, 'string'
|
80
76
|
field :location, 'Page'
|
81
77
|
field :meeting_for, { list: 'string' }
|
82
|
-
field :messenger_join_notifications_enabled, 'bool'
|
83
78
|
field :middle_name, 'string'
|
84
79
|
field :name, 'string'
|
85
80
|
field :name_format, 'string'
|
86
81
|
field :payment_pricepoints, 'PaymentPricepoints'
|
87
82
|
field :political, 'string'
|
88
83
|
field :profile_pic, 'string'
|
89
|
-
field :public_key, 'string'
|
90
|
-
field :published_timeline, 'bool'
|
91
84
|
field :quotes, 'string'
|
92
85
|
field :relationship_status, 'string'
|
93
86
|
field :religion, 'string'
|
@@ -100,12 +93,9 @@ module FacebookAds
|
|
100
93
|
field :timezone, 'double'
|
101
94
|
field :token_for_business, 'string'
|
102
95
|
field :updated_time, 'datetime'
|
103
|
-
field :user_storage_key, 'string'
|
104
|
-
field :username, 'string'
|
105
96
|
field :verified, 'bool'
|
106
97
|
field :video_upload_limits, 'VideoUploadLimits'
|
107
98
|
field :website, 'string'
|
108
|
-
field :work, { list: 'object' }
|
109
99
|
|
110
100
|
has_edge :access_tokens do |edge|
|
111
101
|
edge.delete
|
@@ -516,8 +506,8 @@ module FacebookAds
|
|
516
506
|
end
|
517
507
|
end
|
518
508
|
|
519
|
-
has_edge :
|
520
|
-
edge.get '
|
509
|
+
has_edge :payment_transactions do |edge|
|
510
|
+
edge.get 'PaymentEnginePayment'
|
521
511
|
end
|
522
512
|
|
523
513
|
has_edge :permissions do |edge|
|
@@ -604,6 +594,17 @@ module FacebookAds
|
|
604
594
|
end
|
605
595
|
end
|
606
596
|
|
597
|
+
has_edge :posts do |edge|
|
598
|
+
edge.get 'Post' do |api|
|
599
|
+
api.has_param :include_hidden, 'bool'
|
600
|
+
api.has_param :q, 'string'
|
601
|
+
api.has_param :show_expired, 'bool'
|
602
|
+
api.has_param :since, 'datetime'
|
603
|
+
api.has_param :until, 'datetime'
|
604
|
+
api.has_param :with, 'string'
|
605
|
+
end
|
606
|
+
end
|
607
|
+
|
607
608
|
has_edge :rich_media_documents do |edge|
|
608
609
|
edge.get 'Canvas' do |api|
|
609
610
|
api.has_param :query, 'string'
|
@@ -625,7 +626,6 @@ module FacebookAds
|
|
625
626
|
api.has_param :animated_effect_id, 'int'
|
626
627
|
api.has_param :application_id, 'string'
|
627
628
|
api.has_param :asked_fun_fact_prompt_id, 'int'
|
628
|
-
api.has_param :attribution_app_id, 'string'
|
629
629
|
api.has_param :audio_story_wave_animation_handle, 'string'
|
630
630
|
api.has_param :composer_entry_picker, 'string'
|
631
631
|
api.has_param :composer_entry_point, 'string'
|
@@ -680,6 +680,7 @@ module FacebookAds
|
|
680
680
|
api.has_param :sales_promo_id, 'int'
|
681
681
|
api.has_param :slideshow_spec, 'hash'
|
682
682
|
api.has_param :source, 'string'
|
683
|
+
api.has_param :source_instagram_media_id, 'string'
|
683
684
|
api.has_param :spherical, 'bool'
|
684
685
|
api.has_param :sponsor_id, 'string'
|
685
686
|
api.has_param :start_offset, 'int'
|