facebookbusiness 0.8.0.3 → 0.9.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/facebook_ads/ad_objects/ad.rb +3 -0
- data/lib/facebook_ads/ad_objects/ad_account.rb +22 -23
- data/lib/facebook_ads/ad_objects/ad_account_ad_volume.rb +1 -0
- 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 +22 -5
- data/lib/facebook_ads/ad_objects/ad_activity.rb +0 -1
- data/lib/facebook_ads/ad_objects/ad_asset_feed_spec.rb +6 -0
- data/lib/facebook_ads/ad_objects/ad_async_request.rb +2 -0
- data/lib/facebook_ads/ad_objects/ad_campaign_activity.rb +10 -2
- data/lib/facebook_ads/ad_objects/ad_campaign_delivery_estimate.rb +1 -0
- data/lib/facebook_ads/ad_objects/ad_creative.rb +7 -0
- data/lib/facebook_ads/ad_objects/ad_creative_link_data_call_to_action.rb +5 -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 +4 -0
- data/lib/facebook_ads/ad_objects/ad_report_run.rb +1 -0
- data/lib/facebook_ads/ad_objects/ad_rule_execution_spec.rb +4 -0
- data/lib/facebook_ads/ad_objects/ad_set.rb +5 -1
- data/lib/facebook_ads/ad_objects/ad_study.rb +0 -12
- data/lib/facebook_ads/ad_objects/ad_study_objective.rb +1 -4
- data/lib/facebook_ads/ad_objects/ad_video.rb +7 -11
- 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/adoptable_pet.rb +7 -0
- data/lib/facebook_ads/ad_objects/ads_action_stats.rb +2 -0
- data/lib/facebook_ads/ad_objects/ads_insights.rb +2 -0
- data/lib/facebook_ads/ad_objects/ads_pixel.rb +5 -0
- data/lib/facebook_ads/ad_objects/album.rb +0 -10
- data/lib/facebook_ads/ad_objects/application.rb +2 -10
- data/lib/facebook_ads/ad_objects/automotive_model.rb +25 -0
- data/lib/facebook_ads/ad_objects/business.rb +29 -3
- data/lib/facebook_ads/ad_objects/business_asset_group.rb +1 -1
- data/lib/facebook_ads/ad_objects/business_role_request.rb +4 -4
- data/lib/facebook_ads/ad_objects/business_unit.rb +0 -1
- data/lib/facebook_ads/ad_objects/business_user.rb +4 -4
- data/lib/facebook_ads/ad_objects/campaign.rb +10 -1
- data/lib/facebook_ads/ad_objects/catalog_item_channels_to_integrity_status.rb +38 -0
- 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 +3 -24
- data/lib/facebook_ads/ad_objects/commerce_merchant_settings_setup_status.rb +1 -0
- data/lib/facebook_ads/ad_objects/{ad_creative_instagram_branded_content.rb → contextual_bundling_spec.rb} +2 -1
- data/lib/facebook_ads/ad_objects/custom_audience.rb +8 -0
- data/lib/facebook_ads/ad_objects/extended_credit.rb +0 -1
- data/lib/facebook_ads/ad_objects/group.rb +26 -22
- data/lib/facebook_ads/ad_objects/hotel_room.rb +1 -0
- 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/link.rb +0 -4
- 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 +43 -15
- data/lib/facebook_ads/ad_objects/page_call_to_action.rb +3 -0
- data/lib/facebook_ads/ad_objects/{friend_list.rb → page_commerce_eligibility.rb} +5 -5
- 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/playable_content.rb +1 -0
- data/lib/facebook_ads/ad_objects/post.rb +46 -29
- data/lib/facebook_ads/ad_objects/product_catalog.rb +18 -9
- data/lib/facebook_ads/ad_objects/product_feed.rb +3 -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/referral.rb +2 -0
- 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/event_request.rb +1 -1
- data/lib/facebook_ads/ad_objects/server_side/util.rb +14 -1
- data/lib/facebook_ads/ad_objects/system_user.rb +4 -4
- data/lib/facebook_ads/ad_objects/targeting.rb +0 -2
- data/lib/facebook_ads/ad_objects/third_party_measurement_report_dataset.rb +0 -1
- data/lib/facebook_ads/ad_objects/unified_thread.rb +0 -1
- data/lib/facebook_ads/ad_objects/user.rb +31 -18
- data/lib/facebook_ads/ad_objects/vehicle.rb +1 -0
- data/lib/facebook_ads/ad_objects/whats_app_business_account.rb +3 -0
- 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/session.rb +1 -1
- data/lib/facebook_ads/version.rb +2 -2
- metadata +12 -12
- 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
- data/lib/facebook_ads/ad_objects/user_payment_modules_options.rb +0 -40
@@ -293,6 +293,7 @@ module FacebookAds
|
|
293
293
|
field :additional_variant_attributes, 'hash'
|
294
294
|
field :age_group, { enum: -> { AGE_GROUP }}
|
295
295
|
field :applinks, 'CatalogItemAppLinks'
|
296
|
+
field :ar_data, 'ProductItemArData'
|
296
297
|
field :availability, { enum: -> { AVAILABILITY }}
|
297
298
|
field :brand, 'string'
|
298
299
|
field :capability_to_review_status, 'hash'
|
@@ -316,12 +317,14 @@ module FacebookAds
|
|
316
317
|
field :id, 'string'
|
317
318
|
field :image_cdn_urls, 'hash'
|
318
319
|
field :image_url, 'string'
|
320
|
+
field :images, { list: 'string' }
|
319
321
|
field :inventory, 'int'
|
320
322
|
field :manufacturer_part_number, 'string'
|
321
323
|
field :material, 'string'
|
322
324
|
field :mobile_link, 'string'
|
323
325
|
field :name, 'string'
|
324
326
|
field :ordering_index, 'int'
|
327
|
+
field :parent_product_id, 'string'
|
325
328
|
field :pattern, 'string'
|
326
329
|
field :price, 'string'
|
327
330
|
field :product_catalog, 'ProductCatalog'
|
@@ -342,7 +345,7 @@ module FacebookAds
|
|
342
345
|
field :start_date, 'string'
|
343
346
|
field :url, 'string'
|
344
347
|
field :visibility, { enum: -> { VISIBILITY }}
|
345
|
-
field :
|
348
|
+
field :additional_uploaded_image_ids, { list: 'string' }
|
346
349
|
field :android_app_name, 'string'
|
347
350
|
field :android_class, 'string'
|
348
351
|
field :android_package, 'string'
|
@@ -367,6 +370,10 @@ module FacebookAds
|
|
367
370
|
field :windows_phone_app_name, 'string'
|
368
371
|
field :windows_phone_url, 'string'
|
369
372
|
|
373
|
+
has_edge :channels_to_integrity_status do |edge|
|
374
|
+
edge.get 'CatalogItemChannelsToIntegrityStatus'
|
375
|
+
end
|
376
|
+
|
370
377
|
has_edge :product_sets do |edge|
|
371
378
|
edge.get 'ProductSet'
|
372
379
|
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
|
@@ -34,10 +34,12 @@ module FacebookAds
|
|
34
34
|
field :namespace, 'string'
|
35
35
|
field :need_promo_code, 'bool'
|
36
36
|
field :offer_origin, 'string'
|
37
|
+
field :privacy_policy_link, 'string'
|
37
38
|
field :promotion_text, 'string'
|
38
39
|
field :receiver_benefits_text, 'string'
|
39
40
|
field :referral_link_uri, 'string'
|
40
41
|
field :sender_benefits_text, 'string'
|
42
|
+
field :terms_and_condition_link, 'string'
|
41
43
|
|
42
44
|
end
|
43
45
|
end
|
@@ -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
|
|
@@ -190,7 +190,7 @@ module FacebookAds
|
|
190
190
|
'events',
|
191
191
|
].join('/')
|
192
192
|
headers = {
|
193
|
-
'User-Agent' => "fbbizsdk-ruby-v#{FacebookAds::
|
193
|
+
'User-Agent' => "fbbizsdk-ruby-v#{FacebookAds::VERSION}"
|
194
194
|
}
|
195
195
|
params = get_params
|
196
196
|
params[:data] = events.map(&:normalize)
|
@@ -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
|
@@ -29,14 +29,14 @@ module FacebookAds
|
|
29
29
|
ROLE = [
|
30
30
|
"ADMIN",
|
31
31
|
"ADS_RIGHTS_REVIEWER",
|
32
|
+
"DEFAULT",
|
32
33
|
"DEVELOPER",
|
33
34
|
"EMPLOYEE",
|
34
35
|
"FINANCE_ANALYST",
|
36
|
+
"FINANCE_EDIT",
|
35
37
|
"FINANCE_EDITOR",
|
36
|
-
"
|
37
|
-
"
|
38
|
-
"MODERATE_TASK",
|
39
|
-
"OPERATE_TASK",
|
38
|
+
"FINANCE_VIEW",
|
39
|
+
"MANAGE",
|
40
40
|
"PARTNER_CENTER_ADMIN",
|
41
41
|
"PARTNER_CENTER_ANALYST",
|
42
42
|
"PARTNER_CENTER_EDUCATION",
|
@@ -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' }
|
@@ -85,7 +81,6 @@ module FacebookAds
|
|
85
81
|
field :payment_pricepoints, 'PaymentPricepoints'
|
86
82
|
field :political, 'string'
|
87
83
|
field :profile_pic, 'string'
|
88
|
-
field :public_key, 'string'
|
89
84
|
field :quotes, 'string'
|
90
85
|
field :relationship_status, 'string'
|
91
86
|
field :religion, 'string'
|
@@ -101,7 +96,6 @@ module FacebookAds
|
|
101
96
|
field :verified, 'bool'
|
102
97
|
field :video_upload_limits, 'VideoUploadLimits'
|
103
98
|
field :website, 'string'
|
104
|
-
field :work, { list: 'object' }
|
105
99
|
|
106
100
|
has_edge :access_tokens do |edge|
|
107
101
|
edge.delete
|
@@ -238,7 +232,15 @@ module FacebookAds
|
|
238
232
|
end
|
239
233
|
|
240
234
|
has_edge :feed do |edge|
|
241
|
-
edge.
|
235
|
+
edge.get 'Post' do |api|
|
236
|
+
api.has_param :include_hidden, 'bool'
|
237
|
+
api.has_param :q, 'string'
|
238
|
+
api.has_param :show_expired, 'bool'
|
239
|
+
api.has_param :since, 'datetime'
|
240
|
+
api.has_param :until, 'datetime'
|
241
|
+
api.has_param :with, 'string'
|
242
|
+
end
|
243
|
+
edge.post 'Post' do |api|
|
242
244
|
api.has_param :actions, 'object'
|
243
245
|
api.has_param :adaptive_type, 'string'
|
244
246
|
api.has_param :album_id, 'string'
|
@@ -252,10 +254,10 @@ module FacebookAds
|
|
252
254
|
api.has_param :attached_media, { list: 'object' }
|
253
255
|
api.has_param :audience_exp, 'bool'
|
254
256
|
api.has_param :backdated_time, 'datetime'
|
255
|
-
api.has_param :backdated_time_granularity, { enum:
|
257
|
+
api.has_param :backdated_time_granularity, { enum: -> { Post::BACKDATED_TIME_GRANULARITY }}
|
256
258
|
api.has_param :call_to_action, 'object'
|
257
259
|
api.has_param :caption, 'string'
|
258
|
-
api.has_param :checkin_entry_point, { enum:
|
260
|
+
api.has_param :checkin_entry_point, { enum: -> { Post::CHECKIN_ENTRY_POINT }}
|
259
261
|
api.has_param :child_attachments, { list: 'object' }
|
260
262
|
api.has_param :client_mutation_id, 'string'
|
261
263
|
api.has_param :composer_entry_picker, 'string'
|
@@ -275,7 +277,7 @@ module FacebookAds
|
|
275
277
|
api.has_param :expanded_height, 'int'
|
276
278
|
api.has_param :expanded_width, 'int'
|
277
279
|
api.has_param :feed_targeting, 'object'
|
278
|
-
api.has_param :formatting, { enum:
|
280
|
+
api.has_param :formatting, { enum: -> { Post::FORMATTING }}
|
279
281
|
api.has_param :fun_fact_prompt_id, 'int'
|
280
282
|
api.has_param :fun_fact_toastee_id, 'int'
|
281
283
|
api.has_param :has_nickname, 'bool'
|
@@ -312,11 +314,11 @@ module FacebookAds
|
|
312
314
|
api.has_param :page_recommendation, 'string'
|
313
315
|
api.has_param :picture, 'string'
|
314
316
|
api.has_param :place, 'object'
|
315
|
-
api.has_param :place_attachment_setting, { enum:
|
317
|
+
api.has_param :place_attachment_setting, { enum: -> { Post::PLACE_ATTACHMENT_SETTING }}
|
316
318
|
api.has_param :place_list, 'string'
|
317
319
|
api.has_param :place_list_data, { list: 'string' }
|
318
|
-
api.has_param :post_surfaces_blacklist, { list: { enum:
|
319
|
-
api.has_param :posting_to_redspace, { enum:
|
320
|
+
api.has_param :post_surfaces_blacklist, { list: { enum: -> { Post::POST_SURFACES_BLACKLIST }} }
|
321
|
+
api.has_param :posting_to_redspace, { enum: -> { Post::POSTING_TO_REDSPACE }}
|
320
322
|
api.has_param :privacy, 'string'
|
321
323
|
api.has_param :prompt_id, 'string'
|
322
324
|
api.has_param :prompt_tracking_string, 'string'
|
@@ -336,7 +338,7 @@ module FacebookAds
|
|
336
338
|
api.has_param :sponsor_relationship, 'int'
|
337
339
|
api.has_param :suggested_place_id, 'object'
|
338
340
|
api.has_param :tags, { list: 'int' }
|
339
|
-
api.has_param :target_surface, { enum:
|
341
|
+
api.has_param :target_surface, { enum: -> { Post::TARGET_SURFACE }}
|
340
342
|
api.has_param :targeting, 'object'
|
341
343
|
api.has_param :text_format_metadata, 'string'
|
342
344
|
api.has_param :text_format_preset_id, 'string'
|
@@ -346,7 +348,7 @@ module FacebookAds
|
|
346
348
|
api.has_param :time_since_original_post, 'int'
|
347
349
|
api.has_param :title, 'string'
|
348
350
|
api.has_param :tracking_info, 'string'
|
349
|
-
api.has_param :unpublished_content_type, { enum:
|
351
|
+
api.has_param :unpublished_content_type, { enum: -> { Post::UNPUBLISHED_CONTENT_TYPE }}
|
350
352
|
api.has_param :user_selected_tags, 'bool'
|
351
353
|
api.has_param :video_start_time_ms, 'int'
|
352
354
|
api.has_param :viewer_coordinates, 'object'
|
@@ -504,8 +506,8 @@ module FacebookAds
|
|
504
506
|
end
|
505
507
|
end
|
506
508
|
|
507
|
-
has_edge :
|
508
|
-
edge.get '
|
509
|
+
has_edge :payment_transactions do |edge|
|
510
|
+
edge.get 'PaymentEnginePayment'
|
509
511
|
end
|
510
512
|
|
511
513
|
has_edge :permissions do |edge|
|
@@ -592,6 +594,17 @@ module FacebookAds
|
|
592
594
|
end
|
593
595
|
end
|
594
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
|
+
|
595
608
|
has_edge :rich_media_documents do |edge|
|
596
609
|
edge.get 'Canvas' do |api|
|
597
610
|
api.has_param :query, 'string'
|
@@ -613,7 +626,6 @@ module FacebookAds
|
|
613
626
|
api.has_param :animated_effect_id, 'int'
|
614
627
|
api.has_param :application_id, 'string'
|
615
628
|
api.has_param :asked_fun_fact_prompt_id, 'int'
|
616
|
-
api.has_param :attribution_app_id, 'string'
|
617
629
|
api.has_param :audio_story_wave_animation_handle, 'string'
|
618
630
|
api.has_param :composer_entry_picker, 'string'
|
619
631
|
api.has_param :composer_entry_point, 'string'
|
@@ -668,6 +680,7 @@ module FacebookAds
|
|
668
680
|
api.has_param :sales_promo_id, 'int'
|
669
681
|
api.has_param :slideshow_spec, 'hash'
|
670
682
|
api.has_param :source, 'string'
|
683
|
+
api.has_param :source_instagram_media_id, 'string'
|
671
684
|
api.has_param :spherical, 'bool'
|
672
685
|
api.has_param :sponsor_id, 'string'
|
673
686
|
api.has_param :start_offset, 'int'
|