google-dfp-api 0.13.1 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. data/ChangeLog +12 -1
  2. data/README.md +1 -1
  3. data/examples/v201508/common/oauth2_jwt_handling.rb +1 -1
  4. data/examples/v201508/common/setup_oauth2.rb +1 -1
  5. data/examples/v201511/common/oauth2_jwt_handling.rb +1 -1
  6. data/examples/v201511/common/setup_oauth2.rb +1 -1
  7. data/examples/v201602/common/oauth2_jwt_handling.rb +1 -1
  8. data/examples/v201602/common/setup_oauth2.rb +1 -1
  9. data/examples/{v201505 → v201605}/activity_group_service/create_activity_groups.rb +1 -1
  10. data/examples/{v201505 → v201605}/activity_group_service/get_active_activity_groups.rb +1 -1
  11. data/examples/{v201505 → v201605}/activity_group_service/get_all_activity_groups.rb +1 -1
  12. data/examples/{v201505 → v201605}/activity_group_service/update_activity_groups.rb +1 -1
  13. data/examples/{v201505 → v201605}/activity_service/create_activities.rb +1 -1
  14. data/examples/{v201505 → v201605}/activity_service/get_active_activities.rb +1 -1
  15. data/examples/{v201505 → v201605}/activity_service/get_all_activities.rb +1 -1
  16. data/examples/{v201505 → v201605}/activity_service/update_activities.rb +1 -1
  17. data/examples/{v201505 → v201605}/audience_segment_service/create_audience_segments.rb +1 -1
  18. data/examples/{v201505 → v201605}/audience_segment_service/get_all_audience_segments.rb +1 -1
  19. data/examples/{v201505 → v201605}/audience_segment_service/get_first_party_audience_segments.rb +1 -1
  20. data/examples/{v201505 → v201605}/audience_segment_service/populate_first_party_audience_segments.rb +1 -1
  21. data/examples/{v201505 → v201605}/audience_segment_service/update_audience_segments.rb +1 -1
  22. data/examples/{v201505 → v201605}/common/error_handling.rb +1 -1
  23. data/examples/{v201505 → v201605}/common/oauth2_jwt_handling.rb +1 -1
  24. data/examples/{v201505 → v201605}/common/setup_oauth2.rb +1 -1
  25. data/examples/{v201505 → v201605}/company_service/create_companies.rb +3 -2
  26. data/examples/{v201505 → v201605}/company_service/get_all_companies.rb +1 -1
  27. data/examples/{v201505 → v201605}/company_service/get_companies_by_statement.rb +1 -1
  28. data/examples/{v201505 → v201605}/company_service/update_companies.rb +1 -1
  29. data/examples/{v201505 → v201605}/contact_service/create_contacts.rb +1 -1
  30. data/examples/{v201505 → v201605}/contact_service/get_all_contacts.rb +1 -1
  31. data/examples/{v201505 → v201605}/contact_service/get_uninvited_contacts.rb +1 -1
  32. data/examples/{v201505 → v201605}/contact_service/update_contacts.rb +1 -1
  33. data/examples/{v201505 → v201605}/content_metadata_key_hierarchy_service/create_content_metadata_key_hierarchies.rb +1 -1
  34. data/examples/{v201505 → v201605}/content_metadata_key_hierarchy_service/delete_content_metadata_key_hierarchies.rb +1 -1
  35. data/examples/{v201505 → v201605}/content_metadata_key_hierarchy_service/get_all_content_metadata_key_hierarchies.rb +1 -1
  36. data/examples/{v201505 → v201605}/content_metadata_key_hierarchy_service/update_content_metadata_key_hierarchies.rb +1 -1
  37. data/examples/{v201505 → v201605}/content_service/get_all_content.rb +1 -1
  38. data/examples/{v201505 → v201605}/content_service/get_content_by_category.rb +1 -1
  39. data/examples/{v201505 → v201605}/creative_service/copy_image_creatives.rb +1 -1
  40. data/examples/{v201505 → v201605}/creative_service/create_creative_from_template.rb +1 -1
  41. data/examples/{v201505 → v201605}/creative_service/create_creatives.rb +1 -1
  42. data/examples/{v201505 → v201605}/creative_service/create_custom_creative.rb +9 -6
  43. data/examples/v201605/creative_service/create_native_creative.rb +189 -0
  44. data/examples/{v201505 → v201605}/creative_service/get_all_creatives.rb +1 -1
  45. data/examples/{v201505 → v201605}/creative_service/get_creatives_by_statement.rb +1 -1
  46. data/examples/{v201505 → v201605}/creative_service/update_creatives.rb +1 -1
  47. data/examples/{v201505 → v201605}/creative_set_service/associate_creative_set_to_line_item.rb +1 -1
  48. data/examples/{v201505 → v201605}/creative_set_service/create_creative_set.rb +1 -1
  49. data/examples/{v201505 → v201605}/creative_set_service/get_all_creative_sets.rb +1 -1
  50. data/examples/{v201505 → v201605}/creative_set_service/get_creative_sets_by_statement.rb +1 -1
  51. data/examples/{v201505 → v201605}/creative_set_service/update_creative_sets.rb +1 -1
  52. data/examples/{v201505 → v201605}/creative_template_service/get_all_creative_templates.rb +1 -1
  53. data/examples/{v201505 → v201605}/creative_template_service/get_system_defined_creative_templates.rb +1 -1
  54. data/examples/{v201505 → v201605}/creative_wrapper_service/create_creative_wrappers.rb +1 -1
  55. data/examples/{v201505 → v201605}/creative_wrapper_service/deactivate_creative_wrapper.rb +1 -1
  56. data/examples/{v201505 → v201605}/creative_wrapper_service/get_all_creative_wrappers.rb +1 -1
  57. data/examples/{v201505 → v201605}/creative_wrapper_service/get_creative_wrappers_by_statement.rb +1 -1
  58. data/examples/{v201505 → v201605}/creative_wrapper_service/update_creative_wrappers.rb +1 -1
  59. data/examples/{v201505 → v201605}/custom_field_service/create_custom_field_options.rb +1 -1
  60. data/examples/{v201505 → v201605}/custom_field_service/create_custom_fields.rb +1 -1
  61. data/examples/{v201505 → v201605}/custom_field_service/deactivate_all_line_item_custom_fields.rb +1 -1
  62. data/examples/{v201505 → v201605}/custom_field_service/get_all_custom_fields.rb +1 -1
  63. data/examples/{v201505 → v201605}/custom_field_service/get_all_line_item_custom_fields.rb +1 -1
  64. data/examples/{v201505 → v201605}/custom_field_service/set_line_item_custom_field_value.rb +1 -1
  65. data/examples/{v201505 → v201605}/custom_field_service/update_custom_fields.rb +1 -1
  66. data/examples/{v201505 → v201605}/custom_targeting_service/create_custom_targeting_keys_and_values.rb +1 -1
  67. data/examples/{v201505 → v201605}/custom_targeting_service/delete_custom_targeting_keys.rb +1 -1
  68. data/examples/{v201505 → v201605}/custom_targeting_service/delete_custom_targeting_values.rb +1 -1
  69. data/examples/{v201505 → v201605}/custom_targeting_service/get_all_custom_targeting_keys_and_values.rb +1 -1
  70. data/examples/{v201505 → v201605}/custom_targeting_service/get_custom_targeting_keys_by_statement.rb +1 -1
  71. data/examples/{v201505 → v201605}/custom_targeting_service/get_custom_targeting_values_by_statement.rb +1 -1
  72. data/examples/{v201505 → v201605}/custom_targeting_service/update_custom_targeting_keys.rb +1 -1
  73. data/examples/{v201505 → v201605}/custom_targeting_service/update_custom_targeting_values.rb +1 -1
  74. data/examples/{v201505 → v201605}/forecast_service/get_availability_forecast.rb +9 -1
  75. data/examples/{v201505 → v201605}/forecast_service/get_availability_forecast_for_line_item.rb +5 -1
  76. data/examples/{v201505 → v201605}/forecast_service/get_delivery_forecast_for_line_items.rb +5 -1
  77. data/examples/{v201505 → v201605}/inventory_service/create_ad_units.rb +1 -1
  78. data/examples/{v201505 → v201605}/inventory_service/create_video_ad_unit.rb +1 -2
  79. data/examples/{v201505 → v201605}/inventory_service/deactivate_ad_units.rb +1 -1
  80. data/examples/{v201505 → v201605}/inventory_service/get_ad_unit_sizes.rb +1 -1
  81. data/examples/{v201505 → v201605}/inventory_service/get_ad_units_by_statement.rb +1 -1
  82. data/examples/{v201505 → v201605}/inventory_service/get_all_ad_units.rb +1 -1
  83. data/examples/{v201505 → v201605}/inventory_service/update_ad_units.rb +1 -1
  84. data/examples/{v201505 → v201605}/label_service/create_labels.rb +1 -1
  85. data/examples/{v201505 → v201605}/label_service/deactivate_labels.rb +1 -1
  86. data/examples/{v201505 → v201605}/label_service/get_all_labels.rb +1 -1
  87. data/examples/{v201505 → v201605}/label_service/get_labels_by_statement.rb +1 -1
  88. data/examples/{v201505 → v201605}/label_service/update_labels.rb +1 -1
  89. data/examples/{v201505 → v201605}/line_item_creative_association_service/create_licas.rb +1 -1
  90. data/examples/{v201505 → v201605}/line_item_creative_association_service/deactivate_licas.rb +1 -1
  91. data/examples/{v201505 → v201605}/line_item_creative_association_service/get_all_licas.rb +1 -1
  92. data/examples/{v201505 → v201605}/line_item_creative_association_service/get_licas_by_statement.rb +1 -1
  93. data/examples/{v201505 → v201605}/line_item_creative_association_service/update_licas.rb +1 -1
  94. data/examples/{v201505 → v201605}/line_item_service/activate_line_items.rb +1 -1
  95. data/examples/{v201505 → v201605}/line_item_service/create_line_items.rb +1 -1
  96. data/examples/{v201505 → v201605}/line_item_service/create_video_line_item.rb +1 -1
  97. data/examples/{v201505 → v201605}/line_item_service/get_all_line_items.rb +1 -1
  98. data/examples/{v201505 → v201605}/line_item_service/get_line_items_by_statement.rb +1 -1
  99. data/examples/{v201505 → v201605}/line_item_service/get_recently_updated_line_items.rb +1 -1
  100. data/examples/{v201505 → v201605}/line_item_service/target_custom_criteria.rb +1 -1
  101. data/examples/{v201505 → v201605}/line_item_service/update_line_items.rb +1 -1
  102. data/examples/{v201505 → v201605}/network_service/get_all_networks.rb +1 -1
  103. data/examples/{v201505 → v201605}/network_service/get_current_network.rb +1 -1
  104. data/examples/{v201505 → v201605}/network_service/make_test_network.rb +1 -1
  105. data/examples/{v201505 → v201605}/order_service/approve_orders.rb +1 -1
  106. data/examples/{v201505 → v201605}/order_service/create_orders.rb +1 -1
  107. data/examples/{v201505 → v201605}/order_service/get_all_orders.rb +1 -1
  108. data/examples/{v201505 → v201605}/order_service/get_orders_by_statement.rb +1 -1
  109. data/examples/{v201505 → v201605}/order_service/update_orders.rb +1 -1
  110. data/examples/{v201505 → v201605}/placement_service/create_placements.rb +1 -1
  111. data/examples/{v201505 → v201605}/placement_service/deactivate_placements.rb +1 -1
  112. data/examples/{v201505 → v201605}/placement_service/get_all_placements.rb +1 -1
  113. data/examples/{v201505 → v201605}/placement_service/get_placements_by_statement.rb +1 -1
  114. data/examples/{v201505 → v201605}/placement_service/update_placements.rb +2 -2
  115. data/examples/{v201505 → v201605}/publisher_query_language_service/fetch_match_tables.rb +2 -2
  116. data/examples/{v201505 → v201605}/publisher_query_language_service/get_all_line_items.rb +1 -1
  117. data/examples/{v201505 → v201605}/publisher_query_language_service/get_geo_targets.rb +1 -1
  118. data/examples/{v201505 → v201605}/publisher_query_language_service/get_line_items_named_like.rb +1 -1
  119. data/examples/{v201505 → v201605}/report_service/display_report.rb +1 -1
  120. data/examples/{v201505 → v201605}/report_service/download_report.rb +1 -1
  121. data/examples/{v201505 → v201605}/report_service/run_delivery_report.rb +13 -2
  122. data/examples/{v201505 → v201605}/report_service/run_inventory_report.rb +1 -1
  123. data/examples/{v201505 → v201605}/report_service/run_reach_report.rb +1 -1
  124. data/examples/{v201505 → v201605}/report_service/run_report_with_custom_fields.rb +1 -1
  125. data/examples/{v201505 → v201605}/report_service/run_sales_report.rb +1 -1
  126. data/examples/{v201505 → v201605}/suggested_ad_unit_service/approve_all_suggested_ad_units.rb +2 -2
  127. data/examples/{v201505 → v201605}/suggested_ad_unit_service/get_all_suggested_ad_units.rb +1 -1
  128. data/examples/{v201505 → v201605}/suggested_ad_unit_service/get_suggested_ad_units_by_statement.rb +1 -1
  129. data/examples/{v201505 → v201605}/team_service/create_teams.rb +1 -1
  130. data/examples/{v201505 → v201605}/team_service/get_all_teams.rb +1 -1
  131. data/examples/{v201505 → v201605}/team_service/get_teams_by_statement.rb +1 -1
  132. data/examples/{v201505 → v201605}/team_service/update_teams.rb +1 -1
  133. data/examples/{v201505 → v201605}/user_service/create_users.rb +2 -2
  134. data/examples/{v201505 → v201605}/user_service/deactivate_users.rb +1 -1
  135. data/examples/{v201505 → v201605}/user_service/get_all_roles.rb +1 -1
  136. data/examples/{v201505 → v201605}/user_service/get_all_users.rb +1 -1
  137. data/examples/{v201505 → v201605}/user_service/get_current_user.rb +1 -1
  138. data/examples/{v201505 → v201605}/user_service/get_users_by_statement.rb +1 -1
  139. data/examples/{v201505 → v201605}/user_service/update_users.rb +1 -1
  140. data/examples/{v201505 → v201605}/user_team_association_service/create_user_team_associations.rb +1 -1
  141. data/examples/{v201505 → v201605}/user_team_association_service/delete_user_team_associations.rb +1 -1
  142. data/examples/{v201505 → v201605}/user_team_association_service/get_all_user_team_associations.rb +1 -1
  143. data/examples/{v201505 → v201605}/user_team_association_service/get_user_team_associations_by_statement.rb +1 -1
  144. data/examples/{v201505 → v201605}/user_team_association_service/update_user_team_associations.rb +1 -1
  145. data/lib/dfp_api/api_config.rb +11 -10
  146. data/lib/dfp_api/version.rb +1 -1
  147. metadata +140 -140
  148. data/examples/v201505/inventory_service/create_mobile_ad_unit.rb +0 -97
@@ -23,7 +23,7 @@
23
23
  require 'dfp_api'
24
24
 
25
25
 
26
- API_VERSION = :v201505
26
+ API_VERSION = :v201605
27
27
 
28
28
  def get_orders_by_statement()
29
29
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -22,7 +22,7 @@
22
22
  require 'dfp_api'
23
23
 
24
24
 
25
- API_VERSION = :v201505
25
+ API_VERSION = :v201605
26
26
 
27
27
  def update_orders()
28
28
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -22,7 +22,7 @@
22
22
  require 'dfp_api'
23
23
 
24
24
 
25
- API_VERSION = :v201505
25
+ API_VERSION = :v201605
26
26
 
27
27
  def create_placements()
28
28
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -22,7 +22,7 @@
22
22
  require 'dfp_api'
23
23
 
24
24
 
25
- API_VERSION = :v201505
25
+ API_VERSION = :v201605
26
26
 
27
27
  def deactivate_placements()
28
28
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -22,7 +22,7 @@
22
22
  require 'dfp_api'
23
23
 
24
24
 
25
- API_VERSION = :v201505
25
+ API_VERSION = :v201605
26
26
 
27
27
  def get_all_placements()
28
28
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -22,7 +22,7 @@
22
22
  require 'dfp_api'
23
23
 
24
24
 
25
- API_VERSION = :v201505
25
+ API_VERSION = :v201605
26
26
 
27
27
  def get_placements_by_statement()
28
28
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -22,7 +22,7 @@
22
22
  require 'dfp_api'
23
23
 
24
24
 
25
- API_VERSION = :v201505
25
+ API_VERSION = :v201605
26
26
 
27
27
  def update_placements()
28
28
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -59,7 +59,7 @@ def update_placements()
59
59
  (placement[:description].nil? || placement[:description].empty?) ?
60
60
  'Generic description' : placement[:description]
61
61
  placement[:targeting_ad_location] = 'All images on sports pages.'
62
- placement[:targeting_site_name] = 'http://code.google.com'
62
+ placement[:targeting_site_name] = 'http://developers.google.com'
63
63
  placement[:is_ad_sense_targeting_enabled] = true
64
64
  end
65
65
 
@@ -21,14 +21,14 @@
21
21
  #
22
22
  # A full list of available tables can be found at:
23
23
  #
24
- # https://developers.google.com/doubleclick-publishers/docs/reference/v201505/PublisherQueryLanguageService
24
+ # https://developers.google.com/doubleclick-publishers/docs/reference/v201605/PublisherQueryLanguageService
25
25
 
26
26
  require 'tempfile'
27
27
 
28
28
  require 'dfp_api'
29
29
 
30
30
 
31
- API_VERSION = :v201505
31
+ API_VERSION = :v201605
32
32
  # A string to separate columns in output. Use "," to get CSV.
33
33
  COLUMN_SEPARATOR = ','
34
34
 
@@ -24,7 +24,7 @@
24
24
  require 'dfp_api'
25
25
 
26
26
 
27
- API_VERSION = :v201505
27
+ API_VERSION = :v201605
28
28
  # A string to separate columns in output. Use "," to get CSV.
29
29
  COLUMN_SEPARATOR = "\t"
30
30
 
@@ -24,7 +24,7 @@
24
24
  require 'dfp_api'
25
25
 
26
26
 
27
- API_VERSION = :v201505
27
+ API_VERSION = :v201605
28
28
  # A string to separate columns in output. Use "," to get CSV.
29
29
  COLUMN_SEPARATOR = "\t"
30
30
 
@@ -22,7 +22,7 @@
22
22
  require 'dfp_api'
23
23
 
24
24
 
25
- API_VERSION = :v201505
25
+ API_VERSION = :v201605
26
26
  # A string to separate columns in output. Use "," to get CSV.
27
27
  COLUMN_SEPARATOR = "\t"
28
28
 
@@ -24,7 +24,7 @@ require 'dfp_api'
24
24
 
25
25
  require 'open-uri'
26
26
 
27
- API_VERSION = :v201505
27
+ API_VERSION = :v201605
28
28
 
29
29
  def display_report()
30
30
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -23,7 +23,7 @@ require 'dfp_api'
23
23
 
24
24
  require 'open-uri'
25
25
 
26
- API_VERSION = :v201505
26
+ API_VERSION = :v201605
27
27
 
28
28
  def download_report()
29
29
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -20,9 +20,10 @@
20
20
  # with additional attributes and can filter to include just one order.
21
21
  # To download the report see download_report.rb.
22
22
 
23
+ require 'date'
23
24
  require 'dfp_api'
24
25
 
25
- API_VERSION = :v201505
26
+ API_VERSION = :v201605
26
27
  MAX_RETRIES = 10
27
28
  RETRY_INTERVAL = 30
28
29
 
@@ -40,9 +41,19 @@ def run_delivery_report()
40
41
  # Specify the order ID to filter by.
41
42
  order_id = 'INSERT_ORDER_ID_HERE'.to_i
42
43
 
44
+ # Specify a report to run for the last 7 days.
45
+ report_end_date = DateTime.now
46
+ report_start_date = report_end_date - 7
47
+
43
48
  # Create report query.
44
49
  report_query = {
45
- :date_range_type => 'LAST_MONTH',
50
+ :date_range_type => 'CUSTOM_DATE',
51
+ :start_date => {:year => report_start_date.year,
52
+ :month => report_start_date.month,
53
+ :day => report_start_date.day},
54
+ :end_date => {:year => report_end_date.year,
55
+ :month => report_end_date.month,
56
+ :day => report_end_date.day},
46
57
  :dimensions => ['ORDER_ID', 'ORDER_NAME'],
47
58
  :dimension_attributes => ['ORDER_TRAFFICKER', 'ORDER_START_DATE_TIME',
48
59
  'ORDER_END_DATE_TIME'],
@@ -21,7 +21,7 @@
21
21
 
22
22
  require 'dfp_api'
23
23
 
24
- API_VERSION = :v201505
24
+ API_VERSION = :v201605
25
25
  MAX_RETRIES = 10
26
26
  RETRY_INTERVAL = 30
27
27
 
@@ -21,7 +21,7 @@
21
21
 
22
22
  require 'dfp_api'
23
23
 
24
- API_VERSION = :v201505
24
+ API_VERSION = :v201605
25
25
  MAX_RETRIES = 10
26
26
  RETRY_INTERVAL = 30
27
27
 
@@ -21,7 +21,7 @@
21
21
 
22
22
  require 'dfp_api'
23
23
 
24
- API_VERSION = :v201505
24
+ API_VERSION = :v201605
25
25
  MAX_RETRIES = 10
26
26
  RETRY_INTERVAL = 30
27
27
 
@@ -21,7 +21,7 @@
21
21
 
22
22
  require 'dfp_api'
23
23
 
24
- API_VERSION = :v201505
24
+ API_VERSION = :v201605
25
25
  MAX_RETRIES = 10
26
26
  RETRY_INTERVAL = 30
27
27
 
@@ -23,7 +23,7 @@
23
23
  require 'dfp_api'
24
24
 
25
25
 
26
- API_VERSION = :v201505
26
+ API_VERSION = :v201605
27
27
  NUMBER_OF_REQUESTS = 50
28
28
 
29
29
  def approve_suggested_ad_units()
@@ -73,7 +73,7 @@ def approve_suggested_ad_units()
73
73
  if unit_count_to_approve > 0
74
74
  # Perform action with the same statement.
75
75
  result = suggested_ad_unit_service.perform_suggested_ad_unit_action(
76
- {:xsi_type => 'ApproveSuggestedAdUnit'}, statement)
76
+ {:xsi_type => 'ApproveSuggestedAdUnits'}, statement)
77
77
 
78
78
  # Display results.
79
79
  if result and result[:num_changes] > 0
@@ -24,7 +24,7 @@
24
24
  require 'dfp_api'
25
25
 
26
26
 
27
- API_VERSION = :v201505
27
+ API_VERSION = :v201605
28
28
 
29
29
  def get_all_suggested_ad_units()
30
30
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -23,7 +23,7 @@
23
23
  require 'dfp_api'
24
24
 
25
25
 
26
- API_VERSION = :v201505
26
+ API_VERSION = :v201605
27
27
  NUMBER_OF_REQUESTS = 50
28
28
 
29
29
  def get_suggested_ad_units_by_statement()
@@ -21,7 +21,7 @@
21
21
 
22
22
  require 'dfp_api'
23
23
 
24
- API_VERSION = :v201505
24
+ API_VERSION = :v201605
25
25
  ITEM_COUNT = 5
26
26
 
27
27
  def create_teams()
@@ -21,7 +21,7 @@
21
21
  require 'dfp_api'
22
22
 
23
23
 
24
- API_VERSION = :v201505
24
+ API_VERSION = :v201605
25
25
 
26
26
  def get_all_teams()
27
27
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -21,7 +21,7 @@
21
21
  require 'dfp_api'
22
22
 
23
23
 
24
- API_VERSION = :v201505
24
+ API_VERSION = :v201605
25
25
 
26
26
  def get_teams_by_statement()
27
27
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -23,7 +23,7 @@
23
23
  require 'dfp_api'
24
24
 
25
25
 
26
- API_VERSION = :v201505
26
+ API_VERSION = :v201605
27
27
 
28
28
  def update_teams()
29
29
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -21,7 +21,7 @@
21
21
 
22
22
  require 'dfp_api'
23
23
 
24
- API_VERSION = :v201505
24
+ API_VERSION = :v201605
25
25
 
26
26
  def create_users()
27
27
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -47,7 +47,7 @@ def create_users()
47
47
 
48
48
  # Create an array to store local user objects.
49
49
  users = emails_and_names.map do |email_and_name|
50
- email_and_name.merge({:role_id => role_id, :preferred_locale => 'en_US'})
50
+ email_and_name.merge({:role_id => role_id})
51
51
  end
52
52
 
53
53
  # Create the users on the server.
@@ -23,7 +23,7 @@
23
23
  require 'dfp_api'
24
24
 
25
25
 
26
- API_VERSION = :v201505
26
+ API_VERSION = :v201605
27
27
 
28
28
  def deactivate_users()
29
29
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -21,7 +21,7 @@
21
21
 
22
22
  require 'dfp_api'
23
23
 
24
- API_VERSION = :v201505
24
+ API_VERSION = :v201605
25
25
 
26
26
  def get_all_roles()
27
27
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -22,7 +22,7 @@
22
22
  require 'dfp_api'
23
23
 
24
24
 
25
- API_VERSION = :v201505
25
+ API_VERSION = :v201605
26
26
 
27
27
  def get_all_users()
28
28
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -20,7 +20,7 @@
20
20
 
21
21
  require 'dfp_api'
22
22
 
23
- API_VERSION = :v201505
23
+ API_VERSION = :v201605
24
24
 
25
25
  def get_current_user()
26
26
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -22,7 +22,7 @@
22
22
  require 'dfp_api'
23
23
 
24
24
 
25
- API_VERSION = :v201505
25
+ API_VERSION = :v201605
26
26
 
27
27
  def get_users_by_statement()
28
28
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -22,7 +22,7 @@
22
22
  require 'dfp_api'
23
23
 
24
24
 
25
- API_VERSION = :v201505
25
+ API_VERSION = :v201605
26
26
 
27
27
  def update_users()
28
28
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -22,7 +22,7 @@
22
22
 
23
23
  require 'dfp_api'
24
24
 
25
- API_VERSION = :v201505
25
+ API_VERSION = :v201605
26
26
 
27
27
  def create_user_team_associations()
28
28
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -22,7 +22,7 @@
22
22
  require 'dfp_api'
23
23
 
24
24
 
25
- API_VERSION = :v201505
25
+ API_VERSION = :v201605
26
26
 
27
27
  def delete_user_team_associations()
28
28
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -22,7 +22,7 @@
22
22
  require 'dfp_api'
23
23
 
24
24
 
25
- API_VERSION = :v201505
25
+ API_VERSION = :v201605
26
26
 
27
27
  def get_all_user_team_associations()
28
28
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -22,7 +22,7 @@
22
22
  require 'dfp_api'
23
23
 
24
24
 
25
- API_VERSION = :v201505
25
+ API_VERSION = :v201605
26
26
 
27
27
  def get_user_team_associations_by_statement()
28
28
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -24,7 +24,7 @@
24
24
  require 'dfp_api'
25
25
 
26
26
 
27
- API_VERSION = :v201505
27
+ API_VERSION = :v201605
28
28
 
29
29
  def update_user_team_associations()
30
30
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -33,9 +33,9 @@ module DfpApi
33
33
  end
34
34
 
35
35
  # Set defaults
36
- DEFAULT_VERSION = :v201602
36
+ DEFAULT_VERSION = :v201605
37
37
  DEFAULT_ENVIRONMENT = :PRODUCTION
38
- LATEST_VERSION = :v201602
38
+ LATEST_VERSION = :v201605
39
39
 
40
40
  # Set other constants
41
41
  API_NAME = 'DfpApi'
@@ -43,7 +43,7 @@ module DfpApi
43
43
 
44
44
  # Configure the services available to each version
45
45
  @@service_config = {
46
- :v201502 => [:ActivityGroupService, :ActivityService,
46
+ :v201505 => [:ActivityGroupService, :ActivityService,
47
47
  :AdExclusionRuleService, :AdRuleService,
48
48
  :AudienceSegmentService, :BaseRateService, :CompanyService,
49
49
  :ContactService, :ContentBundleService,
@@ -66,7 +66,7 @@ module DfpApi
66
66
  :SharedAdUnitService, :SuggestedAdUnitService,
67
67
  :TeamService, :UserService,
68
68
  :UserTeamAssociationService, :WorkflowRequestService],
69
- :v201505 => [:ActivityGroupService, :ActivityService,
69
+ :v201508 => [:ActivityGroupService, :ActivityService,
70
70
  :AdExclusionRuleService, :AdRuleService,
71
71
  :AudienceSegmentService, :BaseRateService, :CompanyService,
72
72
  :ContactService, :ContentBundleService,
@@ -84,12 +84,13 @@ module DfpApi
84
84
  :ProductTemplateService, :ProposalLineItemService,
85
85
  :ProposalService, :PublisherQueryLanguageService,
86
86
  :RateCardService, :ReconciliationOrderReportService,
87
+ :ReconciliationLineItemReportService,
87
88
  :ReconciliationReportRowService,
88
89
  :ReconciliationReportService, :ReportService,
89
90
  :SharedAdUnitService, :SuggestedAdUnitService,
90
91
  :TeamService, :UserService,
91
92
  :UserTeamAssociationService, :WorkflowRequestService],
92
- :v201508 => [:ActivityGroupService, :ActivityService,
93
+ :v201511 => [:ActivityGroupService, :ActivityService,
93
94
  :AdExclusionRuleService, :AdRuleService,
94
95
  :AudienceSegmentService, :BaseRateService, :CompanyService,
95
96
  :ContactService, :ContentBundleService,
@@ -113,7 +114,7 @@ module DfpApi
113
114
  :SharedAdUnitService, :SuggestedAdUnitService,
114
115
  :TeamService, :UserService,
115
116
  :UserTeamAssociationService, :WorkflowRequestService],
116
- :v201511 => [:ActivityGroupService, :ActivityService,
117
+ :v201602 => [:ActivityGroupService, :ActivityService,
117
118
  :AdExclusionRuleService, :AdRuleService,
118
119
  :AudienceSegmentService, :BaseRateService, :CompanyService,
119
120
  :ContactService, :ContentBundleService,
@@ -134,10 +135,10 @@ module DfpApi
134
135
  :ReconciliationLineItemReportService,
135
136
  :ReconciliationReportRowService,
136
137
  :ReconciliationReportService, :ReportService,
137
- :SharedAdUnitService, :SuggestedAdUnitService,
138
+ :SuggestedAdUnitService,
138
139
  :TeamService, :UserService,
139
140
  :UserTeamAssociationService, :WorkflowRequestService],
140
- :v201602 => [:ActivityGroupService, :ActivityService,
141
+ :v201605 => [:ActivityGroupService, :ActivityService,
141
142
  :AdExclusionRuleService, :AdRuleService,
142
143
  :AudienceSegmentService, :BaseRateService, :CompanyService,
143
144
  :ContactService, :ContentBundleService,
@@ -168,11 +169,11 @@ module DfpApi
168
169
  :PRODUCTION => {
169
170
  :oauth_scope => 'https://www.googleapis.com/auth/dfp',
170
171
  :header_ns => 'https://www.google.com/apis/ads/publisher/',
171
- :v201502 => 'https://ads.google.com/apis/ads/publisher/',
172
172
  :v201505 => 'https://ads.google.com/apis/ads/publisher/',
173
173
  :v201508 => 'https://ads.google.com/apis/ads/publisher/',
174
174
  :v201511 => 'https://ads.google.com/apis/ads/publisher/',
175
- :v201602 => 'https://ads.google.com/apis/ads/publisher/'
175
+ :v201602 => 'https://ads.google.com/apis/ads/publisher/',
176
+ :v201605 => 'https://ads.google.com/apis/ads/publisher/'
176
177
  }
177
178
  }
178
179