facebookads 0.0.1 → 0.2.9

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.
Files changed (174) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +17 -0
  3. data/README.md +222 -0
  4. data/lib/facebook_ads/ad_object.rb +177 -0
  5. data/lib/facebook_ads/ad_objects/ad.rb +215 -0
  6. data/lib/facebook_ads/ad_objects/ad_account.rb +665 -0
  7. data/lib/facebook_ads/ad_objects/ad_account_roas.rb +97 -0
  8. data/lib/facebook_ads/ad_objects/ad_account_targeting_unified.rb +136 -0
  9. data/lib/facebook_ads/ad_objects/ad_account_user.rb +39 -0
  10. data/lib/facebook_ads/ad_objects/ad_activity.rb +123 -0
  11. data/lib/facebook_ads/ad_objects/ad_async_request.rb +66 -0
  12. data/lib/facebook_ads/ad_objects/ad_async_request_set.rb +68 -0
  13. data/lib/facebook_ads/ad_objects/ad_async_request_set_notification_result.rb +38 -0
  14. data/lib/facebook_ads/ad_objects/ad_creative.rb +163 -0
  15. data/lib/facebook_ads/ad_objects/ad_creative_link_data.rb +62 -0
  16. data/lib/facebook_ads/ad_objects/ad_creative_link_data_app_link_spec.rb +40 -0
  17. data/lib/facebook_ads/ad_objects/ad_creative_link_data_call_to_action.rb +75 -0
  18. data/lib/facebook_ads/ad_objects/ad_creative_link_data_call_to_action_value.rb +46 -0
  19. data/lib/facebook_ads/ad_objects/ad_creative_link_data_child_attachment.rb +47 -0
  20. data/lib/facebook_ads/ad_objects/ad_creative_object_story_spec.rb +43 -0
  21. data/lib/facebook_ads/ad_objects/ad_creative_offer_data.rb +44 -0
  22. data/lib/facebook_ads/ad_objects/ad_creative_photo_data.rb +42 -0
  23. data/lib/facebook_ads/ad_objects/ad_creative_place_data.rb +41 -0
  24. data/lib/facebook_ads/ad_objects/ad_creative_text_data.rb +37 -0
  25. data/lib/facebook_ads/ad_objects/ad_creative_video_data.rb +48 -0
  26. data/lib/facebook_ads/ad_objects/ad_image.rb +58 -0
  27. data/lib/facebook_ads/ad_objects/ad_keyword_stats.rb +55 -0
  28. data/lib/facebook_ads/ad_objects/ad_label.rb +57 -0
  29. data/lib/facebook_ads/ad_objects/ad_place_page_set.rb +44 -0
  30. data/lib/facebook_ads/ad_objects/ad_preview.rb +54 -0
  31. data/lib/facebook_ads/ad_objects/ad_promoted_object.rb +64 -0
  32. data/lib/facebook_ads/ad_objects/ad_recommendation.rb +55 -0
  33. data/lib/facebook_ads/ad_objects/ad_recommendation_data.rb +37 -0
  34. data/lib/facebook_ads/ad_objects/ad_report_run.rb +70 -0
  35. data/lib/facebook_ads/ad_objects/ad_set.rb +267 -0
  36. data/lib/facebook_ads/ad_objects/ad_study.rb +69 -0
  37. data/lib/facebook_ads/ad_objects/ad_study_cell.rb +39 -0
  38. data/lib/facebook_ads/ad_objects/ad_study_objective.rb +59 -0
  39. data/lib/facebook_ads/ad_objects/ad_video.rb +25 -0
  40. data/lib/facebook_ads/ad_objects/adgroup_placement_specific_review_feedback.rb +43 -0
  41. data/lib/facebook_ads/ad_objects/adgroup_relevance_score.rb +40 -0
  42. data/lib/facebook_ads/ad_objects/adgroup_review_feedback.rb +38 -0
  43. data/lib/facebook_ads/ad_objects/ads_action_stats.rb +53 -0
  44. data/lib/facebook_ads/ad_objects/ads_data_partner.rb +37 -0
  45. data/lib/facebook_ads/ad_objects/ads_image_crops.rb +42 -0
  46. data/lib/facebook_ads/ad_objects/ads_insights.rb +225 -0
  47. data/lib/facebook_ads/ad_objects/ads_pixel.rb +64 -0
  48. data/lib/facebook_ads/ad_objects/ads_pixel_stats.rb +39 -0
  49. data/lib/facebook_ads/ad_objects/ads_pixel_stats_result.rb +50 -0
  50. data/lib/facebook_ads/ad_objects/agency_client_declaration.rb +48 -0
  51. data/lib/facebook_ads/ad_objects/android_app_link.rb +40 -0
  52. data/lib/facebook_ads/ad_objects/app_links.rb +43 -0
  53. data/lib/facebook_ads/ad_objects/broad_targeting_categories.rb +46 -0
  54. data/lib/facebook_ads/ad_objects/business.rb +242 -0
  55. data/lib/facebook_ads/ad_objects/business_ad_account_request.rb +37 -0
  56. data/lib/facebook_ads/ad_objects/business_page_request.rb +37 -0
  57. data/lib/facebook_ads/ad_objects/campaign.rb +211 -0
  58. data/lib/facebook_ads/ad_objects/conversion_action_query.rb +63 -0
  59. data/lib/facebook_ads/ad_objects/custom_audience.rb +166 -0
  60. data/lib/facebook_ads/ad_objects/custom_audience_ad_account.rb +36 -0
  61. data/lib/facebook_ads/ad_objects/custom_audience_data_source.rb +94 -0
  62. data/lib/facebook_ads/ad_objects/custom_audience_permission.rb +41 -0
  63. data/lib/facebook_ads/ad_objects/custom_audience_prefill_state.rb +39 -0
  64. data/lib/facebook_ads/ad_objects/custom_audience_session.rb +44 -0
  65. data/lib/facebook_ads/ad_objects/custom_audience_status.rb +38 -0
  66. data/lib/facebook_ads/ad_objects/custom_audiences_tos.rb +38 -0
  67. data/lib/facebook_ads/ad_objects/custom_conversion.rb +78 -0
  68. data/lib/facebook_ads/ad_objects/custom_conversion_stats_result.rb +50 -0
  69. data/lib/facebook_ads/ad_objects/day_part.rb +40 -0
  70. data/lib/facebook_ads/ad_objects/delivery_check.rb +40 -0
  71. data/lib/facebook_ads/ad_objects/delivery_check_extra_info.rb +39 -0
  72. data/lib/facebook_ads/ad_objects/delivery_estimate.rb +41 -0
  73. data/lib/facebook_ads/ad_objects/domain.rb +37 -0
  74. data/lib/facebook_ads/ad_objects/event.rb +74 -0
  75. data/lib/facebook_ads/ad_objects/event_source_group.rb +43 -0
  76. data/lib/facebook_ads/ad_objects/external_event_source.rb +38 -0
  77. data/lib/facebook_ads/ad_objects/flexible_targeting.rb +64 -0
  78. data/lib/facebook_ads/ad_objects/funding_source_details.rb +39 -0
  79. data/lib/facebook_ads/ad_objects/funding_source_details_coupon.rb +40 -0
  80. data/lib/facebook_ads/ad_objects/helpers/custom_audience_helpers.rb +170 -0
  81. data/lib/facebook_ads/ad_objects/hotel.rb +61 -0
  82. data/lib/facebook_ads/ad_objects/hotel_room.rb +44 -0
  83. data/lib/facebook_ads/ad_objects/id_name.rb +37 -0
  84. data/lib/facebook_ads/ad_objects/ios_app_link.rb +39 -0
  85. data/lib/facebook_ads/ad_objects/lead.rb +47 -0
  86. data/lib/facebook_ads/ad_objects/lead_gen_qualifier.rb +40 -0
  87. data/lib/facebook_ads/ad_objects/lead_gen_question.rb +40 -0
  88. data/lib/facebook_ads/ad_objects/lead_gen_question_option.rb +38 -0
  89. data/lib/facebook_ads/ad_objects/leadgen_form.rb +70 -0
  90. data/lib/facebook_ads/ad_objects/legacy_business_ad_account_request.rb +38 -0
  91. data/lib/facebook_ads/ad_objects/lookalike_spec.rb +43 -0
  92. data/lib/facebook_ads/ad_objects/minimum_budget.rb +41 -0
  93. data/lib/facebook_ads/ad_objects/offsite_pixel.rb +57 -0
  94. data/lib/facebook_ads/ad_objects/outcome_prediction_point.rb +40 -0
  95. data/lib/facebook_ads/ad_objects/partner_category.rb +51 -0
  96. data/lib/facebook_ads/ad_objects/product_catalog.rb +257 -0
  97. data/lib/facebook_ads/ad_objects/product_catalog_hotel_rooms_batch.rb +50 -0
  98. data/lib/facebook_ads/ad_objects/product_catalog_image_settings.rb +38 -0
  99. data/lib/facebook_ads/ad_objects/product_catalog_image_settings_operation.rb +37 -0
  100. data/lib/facebook_ads/ad_objects/product_catalog_pricing_variables_batch.rb +50 -0
  101. data/lib/facebook_ads/ad_objects/product_feed.rb +88 -0
  102. data/lib/facebook_ads/ad_objects/product_feed_schedule.rb +61 -0
  103. data/lib/facebook_ads/ad_objects/product_feed_upload.rb +48 -0
  104. data/lib/facebook_ads/ad_objects/product_feed_upload_error.rb +49 -0
  105. data/lib/facebook_ads/ad_objects/product_feed_upload_error_sample.rb +37 -0
  106. data/lib/facebook_ads/ad_objects/product_group.rb +98 -0
  107. data/lib/facebook_ads/ad_objects/product_item.rb +147 -0
  108. data/lib/facebook_ads/ad_objects/product_item_commerce_insights.rb +39 -0
  109. data/lib/facebook_ads/ad_objects/product_set.rb +49 -0
  110. data/lib/facebook_ads/ad_objects/product_variant.rb +39 -0
  111. data/lib/facebook_ads/ad_objects/profile_picture_source.rb +52 -0
  112. data/lib/facebook_ads/ad_objects/rate_card.rb +39 -0
  113. data/lib/facebook_ads/ad_objects/reach_estimate.rb +60 -0
  114. data/lib/facebook_ads/ad_objects/reach_frequency_prediction.rb +89 -0
  115. data/lib/facebook_ads/ad_objects/reach_frequency_spec.rb +42 -0
  116. data/lib/facebook_ads/ad_objects/rev_share_policy.rb +38 -0
  117. data/lib/facebook_ads/ad_objects/roas_cohorts_data.rb +41 -0
  118. data/lib/facebook_ads/ad_objects/roas_cohorts_per_cohort_interval_unit.rb +38 -0
  119. data/lib/facebook_ads/ad_objects/targeting.rb +133 -0
  120. data/lib/facebook_ads/ad_objects/targeting_dynamic_rule.rb +44 -0
  121. data/lib/facebook_ads/ad_objects/targeting_geo_location.rb +47 -0
  122. data/lib/facebook_ads/ad_objects/targeting_geo_location_city.rb +43 -0
  123. data/lib/facebook_ads/ad_objects/targeting_geo_location_custom_location.rb +50 -0
  124. data/lib/facebook_ads/ad_objects/targeting_geo_location_electoral_district.rb +40 -0
  125. data/lib/facebook_ads/ad_objects/targeting_geo_location_market.rb +40 -0
  126. data/lib/facebook_ads/ad_objects/targeting_geo_location_place.rb +45 -0
  127. data/lib/facebook_ads/ad_objects/targeting_geo_location_political_district.rb +40 -0
  128. data/lib/facebook_ads/ad_objects/targeting_geo_location_region.rb +39 -0
  129. data/lib/facebook_ads/ad_objects/targeting_geo_location_zip.rb +41 -0
  130. data/lib/facebook_ads/ad_objects/targeting_product_audience_spec.rb +39 -0
  131. data/lib/facebook_ads/ad_objects/targeting_product_audience_sub_spec.rb +38 -0
  132. data/lib/facebook_ads/ad_objects/targeting_sentence_line.rb +38 -0
  133. data/lib/facebook_ads/ad_objects/transaction.rb +56 -0
  134. data/lib/facebook_ads/ad_objects/transaction_currency_amount.rb +39 -0
  135. data/lib/facebook_ads/ad_objects/user.rb +127 -0
  136. data/lib/facebook_ads/ad_objects/user_lead_gen_disclaimer_response.rb +38 -0
  137. data/lib/facebook_ads/ad_objects/user_lead_gen_field_data.rb +38 -0
  138. data/lib/facebook_ads/ad_objects/video_thumbnail.rb +42 -0
  139. data/lib/facebook_ads/ad_objects/web_app_link.rb +38 -0
  140. data/lib/facebook_ads/ad_objects/windows_app_link.rb +40 -0
  141. data/lib/facebook_ads/ad_objects/windows_phone_app_link.rb +39 -0
  142. data/lib/facebook_ads/api_request.rb +123 -0
  143. data/lib/facebook_ads/api_response.rb +47 -0
  144. data/lib/facebook_ads/batch_api/batch.rb +86 -0
  145. data/lib/facebook_ads/batch_api/batch_proxy.rb +67 -0
  146. data/lib/facebook_ads/config.rb +43 -0
  147. data/lib/facebook_ads/edge.rb +184 -0
  148. data/lib/facebook_ads/errors.rb +55 -0
  149. data/lib/facebook_ads/field_types/ad_object.rb +37 -0
  150. data/lib/facebook_ads/field_types/base.rb +33 -0
  151. data/lib/facebook_ads/field_types/boolean.rb +25 -0
  152. data/lib/facebook_ads/field_types/datetime.rb +47 -0
  153. data/lib/facebook_ads/field_types/double.rb +29 -0
  154. data/lib/facebook_ads/field_types/enum.rb +31 -0
  155. data/lib/facebook_ads/field_types/integer.rb +33 -0
  156. data/lib/facebook_ads/field_types/list.rb +57 -0
  157. data/lib/facebook_ads/field_types/object.rb +33 -0
  158. data/lib/facebook_ads/field_types/string_type.rb +34 -0
  159. data/lib/facebook_ads/field_types/upload_file.rb +121 -0
  160. data/lib/facebook_ads/field_types.rb +65 -0
  161. data/lib/facebook_ads/fields.rb +66 -0
  162. data/lib/facebook_ads/helpers/edge_helpers.rb +57 -0
  163. data/lib/facebook_ads/helpers/node_helpers.rb +80 -0
  164. data/lib/facebook_ads/helpers/shortcuts.rb +34 -0
  165. data/lib/facebook_ads/param_set.rb +74 -0
  166. data/lib/facebook_ads/ruby2patch.rb +27 -0
  167. data/lib/facebook_ads/session.rb +99 -0
  168. data/lib/facebook_ads/utils/utils.rb +29 -0
  169. data/lib/facebook_ads/version.rb +24 -0
  170. data/lib/facebook_ads/videos/video_io.rb +25 -0
  171. data/lib/facebook_ads/videos/video_request.rb +42 -0
  172. data/lib/facebook_ads.rb +72 -0
  173. metadata +337 -13
  174. data/lib/facebookads.rb +0 -5
@@ -0,0 +1,57 @@
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
+ # FB:AUTOGEN
20
+
21
+ module FacebookAds
22
+ # This class is auto-genereated.
23
+
24
+ # For any issues or feature requests related to this class, please let us know
25
+ # on github and we'll fix in our codegen framework. We'll not be able to accept
26
+ # pull request for this class.
27
+
28
+ class AdLabel < AdObject
29
+ EXECUTION_OPTIONS = [
30
+ "validate_only",
31
+ ]
32
+
33
+
34
+ field :account, 'AdAccount'
35
+ field :created_time, 'datetime'
36
+ field :id, 'string'
37
+ field :name, 'string'
38
+ field :updated_time, 'datetime'
39
+
40
+ has_edge :adcreatives do |edge|
41
+ edge.get 'AdCreative'
42
+ end
43
+
44
+ has_edge :ads do |edge|
45
+ edge.get 'Ad'
46
+ end
47
+
48
+ has_edge :adsets do |edge|
49
+ edge.get 'AdSet'
50
+ end
51
+
52
+ has_edge :campaigns do |edge|
53
+ edge.get 'Campaign'
54
+ end
55
+
56
+ end
57
+ end
@@ -0,0 +1,44 @@
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
+ # FB:AUTOGEN
20
+
21
+ module FacebookAds
22
+ # This class is auto-genereated.
23
+
24
+ # For any issues or feature requests related to this class, please let us know
25
+ # on github and we'll fix in our codegen framework. We'll not be able to accept
26
+ # pull request for this class.
27
+
28
+ class AdPlacePageSet < AdObject
29
+ LOCATION_TYPES = [
30
+ "recent",
31
+ "home",
32
+ ]
33
+
34
+
35
+ field :account_id, 'string'
36
+ field :id, 'string'
37
+ field :location_types, { list: 'string' }
38
+ field :name, 'string'
39
+ field :pages_count, 'int'
40
+ field :parent_page, 'object'
41
+ has_no_delete
42
+
43
+ end
44
+ end
@@ -0,0 +1,54 @@
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
+ # FB:AUTOGEN
20
+
21
+ module FacebookAds
22
+ # This class is auto-genereated.
23
+
24
+ # For any issues or feature requests related to this class, please let us know
25
+ # on github and we'll fix in our codegen framework. We'll not be able to accept
26
+ # pull request for this class.
27
+
28
+ class AdPreview < AdObject
29
+ AD_FORMAT = [
30
+ "RIGHT_COLUMN_STANDARD",
31
+ "DESKTOP_FEED_STANDARD",
32
+ "MOBILE_FEED_STANDARD",
33
+ "MOBILE_FEED_BASIC",
34
+ "MOBILE_INTERSTITIAL",
35
+ "MOBILE_BANNER",
36
+ "MOBILE_MEDIUM_RECTANGLE",
37
+ "MOBILE_FULLWIDTH",
38
+ "MOBILE_NATIVE",
39
+ "INSTAGRAM_STANDARD",
40
+ "AUDIENCE_NETWORK_OUTSTREAM_VIDEO",
41
+ "INSTANT_ARTICLE_STANDARD",
42
+ "INSTREAM_VIDEO_DESKTOP",
43
+ "INSTREAM_VIDEO_MOBILE",
44
+ ]
45
+
46
+
47
+ field :body, 'string'
48
+ has_no_id
49
+ has_no_get
50
+ has_no_post
51
+ has_no_delete
52
+
53
+ end
54
+ end
@@ -0,0 +1,64 @@
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
+ # FB:AUTOGEN
20
+
21
+ module FacebookAds
22
+ # This class is auto-genereated.
23
+
24
+ # For any issues or feature requests related to this class, please let us know
25
+ # on github and we'll fix in our codegen framework. We'll not be able to accept
26
+ # pull request for this class.
27
+
28
+ class AdPromotedObject < AdObject
29
+ CUSTOM_EVENT_TYPE = [
30
+ "COMPLETE_REGISTRATION",
31
+ "CONTENT_VIEW",
32
+ "SEARCH",
33
+ "RATE",
34
+ "TUTORIAL_COMPLETION",
35
+ "ADD_TO_CART",
36
+ "ADD_TO_WISHLIST",
37
+ "INITIATED_CHECKOUT",
38
+ "ADD_PAYMENT_INFO",
39
+ "PURCHASE",
40
+ "LEAD",
41
+ "LEVEL_ACHIEVED",
42
+ "ACHIEVEMENT_UNLOCKED",
43
+ "SPENT_CREDITS",
44
+ "OTHER",
45
+ ]
46
+
47
+
48
+ field :application_id, 'string'
49
+ field :custom_event_type, { enum: -> { CUSTOM_EVENT_TYPE }}
50
+ field :event_id, 'string'
51
+ field :object_store_url, 'string'
52
+ field :offer_id, 'string'
53
+ field :page_id, 'string'
54
+ field :pixel_id, 'string'
55
+ field :place_page_set_id, 'string'
56
+ field :product_catalog_id, 'string'
57
+ field :product_set_id, 'string'
58
+ has_no_id
59
+ has_no_get
60
+ has_no_post
61
+ has_no_delete
62
+
63
+ end
64
+ end
@@ -0,0 +1,55 @@
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
+ # FB:AUTOGEN
20
+
21
+ module FacebookAds
22
+ # This class is auto-genereated.
23
+
24
+ # For any issues or feature requests related to this class, please let us know
25
+ # on github and we'll fix in our codegen framework. We'll not be able to accept
26
+ # pull request for this class.
27
+
28
+ class AdRecommendation < AdObject
29
+ CONFIDENCE = [
30
+ "HIGH",
31
+ "MEDIUM",
32
+ "LOW",
33
+ ]
34
+
35
+ IMPORTANCE = [
36
+ "HIGH",
37
+ "MEDIUM",
38
+ "LOW",
39
+ ]
40
+
41
+
42
+ field :blame_field, 'string'
43
+ field :code, 'int'
44
+ field :confidence, { enum: -> { CONFIDENCE }}
45
+ field :importance, { enum: -> { IMPORTANCE }}
46
+ field :message, 'string'
47
+ field :recommendation_data, 'AdRecommendationData'
48
+ field :title, 'string'
49
+ has_no_id
50
+ has_no_get
51
+ has_no_post
52
+ has_no_delete
53
+
54
+ end
55
+ end
@@ -0,0 +1,37 @@
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
+ # FB:AUTOGEN
20
+
21
+ module FacebookAds
22
+ # This class is auto-genereated.
23
+
24
+ # For any issues or feature requests related to this class, please let us know
25
+ # on github and we'll fix in our codegen framework. We'll not be able to accept
26
+ # pull request for this class.
27
+
28
+ class AdRecommendationData < AdObject
29
+
30
+ field :link, 'string'
31
+ has_no_id
32
+ has_no_get
33
+ has_no_post
34
+ has_no_delete
35
+
36
+ end
37
+ end
@@ -0,0 +1,70 @@
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
+ # FB:AUTOGEN
20
+
21
+ module FacebookAds
22
+ # This class is auto-genereated.
23
+
24
+ # For any issues or feature requests related to this class, please let us know
25
+ # on github and we'll fix in our codegen framework. We'll not be able to accept
26
+ # pull request for this class.
27
+
28
+ class AdReportRun < AdObject
29
+
30
+ field :account_id, 'string'
31
+ field :async_percent_completion, 'int'
32
+ field :async_status, 'string'
33
+ field :date_start, 'string'
34
+ field :date_stop, 'string'
35
+ field :emails, { list: 'string' }
36
+ field :friendly_name, 'string'
37
+ field :id, 'string'
38
+ field :is_bookmarked, 'bool'
39
+ field :is_running, 'bool'
40
+ field :schedule_id, 'string'
41
+ field :time_completed, 'int'
42
+ field :time_ref, 'int'
43
+ field :action_attribution_windows, { list: 'adaccountinsights_action_attribution_windows_enum_param' }
44
+ field :action_breakdowns, { list: 'adaccountinsights_action_breakdowns_enum_param' }
45
+ field :action_report_time, 'adaccountinsights_action_report_time_enum_param'
46
+ field :breakdowns, { list: 'adaccountinsights_breakdowns_enum_param' }
47
+ field :date_preset, 'adaccountinsights_date_preset_enum_param'
48
+ field :default_summary, 'bool'
49
+ field :export_columns, { list: 'string' }
50
+ field :export_format, 'string'
51
+ field :export_name, 'string'
52
+ field :fields, { list: 'adreportrun_graph_fields_param' }
53
+ field :filtering, { list: 'object' }
54
+ field :level, 'adaccountinsights_level_enum_param'
55
+ field :product_id_limit, 'int'
56
+ field :sort, { list: 'string' }
57
+ field :summary, { list: 'adreportrun_graph_fields_param' }
58
+ field :summary_action_breakdowns, { list: 'adaccountinsights_summary_action_breakdowns_enum_param' }
59
+ field :time_increment, 'string'
60
+ field :time_range, 'object'
61
+ field :time_ranges, { list: 'object' }
62
+ has_no_post
63
+ has_no_delete
64
+
65
+ has_edge :insights do |edge|
66
+ edge.get 'AdsInsights'
67
+ end
68
+
69
+ end
70
+ end
@@ -0,0 +1,267 @@
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
+ # FB:AUTOGEN
20
+
21
+ module FacebookAds
22
+ # This class is auto-genereated.
23
+
24
+ # For any issues or feature requests related to this class, please let us know
25
+ # on github and we'll fix in our codegen framework. We'll not be able to accept
26
+ # pull request for this class.
27
+
28
+ class AdSet < AdObject
29
+ BILLING_EVENT = [
30
+ "APP_INSTALLS",
31
+ "CLICKS",
32
+ "IMPRESSIONS",
33
+ "LINK_CLICKS",
34
+ "OFFER_CLAIMS",
35
+ "PAGE_LIKES",
36
+ "POST_ENGAGEMENT",
37
+ "VIDEO_VIEWS",
38
+ "MRC_VIDEO_VIEWS",
39
+ ]
40
+
41
+ CONFIGURED_STATUS = [
42
+ "ACTIVE",
43
+ "PAUSED",
44
+ "DELETED",
45
+ "ARCHIVED",
46
+ ]
47
+
48
+ EFFECTIVE_STATUS = [
49
+ "ACTIVE",
50
+ "PAUSED",
51
+ "DELETED",
52
+ "PENDING_REVIEW",
53
+ "DISAPPROVED",
54
+ "PREAPPROVED",
55
+ "PENDING_BILLING_INFO",
56
+ "CAMPAIGN_PAUSED",
57
+ "ARCHIVED",
58
+ "ADSET_PAUSED",
59
+ ]
60
+
61
+ OPTIMIZATION_GOAL = [
62
+ "NONE",
63
+ "APP_INSTALLS",
64
+ "BRAND_AWARENESS",
65
+ "CLICKS",
66
+ "ENGAGED_USERS",
67
+ "EVENT_RESPONSES",
68
+ "IMPRESSIONS",
69
+ "LEAD_GENERATION",
70
+ "LINK_CLICKS",
71
+ "OFFER_CLAIMS",
72
+ "OFFSITE_CONVERSIONS",
73
+ "PAGE_ENGAGEMENT",
74
+ "PAGE_LIKES",
75
+ "POST_ENGAGEMENT",
76
+ "REACH",
77
+ "SOCIAL_IMPRESSIONS",
78
+ "VIDEO_VIEWS",
79
+ "APP_DOWNLOADS",
80
+ ]
81
+
82
+ STATUS = [
83
+ "ACTIVE",
84
+ "PAUSED",
85
+ "DELETED",
86
+ "ARCHIVED",
87
+ ]
88
+
89
+ DATE_PRESET = [
90
+ "today",
91
+ "yesterday",
92
+ "this_month",
93
+ "last_month",
94
+ "this_quarter",
95
+ "lifetime",
96
+ "last_3d",
97
+ "last_7d",
98
+ "last_14d",
99
+ "last_28d",
100
+ "last_30d",
101
+ "last_90d",
102
+ "last_week_mon_sun",
103
+ "last_week_sun_sat",
104
+ "last_quarter",
105
+ "last_year",
106
+ "this_week_mon_today",
107
+ "this_week_sun_today",
108
+ "this_year",
109
+ ]
110
+
111
+ EXECUTION_OPTIONS = [
112
+ "validate_only",
113
+ "include_recommendations",
114
+ ]
115
+
116
+ OPERATOR = [
117
+ "ALL",
118
+ "ANY",
119
+ ]
120
+
121
+
122
+ field :account_id, 'string'
123
+ field :adlabels, { list: 'AdLabel' }
124
+ field :adset_schedule, { list: 'DayPart' }
125
+ field :attribution_spec, { list: 'object' }
126
+ field :bid_amount, 'int'
127
+ field :bid_info, 'map<string, unsigned int>'
128
+ field :billing_event, { enum: -> { BILLING_EVENT }}
129
+ field :budget_remaining, 'string'
130
+ field :campaign, 'Campaign'
131
+ field :campaign_id, 'string'
132
+ field :configured_status, { enum: -> { CONFIGURED_STATUS }}
133
+ field :created_time, 'datetime'
134
+ field :creative_sequence, { list: 'string' }
135
+ field :daily_budget, 'string'
136
+ field :effective_status, { enum: -> { EFFECTIVE_STATUS }}
137
+ field :end_time, 'datetime'
138
+ field :frequency_cap, 'int'
139
+ field :frequency_cap_reset_period, 'int'
140
+ field :frequency_control_specs, { list: 'object' }
141
+ field :id, 'string'
142
+ field :is_autobid, 'bool'
143
+ field :is_average_price_pacing, 'bool'
144
+ field :lifetime_budget, 'string'
145
+ field :lifetime_frequency_cap, 'int'
146
+ field :lifetime_imps, 'int'
147
+ field :name, 'string'
148
+ field :optimization_goal, { enum: -> { OPTIMIZATION_GOAL }}
149
+ field :pacing_type, { list: 'string' }
150
+ field :promoted_object, 'AdPromotedObject'
151
+ field :recommendations, { list: 'AdRecommendation' }
152
+ field :recurring_budget_semantics, 'bool'
153
+ field :rf_prediction_id, 'string'
154
+ field :rtb_flag, 'bool'
155
+ field :start_time, 'datetime'
156
+ field :status, { enum: -> { STATUS }}
157
+ field :targeting, 'Targeting'
158
+ field :time_based_ad_rotation_id_blocks, { list: { list: 'int' } }
159
+ field :time_based_ad_rotation_intervals, { list: 'int' }
160
+ field :updated_time, 'datetime'
161
+ field :use_new_app_click, 'bool'
162
+ field :campaign_spec, 'object'
163
+ field :daily_imps, 'int'
164
+ field :execution_options, { list: { enum: -> { EXECUTION_OPTIONS }} }
165
+ field :redownload, 'bool'
166
+
167
+ has_edge :activities do |edge|
168
+ edge.get 'AdActivity' do |api|
169
+ api.has_param :business_id, 'string'
170
+ api.has_param :category, { enum: -> { AdActivity::CATEGORY }}
171
+ api.has_param :since, 'datetime'
172
+ api.has_param :uid, 'int'
173
+ api.has_param :until, 'datetime'
174
+ end
175
+ end
176
+
177
+ has_edge :adcreatives do |edge|
178
+ edge.get 'AdCreative'
179
+ end
180
+
181
+ has_edge :adlabels do |edge|
182
+ edge.delete do |api|
183
+ api.has_param :adlabels, { list: 'object' }
184
+ api.has_param :execution_options, { list: { enum: -> { AdLabel::EXECUTION_OPTIONS }} }
185
+ end
186
+ edge.post 'AdLabel' do |api|
187
+ api.has_param :adlabels, { list: 'object' }
188
+ api.has_param :execution_options, { list: { enum: -> { AdLabel::EXECUTION_OPTIONS }} }
189
+ end
190
+ end
191
+
192
+ has_edge :ads do |edge|
193
+ edge.get 'Ad' do |api|
194
+ api.has_param :ad_draft_id, 'string'
195
+ api.has_param :date_preset, { enum: -> { Ad::DATE_PRESET }}
196
+ api.has_param :effective_status, { list: 'string' }
197
+ api.has_param :include_deleted, 'bool'
198
+ api.has_param :time_range, 'object'
199
+ api.has_param :updated_since, 'int'
200
+ end
201
+ end
202
+
203
+ has_edge :asyncadrequests do |edge|
204
+ edge.get 'AdAsyncRequest' do |api|
205
+ api.has_param :statuses, { list: { enum: -> { AdAsyncRequest::STATUSES }} }
206
+ end
207
+ end
208
+
209
+ has_edge :delivery_estimate do |edge|
210
+ edge.get 'DeliveryEstimate' do |api|
211
+ api.has_param :optimization_goal, 'adcampaigndelivery_estimate_optimization_goal_enum_param'
212
+ api.has_param :promoted_object, 'object'
213
+ api.has_param :targeting_spec, 'Targeting'
214
+ end
215
+ end
216
+
217
+ has_edge :insights do |edge|
218
+ edge.get 'AdsInsights' do |api|
219
+ api.has_param :action_attribution_windows, { list: { enum: -> { AdsInsights::ACTION_ATTRIBUTION_WINDOWS }} }
220
+ api.has_param :action_breakdowns, { list: { enum: -> { AdsInsights::ACTION_BREAKDOWNS }} }
221
+ api.has_param :action_report_time, { enum: -> { AdsInsights::ACTION_REPORT_TIME }}
222
+ api.has_param :breakdowns, { list: { enum: -> { AdsInsights::BREAKDOWNS }} }
223
+ api.has_param :date_preset, { enum: -> { AdsInsights::DATE_PRESET }}
224
+ api.has_param :default_summary, 'bool'
225
+ api.has_param :export_columns, { list: 'string' }
226
+ api.has_param :export_format, 'string'
227
+ api.has_param :export_name, 'string'
228
+ api.has_param :fields, { list: { enum: -> { AdsInsights::SUMMARY }} }
229
+ api.has_param :filtering, { list: 'object' }
230
+ api.has_param :level, { enum: -> { AdsInsights::LEVEL }}
231
+ api.has_param :product_id_limit, 'int'
232
+ api.has_param :sort, { list: 'string' }
233
+ api.has_param :summary, { list: { enum: -> { AdsInsights::SUMMARY }} }
234
+ api.has_param :summary_action_breakdowns, { list: { enum: -> { AdsInsights::SUMMARY_ACTION_BREAKDOWNS }} }
235
+ api.has_param :time_increment, 'string'
236
+ api.has_param :time_range, 'object'
237
+ api.has_param :time_ranges, { list: 'object' }
238
+ end
239
+ edge.post 'AdReportRun' do |api|
240
+ api.has_param :action_attribution_windows, { list: { enum: -> { AdsInsights::ACTION_ATTRIBUTION_WINDOWS }} }
241
+ api.has_param :action_breakdowns, { list: { enum: -> { AdsInsights::ACTION_BREAKDOWNS }} }
242
+ api.has_param :action_report_time, { enum: -> { AdsInsights::ACTION_REPORT_TIME }}
243
+ api.has_param :breakdowns, { list: { enum: -> { AdsInsights::BREAKDOWNS }} }
244
+ api.has_param :date_preset, { enum: -> { AdsInsights::DATE_PRESET }}
245
+ api.has_param :default_summary, 'bool'
246
+ api.has_param :export_columns, { list: 'string' }
247
+ api.has_param :export_format, 'string'
248
+ api.has_param :export_name, 'string'
249
+ api.has_param :fields, { list: { enum: -> { AdsInsights::SUMMARY }} }
250
+ api.has_param :filtering, { list: 'object' }
251
+ api.has_param :level, { enum: -> { AdsInsights::LEVEL }}
252
+ api.has_param :product_id_limit, 'int'
253
+ api.has_param :sort, { list: 'string' }
254
+ api.has_param :summary, { list: { enum: -> { AdsInsights::SUMMARY }} }
255
+ api.has_param :summary_action_breakdowns, { list: { enum: -> { AdsInsights::SUMMARY_ACTION_BREAKDOWNS }} }
256
+ api.has_param :time_increment, 'string'
257
+ api.has_param :time_range, 'object'
258
+ api.has_param :time_ranges, { list: 'object' }
259
+ end
260
+ end
261
+
262
+ has_edge :targetingsentencelines do |edge|
263
+ edge.get 'TargetingSentenceLine'
264
+ end
265
+
266
+ end
267
+ end