facebookbusiness 0.3.3.1 → 0.3.3.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 792cfd307850bcfc32cb9f8ea348eb37ead2a9d674a25841c49baf4cda2d3177
4
- data.tar.gz: 712f0d5e1a61e6b07d1944ef65a592227a364ffb58bdce0bd1e9c29ce4592af4
3
+ metadata.gz: a13f4ad01041f850f2d271f8f4d3312bae6eeb72f58aafbdea9957fa35d4325a
4
+ data.tar.gz: 0cf341ba5504c12aec66fa4dbdfe943ac90824c69cdbc2eacb58a1d119920537
5
5
  SHA512:
6
- metadata.gz: 29a8ba1fbc2932b1cfa2260a6fc022d06795a31a08549a811a859d073f4b07a5575283b1d8e2e0a8d52bdbac59723bf8158ddd9feb6b3bfdb9bfa8fb9524dfb2
7
- data.tar.gz: 880bb8b3334c1243d5724539fd252aa960f4968ce7c7adc65c7d16e86a97733f7b136f09ca0e0790f53a5d8f0950ae8a7c9b4ddb43a36e42ba09da5696f88921
6
+ metadata.gz: 1dfe8a3f91e658fe5b9a8eef4221b67b4c0edac37fa378d9b54842b5d64355692bf181b7a06dd237cae771f67dc450bcea1f9c01f314fb83cd77727f5677b364
7
+ data.tar.gz: 388015cd356e922bf4738c1fe289b7b4ef4d2cba3679002e1de94d862326922153dd55c4a20c6c2d40a5f573a5e708f663abab2446f2806b2e1dee497a383a28
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "facebookbusiness"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
@@ -551,6 +551,9 @@ module FacebookAds
551
551
  end
552
552
 
553
553
  has_edge :advideos do |edge|
554
+ edge.delete do |api|
555
+ api.has_param :video_id, 'string'
556
+ end
554
557
  edge.get 'AdVideo' do |api|
555
558
  api.has_param :max_aspect_ratio, 'double'
556
559
  api.has_param :maxheight, 'int'
@@ -54,16 +54,9 @@ module FacebookAds
54
54
 
55
55
  EFFECTIVE_STATUS = [
56
56
  "ACTIVE",
57
- "ADSET_PAUSED",
58
57
  "ARCHIVED",
59
- "CAMPAIGN_PAUSED",
60
58
  "DELETED",
61
- "DISAPPROVED",
62
59
  "PAUSED",
63
- "PENDING_BILLING_INFO",
64
- "PENDING_REVIEW",
65
- "PREAPPROVED",
66
- "WITH_ISSUES",
67
60
  ]
68
61
 
69
62
  OPTIMIZATION_GOAL = [
@@ -189,6 +189,13 @@ module FacebookAds
189
189
  "year",
190
190
  ]
191
191
 
192
+ VIDEO_POLL_WWW_PLACEMENT = [
193
+ "BOTTOM_LEFT",
194
+ "BOTTOM_RIGHT",
195
+ "TOP_LEFT",
196
+ "TOP_RIGHT",
197
+ ]
198
+
192
199
 
193
200
  field :ad_breaks, { list: 'int' }
194
201
  field :backdated_time, 'datetime'
@@ -347,6 +354,14 @@ module FacebookAds
347
354
  end
348
355
  end
349
356
 
357
+ has_edge :poll_settings do |edge|
358
+ edge.get
359
+ edge.post 'AdVideo' do |api|
360
+ api.has_param :enable_was_live_voting, 'bool'
361
+ api.has_param :video_poll_www_placement, { enum: -> { AdVideo::VIDEO_POLL_WWW_PLACEMENT }}
362
+ end
363
+ end
364
+
350
365
  has_edge :polls do |edge|
351
366
  edge.get 'VideoPoll'
352
367
  edge.post 'VideoPoll' do |api|
@@ -170,6 +170,7 @@ module FacebookAds
170
170
  field :property_id, 'string'
171
171
  field :real_time_mode_devices, { list: 'string' }
172
172
  field :restrictions, 'object'
173
+ field :restrictive_data_filter_rules, 'string'
173
174
  field :sdk_update_message, 'string'
174
175
  field :seamless_login, 'int'
175
176
  field :secure_canvas_url, 'string'
@@ -276,10 +277,6 @@ module FacebookAds
276
277
  end
277
278
  end
278
279
 
279
- has_edge :agencies do |edge|
280
- edge.get 'Business'
281
- end
282
-
283
280
  has_edge :app_event_types do |edge|
284
281
  edge.get
285
282
  end
@@ -329,17 +326,9 @@ module FacebookAds
329
326
  end
330
327
 
331
328
  has_edge :authorized_adaccounts do |edge|
332
- edge.delete do |api|
333
- api.has_param :account_id, 'string'
334
- api.has_param :business, 'string'
335
- end
336
329
  edge.get 'AdAccount' do |api|
337
330
  api.has_param :business, 'string'
338
331
  end
339
- edge.post 'Application' do |api|
340
- api.has_param :account_id, 'string'
341
- api.has_param :business, 'string'
342
- end
343
332
  end
344
333
 
345
334
  has_edge :banned do |edge|
@@ -57,11 +57,6 @@ module FacebookAds
57
57
  "TRAVEL",
58
58
  ]
59
59
 
60
- ACCESS_TYPE = [
61
- "AGENCY",
62
- "OWNER",
63
- ]
64
-
65
60
  PERMITTED_TASKS = [
66
61
  "ADVERTISE",
67
62
  "ANALYZE",
@@ -89,14 +84,6 @@ module FacebookAds
89
84
  "VIEW_MONETIZATION_INSIGHTS",
90
85
  ]
91
86
 
92
- ROLE = [
93
- "ADMIN",
94
- "ADS_RIGHTS_REVIEWER",
95
- "EMPLOYEE",
96
- "FINANCE_ANALYST",
97
- "FINANCE_EDITOR",
98
- ]
99
-
100
87
 
101
88
  field :block_offline_analytics, 'bool'
102
89
  field :created_by, 'object'
@@ -166,16 +153,16 @@ module FacebookAds
166
153
 
167
154
  has_edge :adaccountcreationrequests do |edge|
168
155
  edge.post 'AdAccountCreationRequest' do |api|
169
- api.has_param :ad_accounts_info, { list: 'object' }
156
+ api.has_param :ad_accounts_info, { list: 'hash' }
170
157
  api.has_param :additional_comment, 'string'
171
158
  api.has_param :address_in_chinese, 'string'
172
- api.has_param :address_in_english, 'object'
159
+ api.has_param :address_in_english, 'hash'
173
160
  api.has_param :address_in_local_language, 'string'
174
161
  api.has_param :advertiser_business_id, 'string'
175
162
  api.has_param :business_registration, 'file'
176
163
  api.has_param :business_registration_id, 'string'
177
164
  api.has_param :chinese_legal_entity_name, 'string'
178
- api.has_param :contact, 'object'
165
+ api.has_param :contact, 'hash'
179
166
  api.has_param :english_legal_entity_name, 'string'
180
167
  api.has_param :extended_credit_id, 'string'
181
168
  api.has_param :is_smb, 'bool'
@@ -184,7 +171,7 @@ module FacebookAds
184
171
  api.has_param :official_website_url, 'string'
185
172
  api.has_param :planning_agency_business_id, 'string'
186
173
  api.has_param :promotable_app_ids, { list: 'string' }
187
- api.has_param :promotable_page_ids, { list: 'string' }
174
+ api.has_param :promotable_page_ids, { list: 'int' }
188
175
  api.has_param :promotable_page_urls, { list: 'string' }
189
176
  api.has_param :promotable_urls, { list: 'string' }
190
177
  api.has_param :subvertical, { enum: -> { AdAccountCreationRequest::SUBVERTICAL }}
@@ -254,26 +241,10 @@ module FacebookAds
254
241
  edge.get 'Business'
255
242
  end
256
243
 
257
- has_edge :agency_pages do |edge|
258
- edge.get 'Page' do |api|
259
- api.has_param :agency_id, 'string'
260
- end
261
- end
262
-
263
244
  has_edge :an_placements do |edge|
264
245
  edge.get 'AdPlacement'
265
246
  end
266
247
 
267
- has_edge :apps do |edge|
268
- edge.delete do |api|
269
- api.has_param :app_id, 'int'
270
- end
271
- edge.post 'Business' do |api|
272
- api.has_param :access_type, { enum: -> { Business::ACCESS_TYPE }}
273
- api.has_param :app_id, 'object'
274
- end
275
- end
276
-
277
248
  has_edge :block_list_drafts do |edge|
278
249
  edge.post 'Business' do |api|
279
250
  api.has_param :publisher_urls_file, 'file'
@@ -640,23 +611,5 @@ module FacebookAds
640
611
  end
641
612
  end
642
613
 
643
- has_edge :user_invitations do |edge|
644
- edge.delete do |api|
645
- api.has_param :email, 'string'
646
- end
647
- end
648
-
649
- has_edge :userpermissions do |edge|
650
- edge.delete do |api|
651
- api.has_param :email, 'string'
652
- api.has_param :user, 'int'
653
- end
654
- edge.post 'Business' do |api|
655
- api.has_param :email, 'string'
656
- api.has_param :role, { enum: -> { Business::ROLE }}
657
- api.has_param :user, 'int'
658
- end
659
- end
660
-
661
614
  end
662
615
  end
@@ -41,16 +41,9 @@ module FacebookAds
41
41
 
42
42
  EFFECTIVE_STATUS = [
43
43
  "ACTIVE",
44
- "ADSET_PAUSED",
45
44
  "ARCHIVED",
46
- "CAMPAIGN_PAUSED",
47
45
  "DELETED",
48
- "DISAPPROVED",
49
46
  "PAUSED",
50
- "PENDING_BILLING_INFO",
51
- "PENDING_REVIEW",
52
- "PREAPPROVED",
53
- "WITH_ISSUES",
54
47
  ]
55
48
 
56
49
  STATUS = [
@@ -80,6 +80,7 @@ module FacebookAds
80
80
  "WORK_LEARNING",
81
81
  "WORK_MENTORSHIP",
82
82
  "WORK_MULTI_COMPANY",
83
+ "WORK_RECRUITING",
83
84
  "WORK_SOCIAL",
84
85
  "WORK_TEAM",
85
86
  "WORK_TEAMWORK",
@@ -127,6 +128,7 @@ module FacebookAds
127
128
  "WORK_LEARNING",
128
129
  "WORK_MENTORSHIP",
129
130
  "WORK_MULTI_COMPANY",
131
+ "WORK_RECRUITING",
130
132
  "WORK_SOCIAL",
131
133
  "WORK_TEAM",
132
134
  "WORK_TEAMWORK",
@@ -36,6 +36,7 @@ module FacebookAds
36
36
  field :personal_info_text, 'string'
37
37
  field :phone_number_inline_context_text, 'string'
38
38
  field :review_your_info_text, 'string'
39
+ field :secure_sharing_text, 'string'
39
40
  field :slide_to_submit_text, 'string'
40
41
  field :submit_button_text, 'string'
41
42
  has_no_id
@@ -906,6 +906,24 @@ module FacebookAds
906
906
  api.has_param :store_number, 'int'
907
907
  end
908
908
  edge.get 'Page'
909
+ edge.post 'Page' do |api|
910
+ api.has_param :always_open, 'bool'
911
+ api.has_param :hours, 'hash'
912
+ api.has_param :ignore_warnings, 'bool'
913
+ api.has_param :location, 'object'
914
+ api.has_param :location_page_id, 'string'
915
+ api.has_param :old_store_number, 'int'
916
+ api.has_param :page_username, 'string'
917
+ api.has_param :permanently_closed, 'bool'
918
+ api.has_param :phone, 'string'
919
+ api.has_param :place_topics, { list: 'string' }
920
+ api.has_param :price_range, 'string'
921
+ api.has_param :store_code, 'string'
922
+ api.has_param :store_location_descriptor, 'string'
923
+ api.has_param :store_name, 'string'
924
+ api.has_param :store_number, 'int'
925
+ api.has_param :website, 'string'
926
+ end
909
927
  end
910
928
 
911
929
  has_edge :media_fingerprints do |edge|
@@ -26,11 +26,14 @@ module FacebookAds
26
26
  # pull request for this class.
27
27
 
28
28
  class PageBroadcast < AdObject
29
+ OPERATION = [
30
+ "CANCEL",
31
+ ]
32
+
29
33
 
30
34
  field :id, 'string'
31
35
  field :scheduled_time, 'string'
32
36
  field :status, 'string'
33
- has_no_post
34
37
  has_no_delete
35
38
 
36
39
  has_edge :insights do |edge|
@@ -267,6 +267,7 @@ module FacebookAds
267
267
  api.has_param :feed_type, { enum: -> { ProductFeed::FEED_TYPE }}
268
268
  api.has_param :file_name, 'string'
269
269
  api.has_param :name, 'string'
270
+ api.has_param :override_type, { enum: -> { ProductFeed::OVERRIDE_TYPE }}
270
271
  api.has_param :quoted_fields_mode, { enum: -> { ProductFeed::QUOTED_FIELDS_MODE }}
271
272
  api.has_param :rules, { list: 'string' }
272
273
  api.has_param :schedule, 'string'
@@ -66,6 +66,11 @@ module FacebookAds
66
66
  "VEHICLE_OFFER",
67
67
  ]
68
68
 
69
+ OVERRIDE_TYPE = [
70
+ "COUNTRY",
71
+ "LANGUAGE",
72
+ ]
73
+
69
74
 
70
75
  field :country, 'string'
71
76
  field :created_time, 'datetime'
@@ -19,6 +19,6 @@
19
19
  # FB:AUTOGEN
20
20
 
21
21
  module FacebookAds
22
- VERSION = '0.3.3.1'
22
+ VERSION = '0.3.3.2'
23
23
  API_VERSION = '3.3'
24
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: facebookbusiness
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3.1
4
+ version: 0.3.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Facebook
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-07 00:00:00.000000000 Z
11
+ date: 2019-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -182,12 +182,14 @@ description: |2
182
182
  The official Facebook Business API SDK for Ruby.
183
183
  https://developers.facebook.com/docs/marketing-api/sdks'
184
184
  email: ''
185
- executables: []
185
+ executables:
186
+ - facebookbusiness
186
187
  extensions: []
187
188
  extra_rdoc_files: []
188
189
  files:
189
190
  - LICENSE.txt
190
191
  - README.md
192
+ - bin/facebookbusiness
191
193
  - lib/facebook_ads.rb
192
194
  - lib/facebook_ads/ad_object.rb
193
195
  - lib/facebook_ads/ad_objects/ad.rb