google-dfp-api 0.9.3 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +7 -0
- data/examples/{v201403 → v201502}/activity_group_service/create_activity_groups.rb +1 -1
- data/examples/{v201403 → v201502}/activity_group_service/get_active_activity_groups.rb +18 -27
- data/examples/{v201403 → v201502}/activity_group_service/get_all_activity_groups.rb +13 -23
- data/examples/{v201403 → v201502}/activity_group_service/update_activity_groups.rb +11 -9
- data/examples/{v201403 → v201502}/activity_service/create_activities.rb +1 -1
- data/examples/{v201403 → v201502}/activity_service/get_active_activities.rb +15 -27
- data/examples/{v201403 → v201502}/activity_service/get_all_activities.rb +10 -21
- data/examples/{v201403 → v201502}/activity_service/update_activities.rb +9 -7
- data/examples/{v201403 → v201502}/audience_segment_service/create_audience_segments.rb +1 -1
- data/examples/{v201403 → v201502}/audience_segment_service/get_all_audience_segments.rb +10 -19
- data/examples/{v201403 → v201502}/audience_segment_service/get_first_party_audience_segments.rb +14 -21
- data/examples/{v201403 → v201502}/audience_segment_service/populate_first_party_audience_segments.rb +16 -14
- data/examples/{v201403 → v201502}/audience_segment_service/update_audience_segments.rb +12 -11
- data/examples/{v201403 → v201502}/common/error_handling.rb +1 -1
- data/examples/{v201403 → v201502}/common/oauth2_jwt_handling.rb +9 -17
- data/examples/{v201403 → v201502}/common/setup_oauth2.rb +1 -1
- data/examples/{v201403 → v201502}/company_service/create_companies.rb +1 -1
- data/examples/{v201403 → v201502}/company_service/get_all_companies.rb +10 -18
- data/examples/{v201403 → v201502}/company_service/get_companies_by_statement.rb +21 -16
- data/examples/{v201403 → v201502}/company_service/update_companies.rb +13 -10
- data/examples/{v201403 → v201502}/contact_service/create_contacts.rb +1 -1
- data/examples/{v201403 → v201502}/contact_service/get_all_contacts.rb +11 -19
- data/examples/{v201403 → v201502}/contact_service/get_uninvited_contacts.rb +18 -22
- data/examples/{v201403 → v201502}/contact_service/update_contacts.rb +9 -7
- data/examples/{v201403 → v201502}/content_metadata_key_hierarchy_service/create_content_metadata_key_hierarchies.rb +1 -1
- data/examples/{v201403 → v201502}/content_metadata_key_hierarchy_service/delete_content_metadata_key_hierarchies.rb +11 -8
- data/examples/{v201403 → v201502}/content_metadata_key_hierarchy_service/get_all_content_metadata_key_hierarchies.rb +8 -18
- data/examples/{v201403 → v201502}/content_metadata_key_hierarchy_service/update_content_metadata_key_hierarchies.rb +9 -7
- data/examples/{v201403 → v201502}/content_service/get_all_content.rb +9 -18
- data/examples/{v201403 → v201502}/content_service/get_content_by_category.rb +18 -28
- data/examples/{v201403 → v201502}/creative_service/copy_image_creatives.rb +7 -7
- data/examples/{v201403 → v201502}/creative_service/create_creative_from_template.rb +1 -1
- data/examples/{v201403 → v201502}/creative_service/create_creatives.rb +1 -1
- data/examples/{v201403 → v201502}/creative_service/create_custom_creative.rb +1 -1
- data/examples/{v201403 → v201502}/creative_service/get_all_creatives.rb +8 -17
- data/examples/{v201403 → v201502}/creative_service/get_creatives_by_statement.rb +18 -13
- data/examples/{v201403 → v201502}/creative_service/update_creatives.rb +16 -11
- data/examples/{v201403 → v201502}/creative_set_service/associate_creative_set_to_line_item.rb +1 -1
- data/examples/{v201403 → v201502}/creative_set_service/create_creative_set.rb +1 -1
- data/examples/{v201403 → v201502}/creative_set_service/get_all_creative_sets.rb +9 -17
- data/examples/{v201403 → v201502}/creative_set_service/get_creative_sets_by_statement.rb +20 -14
- data/examples/{v201403 → v201502}/creative_set_service/update_creative_sets.rb +10 -7
- data/examples/{v201403 → v201502}/creative_template_service/get_all_creative_templates.rb +9 -17
- data/examples/{v201403/creative_template_service/get_creative_templates_by_statement.rb → v201502/creative_template_service/get_system_defined_creative_templates.rb} +24 -13
- data/examples/{v201403 → v201502}/creative_wrapper_service/create_creative_wrappers.rb +1 -1
- data/examples/{v201403 → v201502}/creative_wrapper_service/deactivate_creative_wrapper.rb +9 -7
- data/examples/{v201403 → v201502}/creative_wrapper_service/get_all_creative_wrappers.rb +10 -18
- data/examples/{v201403 → v201502}/creative_wrapper_service/get_creative_wrappers_by_statement.rb +17 -12
- data/examples/{v201403 → v201502}/creative_wrapper_service/update_creative_wrappers.rb +10 -7
- data/examples/{v201403 → v201502}/custom_field_service/create_custom_field_options.rb +1 -1
- data/examples/{v201403 → v201502}/custom_field_service/create_custom_fields.rb +1 -1
- data/examples/{v201403 → v201502}/custom_field_service/deactivate_all_line_item_custom_fields.rb +13 -23
- data/examples/{v201403 → v201502}/custom_field_service/get_all_custom_fields.rb +11 -19
- data/examples/{v201403 → v201502}/custom_field_service/get_all_line_item_custom_fields.rb +19 -14
- data/examples/{v201403 → v201502}/custom_field_service/set_line_item_custom_field_value.rb +24 -19
- data/examples/{v201403 → v201502}/custom_field_service/update_custom_fields.rb +10 -7
- data/examples/{v201403 → v201502}/custom_targeting_service/create_custom_targeting_keys_and_values.rb +1 -1
- data/examples/{v201403 → v201502}/custom_targeting_service/delete_custom_targeting_keys.rb +16 -20
- data/examples/{v201403 → v201502}/custom_targeting_service/delete_custom_targeting_values.rb +23 -21
- data/examples/{v201403 → v201502}/custom_targeting_service/get_all_custom_targeting_keys_and_values.rb +15 -36
- data/examples/{v201403 → v201502}/custom_targeting_service/get_custom_targeting_keys_by_statement.rb +20 -16
- data/examples/{v201403 → v201502}/custom_targeting_service/get_custom_targeting_values_by_statement.rb +19 -15
- data/examples/{v201403 → v201502}/custom_targeting_service/update_custom_targeting_keys.rb +4 -3
- data/examples/{v201403 → v201502}/custom_targeting_service/update_custom_targeting_values.rb +34 -30
- data/examples/{v201403/forecast_service/get_forecast.rb → v201502/forecast_service/get_availability_forecast.rb} +39 -15
- data/examples/{v201403/forecast_service/get_forecast_by_id.rb → v201502/forecast_service/get_availability_forecast_for_line_item.rb} +18 -11
- data/examples/v201502/forecast_service/get_delivery_forecast_for_line_items.rb +81 -0
- data/examples/{v201403 → v201502}/inventory_service/create_ad_units.rb +1 -1
- data/examples/{v201403 → v201502}/inventory_service/create_mobile_ad_unit.rb +1 -1
- data/examples/{v201403 → v201502}/inventory_service/create_video_ad_unit.rb +1 -1
- data/examples/{v201403 → v201502}/inventory_service/deactivate_ad_units.rb +19 -23
- data/examples/{v201403 → v201502}/inventory_service/get_ad_unit_sizes.rb +7 -14
- data/examples/{v201403 → v201502}/inventory_service/get_ad_units_by_statement.rb +18 -13
- data/examples/{v201403 → v201502}/inventory_service/get_all_ad_units.rb +8 -17
- data/examples/{v201403 → v201502}/inventory_service/update_ad_units.rb +23 -11
- data/examples/{v201403 → v201502}/label_service/create_labels.rb +1 -1
- data/examples/{v201403 → v201502}/label_service/deactivate_labels.rb +15 -22
- data/examples/{v201403 → v201502}/label_service/get_all_labels.rb +9 -18
- data/examples/{v201403 → v201502}/label_service/get_labels_by_statement.rb +16 -11
- data/examples/{v201403 → v201502}/label_service/update_labels.rb +24 -26
- data/examples/{v201403 → v201502}/line_item_creative_association_service/create_licas.rb +1 -1
- data/examples/{v201403 → v201502}/line_item_creative_association_service/deactivate_licas.rb +15 -24
- data/examples/{v201403 → v201502}/line_item_creative_association_service/get_all_licas.rb +8 -17
- data/examples/{v201403 → v201502}/line_item_creative_association_service/get_licas_by_statement.rb +10 -8
- data/examples/{v201403 → v201502}/line_item_creative_association_service/update_licas.rb +16 -7
- data/examples/{v201403 → v201502}/line_item_service/activate_line_items.rb +13 -21
- data/examples/{v201403 → v201502}/line_item_service/create_line_items.rb +6 -3
- data/examples/{v201403 → v201502}/line_item_service/create_video_line_item.rb +8 -2
- data/examples/{v201403 → v201502}/line_item_service/get_all_line_items.rb +9 -17
- data/examples/{v201403 → v201502}/line_item_service/get_line_items_by_statement.rb +19 -17
- data/examples/{v201403 → v201502}/line_item_service/get_recently_updated_line_items.rb +19 -13
- data/examples/{v201403 → v201502}/line_item_service/target_custom_criteria.rb +9 -7
- data/examples/{v201403 → v201502}/line_item_service/update_line_items.rb +9 -9
- data/examples/{v201403 → v201502}/network_service/get_all_networks.rb +1 -1
- data/examples/{v201403 → v201502}/network_service/get_current_network.rb +1 -1
- data/examples/{v201403 → v201502}/network_service/make_test_network.rb +1 -1
- data/examples/{v201403 → v201502}/order_service/approve_orders.rb +16 -24
- data/examples/{v201403 → v201502}/order_service/create_orders.rb +1 -1
- data/examples/{v201403 → v201502}/order_service/get_all_orders.rb +8 -17
- data/examples/{v201403 → v201502}/order_service/get_orders_by_statement.rb +18 -14
- data/examples/{v201403 → v201502}/order_service/update_orders.rb +15 -7
- data/examples/{v201403 → v201502}/placement_service/create_placements.rb +4 -2
- data/examples/{v201403 → v201502}/placement_service/deactivate_placements.rb +14 -22
- data/examples/{v201403 → v201502}/placement_service/get_all_placements.rb +9 -17
- data/examples/{v201403 → v201502}/placement_service/get_placements_by_statement.rb +18 -13
- data/examples/{v201403 → v201502}/placement_service/update_placements.rb +16 -6
- data/examples/{v201403 → v201502}/publisher_query_language_service/fetch_match_tables.rb +8 -11
- data/examples/{v201403 → v201502}/publisher_query_language_service/get_all_line_items.rb +8 -9
- data/examples/{v201403 → v201502}/publisher_query_language_service/get_geo_targets.rb +10 -10
- data/examples/{v201403 → v201502}/publisher_query_language_service/get_line_items_named_like.rb +10 -10
- data/examples/{v201403 → v201502}/report_service/display_report.rb +1 -1
- data/examples/{v201403 → v201502}/report_service/download_report.rb +1 -1
- data/examples/{v201403 → v201502}/report_service/run_delivery_report.rb +1 -1
- data/examples/{v201403 → v201502}/report_service/run_inventory_report.rb +4 -4
- data/examples/{v201403 → v201502}/report_service/run_reach_report.rb +1 -1
- data/examples/{v201403/report_service/run_merged_delivery_report.rb → v201502/report_service/run_report_with_custom_fields.rb} +12 -14
- data/examples/{v201403 → v201502}/report_service/run_sales_report.rb +1 -1
- data/examples/{v201403 → v201502}/suggested_ad_unit_service/approve_all_suggested_ad_units.rb +25 -21
- data/examples/{v201403 → v201502}/suggested_ad_unit_service/get_all_suggested_ad_units.rb +9 -18
- data/examples/{v201403 → v201502}/suggested_ad_unit_service/get_suggested_ad_units_by_statement.rb +24 -21
- data/examples/{v201403 → v201502}/team_service/create_teams.rb +1 -1
- data/examples/{v201403 → v201502}/team_service/get_all_teams.rb +8 -17
- data/examples/{v201403 → v201502}/team_service/get_teams_by_statement.rb +15 -11
- data/examples/{v201403 → v201502}/team_service/update_teams.rb +4 -3
- data/examples/{v201403 → v201502}/user_service/create_users.rb +1 -1
- data/examples/{v201403 → v201502}/user_service/deactivate_users.rb +7 -7
- data/examples/{v201403 → v201502}/user_service/get_all_roles.rb +1 -1
- data/examples/{v201403 → v201502}/user_service/get_all_users.rb +8 -18
- data/examples/{v201403 → v201502}/user_service/get_current_user.rb +1 -1
- data/examples/{v201403 → v201502}/user_service/get_users_by_statement.rb +17 -12
- data/examples/{v201403 → v201502}/user_service/update_users.rb +15 -6
- data/examples/{v201403 → v201502}/user_team_association_service/create_user_team_associations.rb +1 -1
- data/examples/{v201403 → v201502}/user_team_association_service/delete_user_team_associations.rb +13 -21
- data/examples/{v201403 → v201502}/user_team_association_service/get_all_user_team_associations.rb +10 -17
- data/examples/{v201403 → v201502}/user_team_association_service/get_user_team_associations_by_statement.rb +20 -16
- data/examples/{v201403 → v201502}/user_team_association_service/update_user_team_associations.rb +8 -7
- data/lib/dfp_api.rb +0 -10
- data/lib/dfp_api/api_config.rb +22 -67
- data/lib/dfp_api/{v201308 → v201502}/activity_group_service.rb +6 -18
- data/lib/dfp_api/v201502/activity_group_service_registry.rb +45 -0
- data/lib/dfp_api/{v201311 → v201502}/activity_service.rb +6 -18
- data/lib/dfp_api/v201502/activity_service_registry.rb +45 -0
- data/lib/dfp_api/v201502/ad_exclusion_rule_service.rb +46 -0
- data/lib/dfp_api/v201502/ad_exclusion_rule_service_registry.rb +45 -0
- data/lib/dfp_api/{v201308 → v201502}/ad_rule_service.rb +6 -18
- data/lib/dfp_api/v201502/ad_rule_service_registry.rb +45 -0
- data/lib/dfp_api/{v201311 → v201502}/audience_segment_service.rb +6 -6
- data/lib/dfp_api/v201502/audience_segment_service_registry.rb +45 -0
- data/lib/dfp_api/{v201308 → v201502}/base_rate_service.rb +6 -18
- data/lib/dfp_api/v201502/base_rate_service_registry.rb +45 -0
- data/lib/dfp_api/{v201311 → v201502}/company_service.rb +6 -18
- data/lib/dfp_api/v201502/company_service_registry.rb +45 -0
- data/lib/dfp_api/{v201311 → v201502}/contact_service.rb +6 -18
- data/lib/dfp_api/v201502/contact_service_registry.rb +45 -0
- data/lib/dfp_api/{v201311 → v201502}/content_bundle_service.rb +6 -18
- data/lib/dfp_api/v201502/content_bundle_service_registry.rb +45 -0
- data/lib/dfp_api/v201502/content_metadata_key_hierarchy_service.rb +46 -0
- data/lib/dfp_api/v201502/content_metadata_key_hierarchy_service_registry.rb +45 -0
- data/lib/dfp_api/{v201308 → v201502}/content_service.rb +6 -6
- data/lib/dfp_api/v201502/content_service_registry.rb +45 -0
- data/lib/dfp_api/{v201311 → v201502}/creative_service.rb +6 -18
- data/lib/dfp_api/v201502/creative_service_registry.rb +45 -0
- data/lib/dfp_api/{v201311 → v201502}/creative_set_service.rb +6 -10
- data/lib/dfp_api/v201502/creative_set_service_registry.rb +45 -0
- data/lib/dfp_api/{v201306 → v201502}/creative_template_service.rb +6 -10
- data/lib/dfp_api/v201502/creative_template_service_registry.rb +45 -0
- data/lib/dfp_api/{v201311 → v201502}/creative_wrapper_service.rb +6 -18
- data/lib/dfp_api/v201502/creative_wrapper_service_registry.rb +45 -0
- data/lib/dfp_api/{v201308 → v201502}/custom_field_service.rb +6 -26
- data/lib/dfp_api/v201502/custom_field_service_registry.rb +45 -0
- data/lib/dfp_api/{v201306 → v201502}/custom_targeting_service.rb +6 -6
- data/lib/dfp_api/v201502/custom_targeting_service_registry.rb +45 -0
- data/lib/dfp_api/{v201311 → v201502}/exchange_rate_service.rb +6 -10
- data/lib/dfp_api/v201502/exchange_rate_service_registry.rb +45 -0
- data/lib/dfp_api/v201502/forecast_service.rb +46 -0
- data/lib/dfp_api/v201502/forecast_service_registry.rb +45 -0
- data/lib/dfp_api/{v201308 → v201502}/inventory_service.rb +6 -18
- data/lib/dfp_api/v201502/inventory_service_registry.rb +45 -0
- data/lib/dfp_api/{v201311 → v201502}/label_service.rb +6 -18
- data/lib/dfp_api/v201502/label_service_registry.rb +45 -0
- data/lib/dfp_api/{v201308 → v201502}/line_item_creative_association_service.rb +6 -18
- data/lib/dfp_api/v201502/line_item_creative_association_service_registry.rb +45 -0
- data/lib/dfp_api/{v201306 → v201502}/line_item_service.rb +6 -18
- data/lib/dfp_api/v201502/line_item_service_registry.rb +45 -0
- data/lib/dfp_api/{v201306 → v201502}/line_item_template_service.rb +6 -6
- data/lib/dfp_api/v201502/line_item_template_service_registry.rb +45 -0
- data/lib/dfp_api/v201502/live_stream_event_service.rb +46 -0
- data/lib/dfp_api/v201502/live_stream_event_service_registry.rb +45 -0
- data/lib/dfp_api/{v201308 → v201502}/network_service.rb +6 -6
- data/lib/dfp_api/v201502/network_service_registry.rb +45 -0
- data/lib/dfp_api/{v201306 → v201502}/order_service.rb +6 -18
- data/lib/dfp_api/v201502/order_service_registry.rb +45 -0
- data/lib/dfp_api/v201502/package_service.rb +46 -0
- data/lib/dfp_api/v201502/package_service_registry.rb +45 -0
- data/lib/dfp_api/{v201308 → v201502}/placement_service.rb +6 -18
- data/lib/dfp_api/v201502/placement_service_registry.rb +45 -0
- data/lib/dfp_api/v201502/premium_rate_service.rb +42 -0
- data/lib/dfp_api/v201502/premium_rate_service_registry.rb +45 -0
- data/lib/dfp_api/v201502/product_package_item_service.rb +46 -0
- data/lib/dfp_api/v201502/product_package_item_service_registry.rb +45 -0
- data/lib/dfp_api/v201502/product_package_service.rb +46 -0
- data/lib/dfp_api/v201502/product_package_service_registry.rb +45 -0
- data/lib/dfp_api/{v201306 → v201502}/product_service.rb +6 -14
- data/lib/dfp_api/v201502/product_service_registry.rb +45 -0
- data/lib/dfp_api/{v201311 → v201502}/product_template_service.rb +6 -18
- data/lib/dfp_api/v201502/product_template_service_registry.rb +45 -0
- data/lib/dfp_api/{v201306 → v201502}/proposal_line_item_service.rb +6 -18
- data/lib/dfp_api/v201502/proposal_line_item_service_registry.rb +45 -0
- data/lib/dfp_api/{v201308 → v201502}/proposal_service.rb +6 -18
- data/lib/dfp_api/v201502/proposal_service_registry.rb +45 -0
- data/lib/dfp_api/{v201306 → v201502}/publisher_query_language_service.rb +6 -6
- data/lib/dfp_api/v201502/publisher_query_language_service_registry.rb +45 -0
- data/lib/dfp_api/{v201308 → v201502}/rate_card_service.rb +6 -18
- data/lib/dfp_api/v201502/rate_card_service_registry.rb +45 -0
- data/lib/dfp_api/{v201306 → v201502}/reconciliation_order_report_service.rb +6 -10
- data/lib/dfp_api/v201502/reconciliation_order_report_service_registry.rb +45 -0
- data/lib/dfp_api/{v201308 → v201502}/reconciliation_report_row_service.rb +6 -6
- data/lib/dfp_api/v201502/reconciliation_report_row_service_registry.rb +45 -0
- data/lib/dfp_api/{v201306 → v201502}/reconciliation_report_service.rb +6 -14
- data/lib/dfp_api/v201502/reconciliation_report_service_registry.rb +45 -0
- data/lib/dfp_api/{v201311 → v201502}/report_service.rb +6 -6
- data/lib/dfp_api/v201502/report_service_registry.rb +45 -0
- data/lib/dfp_api/v201502/shared_ad_unit_service.rb +38 -0
- data/lib/dfp_api/v201502/shared_ad_unit_service_registry.rb +45 -0
- data/lib/dfp_api/{v201311 → v201502}/suggested_ad_unit_service.rb +6 -10
- data/lib/dfp_api/v201502/suggested_ad_unit_service_registry.rb +45 -0
- data/lib/dfp_api/{v201311 → v201502}/team_service.rb +6 -18
- data/lib/dfp_api/v201502/team_service_registry.rb +45 -0
- data/lib/dfp_api/{v201308 → v201502}/user_service.rb +6 -18
- data/lib/dfp_api/v201502/user_service_registry.rb +45 -0
- data/lib/dfp_api/{v201311 → v201502}/user_team_association_service.rb +6 -18
- data/lib/dfp_api/v201502/user_team_association_service_registry.rb +45 -0
- data/lib/dfp_api/{v201311 → v201502}/workflow_request_service.rb +6 -6
- data/lib/dfp_api/v201502/workflow_request_service_registry.rb +45 -0
- data/lib/dfp_api/version.rb +1 -1
- metadata +909 -1057
- checksums.yaml +0 -15
- data/examples/v201403/creative_template_service/get_creative_template.rb +0 -74
- data/examples/v201403/line_item_service/create_mobile_line_item.rb +0 -135
- data/examples/v201403/report_service/run_report_with_custom_fields.rb +0 -135
- data/examples/v201403/suggested_ad_unit_service/get_suggested_ad_unit.rb +0 -75
- data/lib/dfp_api/client_login_header_handler.rb +0 -52
- data/lib/dfp_api/v201306/activity_group_service.rb +0 -54
- data/lib/dfp_api/v201306/activity_group_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/activity_service.rb +0 -54
- data/lib/dfp_api/v201306/activity_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/ad_rule_service.rb +0 -58
- data/lib/dfp_api/v201306/ad_rule_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/audience_segment_service.rb +0 -34
- data/lib/dfp_api/v201306/audience_segment_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/base_rate_service.rb +0 -58
- data/lib/dfp_api/v201306/base_rate_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/company_service.rb +0 -54
- data/lib/dfp_api/v201306/company_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/contact_service.rb +0 -54
- data/lib/dfp_api/v201306/contact_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/content_bundle_service.rb +0 -58
- data/lib/dfp_api/v201306/content_bundle_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/content_service.rb +0 -38
- data/lib/dfp_api/v201306/content_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/creative_service.rb +0 -54
- data/lib/dfp_api/v201306/creative_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/creative_set_service.rb +0 -46
- data/lib/dfp_api/v201306/creative_set_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/creative_template_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/creative_wrapper_service.rb +0 -58
- data/lib/dfp_api/v201306/creative_wrapper_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/custom_field_service.rb +0 -78
- data/lib/dfp_api/v201306/custom_field_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/custom_targeting_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/forecast_service.rb +0 -38
- data/lib/dfp_api/v201306/forecast_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/inventory_service.rb +0 -62
- data/lib/dfp_api/v201306/inventory_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/label_service.rb +0 -58
- data/lib/dfp_api/v201306/label_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/line_item_creative_association_service.rb +0 -62
- data/lib/dfp_api/v201306/line_item_creative_association_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/line_item_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/line_item_template_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/network_service.rb +0 -46
- data/lib/dfp_api/v201306/network_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/order_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/placement_service.rb +0 -58
- data/lib/dfp_api/v201306/placement_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/product_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/product_template_service.rb +0 -58
- data/lib/dfp_api/v201306/product_template_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/proposal_line_item_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/proposal_service.rb +0 -58
- data/lib/dfp_api/v201306/proposal_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/publisher_query_language_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/rate_card_customization_service.rb +0 -58
- data/lib/dfp_api/v201306/rate_card_customization_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/rate_card_service.rb +0 -58
- data/lib/dfp_api/v201306/rate_card_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/reconciliation_order_report_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/reconciliation_report_row_service.rb +0 -38
- data/lib/dfp_api/v201306/reconciliation_report_row_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/reconciliation_report_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/report_service.rb +0 -46
- data/lib/dfp_api/v201306/report_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/suggested_ad_unit_service.rb +0 -42
- data/lib/dfp_api/v201306/suggested_ad_unit_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/team_service.rb +0 -54
- data/lib/dfp_api/v201306/team_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/user_service.rb +0 -66
- data/lib/dfp_api/v201306/user_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/user_team_association_service.rb +0 -58
- data/lib/dfp_api/v201306/user_team_association_service_registry.rb +0 -46
- data/lib/dfp_api/v201306/workflow_action_service.rb +0 -38
- data/lib/dfp_api/v201306/workflow_action_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/activity_group_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/activity_service.rb +0 -54
- data/lib/dfp_api/v201308/activity_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/ad_rule_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/audience_segment_service.rb +0 -46
- data/lib/dfp_api/v201308/audience_segment_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/base_rate_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/company_service.rb +0 -54
- data/lib/dfp_api/v201308/company_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/contact_service.rb +0 -54
- data/lib/dfp_api/v201308/contact_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/content_bundle_service.rb +0 -58
- data/lib/dfp_api/v201308/content_bundle_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/content_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/creative_service.rb +0 -54
- data/lib/dfp_api/v201308/creative_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/creative_set_service.rb +0 -46
- data/lib/dfp_api/v201308/creative_set_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/creative_template_service.rb +0 -38
- data/lib/dfp_api/v201308/creative_template_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/creative_wrapper_service.rb +0 -58
- data/lib/dfp_api/v201308/creative_wrapper_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/custom_field_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/custom_targeting_service.rb +0 -62
- data/lib/dfp_api/v201308/custom_targeting_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/forecast_service.rb +0 -38
- data/lib/dfp_api/v201308/forecast_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/inventory_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/label_service.rb +0 -58
- data/lib/dfp_api/v201308/label_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/line_item_creative_association_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/line_item_service.rb +0 -58
- data/lib/dfp_api/v201308/line_item_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/line_item_template_service.rb +0 -34
- data/lib/dfp_api/v201308/line_item_template_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/network_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/order_service.rb +0 -58
- data/lib/dfp_api/v201308/order_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/placement_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/product_service.rb +0 -50
- data/lib/dfp_api/v201308/product_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/product_template_service.rb +0 -58
- data/lib/dfp_api/v201308/product_template_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/proposal_line_item_service.rb +0 -58
- data/lib/dfp_api/v201308/proposal_line_item_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/proposal_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/publisher_query_language_service.rb +0 -34
- data/lib/dfp_api/v201308/publisher_query_language_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/rate_card_customization_service.rb +0 -58
- data/lib/dfp_api/v201308/rate_card_customization_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/rate_card_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/reconciliation_order_report_service.rb +0 -42
- data/lib/dfp_api/v201308/reconciliation_order_report_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/reconciliation_report_row_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/reconciliation_report_service.rb +0 -46
- data/lib/dfp_api/v201308/reconciliation_report_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/report_service.rb +0 -46
- data/lib/dfp_api/v201308/report_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/suggested_ad_unit_service.rb +0 -42
- data/lib/dfp_api/v201308/suggested_ad_unit_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/team_service.rb +0 -54
- data/lib/dfp_api/v201308/team_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/user_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/user_team_association_service.rb +0 -58
- data/lib/dfp_api/v201308/user_team_association_service_registry.rb +0 -46
- data/lib/dfp_api/v201308/workflow_action_service.rb +0 -38
- data/lib/dfp_api/v201308/workflow_action_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/activity_group_service.rb +0 -54
- data/lib/dfp_api/v201311/activity_group_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/activity_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/ad_rule_service.rb +0 -58
- data/lib/dfp_api/v201311/ad_rule_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/audience_segment_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/base_rate_service.rb +0 -58
- data/lib/dfp_api/v201311/base_rate_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/company_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/contact_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/content_bundle_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/content_metadata_key_hierarchy_service.rb +0 -34
- data/lib/dfp_api/v201311/content_metadata_key_hierarchy_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/content_service.rb +0 -38
- data/lib/dfp_api/v201311/content_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/creative_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/creative_set_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/creative_template_service.rb +0 -38
- data/lib/dfp_api/v201311/creative_template_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/creative_wrapper_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/custom_field_service.rb +0 -78
- data/lib/dfp_api/v201311/custom_field_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/custom_targeting_service.rb +0 -62
- data/lib/dfp_api/v201311/custom_targeting_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/exchange_rate_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/forecast_service.rb +0 -38
- data/lib/dfp_api/v201311/forecast_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/inventory_service.rb +0 -62
- data/lib/dfp_api/v201311/inventory_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/label_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/line_item_creative_association_service.rb +0 -62
- data/lib/dfp_api/v201311/line_item_creative_association_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/line_item_service.rb +0 -58
- data/lib/dfp_api/v201311/line_item_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/line_item_template_service.rb +0 -34
- data/lib/dfp_api/v201311/line_item_template_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/network_service.rb +0 -46
- data/lib/dfp_api/v201311/network_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/order_service.rb +0 -58
- data/lib/dfp_api/v201311/order_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/placement_service.rb +0 -58
- data/lib/dfp_api/v201311/placement_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/product_service.rb +0 -50
- data/lib/dfp_api/v201311/product_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/product_template_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/proposal_line_item_service.rb +0 -58
- data/lib/dfp_api/v201311/proposal_line_item_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/proposal_service.rb +0 -58
- data/lib/dfp_api/v201311/proposal_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/publisher_query_language_service.rb +0 -34
- data/lib/dfp_api/v201311/publisher_query_language_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/rate_card_customization_service.rb +0 -58
- data/lib/dfp_api/v201311/rate_card_customization_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/rate_card_service.rb +0 -58
- data/lib/dfp_api/v201311/rate_card_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/reconciliation_order_report_service.rb +0 -42
- data/lib/dfp_api/v201311/reconciliation_order_report_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/reconciliation_report_row_service.rb +0 -38
- data/lib/dfp_api/v201311/reconciliation_report_row_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/reconciliation_report_service.rb +0 -46
- data/lib/dfp_api/v201311/reconciliation_report_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/report_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/suggested_ad_unit_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/team_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/user_service.rb +0 -66
- data/lib/dfp_api/v201311/user_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/user_team_association_service_registry.rb +0 -46
- data/lib/dfp_api/v201311/workflow_request_service_registry.rb +0 -46
data/examples/{v201403 → v201502}/user_team_association_service/delete_user_team_associations.rb
RENAMED
@@ -25,9 +25,9 @@
|
|
25
25
|
# Tags: UserTeamAssociationService.performUserTeamAssociationAction
|
26
26
|
|
27
27
|
require 'dfp_api'
|
28
|
+
require 'dfp_api_statement'
|
28
29
|
|
29
|
-
API_VERSION = :
|
30
|
-
PAGE_SIZE = 500
|
30
|
+
API_VERSION = :v201502
|
31
31
|
|
32
32
|
def delete_user_team_associations()
|
33
33
|
# Get DfpApi instance and load configuration from ~/dfp_api.yml.
|
@@ -44,42 +44,34 @@ def delete_user_team_associations()
|
|
44
44
|
user_id = 'INSERT_USER_ID_HERE'.to_i
|
45
45
|
|
46
46
|
# Create filter text to remove association by user ID.
|
47
|
-
|
48
|
-
|
49
|
-
|
47
|
+
statement = DfpApiStatement::FilterStatement.new(
|
48
|
+
'WHERE userId = :user_id',
|
49
|
+
[
|
50
50
|
{:key => 'user_id',
|
51
51
|
:value => {:value => user_id, :xsi_type => 'NumberValue'}}
|
52
52
|
]
|
53
|
-
|
54
|
-
|
55
|
-
offset = 0
|
56
|
-
page = {}
|
53
|
+
)
|
57
54
|
|
58
55
|
begin
|
59
|
-
# Update statement with the current offset.
|
60
|
-
statement[:query] = statement_text + " LIMIT %d OFFSET %d" %
|
61
|
-
[PAGE_SIZE, offset]
|
62
|
-
|
63
56
|
# Get user team associations by statement.
|
64
|
-
page = uta_service.get_user_team_associations_by_statement(
|
57
|
+
page = uta_service.get_user_team_associations_by_statement(
|
58
|
+
statement.toStatement())
|
65
59
|
|
66
60
|
if page[:results]
|
67
|
-
# Increase query offset by page size.
|
68
|
-
offset += PAGE_SIZE
|
69
|
-
|
70
61
|
page[:results].each do |association|
|
71
62
|
puts ("User team association of user ID %d with team ID %d will be " +
|
72
63
|
"deleted.") % [association[:user_id], association[:team_id]]
|
73
64
|
end
|
74
65
|
end
|
75
|
-
|
66
|
+
statement.offset += DfpApiStatement::SUGGESTED_PAGE_LIMIT
|
67
|
+
end while statement.offset < page[:total_result_set_size]
|
76
68
|
|
77
|
-
#
|
78
|
-
statement
|
69
|
+
# Reset offset back to 0 to perform action.
|
70
|
+
statement.toStatementForAction()
|
79
71
|
|
80
72
|
# Perform the action.
|
81
73
|
result = uta_service.perform_user_team_association_action(
|
82
|
-
{:xsi_type => 'DeleteUserTeamAssociations'}, statement)
|
74
|
+
{:xsi_type => 'DeleteUserTeamAssociations'}, statement.toStatement())
|
83
75
|
|
84
76
|
# Display results.
|
85
77
|
if result and result[:num_changes] > 0
|
data/examples/{v201403 → v201502}/user_team_association_service/get_all_user_team_associations.rb
RENAMED
@@ -24,9 +24,9 @@
|
|
24
24
|
# Tags: UserTeamAssociationService.getUserTeamAssociationsByStatement
|
25
25
|
|
26
26
|
require 'dfp_api'
|
27
|
+
require 'dfp_api_statement'
|
27
28
|
|
28
|
-
API_VERSION = :
|
29
|
-
PAGE_SIZE = 500
|
29
|
+
API_VERSION = :v201502
|
30
30
|
|
31
31
|
def get_all_user_team_associations()
|
32
32
|
# Get DfpApi instance and load configuration from ~/dfp_api.yml.
|
@@ -39,31 +39,24 @@ def get_all_user_team_associations()
|
|
39
39
|
# Get the UserTeamAssociationService.
|
40
40
|
uta_service = dfp.service(:UserTeamAssociationService, API_VERSION)
|
41
41
|
|
42
|
-
#
|
43
|
-
|
44
|
-
page = {}
|
42
|
+
# Create statement for all user team associations.
|
43
|
+
statement = DfpApiStatement::FilterStatement.new('ORDER BY id ASC')
|
45
44
|
|
46
45
|
begin
|
47
|
-
# Create statement for one page with current offset.
|
48
|
-
statement = {:query => "LIMIT %d OFFSET %d" % [PAGE_SIZE, offset]}
|
49
|
-
|
50
46
|
# Get the user team associations by statement.
|
51
|
-
page = uta_service.get_user_team_associations_by_statement(
|
47
|
+
page = uta_service.get_user_team_associations_by_statement(
|
48
|
+
statement.toStatement())
|
52
49
|
|
53
50
|
if page[:results]
|
54
|
-
# Increase query offset by page size.
|
55
|
-
offset += PAGE_SIZE
|
56
|
-
|
57
|
-
# Get the start index for printout.
|
58
|
-
start_index = page[:start_index]
|
59
|
-
|
60
51
|
# Print details about each user team association in results page.
|
61
52
|
page[:results].each_with_index do |association, index|
|
62
53
|
puts "%d) User team association between team ID: %d and user ID %d" %
|
63
|
-
[index +
|
54
|
+
[index + statement.offset,
|
55
|
+
association[:team_id], association[:user_id]]
|
64
56
|
end
|
65
57
|
end
|
66
|
-
|
58
|
+
statement.offset += DfpApiStatement::SUGGESTED_PAGE_LIMIT
|
59
|
+
end while statement.offset < page[:total_result_set_size]
|
67
60
|
|
68
61
|
# Print a footer
|
69
62
|
if page.include?(:total_result_set_size)
|
@@ -18,17 +18,16 @@
|
|
18
18
|
# See the License for the specific language governing permissions and
|
19
19
|
# limitations under the License.
|
20
20
|
#
|
21
|
-
# This example gets all teams that the current user belongs to.
|
22
|
-
#
|
23
|
-
# create_user_team_associations.rb.
|
21
|
+
# This example gets all teams that the current user belongs to.
|
22
|
+
# To create teams, run create_user_team_associations.rb.
|
24
23
|
#
|
25
24
|
# Tags: UserTeamAssociationService.getUserTeamAssociationsByStatement
|
26
25
|
# Tags: UserService.getCurrentUser
|
27
26
|
|
28
27
|
require 'dfp_api'
|
28
|
+
require 'dfp_api_statement'
|
29
29
|
|
30
|
-
API_VERSION = :
|
31
|
-
PAGE_SIZE = 500
|
30
|
+
API_VERSION = :v201502
|
32
31
|
|
33
32
|
def get_user_team_associations_by_statement()
|
34
33
|
# Get DfpApi instance and load configuration from ~/dfp_api.yml.
|
@@ -48,23 +47,28 @@ def get_user_team_associations_by_statement()
|
|
48
47
|
user = user_service.get_current_user()
|
49
48
|
|
50
49
|
# Create filter text to select user team associations by the user ID.
|
51
|
-
statement =
|
52
|
-
|
53
|
-
|
50
|
+
statement = DfpApiStatement::FilterStatement.new(
|
51
|
+
'WHERE userId = :user_id ORDER BY id',
|
52
|
+
[
|
54
53
|
{:key => 'user_id',
|
55
54
|
:value => {:value => user[:id], :xsi_type => 'NumberValue'}},
|
56
55
|
]
|
57
|
-
|
56
|
+
)
|
58
57
|
|
59
|
-
|
60
|
-
|
58
|
+
begin
|
59
|
+
# Get user team associations by statement.
|
60
|
+
page = uta_service.get_user_team_associations_by_statement(
|
61
|
+
statement.toStatement())
|
61
62
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
63
|
+
if page and page[:results]
|
64
|
+
page[:results].each_with_index do |association, index|
|
65
|
+
puts "%d) Team user association between team ID %d and user ID %d." %
|
66
|
+
[index + statement.offset, association[:team_id],
|
67
|
+
association[:user_id]]
|
68
|
+
end
|
66
69
|
end
|
67
|
-
|
70
|
+
statement.offset += DfpApiStatement::SUGGESTED_PAGE_LIMIT
|
71
|
+
end while statement.offset < page[:total_result_set_size]
|
68
72
|
|
69
73
|
# Print a footer.
|
70
74
|
if page.include?(:total_result_set_size)
|
data/examples/{v201403 → v201502}/user_team_association_service/update_user_team_associations.rb
RENAMED
@@ -27,9 +27,9 @@
|
|
27
27
|
# Tags: UserTeamAssociationService.updateUserTeamAssociations
|
28
28
|
|
29
29
|
require 'dfp_api'
|
30
|
+
require 'dfp_api_statement'
|
30
31
|
|
31
|
-
API_VERSION = :
|
32
|
-
PAGE_SIZE = 500
|
32
|
+
API_VERSION = :v201502
|
33
33
|
|
34
34
|
def update_user_team_associations()
|
35
35
|
# Get DfpApi instance and load configuration from ~/dfp_api.yml.
|
@@ -46,16 +46,17 @@ def update_user_team_associations()
|
|
46
46
|
user_id = 'INSERT_USER_ID_HERE'.to_i
|
47
47
|
|
48
48
|
# Create filter text to select user team associations by the user ID.
|
49
|
-
statement =
|
50
|
-
|
51
|
-
|
49
|
+
statement = DfpApiStatement::FilterStatement.new(
|
50
|
+
'WHERE userId = :user_id ORDER BY id ASC',
|
51
|
+
[
|
52
52
|
{:key => 'user_id',
|
53
53
|
:value => {:value => user_id, :xsi_type => 'NumberValue'}},
|
54
54
|
]
|
55
|
-
|
55
|
+
)
|
56
56
|
|
57
57
|
# Get user team associations by statement.
|
58
|
-
page = uta_service.get_user_team_associations_by_statement(
|
58
|
+
page = uta_service.get_user_team_associations_by_statement(
|
59
|
+
statement.toStatement())
|
59
60
|
|
60
61
|
if page[:results] and !page[:results].empty?
|
61
62
|
associations = page[:results]
|
data/lib/dfp_api.rb
CHANGED
@@ -22,7 +22,6 @@
|
|
22
22
|
require 'ads_common/api'
|
23
23
|
require 'ads_common/savon_headers/oauth_header_handler'
|
24
24
|
require 'dfp_api/api_config'
|
25
|
-
require 'dfp_api/client_login_header_handler'
|
26
25
|
require 'dfp_api/credential_handler'
|
27
26
|
require 'dfp_api/errors'
|
28
27
|
|
@@ -51,15 +50,6 @@ module DfpApi
|
|
51
50
|
def soap_header_handler(auth_handler, version, header_ns, default_ns)
|
52
51
|
auth_method = @config.read('authentication.method', :OAUTH2)
|
53
52
|
handler_class = case auth_method
|
54
|
-
when :CLIENTLOGIN
|
55
|
-
if version.to_s[/\d+/].to_i > 201311
|
56
|
-
raise AdsCommon::Errors::AuthError,
|
57
|
-
"ClientLogin is not supported for versions after v201311. " +
|
58
|
-
"Please use OAuth2 instead. See here for details:\n\n\t" +
|
59
|
-
"https://developers.google.com/doubleclick-publishers/docs/" +
|
60
|
-
"authentication"
|
61
|
-
end
|
62
|
-
DfpApi::ClientLoginHeaderHandler
|
63
53
|
when :OAUTH2, :OAUTH2_JWT
|
64
54
|
AdsCommon::SavonHeaders::OAuthHeaderHandler
|
65
55
|
else
|
data/lib/dfp_api/api_config.rb
CHANGED
@@ -35,9 +35,9 @@ module DfpApi
|
|
35
35
|
end
|
36
36
|
|
37
37
|
# Set defaults
|
38
|
-
DEFAULT_VERSION = :
|
38
|
+
DEFAULT_VERSION = :v201502
|
39
39
|
DEFAULT_ENVIRONMENT = :PRODUCTION
|
40
|
-
LATEST_VERSION = :
|
40
|
+
LATEST_VERSION = :v201502
|
41
41
|
|
42
42
|
# Set other constants
|
43
43
|
API_NAME = 'DfpApi'
|
@@ -45,45 +45,7 @@ module DfpApi
|
|
45
45
|
|
46
46
|
# Configure the services available to each version
|
47
47
|
@@service_config = {
|
48
|
-
:
|
49
|
-
:InventoryService, :LineItemCreativeAssociationService,
|
50
|
-
:LineItemService, :NetworkService, :OrderService,
|
51
|
-
:PlacementService, :ReportService, :UserService,
|
52
|
-
:CustomTargetingService, :PublisherQueryLanguageService,
|
53
|
-
:LabelService, :ContentService, :SuggestedAdUnitService,
|
54
|
-
:CreativeTemplateService, :TeamService,
|
55
|
-
:AudienceSegmentService, :CustomFieldService,
|
56
|
-
:UserTeamAssociationService, :CreativeSetService,
|
57
|
-
:CreativeWrapperService, :ActivityGroupService,
|
58
|
-
:ActivityService, :AdRuleService, :ContactService,
|
59
|
-
:ContentBundleService, :BaseRateService, :ProductService,
|
60
|
-
:ProductTemplateService, :ProposalService,
|
61
|
-
:ProposalLineItemService, :RateCardService,
|
62
|
-
:RateCardCustomizationService,
|
63
|
-
:ReconciliationOrderReportService,
|
64
|
-
:ReconciliationReportService,
|
65
|
-
:ReconciliationReportRowService,
|
66
|
-
:WorkflowActionService, :LineItemTemplateService],
|
67
|
-
:v201308 => [:CompanyService, :CreativeService, :ForecastService,
|
68
|
-
:InventoryService, :LineItemCreativeAssociationService,
|
69
|
-
:LineItemService, :NetworkService, :OrderService,
|
70
|
-
:PlacementService, :ReportService, :UserService,
|
71
|
-
:CustomTargetingService, :PublisherQueryLanguageService,
|
72
|
-
:LabelService, :ContentService, :SuggestedAdUnitService,
|
73
|
-
:CreativeTemplateService, :TeamService,
|
74
|
-
:AudienceSegmentService, :CustomFieldService,
|
75
|
-
:UserTeamAssociationService, :CreativeSetService,
|
76
|
-
:CreativeWrapperService, :ActivityGroupService,
|
77
|
-
:ActivityService, :AdRuleService, :ContactService,
|
78
|
-
:ContentBundleService, :BaseRateService, :ProductService,
|
79
|
-
:ProductTemplateService, :ProposalService,
|
80
|
-
:ProposalLineItemService, :RateCardService,
|
81
|
-
:RateCardCustomizationService,
|
82
|
-
:ReconciliationOrderReportService,
|
83
|
-
:ReconciliationReportService,
|
84
|
-
:ReconciliationReportRowService,
|
85
|
-
:WorkflowActionService, :LineItemTemplateService],
|
86
|
-
:v201311 => [:ActivityGroupService, :ActivityService, :AdRuleService,
|
48
|
+
:v201403 => [:ActivityGroupService, :ActivityService, :AdRuleService,
|
87
49
|
:AudienceSegmentService, :BaseRateService, :CompanyService,
|
88
50
|
:ContactService, :ContentBundleService,
|
89
51
|
:ContentMetadataKeyHierarchyService, :ContentService,
|
@@ -92,17 +54,19 @@ module DfpApi
|
|
92
54
|
:CustomFieldService, :CustomTargetingService,
|
93
55
|
:ExchangeRateService, :ForecastService, :InventoryService,
|
94
56
|
:LabelService, :LineItemCreativeAssociationService,
|
95
|
-
:LineItemService, :LineItemTemplateService,
|
57
|
+
:LineItemService, :LineItemTemplateService,
|
58
|
+
:NetworkService, :LiveStreamEventService,
|
96
59
|
:OrderService, :PlacementService, :ProductService,
|
97
60
|
:ProductTemplateService, :ProposalLineItemService,
|
98
61
|
:ProposalService, :PublisherQueryLanguageService,
|
99
|
-
:RateCardCustomizationService,
|
62
|
+
:RateCardCustomizationService,
|
63
|
+
:RateCardCustomizationGroupService, :RateCardService,
|
100
64
|
:ReconciliationOrderReportService,
|
101
65
|
:ReconciliationReportRowService,
|
102
66
|
:ReconciliationReportService, :ReportService,
|
103
67
|
:SuggestedAdUnitService, :TeamService, :UserService,
|
104
68
|
:UserTeamAssociationService, :WorkflowRequestService],
|
105
|
-
:
|
69
|
+
:v201405 => [:ActivityGroupService, :ActivityService, :AdRuleService,
|
106
70
|
:AudienceSegmentService, :BaseRateService, :CompanyService,
|
107
71
|
:ContactService, :ContentBundleService,
|
108
72
|
:ContentMetadataKeyHierarchyService, :ContentService,
|
@@ -123,7 +87,7 @@ module DfpApi
|
|
123
87
|
:ReconciliationReportService, :ReportService,
|
124
88
|
:SuggestedAdUnitService, :TeamService, :UserService,
|
125
89
|
:UserTeamAssociationService, :WorkflowRequestService],
|
126
|
-
:
|
90
|
+
:v201408 => [:ActivityGroupService, :ActivityService, :AdRuleService,
|
127
91
|
:AudienceSegmentService, :BaseRateService, :CompanyService,
|
128
92
|
:ContactService, :ContentBundleService,
|
129
93
|
:ContentMetadataKeyHierarchyService, :ContentService,
|
@@ -134,17 +98,17 @@ module DfpApi
|
|
134
98
|
:LabelService, :LineItemCreativeAssociationService,
|
135
99
|
:LineItemService, :LineItemTemplateService,
|
136
100
|
:NetworkService, :LiveStreamEventService,
|
137
|
-
:OrderService, :PlacementService,
|
101
|
+
:OrderService, :PlacementService,
|
102
|
+
:PremiumRateService, :ProductService,
|
138
103
|
:ProductTemplateService, :ProposalLineItemService,
|
139
104
|
:ProposalService, :PublisherQueryLanguageService,
|
140
|
-
:
|
141
|
-
:RateCardCustomizationGroupService, :RateCardService,
|
142
|
-
:ReconciliationOrderReportService,
|
105
|
+
:RateCardService, :ReconciliationOrderReportService,
|
143
106
|
:ReconciliationReportRowService,
|
144
107
|
:ReconciliationReportService, :ReportService,
|
145
108
|
:SuggestedAdUnitService, :TeamService, :UserService,
|
146
109
|
:UserTeamAssociationService, :WorkflowRequestService],
|
147
|
-
:
|
110
|
+
:v201411 => [:ActivityGroupService, :ActivityService,
|
111
|
+
:AdExclusionRuleService, :AdRuleService,
|
148
112
|
:AudienceSegmentService, :BaseRateService, :CompanyService,
|
149
113
|
:ContactService, :ContentBundleService,
|
150
114
|
:ContentMetadataKeyHierarchyService, :ContentService,
|
@@ -162,9 +126,10 @@ module DfpApi
|
|
162
126
|
:RateCardService, :ReconciliationOrderReportService,
|
163
127
|
:ReconciliationReportRowService,
|
164
128
|
:ReconciliationReportService, :ReportService,
|
165
|
-
:
|
129
|
+
:SharedAdUnitService, :SuggestedAdUnitService,
|
130
|
+
:TeamService, :UserService,
|
166
131
|
:UserTeamAssociationService, :WorkflowRequestService],
|
167
|
-
:
|
132
|
+
:v201502 => [:ActivityGroupService, :ActivityService,
|
168
133
|
:AdExclusionRuleService, :AdRuleService,
|
169
134
|
:AudienceSegmentService, :BaseRateService, :CompanyService,
|
170
135
|
:ContactService, :ContentBundleService,
|
@@ -176,7 +141,8 @@ module DfpApi
|
|
176
141
|
:LabelService, :LineItemCreativeAssociationService,
|
177
142
|
:LineItemService, :LineItemTemplateService,
|
178
143
|
:NetworkService, :LiveStreamEventService,
|
179
|
-
:OrderService, :
|
144
|
+
:OrderService, :PackageService, :ProductPackageService,
|
145
|
+
:ProductPackageItemService, :PlacementService,
|
180
146
|
:PremiumRateService, :ProductService,
|
181
147
|
:ProductTemplateService, :ProposalLineItemService,
|
182
148
|
:ProposalService, :PublisherQueryLanguageService,
|
@@ -193,20 +159,13 @@ module DfpApi
|
|
193
159
|
:PRODUCTION => {
|
194
160
|
:oauth_scope => 'https://www.googleapis.com/auth/dfp',
|
195
161
|
:header_ns => 'https://www.google.com/apis/ads/publisher/',
|
196
|
-
:v201306 => 'https://ads.google.com/apis/ads/publisher/',
|
197
|
-
:v201308 => 'https://ads.google.com/apis/ads/publisher/',
|
198
|
-
:v201311 => 'https://ads.google.com/apis/ads/publisher/',
|
199
162
|
:v201403 => 'https://ads.google.com/apis/ads/publisher/',
|
200
163
|
:v201405 => 'https://ads.google.com/apis/ads/publisher/',
|
201
164
|
:v201408 => 'https://ads.google.com/apis/ads/publisher/',
|
202
|
-
:v201411 => 'https://ads.google.com/apis/ads/publisher/'
|
203
|
-
|
204
|
-
}
|
165
|
+
:v201411 => 'https://ads.google.com/apis/ads/publisher/',
|
166
|
+
:v201502 => 'https://ads.google.com/apis/ads/publisher/'
|
205
167
|
|
206
|
-
|
207
|
-
@@client_login_config = {
|
208
|
-
:AUTH_SERVER => 'https://www.google.com',
|
209
|
-
:LOGIN_SERVICE_NAME => 'gam'
|
168
|
+
}
|
210
169
|
}
|
211
170
|
|
212
171
|
public
|
@@ -241,10 +200,6 @@ module DfpApi
|
|
241
200
|
nil
|
242
201
|
end
|
243
202
|
|
244
|
-
def self.client_login_config(key)
|
245
|
-
return @@client_login_config[key]
|
246
|
-
end
|
247
|
-
|
248
203
|
def self.default_config_filename
|
249
204
|
DEFAULT_CONFIG_FILENAME
|
250
205
|
end
|
@@ -5,38 +5,26 @@
|
|
5
5
|
# Copyright:: Copyright 2013, Google Inc. All Rights Reserved.
|
6
6
|
# License:: Licensed under the Apache License, Version 2.0.
|
7
7
|
#
|
8
|
-
# Code generated by AdsCommon library 0.9.
|
8
|
+
# Code generated by AdsCommon library 0.9.5 on 2015-02-11 12:49:59.
|
9
9
|
|
10
10
|
require 'ads_common/savon_service'
|
11
|
-
require 'dfp_api/
|
11
|
+
require 'dfp_api/v201502/activity_group_service_registry'
|
12
12
|
|
13
|
-
module DfpApi; module
|
13
|
+
module DfpApi; module V201502; module ActivityGroupService
|
14
14
|
class ActivityGroupService < AdsCommon::SavonService
|
15
15
|
def initialize(config, endpoint)
|
16
|
-
namespace = 'https://www.google.com/apis/ads/publisher/
|
17
|
-
super(config, endpoint, namespace, :
|
18
|
-
end
|
19
|
-
|
20
|
-
def create_activity_group(*args, &block)
|
21
|
-
return execute_action('create_activity_group', args, &block)
|
16
|
+
namespace = 'https://www.google.com/apis/ads/publisher/v201502'
|
17
|
+
super(config, endpoint, namespace, :v201502)
|
22
18
|
end
|
23
19
|
|
24
20
|
def create_activity_groups(*args, &block)
|
25
21
|
return execute_action('create_activity_groups', args, &block)
|
26
22
|
end
|
27
23
|
|
28
|
-
def get_activity_group(*args, &block)
|
29
|
-
return execute_action('get_activity_group', args, &block)
|
30
|
-
end
|
31
|
-
|
32
24
|
def get_activity_groups_by_statement(*args, &block)
|
33
25
|
return execute_action('get_activity_groups_by_statement', args, &block)
|
34
26
|
end
|
35
27
|
|
36
|
-
def update_activity_group(*args, &block)
|
37
|
-
return execute_action('update_activity_group', args, &block)
|
38
|
-
end
|
39
|
-
|
40
28
|
def update_activity_groups(*args, &block)
|
41
29
|
return execute_action('update_activity_groups', args, &block)
|
42
30
|
end
|
@@ -48,7 +36,7 @@ module DfpApi; module V201308; module ActivityGroupService
|
|
48
36
|
end
|
49
37
|
|
50
38
|
def get_module()
|
51
|
-
return DfpApi::
|
39
|
+
return DfpApi::V201502::ActivityGroupService
|
52
40
|
end
|
53
41
|
end
|
54
42
|
end; end; end
|