facebookbusiness 0.8.0.0 → 0.9.0.1
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_account.rb +22 -3
- data/lib/facebook_ads/ad_objects/ad_account_ad_volume.rb +24 -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 +5 -0
- data/lib/facebook_ads/ad_objects/ad_async_request.rb +2 -0
- data/lib/facebook_ads/ad_objects/ad_campaign_activity.rb +4 -0
- data/lib/facebook_ads/ad_objects/ad_creative.rb +6 -0
- data/lib/facebook_ads/ad_objects/ad_creative_interactive_components_spec.rb +1 -0
- data/lib/facebook_ads/ad_objects/ad_creative_link_data_call_to_action.rb +4 -0
- data/lib/facebook_ads/ad_objects/ad_network_analytics_sync_query_result.rb +1 -0
- data/lib/facebook_ads/ad_objects/ad_preview.rb +1 -0
- data/lib/facebook_ads/ad_objects/ad_rule_execution_spec.rb +4 -0
- data/lib/facebook_ads/ad_objects/ad_study.rb +1 -1
- data/lib/facebook_ads/ad_objects/ad_study_objective.rb +0 -4
- data/lib/facebook_ads/ad_objects/ad_video.rb +11 -0
- data/lib/facebook_ads/ad_objects/adgroup_activity.rb +2 -0
- data/lib/facebook_ads/ad_objects/adoptable_pet.rb +8 -0
- data/lib/facebook_ads/ad_objects/ads_insights.rb +1 -0
- data/lib/facebook_ads/ad_objects/ads_pixel.rb +4 -0
- data/lib/facebook_ads/ad_objects/application.rb +23 -0
- data/lib/facebook_ads/ad_objects/atlas_campaign.rb +1 -1
- data/lib/facebook_ads/ad_objects/automotive_model.rb +1 -0
- data/lib/facebook_ads/ad_objects/business.rb +62 -11
- data/lib/facebook_ads/ad_objects/business_asset_group.rb +1 -0
- data/lib/facebook_ads/ad_objects/business_role_request.rb +4 -0
- data/lib/facebook_ads/ad_objects/business_unit.rb +1 -2
- data/lib/facebook_ads/ad_objects/business_user.rb +4 -0
- data/lib/facebook_ads/ad_objects/campaign.rb +8 -0
- data/lib/facebook_ads/ad_objects/catalog_sub_vertical_list.rb +88 -0
- data/lib/facebook_ads/ad_objects/commerce_merchant_settings.rb +16 -19
- data/lib/facebook_ads/ad_objects/commerce_merchant_settings_setup_status.rb +1 -0
- data/lib/facebook_ads/ad_objects/commerce_order.rb +6 -0
- data/lib/facebook_ads/ad_objects/{work_meeting_link.rb → connections_targeting.rb} +3 -2
- data/lib/facebook_ads/ad_objects/cpas_advertiser_partnership_recommendation.rb +43 -0
- data/lib/facebook_ads/ad_objects/cpas_collaboration_request.rb +50 -0
- data/lib/facebook_ads/ad_objects/custom_audience_data_source.rb +1 -0
- data/lib/facebook_ads/ad_objects/da_check.rb +7 -0
- data/lib/facebook_ads/ad_objects/destination.rb +1 -0
- data/lib/facebook_ads/ad_objects/event.rb +1 -0
- data/lib/facebook_ads/ad_objects/extended_credit.rb +7 -1
- data/lib/facebook_ads/ad_objects/flight.rb +1 -0
- data/lib/facebook_ads/ad_objects/group.rb +8 -0
- data/lib/facebook_ads/ad_objects/home_listing.rb +1 -0
- data/lib/facebook_ads/ad_objects/hotel.rb +1 -0
- data/lib/facebook_ads/ad_objects/hotel_room.rb +1 -0
- data/lib/facebook_ads/ad_objects/link.rb +6 -0
- data/lib/facebook_ads/ad_objects/live_video.rb +12 -12
- data/lib/facebook_ads/ad_objects/page.rb +40 -8
- data/lib/facebook_ads/ad_objects/page_post.rb +2 -0
- data/lib/facebook_ads/ad_objects/photo.rb +6 -0
- data/lib/facebook_ads/ad_objects/playable_content.rb +1 -0
- data/lib/facebook_ads/ad_objects/post.rb +49 -2
- data/lib/facebook_ads/ad_objects/product_catalog.rb +41 -7
- data/lib/facebook_ads/ad_objects/product_feed.rb +31 -0
- data/lib/facebook_ads/ad_objects/product_group.rb +1 -0
- data/lib/facebook_ads/ad_objects/product_item.rb +4 -0
- data/lib/facebook_ads/ad_objects/product_set.rb +1 -0
- data/lib/facebook_ads/ad_objects/product_set_metadata.rb +1 -0
- data/lib/facebook_ads/ad_objects/publisher_block_list.rb +6 -0
- data/lib/facebook_ads/ad_objects/referral.rb +2 -0
- data/lib/facebook_ads/ad_objects/security_settings.rb +0 -1
- data/lib/facebook_ads/ad_objects/server_side/action_source.rb +48 -0
- data/lib/facebook_ads/ad_objects/server_side/batch_processor.rb +73 -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 +61 -14
- data/lib/facebook_ads/ad_objects/server_side/event_request_async.rb +43 -0
- data/lib/facebook_ads/ad_objects/server_side/http_method.rb +28 -0
- data/lib/facebook_ads/ad_objects/server_side/http_service_interface.rb +33 -0
- data/lib/facebook_ads/ad_objects/server_side/http_util.rb +31 -0
- data/lib/facebook_ads/ad_objects/server_side/user_data.rb +20 -1
- data/lib/facebook_ads/ad_objects/server_side/util.rb +13 -0
- data/lib/facebook_ads/ad_objects/system_user.rb +0 -16
- data/lib/facebook_ads/ad_objects/targeting.rb +3 -3
- data/lib/facebook_ads/ad_objects/third_party_measurement_report_dataset.rb +0 -1
- data/lib/facebook_ads/ad_objects/unified_thread.rb +1 -0
- data/lib/facebook_ads/ad_objects/user.rb +28 -25
- data/lib/facebook_ads/ad_objects/vehicle.rb +2 -0
- data/lib/facebook_ads/ad_objects/vehicle_offer.rb +1 -0
- data/lib/facebook_ads/ad_objects/whats_app_business_account.rb +25 -0
- data/lib/facebook_ads/errors.rb +1 -1
- data/lib/facebook_ads/session.rb +1 -1
- data/lib/facebook_ads/version.rb +2 -2
- metadata +32 -8
@@ -91,6 +91,9 @@ module FacebookAds
|
|
91
91
|
# The subscription ID for the user in this transaction. This is similar to the order ID for an individual product.
|
92
92
|
attr_accessor :subscription_id
|
93
93
|
|
94
|
+
# The lead ID for the user in this transaction. This ID is associated with a lead generated by Facebook's Lead Ads.
|
95
|
+
attr_accessor :lead_id
|
96
|
+
|
94
97
|
# The first 5 letters of the first name.
|
95
98
|
attr_accessor :f5first
|
96
99
|
|
@@ -126,6 +129,7 @@ module FacebookAds
|
|
126
129
|
# @param [String] fbc
|
127
130
|
# @param [String] fbp
|
128
131
|
# @param [String] subscription_id
|
132
|
+
# @param [String] lead_id
|
129
133
|
# @param [String] f5first
|
130
134
|
# @param [String] f5last
|
131
135
|
# @param [String] fi
|
@@ -135,7 +139,7 @@ module FacebookAds
|
|
135
139
|
def initialize(email: nil, phone: nil, gender: nil, date_of_birth: nil,
|
136
140
|
last_name: nil, first_name: nil, city: nil, state: nil,
|
137
141
|
country_code: nil, zip_code: nil, external_id: nil, client_ip_address: nil,
|
138
|
-
client_user_agent: nil, fbc: nil, fbp: nil, subscription_id: nil,
|
142
|
+
client_user_agent: nil, fbc: nil, fbp: nil, subscription_id: nil, lead_id: nil,
|
139
143
|
f5first: nil, f5last: nil, fi: nil, dobd: nil, dobm: nil, doby: nil)
|
140
144
|
unless email.nil?
|
141
145
|
self.email = email
|
@@ -185,6 +189,9 @@ module FacebookAds
|
|
185
189
|
unless subscription_id.nil?
|
186
190
|
self.subscription_id = subscription_id
|
187
191
|
end
|
192
|
+
unless lead_id.nil?
|
193
|
+
self.lead_id = lead_id
|
194
|
+
end
|
188
195
|
unless f5first.nil?
|
189
196
|
self.f5first = f5first
|
190
197
|
end
|
@@ -273,6 +280,10 @@ module FacebookAds
|
|
273
280
|
self.fbp = attributes[:'fbp']
|
274
281
|
end
|
275
282
|
|
283
|
+
if attributes.has_key?(:'lead_id')
|
284
|
+
self.lead_id = attributes[:'lead_id']
|
285
|
+
end
|
286
|
+
|
276
287
|
if attributes.has_key?(:'f5first')
|
277
288
|
self.f5first = attributes[:'f5first']
|
278
289
|
end
|
@@ -318,6 +329,7 @@ module FacebookAds
|
|
318
329
|
fbc == o.fbc &&
|
319
330
|
fbp == o.fbp &&
|
320
331
|
subscription_id == o.subscription_id &&
|
332
|
+
lead_id == o.lead_id &&
|
321
333
|
f5first == o.f5first &&
|
322
334
|
f5last == o.f5last &&
|
323
335
|
fi == o.fi &&
|
@@ -351,6 +363,7 @@ module FacebookAds
|
|
351
363
|
fbc,
|
352
364
|
fbp,
|
353
365
|
subscription_id,
|
366
|
+
lead_id,
|
354
367
|
f5first,
|
355
368
|
f5last,
|
356
369
|
fi,
|
@@ -413,6 +426,9 @@ module FacebookAds
|
|
413
426
|
unless subscription_id.nil?
|
414
427
|
hash['subscription_id'] = subscription_id
|
415
428
|
end
|
429
|
+
unless lead_id.nil?
|
430
|
+
hash['lead_id'] = lead_id
|
431
|
+
end
|
416
432
|
unless f5first.nil?
|
417
433
|
hash['f5first'] = f5first
|
418
434
|
end
|
@@ -486,6 +502,9 @@ module FacebookAds
|
|
486
502
|
unless subscription_id.nil?
|
487
503
|
hash['subscription_id'] = subscription_id
|
488
504
|
end
|
505
|
+
unless lead_id.nil?
|
506
|
+
hash['lead_id'] = lead_id
|
507
|
+
end
|
489
508
|
unless f5first.nil?
|
490
509
|
hash['f5first'] = FacebookAds::ServerSide::Util.normalize(f5first, 'f5first')
|
491
510
|
end
|
@@ -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'
|
@@ -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
|
@@ -26,20 +26,6 @@ module FacebookAds
|
|
26
26
|
# pull request for this class.
|
27
27
|
|
28
28
|
class SystemUser < AdObject
|
29
|
-
ROLE = [
|
30
|
-
"ADMIN",
|
31
|
-
"ADS_RIGHTS_REVIEWER",
|
32
|
-
"DEVELOPER",
|
33
|
-
"EMPLOYEE",
|
34
|
-
"FINANCE_ANALYST",
|
35
|
-
"FINANCE_EDITOR",
|
36
|
-
"PARTNER_CENTER_ADMIN",
|
37
|
-
"PARTNER_CENTER_ANALYST",
|
38
|
-
"PARTNER_CENTER_EDUCATION",
|
39
|
-
"PARTNER_CENTER_MARKETING",
|
40
|
-
"PARTNER_CENTER_OPERATIONS",
|
41
|
-
]
|
42
|
-
|
43
29
|
|
44
30
|
field :created_by, 'User'
|
45
31
|
field :created_time, 'datetime'
|
@@ -47,8 +33,6 @@ module FacebookAds
|
|
47
33
|
field :id, 'string'
|
48
34
|
field :ip_permission, 'string'
|
49
35
|
field :name, 'string'
|
50
|
-
field :role, { enum: -> { ROLE }}
|
51
|
-
field :system_user_id, 'int'
|
52
36
|
has_no_post
|
53
37
|
has_no_delete
|
54
38
|
|
@@ -50,7 +50,7 @@ module FacebookAds
|
|
50
50
|
field :catalog_based_targeting, 'CatalogBasedTargeting'
|
51
51
|
field :cities, { list: 'IdName' }
|
52
52
|
field :college_years, { list: 'int' }
|
53
|
-
field :connections, { list: '
|
53
|
+
field :connections, { list: 'ConnectionsTargeting' }
|
54
54
|
field :contextual_targeting_categories, { list: 'IdName' }
|
55
55
|
field :countries, { list: 'string' }
|
56
56
|
field :country, { list: 'string' }
|
@@ -72,7 +72,7 @@ module FacebookAds
|
|
72
72
|
field :ethnic_affinity, { list: 'IdName' }
|
73
73
|
field :exclude_reached_since, { list: 'string' }
|
74
74
|
field :excluded_brand_safety_content_types, { list: 'string' }
|
75
|
-
field :excluded_connections, { list: '
|
75
|
+
field :excluded_connections, { list: 'ConnectionsTargeting' }
|
76
76
|
field :excluded_custom_audiences, { list: 'RawCustomAudience' }
|
77
77
|
field :excluded_dynamic_audience_ids, { list: 'string' }
|
78
78
|
field :excluded_engagement_specs, { list: 'TargetingDynamicRule' }
|
@@ -87,7 +87,7 @@ module FacebookAds
|
|
87
87
|
field :family_statuses, { list: 'IdName' }
|
88
88
|
field :fb_deal_id, 'string'
|
89
89
|
field :flexible_spec, { list: 'FlexibleTargeting' }
|
90
|
-
field :friends_of_connections, { list: '
|
90
|
+
field :friends_of_connections, { list: 'ConnectionsTargeting' }
|
91
91
|
field :genders, { list: 'int' }
|
92
92
|
field :generation, { list: 'IdName' }
|
93
93
|
field :geo_locations, 'TargetingGeoLocation'
|
@@ -54,7 +54,6 @@ module FacebookAds
|
|
54
54
|
field :age_range, 'AgeRange'
|
55
55
|
field :auth_method, 'string'
|
56
56
|
field :birthday, 'string'
|
57
|
-
field :can_review_measurement_request, 'bool'
|
58
57
|
field :cover, 'UserCoverPhoto'
|
59
58
|
field :currency, 'Currency'
|
60
59
|
field :devices, { list: 'UserDevice' }
|
@@ -70,9 +69,7 @@ module FacebookAds
|
|
70
69
|
field :install_type, 'string'
|
71
70
|
field :installed, 'bool'
|
72
71
|
field :interested_in, { list: 'string' }
|
73
|
-
field :is_famedeeplinkinguser, 'bool'
|
74
72
|
field :is_guest_user, 'bool'
|
75
|
-
field :is_shared_login, 'bool'
|
76
73
|
field :is_verified, 'bool'
|
77
74
|
field :languages, { list: 'Experience' }
|
78
75
|
field :last_name, 'string'
|
@@ -82,6 +79,7 @@ module FacebookAds
|
|
82
79
|
field :locale, 'string'
|
83
80
|
field :location, 'Page'
|
84
81
|
field :meeting_for, { list: 'string' }
|
82
|
+
field :messenger_join_notifications_enabled, 'bool'
|
85
83
|
field :middle_name, 'string'
|
86
84
|
field :name, 'string'
|
87
85
|
field :name_format, 'string'
|
@@ -89,33 +87,28 @@ module FacebookAds
|
|
89
87
|
field :political, 'string'
|
90
88
|
field :profile_pic, 'string'
|
91
89
|
field :public_key, 'string'
|
90
|
+
field :published_timeline, 'bool'
|
92
91
|
field :quotes, 'string'
|
93
92
|
field :relationship_status, 'string'
|
94
93
|
field :religion, 'string'
|
95
|
-
field :security_settings, 'SecuritySettings'
|
96
94
|
field :shared_login_upgrade_required_by, 'datetime'
|
97
95
|
field :short_name, 'string'
|
98
96
|
field :significant_other, 'User'
|
99
97
|
field :sports, { list: 'Experience' }
|
100
98
|
field :supports_donate_button_in_live_video, 'bool'
|
101
|
-
field :test_group, 'int'
|
102
99
|
field :third_party_id, 'string'
|
103
100
|
field :timezone, 'double'
|
104
101
|
field :token_for_business, 'string'
|
105
102
|
field :updated_time, 'datetime'
|
103
|
+
field :user_storage_key, 'string'
|
104
|
+
field :username, 'string'
|
106
105
|
field :verified, 'bool'
|
107
106
|
field :video_upload_limits, 'VideoUploadLimits'
|
108
|
-
field :viewer_can_send_gift, 'bool'
|
109
107
|
field :website, 'string'
|
110
108
|
field :work, { list: 'object' }
|
111
109
|
|
112
110
|
has_edge :access_tokens do |edge|
|
113
111
|
edge.delete
|
114
|
-
edge.post 'User' do |api|
|
115
|
-
api.has_param :business_app, 'int'
|
116
|
-
api.has_param :page_id, 'string'
|
117
|
-
api.has_param :scope, { list: 'Permission' }
|
118
|
-
end
|
119
112
|
end
|
120
113
|
|
121
114
|
has_edge :accounts do |edge|
|
@@ -211,6 +204,7 @@ module FacebookAds
|
|
211
204
|
end
|
212
205
|
edge.get 'Business'
|
213
206
|
edge.post 'Business' do |api|
|
207
|
+
api.has_param :child_business_external_id, 'string'
|
214
208
|
api.has_param :email, 'string'
|
215
209
|
api.has_param :name, 'string'
|
216
210
|
api.has_param :primary_page, 'string'
|
@@ -243,7 +237,15 @@ module FacebookAds
|
|
243
237
|
end
|
244
238
|
|
245
239
|
has_edge :feed do |edge|
|
246
|
-
edge.
|
240
|
+
edge.get 'Post' do |api|
|
241
|
+
api.has_param :include_hidden, 'bool'
|
242
|
+
api.has_param :q, 'string'
|
243
|
+
api.has_param :show_expired, 'bool'
|
244
|
+
api.has_param :since, 'datetime'
|
245
|
+
api.has_param :until, 'datetime'
|
246
|
+
api.has_param :with, 'string'
|
247
|
+
end
|
248
|
+
edge.post 'Post' do |api|
|
247
249
|
api.has_param :actions, 'object'
|
248
250
|
api.has_param :adaptive_type, 'string'
|
249
251
|
api.has_param :album_id, 'string'
|
@@ -257,10 +259,10 @@ module FacebookAds
|
|
257
259
|
api.has_param :attached_media, { list: 'object' }
|
258
260
|
api.has_param :audience_exp, 'bool'
|
259
261
|
api.has_param :backdated_time, 'datetime'
|
260
|
-
api.has_param :backdated_time_granularity, { enum:
|
262
|
+
api.has_param :backdated_time_granularity, { enum: -> { Post::BACKDATED_TIME_GRANULARITY }}
|
261
263
|
api.has_param :call_to_action, 'object'
|
262
264
|
api.has_param :caption, 'string'
|
263
|
-
api.has_param :checkin_entry_point, { enum:
|
265
|
+
api.has_param :checkin_entry_point, { enum: -> { Post::CHECKIN_ENTRY_POINT }}
|
264
266
|
api.has_param :child_attachments, { list: 'object' }
|
265
267
|
api.has_param :client_mutation_id, 'string'
|
266
268
|
api.has_param :composer_entry_picker, 'string'
|
@@ -280,7 +282,7 @@ module FacebookAds
|
|
280
282
|
api.has_param :expanded_height, 'int'
|
281
283
|
api.has_param :expanded_width, 'int'
|
282
284
|
api.has_param :feed_targeting, 'object'
|
283
|
-
api.has_param :formatting, { enum:
|
285
|
+
api.has_param :formatting, { enum: -> { Post::FORMATTING }}
|
284
286
|
api.has_param :fun_fact_prompt_id, 'int'
|
285
287
|
api.has_param :fun_fact_toastee_id, 'int'
|
286
288
|
api.has_param :has_nickname, 'bool'
|
@@ -317,11 +319,11 @@ module FacebookAds
|
|
317
319
|
api.has_param :page_recommendation, 'string'
|
318
320
|
api.has_param :picture, 'string'
|
319
321
|
api.has_param :place, 'object'
|
320
|
-
api.has_param :place_attachment_setting, { enum:
|
322
|
+
api.has_param :place_attachment_setting, { enum: -> { Post::PLACE_ATTACHMENT_SETTING }}
|
321
323
|
api.has_param :place_list, 'string'
|
322
324
|
api.has_param :place_list_data, { list: 'string' }
|
323
|
-
api.has_param :post_surfaces_blacklist, { list: { enum:
|
324
|
-
api.has_param :posting_to_redspace, { enum:
|
325
|
+
api.has_param :post_surfaces_blacklist, { list: { enum: -> { Post::POST_SURFACES_BLACKLIST }} }
|
326
|
+
api.has_param :posting_to_redspace, { enum: -> { Post::POSTING_TO_REDSPACE }}
|
325
327
|
api.has_param :privacy, 'string'
|
326
328
|
api.has_param :prompt_id, 'string'
|
327
329
|
api.has_param :prompt_tracking_string, 'string'
|
@@ -341,7 +343,7 @@ module FacebookAds
|
|
341
343
|
api.has_param :sponsor_relationship, 'int'
|
342
344
|
api.has_param :suggested_place_id, 'object'
|
343
345
|
api.has_param :tags, { list: 'int' }
|
344
|
-
api.has_param :target_surface, { enum:
|
346
|
+
api.has_param :target_surface, { enum: -> { Post::TARGET_SURFACE }}
|
345
347
|
api.has_param :targeting, 'object'
|
346
348
|
api.has_param :text_format_metadata, 'string'
|
347
349
|
api.has_param :text_format_preset_id, 'string'
|
@@ -351,7 +353,7 @@ module FacebookAds
|
|
351
353
|
api.has_param :time_since_original_post, 'int'
|
352
354
|
api.has_param :title, 'string'
|
353
355
|
api.has_param :tracking_info, 'string'
|
354
|
-
api.has_param :unpublished_content_type, { enum:
|
356
|
+
api.has_param :unpublished_content_type, { enum: -> { Post::UNPUBLISHED_CONTENT_TYPE }}
|
355
357
|
api.has_param :user_selected_tags, 'bool'
|
356
358
|
api.has_param :video_start_time_ms, 'int'
|
357
359
|
api.has_param :viewer_coordinates, 'object'
|
@@ -468,6 +470,7 @@ module FacebookAds
|
|
468
470
|
edge.post 'LiveVideo' do |api|
|
469
471
|
api.has_param :content_tags, { list: 'string' }
|
470
472
|
api.has_param :description, 'string'
|
473
|
+
api.has_param :enable_backup_ingest, 'bool'
|
471
474
|
api.has_param :encoding_settings, 'string'
|
472
475
|
api.has_param :fisheye_video_cropped, 'bool'
|
473
476
|
api.has_param :front_z_rotation, 'double'
|
@@ -489,11 +492,6 @@ module FacebookAds
|
|
489
492
|
end
|
490
493
|
end
|
491
494
|
|
492
|
-
has_edge :meeting_link do |edge|
|
493
|
-
edge.get 'WorkMeetingLink'
|
494
|
-
edge.post 'WorkMeetingLink'
|
495
|
-
end
|
496
|
-
|
497
495
|
has_edge :music do |edge|
|
498
496
|
edge.get 'Page' do |api|
|
499
497
|
api.has_param :target_id, 'string'
|
@@ -513,6 +511,10 @@ module FacebookAds
|
|
513
511
|
end
|
514
512
|
end
|
515
513
|
|
514
|
+
has_edge :owned_product_catalogs do |edge|
|
515
|
+
edge.get 'ProductCatalog'
|
516
|
+
end
|
517
|
+
|
516
518
|
has_edge :permissions do |edge|
|
517
519
|
edge.delete do |api|
|
518
520
|
api.has_param :permission, 'string'
|
@@ -673,6 +675,7 @@ module FacebookAds
|
|
673
675
|
api.has_param :sales_promo_id, 'int'
|
674
676
|
api.has_param :slideshow_spec, 'hash'
|
675
677
|
api.has_param :source, 'string'
|
678
|
+
api.has_param :source_instagram_media_id, 'string'
|
676
679
|
api.has_param :spherical, 'bool'
|
677
680
|
api.has_param :sponsor_id, 'string'
|
678
681
|
api.has_param :start_offset, 'int'
|
@@ -29,6 +29,7 @@ module FacebookAds
|
|
29
29
|
AVAILABILITY = [
|
30
30
|
"AVAILABLE",
|
31
31
|
"NOT_AVAILABLE",
|
32
|
+
"PENDING",
|
32
33
|
]
|
33
34
|
|
34
35
|
BODY_STYLE = [
|
@@ -108,6 +109,7 @@ module FacebookAds
|
|
108
109
|
field :applinks, 'CatalogItemAppLinks'
|
109
110
|
field :availability, 'string'
|
110
111
|
field :body_style, 'string'
|
112
|
+
field :category_specific_fields, 'CatalogSubVerticalList'
|
111
113
|
field :condition, 'string'
|
112
114
|
field :currency, 'string'
|
113
115
|
field :custom_label_0, 'string'
|
@@ -35,6 +35,7 @@ module FacebookAds
|
|
35
35
|
field :body_style, 'string'
|
36
36
|
field :cashback_currency, 'string'
|
37
37
|
field :cashback_price, 'string'
|
38
|
+
field :category_specific_fields, 'CatalogSubVerticalList'
|
38
39
|
field :currency, 'string'
|
39
40
|
field :dma_codes, { list: 'string' }
|
40
41
|
field :downpayment_currency, 'string'
|
@@ -26,6 +26,14 @@ module FacebookAds
|
|
26
26
|
# pull request for this class.
|
27
27
|
|
28
28
|
class WhatsAppBusinessAccount < AdObject
|
29
|
+
TASKS = [
|
30
|
+
"DEVELOP",
|
31
|
+
"MANAGE",
|
32
|
+
"MANAGE_PHONE",
|
33
|
+
"MANAGE_TEMPLATES",
|
34
|
+
"VIEW_COST",
|
35
|
+
]
|
36
|
+
|
29
37
|
CATEGORY = [
|
30
38
|
"ACCOUNT_UPDATE",
|
31
39
|
"ALERT_UPDATE",
|
@@ -47,12 +55,27 @@ module FacebookAds
|
|
47
55
|
field :message_template_namespace, 'string'
|
48
56
|
field :name, 'string'
|
49
57
|
field :on_behalf_of_business_info, 'object'
|
58
|
+
field :owner_business_info, 'object'
|
59
|
+
field :primary_funding_id, 'string'
|
50
60
|
field :purchase_order_number, 'string'
|
51
61
|
field :status, 'string'
|
52
62
|
field :timezone_id, 'string'
|
53
63
|
has_no_post
|
54
64
|
has_no_delete
|
55
65
|
|
66
|
+
has_edge :assigned_users do |edge|
|
67
|
+
edge.delete do |api|
|
68
|
+
api.has_param :user, 'int'
|
69
|
+
end
|
70
|
+
edge.get 'AssignedUser' do |api|
|
71
|
+
api.has_param :business, 'string'
|
72
|
+
end
|
73
|
+
edge.post 'WhatsAppBusinessAccount' do |api|
|
74
|
+
api.has_param :tasks, { list: { enum: -> { WhatsAppBusinessAccount::TASKS }} }
|
75
|
+
api.has_param :user, 'int'
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
56
79
|
has_edge :message_templates do |edge|
|
57
80
|
edge.delete do |api|
|
58
81
|
api.has_param :name, 'string'
|
@@ -78,6 +101,8 @@ module FacebookAds
|
|
78
101
|
end
|
79
102
|
|
80
103
|
has_edge :subscribed_apps do |edge|
|
104
|
+
edge.delete
|
105
|
+
edge.get
|
81
106
|
edge.post 'WhatsAppBusinessAccount'
|
82
107
|
end
|
83
108
|
|
data/lib/facebook_ads/errors.rb
CHANGED
data/lib/facebook_ads/session.rb
CHANGED
@@ -39,7 +39,7 @@ module FacebookAds
|
|
39
39
|
case method
|
40
40
|
when :get, :post, :delete
|
41
41
|
api_conn.send(method, path.gsub(/^\//,''), params) do |req|
|
42
|
-
req.headers[:user_agent] = "fbbizsdk-ruby-v#{
|
42
|
+
req.headers[:user_agent] = "fbbizsdk-ruby-v#{VERSION}".freeze
|
43
43
|
req.params[:access_token] = access_token if access_token
|
44
44
|
req.params[:appsecret_proof] = appsecret_proof if app_secret
|
45
45
|
end
|