google-dfp-api 0.18.0 → 0.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +11 -0
- data/README.md +5 -0
- data/dfp_api.yml +1 -1
- data/lib/dfp_api/api_config.rb +13 -38
- data/lib/dfp_api/dfp_api_statement.rb +5 -0
- data/lib/dfp_api/{v201511 → v201611}/activity_group_service.rb +6 -6
- data/lib/dfp_api/{v201511 → v201611}/activity_group_service_registry.rb +2 -2
- data/lib/dfp_api/{v201508 → v201611}/activity_service.rb +6 -6
- data/lib/dfp_api/{v201508 → v201611}/activity_service_registry.rb +2 -2
- data/lib/dfp_api/{v201511 → v201611}/ad_exclusion_rule_service.rb +6 -6
- data/lib/dfp_api/{v201511 → v201611}/ad_exclusion_rule_service_registry.rb +2 -2
- data/lib/dfp_api/{v201511 → v201611}/ad_rule_service.rb +6 -6
- data/lib/dfp_api/v201611/ad_rule_service_registry.rb +45 -0
- data/lib/dfp_api/{v201508 → v201611}/audience_segment_service.rb +6 -6
- data/lib/dfp_api/{v201511 → v201611}/audience_segment_service_registry.rb +3 -3
- data/lib/dfp_api/{v201511 → v201611}/base_rate_service.rb +6 -6
- data/lib/dfp_api/{v201511 → v201611}/base_rate_service_registry.rb +2 -2
- data/lib/dfp_api/{v201511 → v201611}/company_service.rb +6 -6
- data/lib/dfp_api/{v201511 → v201611}/company_service_registry.rb +3 -3
- data/lib/dfp_api/{v201511 → v201611}/contact_service.rb +6 -6
- data/lib/dfp_api/{v201511 → v201611}/contact_service_registry.rb +2 -2
- data/lib/dfp_api/{v201511 → v201611}/content_bundle_service.rb +6 -6
- data/lib/dfp_api/v201611/content_bundle_service_registry.rb +45 -0
- data/lib/dfp_api/{v201511 → v201611}/content_metadata_key_hierarchy_service.rb +6 -6
- data/lib/dfp_api/{v201511 → v201611}/content_metadata_key_hierarchy_service_registry.rb +2 -2
- data/lib/dfp_api/{v201511 → v201611}/content_service.rb +6 -6
- data/lib/dfp_api/{v201511 → v201611}/content_service_registry.rb +2 -2
- data/lib/dfp_api/{v201511 → v201611}/creative_service.rb +6 -6
- data/lib/dfp_api/v201611/creative_service_registry.rb +45 -0
- data/lib/dfp_api/{v201508 → v201611}/creative_set_service.rb +6 -6
- data/lib/dfp_api/v201611/creative_set_service_registry.rb +45 -0
- data/lib/dfp_api/{v201508 → v201611}/creative_template_service.rb +6 -6
- data/lib/dfp_api/v201611/creative_template_service_registry.rb +45 -0
- data/lib/dfp_api/{v201508 → v201611}/creative_wrapper_service.rb +6 -6
- data/lib/dfp_api/{v201511 → v201611}/creative_wrapper_service_registry.rb +2 -2
- data/lib/dfp_api/{v201511 → v201611}/custom_field_service.rb +6 -6
- data/lib/dfp_api/{v201511 → v201611}/custom_field_service_registry.rb +2 -2
- data/lib/dfp_api/{v201508 → v201611}/custom_targeting_service.rb +6 -6
- data/lib/dfp_api/{v201511 → v201611}/custom_targeting_service_registry.rb +2 -2
- data/lib/dfp_api/{v201508 → v201611}/exchange_rate_service.rb +6 -6
- data/lib/dfp_api/{v201511 → v201611}/exchange_rate_service_registry.rb +2 -2
- data/lib/dfp_api/{v201511 → v201611}/forecast_service.rb +6 -6
- data/lib/dfp_api/v201611/forecast_service_registry.rb +45 -0
- data/lib/dfp_api/{v201508 → v201611}/inventory_service.rb +6 -6
- data/lib/dfp_api/v201611/inventory_service_registry.rb +45 -0
- data/lib/dfp_api/{v201508 → v201611}/label_service.rb +6 -6
- data/lib/dfp_api/{v201511 → v201611}/label_service_registry.rb +2 -2
- data/lib/dfp_api/{v201508 → v201611}/line_item_creative_association_service.rb +6 -6
- data/lib/dfp_api/v201611/line_item_creative_association_service_registry.rb +45 -0
- data/lib/dfp_api/{v201511 → v201611}/line_item_service.rb +6 -6
- data/lib/dfp_api/v201611/line_item_service_registry.rb +45 -0
- data/lib/dfp_api/{v201511 → v201611}/line_item_template_service.rb +6 -6
- data/lib/dfp_api/v201611/line_item_template_service_registry.rb +45 -0
- data/lib/dfp_api/{v201511 → v201611}/live_stream_event_service.rb +14 -6
- data/lib/dfp_api/{v201511 → v201611}/live_stream_event_service_registry.rb +4 -4
- data/lib/dfp_api/v201611/mobile_application_service.rb +62 -0
- data/lib/dfp_api/v201611/mobile_application_service_registry.rb +45 -0
- data/lib/dfp_api/{v201511 → v201611}/network_service.rb +6 -6
- data/lib/dfp_api/{v201511 → v201611}/network_service_registry.rb +3 -3
- data/lib/dfp_api/{v201508 → v201611}/order_service.rb +6 -6
- data/lib/dfp_api/{v201508 → v201611}/order_service_registry.rb +3 -3
- data/lib/dfp_api/{v201508 → v201611}/package_service.rb +6 -6
- data/lib/dfp_api/{v201511 → v201611}/package_service_registry.rb +2 -2
- data/lib/dfp_api/{v201508 → v201611}/placement_service.rb +6 -6
- data/lib/dfp_api/{v201511 → v201611}/placement_service_registry.rb +2 -2
- data/lib/dfp_api/{v201508 → v201611}/premium_rate_service.rb +6 -6
- data/lib/dfp_api/{v201508 → v201611}/premium_rate_service_registry.rb +2 -2
- data/lib/dfp_api/{v201508 → v201611}/product_package_item_service.rb +6 -6
- data/lib/dfp_api/{v201508 → v201611}/product_package_item_service_registry.rb +2 -2
- data/lib/dfp_api/{v201511 → v201611}/product_package_service.rb +6 -6
- data/lib/dfp_api/{v201508 → v201611}/product_package_service_registry.rb +3 -3
- data/lib/dfp_api/{v201511 → v201611}/product_service.rb +14 -6
- data/lib/dfp_api/v201611/product_service_registry.rb +45 -0
- data/lib/dfp_api/{v201511 → v201611}/product_template_service.rb +6 -6
- data/lib/dfp_api/v201611/product_template_service_registry.rb +45 -0
- data/lib/dfp_api/{v201508 → v201611}/proposal_line_item_service.rb +6 -6
- data/lib/dfp_api/v201611/proposal_line_item_service_registry.rb +45 -0
- data/lib/dfp_api/{v201508 → v201611}/proposal_service.rb +14 -6
- data/lib/dfp_api/v201611/proposal_service_registry.rb +45 -0
- data/lib/dfp_api/{v201511 → v201611}/publisher_query_language_service.rb +6 -6
- data/lib/dfp_api/v201611/publisher_query_language_service_registry.rb +45 -0
- data/lib/dfp_api/{v201508 → v201611}/rate_card_service.rb +6 -6
- data/lib/dfp_api/{v201511 → v201611}/rate_card_service_registry.rb +3 -3
- data/lib/dfp_api/{v201508 → v201611}/reconciliation_line_item_report_service.rb +6 -6
- data/lib/dfp_api/{v201511 → v201611}/reconciliation_line_item_report_service_registry.rb +2 -2
- data/lib/dfp_api/{v201511 → v201611}/reconciliation_order_report_service.rb +6 -6
- data/lib/dfp_api/{v201508 → v201611}/reconciliation_order_report_service_registry.rb +2 -2
- data/lib/dfp_api/{v201511 → v201611}/reconciliation_report_row_service.rb +6 -6
- data/lib/dfp_api/{v201511 → v201611}/reconciliation_report_row_service_registry.rb +2 -2
- data/lib/dfp_api/{v201508 → v201611}/reconciliation_report_service.rb +6 -6
- data/lib/dfp_api/{v201508 → v201611}/reconciliation_report_service_registry.rb +2 -2
- data/lib/dfp_api/{v201508 → v201611}/report_service.rb +14 -6
- data/lib/dfp_api/{v201511 → v201611}/report_service_registry.rb +4 -4
- data/lib/dfp_api/{v201508 → v201611}/suggested_ad_unit_service.rb +6 -6
- data/lib/dfp_api/v201611/suggested_ad_unit_service_registry.rb +45 -0
- data/lib/dfp_api/{v201508 → v201611}/team_service.rb +6 -6
- data/lib/dfp_api/{v201508 → v201611}/team_service_registry.rb +3 -3
- data/lib/dfp_api/{v201508 → v201611}/user_service.rb +6 -6
- data/lib/dfp_api/{v201508 → v201611}/user_service_registry.rb +3 -3
- data/lib/dfp_api/{v201511 → v201611}/user_team_association_service.rb +6 -6
- data/lib/dfp_api/{v201511 → v201611}/user_team_association_service_registry.rb +2 -2
- data/lib/dfp_api/{v201508 → v201611}/workflow_request_service.rb +6 -6
- data/lib/dfp_api/{v201511 → v201611}/workflow_request_service_registry.rb +3 -3
- data/lib/dfp_api/version.rb +1 -1
- data/test/bugs/test_issue_00000007.rb +113 -0
- data/test/bugs/test_issue_00000081.rb +5 -3
- metadata +105 -611
- data/examples/v201602/activity_group_service/create_activity_groups.rb +0 -90
- data/examples/v201602/activity_group_service/get_active_activity_groups.rb +0 -87
- data/examples/v201602/activity_group_service/get_all_activity_groups.rb +0 -81
- data/examples/v201602/activity_group_service/update_activity_groups.rb +0 -94
- data/examples/v201602/activity_service/create_activities.rb +0 -87
- data/examples/v201602/activity_service/get_active_activities.rb +0 -87
- data/examples/v201602/activity_service/get_all_activities.rb +0 -81
- data/examples/v201602/activity_service/update_activities.rb +0 -96
- data/examples/v201602/audience_segment_service/create_audience_segments.rb +0 -114
- data/examples/v201602/audience_segment_service/get_all_audience_segments.rb +0 -81
- data/examples/v201602/audience_segment_service/get_first_party_audience_segments.rb +0 -88
- data/examples/v201602/audience_segment_service/populate_first_party_audience_segments.rb +0 -99
- data/examples/v201602/audience_segment_service/update_audience_segments.rb +0 -94
- data/examples/v201602/common/error_handling.rb +0 -72
- data/examples/v201602/common/oauth2_jwt_handling.rb +0 -99
- data/examples/v201602/common/setup_oauth2.rb +0 -85
- data/examples/v201602/company_service/create_companies.rb +0 -78
- data/examples/v201602/company_service/get_all_companies.rb +0 -80
- data/examples/v201602/company_service/get_companies_by_statement.rb +0 -89
- data/examples/v201602/company_service/update_companies.rb +0 -104
- data/examples/v201602/contact_service/create_contacts.rb +0 -91
- data/examples/v201602/contact_service/get_all_contacts.rb +0 -80
- data/examples/v201602/contact_service/get_uninvited_contacts.rb +0 -94
- data/examples/v201602/contact_service/update_contacts.rb +0 -96
- data/examples/v201602/content_metadata_key_hierarchy_service/create_content_metadata_key_hierarchies.rb +0 -92
- data/examples/v201602/content_metadata_key_hierarchy_service/delete_content_metadata_key_hierarchies.rb +0 -101
- data/examples/v201602/content_metadata_key_hierarchy_service/get_all_content_metadata_key_hierarchies.rb +0 -85
- data/examples/v201602/content_metadata_key_hierarchy_service/update_content_metadata_key_hierarchies.rb +0 -110
- data/examples/v201602/content_service/get_all_content.rb +0 -81
- data/examples/v201602/content_service/get_content_by_category.rb +0 -127
- data/examples/v201602/creative_service/copy_image_creatives.rb +0 -111
- data/examples/v201602/creative_service/create_creative_from_template.rb +0 -135
- data/examples/v201602/creative_service/create_creatives.rb +0 -108
- data/examples/v201602/creative_service/create_custom_creative.rb +0 -103
- data/examples/v201602/creative_service/create_native_creative.rb +0 -189
- data/examples/v201602/creative_service/get_all_creatives.rb +0 -80
- data/examples/v201602/creative_service/get_creatives_by_statement.rb +0 -88
- data/examples/v201602/creative_service/update_creatives.rb +0 -97
- data/examples/v201602/creative_set_service/associate_creative_set_to_line_item.rb +0 -73
- data/examples/v201602/creative_set_service/create_creative_set.rb +0 -79
- data/examples/v201602/creative_set_service/get_all_creative_sets.rb +0 -82
- data/examples/v201602/creative_set_service/get_creative_sets_by_statement.rb +0 -92
- data/examples/v201602/creative_set_service/update_creative_sets.rb +0 -98
- data/examples/v201602/creative_template_service/get_all_creative_templates.rb +0 -82
- data/examples/v201602/creative_template_service/get_system_defined_creative_templates.rb +0 -87
- data/examples/v201602/creative_wrapper_service/create_creative_wrappers.rb +0 -85
- data/examples/v201602/creative_wrapper_service/deactivate_creative_wrapper.rb +0 -99
- data/examples/v201602/creative_wrapper_service/get_all_creative_wrappers.rb +0 -82
- data/examples/v201602/creative_wrapper_service/get_creative_wrappers_by_statement.rb +0 -89
- data/examples/v201602/creative_wrapper_service/update_creative_wrappers.rb +0 -99
- data/examples/v201602/custom_field_service/create_custom_field_options.rb +0 -83
- data/examples/v201602/custom_field_service/create_custom_fields.rb +0 -82
- data/examples/v201602/custom_field_service/deactivate_all_line_item_custom_fields.rb +0 -97
- data/examples/v201602/custom_field_service/get_all_custom_fields.rb +0 -90
- data/examples/v201602/custom_field_service/get_all_line_item_custom_fields.rb +0 -87
- data/examples/v201602/custom_field_service/set_line_item_custom_field_value.rb +0 -178
- data/examples/v201602/custom_field_service/update_custom_fields.rb +0 -98
- data/examples/v201602/custom_targeting_service/create_custom_targeting_keys_and_values.rb +0 -135
- data/examples/v201602/custom_targeting_service/delete_custom_targeting_keys.rb +0 -112
- data/examples/v201602/custom_targeting_service/delete_custom_targeting_values.rb +0 -122
- data/examples/v201602/custom_targeting_service/get_all_custom_targeting_keys_and_values.rb +0 -122
- data/examples/v201602/custom_targeting_service/get_custom_targeting_keys_by_statement.rb +0 -92
- data/examples/v201602/custom_targeting_service/get_custom_targeting_values_by_statement.rb +0 -98
- data/examples/v201602/custom_targeting_service/update_custom_targeting_keys.rb +0 -90
- data/examples/v201602/custom_targeting_service/update_custom_targeting_values.rb +0 -105
- data/examples/v201602/forecast_service/get_availability_forecast.rb +0 -134
- data/examples/v201602/forecast_service/get_availability_forecast_for_line_item.rb +0 -84
- data/examples/v201602/forecast_service/get_delivery_forecast_for_line_items.rb +0 -77
- data/examples/v201602/inventory_service/create_ad_units.rb +0 -97
- data/examples/v201602/inventory_service/create_video_ad_unit.rb +0 -103
- data/examples/v201602/inventory_service/deactivate_ad_units.rb +0 -110
- data/examples/v201602/inventory_service/get_ad_unit_sizes.rb +0 -74
- data/examples/v201602/inventory_service/get_ad_units_by_statement.rb +0 -97
- data/examples/v201602/inventory_service/get_all_ad_units.rb +0 -80
- data/examples/v201602/inventory_service/update_ad_units.rb +0 -105
- data/examples/v201602/label_service/create_labels.rb +0 -79
- data/examples/v201602/label_service/deactivate_labels.rb +0 -107
- data/examples/v201602/label_service/get_all_labels.rb +0 -82
- data/examples/v201602/label_service/get_labels_by_statement.rb +0 -82
- data/examples/v201602/label_service/update_labels.rb +0 -96
- data/examples/v201602/line_item_creative_association_service/create_licas.rb +0 -90
- data/examples/v201602/line_item_creative_association_service/deactivate_licas.rb +0 -113
- data/examples/v201602/line_item_creative_association_service/get_all_licas.rb +0 -85
- data/examples/v201602/line_item_creative_association_service/get_licas_by_statement.rb +0 -89
- data/examples/v201602/line_item_creative_association_service/update_licas.rb +0 -96
- data/examples/v201602/line_item_service/activate_line_items.rb +0 -118
- data/examples/v201602/line_item_service/create_line_items.rb +0 -182
- data/examples/v201602/line_item_service/create_video_line_item.rb +0 -164
- data/examples/v201602/line_item_service/get_all_line_items.rb +0 -82
- data/examples/v201602/line_item_service/get_line_items_by_statement.rb +0 -91
- data/examples/v201602/line_item_service/get_recently_updated_line_items.rb +0 -100
- data/examples/v201602/line_item_service/target_custom_criteria.rb +0 -140
- data/examples/v201602/line_item_service/update_line_items.rb +0 -106
- data/examples/v201602/network_service/get_all_networks.rb +0 -70
- data/examples/v201602/network_service/get_current_network.rb +0 -62
- data/examples/v201602/network_service/make_test_network.rb +0 -75
- data/examples/v201602/order_service/approve_orders.rb +0 -110
- data/examples/v201602/order_service/create_orders.rb +0 -88
- data/examples/v201602/order_service/get_all_orders.rb +0 -80
- data/examples/v201602/order_service/get_orders_by_statement.rb +0 -90
- data/examples/v201602/order_service/update_orders.rb +0 -101
- data/examples/v201602/placement_service/create_placements.rb +0 -128
- data/examples/v201602/placement_service/deactivate_placements.rb +0 -106
- data/examples/v201602/placement_service/get_all_placements.rb +0 -81
- data/examples/v201602/placement_service/get_placements_by_statement.rb +0 -87
- data/examples/v201602/placement_service/update_placements.rb +0 -102
- data/examples/v201602/publisher_query_language_service/fetch_match_tables.rb +0 -107
- data/examples/v201602/publisher_query_language_service/get_all_line_items.rb +0 -95
- data/examples/v201602/publisher_query_language_service/get_geo_targets.rb +0 -98
- data/examples/v201602/publisher_query_language_service/get_line_items_named_like.rb +0 -96
- data/examples/v201602/report_service/display_report.rb +0 -77
- data/examples/v201602/report_service/download_report.rb +0 -77
- data/examples/v201602/report_service/run_delivery_report.rb +0 -111
- data/examples/v201602/report_service/run_inventory_report.rb +0 -109
- data/examples/v201602/report_service/run_reach_report.rb +0 -85
- data/examples/v201602/report_service/run_report_with_custom_fields.rb +0 -89
- data/examples/v201602/report_service/run_sales_report.rb +0 -89
- data/examples/v201602/suggested_ad_unit_service/approve_all_suggested_ad_units.rb +0 -108
- data/examples/v201602/suggested_ad_unit_service/get_all_suggested_ad_units.rb +0 -83
- data/examples/v201602/suggested_ad_unit_service/get_suggested_ad_units_by_statement.rb +0 -91
- data/examples/v201602/team_service/create_teams.rb +0 -79
- data/examples/v201602/team_service/get_all_teams.rb +0 -79
- data/examples/v201602/team_service/get_teams_by_statement.rb +0 -78
- data/examples/v201602/team_service/update_teams.rb +0 -94
- data/examples/v201602/user_service/create_users.rb +0 -85
- data/examples/v201602/user_service/deactivate_users.rb +0 -94
- data/examples/v201602/user_service/get_all_roles.rb +0 -69
- data/examples/v201602/user_service/get_all_users.rb +0 -79
- data/examples/v201602/user_service/get_current_user.rb +0 -62
- data/examples/v201602/user_service/get_users_by_statement.rb +0 -80
- data/examples/v201602/user_service/update_users.rb +0 -94
- data/examples/v201602/user_team_association_service/create_user_team_associations.rb +0 -82
- data/examples/v201602/user_team_association_service/delete_user_team_associations.rb +0 -98
- data/examples/v201602/user_team_association_service/get_all_user_team_associations.rb +0 -83
- data/examples/v201602/user_team_association_service/get_user_team_associations_by_statement.rb +0 -93
- data/examples/v201602/user_team_association_service/update_user_team_associations.rb +0 -98
- data/examples/v201605/activity_group_service/create_activity_groups.rb +0 -90
- data/examples/v201605/activity_group_service/get_active_activity_groups.rb +0 -87
- data/examples/v201605/activity_group_service/get_all_activity_groups.rb +0 -81
- data/examples/v201605/activity_group_service/update_activity_groups.rb +0 -94
- data/examples/v201605/activity_service/create_activities.rb +0 -87
- data/examples/v201605/activity_service/get_active_activities.rb +0 -87
- data/examples/v201605/activity_service/get_all_activities.rb +0 -81
- data/examples/v201605/activity_service/update_activities.rb +0 -96
- data/examples/v201605/audience_segment_service/create_audience_segments.rb +0 -114
- data/examples/v201605/audience_segment_service/get_all_audience_segments.rb +0 -81
- data/examples/v201605/audience_segment_service/get_first_party_audience_segments.rb +0 -88
- data/examples/v201605/audience_segment_service/populate_first_party_audience_segments.rb +0 -99
- data/examples/v201605/audience_segment_service/update_audience_segments.rb +0 -94
- data/examples/v201605/common/error_handling.rb +0 -72
- data/examples/v201605/common/oauth2_jwt_handling.rb +0 -99
- data/examples/v201605/common/setup_oauth2.rb +0 -85
- data/examples/v201605/company_service/create_companies.rb +0 -78
- data/examples/v201605/company_service/get_all_companies.rb +0 -80
- data/examples/v201605/company_service/get_companies_by_statement.rb +0 -89
- data/examples/v201605/company_service/update_companies.rb +0 -104
- data/examples/v201605/contact_service/create_contacts.rb +0 -91
- data/examples/v201605/contact_service/get_all_contacts.rb +0 -80
- data/examples/v201605/contact_service/get_uninvited_contacts.rb +0 -94
- data/examples/v201605/contact_service/update_contacts.rb +0 -96
- data/examples/v201605/content_metadata_key_hierarchy_service/create_content_metadata_key_hierarchies.rb +0 -92
- data/examples/v201605/content_metadata_key_hierarchy_service/delete_content_metadata_key_hierarchies.rb +0 -101
- data/examples/v201605/content_metadata_key_hierarchy_service/get_all_content_metadata_key_hierarchies.rb +0 -85
- data/examples/v201605/content_metadata_key_hierarchy_service/update_content_metadata_key_hierarchies.rb +0 -110
- data/examples/v201605/content_service/get_all_content.rb +0 -81
- data/examples/v201605/content_service/get_content_by_category.rb +0 -127
- data/examples/v201605/creative_service/copy_image_creatives.rb +0 -111
- data/examples/v201605/creative_service/create_creative_from_template.rb +0 -135
- data/examples/v201605/creative_service/create_creatives.rb +0 -108
- data/examples/v201605/creative_service/create_custom_creative.rb +0 -103
- data/examples/v201605/creative_service/create_native_creative.rb +0 -189
- data/examples/v201605/creative_service/get_all_creatives.rb +0 -80
- data/examples/v201605/creative_service/get_creatives_by_statement.rb +0 -88
- data/examples/v201605/creative_service/update_creatives.rb +0 -97
- data/examples/v201605/creative_set_service/associate_creative_set_to_line_item.rb +0 -73
- data/examples/v201605/creative_set_service/create_creative_set.rb +0 -79
- data/examples/v201605/creative_set_service/get_all_creative_sets.rb +0 -82
- data/examples/v201605/creative_set_service/get_creative_sets_by_statement.rb +0 -92
- data/examples/v201605/creative_set_service/update_creative_sets.rb +0 -98
- data/examples/v201605/creative_template_service/get_all_creative_templates.rb +0 -82
- data/examples/v201605/creative_template_service/get_system_defined_creative_templates.rb +0 -87
- data/examples/v201605/creative_wrapper_service/create_creative_wrappers.rb +0 -85
- data/examples/v201605/creative_wrapper_service/deactivate_creative_wrapper.rb +0 -99
- data/examples/v201605/creative_wrapper_service/get_all_creative_wrappers.rb +0 -82
- data/examples/v201605/creative_wrapper_service/get_creative_wrappers_by_statement.rb +0 -89
- data/examples/v201605/creative_wrapper_service/update_creative_wrappers.rb +0 -99
- data/examples/v201605/custom_field_service/create_custom_field_options.rb +0 -83
- data/examples/v201605/custom_field_service/create_custom_fields.rb +0 -82
- data/examples/v201605/custom_field_service/deactivate_all_line_item_custom_fields.rb +0 -97
- data/examples/v201605/custom_field_service/get_all_custom_fields.rb +0 -90
- data/examples/v201605/custom_field_service/get_all_line_item_custom_fields.rb +0 -87
- data/examples/v201605/custom_field_service/set_line_item_custom_field_value.rb +0 -178
- data/examples/v201605/custom_field_service/update_custom_fields.rb +0 -98
- data/examples/v201605/custom_targeting_service/create_custom_targeting_keys_and_values.rb +0 -135
- data/examples/v201605/custom_targeting_service/delete_custom_targeting_keys.rb +0 -112
- data/examples/v201605/custom_targeting_service/delete_custom_targeting_values.rb +0 -122
- data/examples/v201605/custom_targeting_service/get_all_custom_targeting_keys_and_values.rb +0 -122
- data/examples/v201605/custom_targeting_service/get_custom_targeting_keys_by_statement.rb +0 -92
- data/examples/v201605/custom_targeting_service/get_custom_targeting_values_by_statement.rb +0 -98
- data/examples/v201605/custom_targeting_service/update_custom_targeting_keys.rb +0 -90
- data/examples/v201605/custom_targeting_service/update_custom_targeting_values.rb +0 -105
- data/examples/v201605/forecast_service/get_availability_forecast.rb +0 -134
- data/examples/v201605/forecast_service/get_availability_forecast_for_line_item.rb +0 -84
- data/examples/v201605/forecast_service/get_delivery_forecast_for_line_items.rb +0 -77
- data/examples/v201605/inventory_service/create_ad_units.rb +0 -97
- data/examples/v201605/inventory_service/create_video_ad_unit.rb +0 -103
- data/examples/v201605/inventory_service/deactivate_ad_units.rb +0 -110
- data/examples/v201605/inventory_service/get_ad_unit_sizes.rb +0 -74
- data/examples/v201605/inventory_service/get_ad_units_by_statement.rb +0 -97
- data/examples/v201605/inventory_service/get_all_ad_units.rb +0 -80
- data/examples/v201605/inventory_service/update_ad_units.rb +0 -105
- data/examples/v201605/label_service/create_labels.rb +0 -79
- data/examples/v201605/label_service/deactivate_labels.rb +0 -107
- data/examples/v201605/label_service/get_all_labels.rb +0 -82
- data/examples/v201605/label_service/get_labels_by_statement.rb +0 -82
- data/examples/v201605/label_service/update_labels.rb +0 -96
- data/examples/v201605/line_item_creative_association_service/create_licas.rb +0 -90
- data/examples/v201605/line_item_creative_association_service/deactivate_licas.rb +0 -113
- data/examples/v201605/line_item_creative_association_service/get_all_licas.rb +0 -85
- data/examples/v201605/line_item_creative_association_service/get_licas_by_statement.rb +0 -89
- data/examples/v201605/line_item_creative_association_service/update_licas.rb +0 -96
- data/examples/v201605/line_item_service/activate_line_items.rb +0 -118
- data/examples/v201605/line_item_service/create_line_items.rb +0 -182
- data/examples/v201605/line_item_service/create_video_line_item.rb +0 -164
- data/examples/v201605/line_item_service/get_all_line_items.rb +0 -82
- data/examples/v201605/line_item_service/get_line_items_by_statement.rb +0 -91
- data/examples/v201605/line_item_service/get_recently_updated_line_items.rb +0 -100
- data/examples/v201605/line_item_service/target_custom_criteria.rb +0 -140
- data/examples/v201605/line_item_service/update_line_items.rb +0 -106
- data/examples/v201605/network_service/get_all_networks.rb +0 -70
- data/examples/v201605/network_service/get_current_network.rb +0 -62
- data/examples/v201605/network_service/make_test_network.rb +0 -75
- data/examples/v201605/order_service/approve_orders.rb +0 -110
- data/examples/v201605/order_service/create_orders.rb +0 -88
- data/examples/v201605/order_service/get_all_orders.rb +0 -80
- data/examples/v201605/order_service/get_orders_by_statement.rb +0 -90
- data/examples/v201605/order_service/update_orders.rb +0 -101
- data/examples/v201605/placement_service/create_placements.rb +0 -128
- data/examples/v201605/placement_service/deactivate_placements.rb +0 -106
- data/examples/v201605/placement_service/get_all_placements.rb +0 -81
- data/examples/v201605/placement_service/get_placements_by_statement.rb +0 -87
- data/examples/v201605/placement_service/update_placements.rb +0 -102
- data/examples/v201605/publisher_query_language_service/fetch_match_tables.rb +0 -107
- data/examples/v201605/publisher_query_language_service/get_all_line_items.rb +0 -95
- data/examples/v201605/publisher_query_language_service/get_geo_targets.rb +0 -98
- data/examples/v201605/publisher_query_language_service/get_line_items_named_like.rb +0 -96
- data/examples/v201605/report_service/display_report.rb +0 -77
- data/examples/v201605/report_service/download_report.rb +0 -77
- data/examples/v201605/report_service/run_delivery_report.rb +0 -111
- data/examples/v201605/report_service/run_inventory_report.rb +0 -109
- data/examples/v201605/report_service/run_reach_report.rb +0 -85
- data/examples/v201605/report_service/run_report_with_custom_fields.rb +0 -89
- data/examples/v201605/report_service/run_sales_report.rb +0 -89
- data/examples/v201605/suggested_ad_unit_service/approve_all_suggested_ad_units.rb +0 -108
- data/examples/v201605/suggested_ad_unit_service/get_all_suggested_ad_units.rb +0 -83
- data/examples/v201605/suggested_ad_unit_service/get_suggested_ad_units_by_statement.rb +0 -91
- data/examples/v201605/team_service/create_teams.rb +0 -79
- data/examples/v201605/team_service/get_all_teams.rb +0 -79
- data/examples/v201605/team_service/get_teams_by_statement.rb +0 -78
- data/examples/v201605/team_service/update_teams.rb +0 -94
- data/examples/v201605/user_service/create_users.rb +0 -85
- data/examples/v201605/user_service/deactivate_users.rb +0 -94
- data/examples/v201605/user_service/get_all_roles.rb +0 -69
- data/examples/v201605/user_service/get_all_users.rb +0 -79
- data/examples/v201605/user_service/get_current_user.rb +0 -62
- data/examples/v201605/user_service/get_users_by_statement.rb +0 -80
- data/examples/v201605/user_service/update_users.rb +0 -94
- data/examples/v201605/user_team_association_service/create_user_team_associations.rb +0 -82
- data/examples/v201605/user_team_association_service/delete_user_team_associations.rb +0 -98
- data/examples/v201605/user_team_association_service/get_all_user_team_associations.rb +0 -83
- data/examples/v201605/user_team_association_service/get_user_team_associations_by_statement.rb +0 -93
- data/examples/v201605/user_team_association_service/update_user_team_associations.rb +0 -98
- data/examples/v201608/activity_group_service/create_activity_groups.rb +0 -90
- data/examples/v201608/activity_group_service/get_active_activity_groups.rb +0 -87
- data/examples/v201608/activity_group_service/get_all_activity_groups.rb +0 -81
- data/examples/v201608/activity_group_service/update_activity_groups.rb +0 -94
- data/examples/v201608/activity_service/create_activities.rb +0 -87
- data/examples/v201608/activity_service/get_active_activities.rb +0 -87
- data/examples/v201608/activity_service/get_all_activities.rb +0 -81
- data/examples/v201608/activity_service/update_activities.rb +0 -96
- data/examples/v201608/audience_segment_service/create_audience_segments.rb +0 -114
- data/examples/v201608/audience_segment_service/get_all_audience_segments.rb +0 -81
- data/examples/v201608/audience_segment_service/get_first_party_audience_segments.rb +0 -88
- data/examples/v201608/audience_segment_service/populate_first_party_audience_segments.rb +0 -99
- data/examples/v201608/audience_segment_service/update_audience_segments.rb +0 -94
- data/examples/v201608/common/error_handling.rb +0 -72
- data/examples/v201608/common/oauth2_jwt_handling.rb +0 -99
- data/examples/v201608/common/setup_oauth2.rb +0 -85
- data/examples/v201608/company_service/create_companies.rb +0 -78
- data/examples/v201608/company_service/get_all_companies.rb +0 -80
- data/examples/v201608/company_service/get_companies_by_statement.rb +0 -89
- data/examples/v201608/company_service/update_companies.rb +0 -104
- data/examples/v201608/contact_service/create_contacts.rb +0 -91
- data/examples/v201608/contact_service/get_all_contacts.rb +0 -80
- data/examples/v201608/contact_service/get_uninvited_contacts.rb +0 -94
- data/examples/v201608/contact_service/update_contacts.rb +0 -96
- data/examples/v201608/content_metadata_key_hierarchy_service/create_content_metadata_key_hierarchies.rb +0 -92
- data/examples/v201608/content_metadata_key_hierarchy_service/delete_content_metadata_key_hierarchies.rb +0 -101
- data/examples/v201608/content_metadata_key_hierarchy_service/get_all_content_metadata_key_hierarchies.rb +0 -85
- data/examples/v201608/content_metadata_key_hierarchy_service/update_content_metadata_key_hierarchies.rb +0 -110
- data/examples/v201608/content_service/get_all_content.rb +0 -81
- data/examples/v201608/content_service/get_content_by_category.rb +0 -127
- data/examples/v201608/creative_service/copy_image_creatives.rb +0 -111
- data/examples/v201608/creative_service/create_creative_from_template.rb +0 -135
- data/examples/v201608/creative_service/create_creatives.rb +0 -108
- data/examples/v201608/creative_service/create_custom_creative.rb +0 -103
- data/examples/v201608/creative_service/create_native_creative.rb +0 -189
- data/examples/v201608/creative_service/get_all_creatives.rb +0 -80
- data/examples/v201608/creative_service/get_creatives_by_statement.rb +0 -88
- data/examples/v201608/creative_service/update_creatives.rb +0 -97
- data/examples/v201608/creative_set_service/associate_creative_set_to_line_item.rb +0 -73
- data/examples/v201608/creative_set_service/create_creative_set.rb +0 -79
- data/examples/v201608/creative_set_service/get_all_creative_sets.rb +0 -82
- data/examples/v201608/creative_set_service/get_creative_sets_by_statement.rb +0 -92
- data/examples/v201608/creative_set_service/update_creative_sets.rb +0 -98
- data/examples/v201608/creative_template_service/get_all_creative_templates.rb +0 -82
- data/examples/v201608/creative_template_service/get_system_defined_creative_templates.rb +0 -87
- data/examples/v201608/creative_wrapper_service/create_creative_wrappers.rb +0 -85
- data/examples/v201608/creative_wrapper_service/deactivate_creative_wrapper.rb +0 -99
- data/examples/v201608/creative_wrapper_service/get_all_creative_wrappers.rb +0 -82
- data/examples/v201608/creative_wrapper_service/get_creative_wrappers_by_statement.rb +0 -89
- data/examples/v201608/creative_wrapper_service/update_creative_wrappers.rb +0 -99
- data/examples/v201608/custom_field_service/create_custom_field_options.rb +0 -83
- data/examples/v201608/custom_field_service/create_custom_fields.rb +0 -82
- data/examples/v201608/custom_field_service/deactivate_all_line_item_custom_fields.rb +0 -97
- data/examples/v201608/custom_field_service/get_all_custom_fields.rb +0 -90
- data/examples/v201608/custom_field_service/get_all_line_item_custom_fields.rb +0 -87
- data/examples/v201608/custom_field_service/set_line_item_custom_field_value.rb +0 -178
- data/examples/v201608/custom_field_service/update_custom_fields.rb +0 -98
- data/examples/v201608/custom_targeting_service/create_custom_targeting_keys_and_values.rb +0 -135
- data/examples/v201608/custom_targeting_service/delete_custom_targeting_keys.rb +0 -112
- data/examples/v201608/custom_targeting_service/delete_custom_targeting_values.rb +0 -122
- data/examples/v201608/custom_targeting_service/get_all_custom_targeting_keys_and_values.rb +0 -122
- data/examples/v201608/custom_targeting_service/get_custom_targeting_keys_by_statement.rb +0 -92
- data/examples/v201608/custom_targeting_service/get_custom_targeting_values_by_statement.rb +0 -98
- data/examples/v201608/custom_targeting_service/update_custom_targeting_keys.rb +0 -90
- data/examples/v201608/custom_targeting_service/update_custom_targeting_values.rb +0 -105
- data/examples/v201608/forecast_service/get_availability_forecast.rb +0 -134
- data/examples/v201608/forecast_service/get_availability_forecast_for_line_item.rb +0 -84
- data/examples/v201608/forecast_service/get_delivery_forecast_for_line_items.rb +0 -77
- data/examples/v201608/inventory_service/create_ad_units.rb +0 -97
- data/examples/v201608/inventory_service/deactivate_ad_units.rb +0 -110
- data/examples/v201608/inventory_service/get_ad_unit_sizes.rb +0 -74
- data/examples/v201608/inventory_service/get_ad_units_by_statement.rb +0 -97
- data/examples/v201608/inventory_service/get_all_ad_units.rb +0 -80
- data/examples/v201608/inventory_service/update_ad_units.rb +0 -113
- data/examples/v201608/label_service/create_labels.rb +0 -79
- data/examples/v201608/label_service/deactivate_labels.rb +0 -107
- data/examples/v201608/label_service/get_all_labels.rb +0 -82
- data/examples/v201608/label_service/get_labels_by_statement.rb +0 -82
- data/examples/v201608/label_service/update_labels.rb +0 -96
- data/examples/v201608/line_item_creative_association_service/create_licas.rb +0 -90
- data/examples/v201608/line_item_creative_association_service/deactivate_licas.rb +0 -113
- data/examples/v201608/line_item_creative_association_service/get_all_licas.rb +0 -85
- data/examples/v201608/line_item_creative_association_service/get_licas_by_statement.rb +0 -89
- data/examples/v201608/line_item_creative_association_service/update_licas.rb +0 -96
- data/examples/v201608/line_item_service/activate_line_items.rb +0 -118
- data/examples/v201608/line_item_service/create_line_items.rb +0 -182
- data/examples/v201608/line_item_service/create_video_line_item.rb +0 -164
- data/examples/v201608/line_item_service/get_all_line_items.rb +0 -82
- data/examples/v201608/line_item_service/get_line_items_by_statement.rb +0 -91
- data/examples/v201608/line_item_service/get_recently_updated_line_items.rb +0 -100
- data/examples/v201608/line_item_service/target_custom_criteria.rb +0 -140
- data/examples/v201608/line_item_service/update_line_items.rb +0 -106
- data/examples/v201608/network_service/get_all_networks.rb +0 -70
- data/examples/v201608/network_service/get_current_network.rb +0 -62
- data/examples/v201608/network_service/make_test_network.rb +0 -75
- data/examples/v201608/order_service/approve_orders.rb +0 -110
- data/examples/v201608/order_service/create_orders.rb +0 -88
- data/examples/v201608/order_service/get_all_orders.rb +0 -80
- data/examples/v201608/order_service/get_orders_by_statement.rb +0 -90
- data/examples/v201608/order_service/update_orders.rb +0 -101
- data/examples/v201608/placement_service/create_placements.rb +0 -128
- data/examples/v201608/placement_service/deactivate_placements.rb +0 -106
- data/examples/v201608/placement_service/get_all_placements.rb +0 -81
- data/examples/v201608/placement_service/get_placements_by_statement.rb +0 -87
- data/examples/v201608/placement_service/update_placements.rb +0 -102
- data/examples/v201608/publisher_query_language_service/fetch_match_tables.rb +0 -107
- data/examples/v201608/publisher_query_language_service/get_all_line_items.rb +0 -95
- data/examples/v201608/publisher_query_language_service/get_geo_targets.rb +0 -98
- data/examples/v201608/publisher_query_language_service/get_line_items_named_like.rb +0 -96
- data/examples/v201608/report_service/display_report.rb +0 -77
- data/examples/v201608/report_service/download_report.rb +0 -77
- data/examples/v201608/report_service/run_delivery_report.rb +0 -111
- data/examples/v201608/report_service/run_inventory_report.rb +0 -109
- data/examples/v201608/report_service/run_reach_report.rb +0 -85
- data/examples/v201608/report_service/run_report_with_custom_fields.rb +0 -89
- data/examples/v201608/report_service/run_sales_report.rb +0 -89
- data/examples/v201608/report_service/run_saved_query.rb +0 -105
- data/examples/v201608/suggested_ad_unit_service/approve_all_suggested_ad_units.rb +0 -108
- data/examples/v201608/suggested_ad_unit_service/get_all_suggested_ad_units.rb +0 -83
- data/examples/v201608/suggested_ad_unit_service/get_suggested_ad_units_by_statement.rb +0 -91
- data/examples/v201608/team_service/create_teams.rb +0 -79
- data/examples/v201608/team_service/get_all_teams.rb +0 -79
- data/examples/v201608/team_service/get_teams_by_statement.rb +0 -78
- data/examples/v201608/team_service/update_teams.rb +0 -88
- data/examples/v201608/user_service/create_users.rb +0 -85
- data/examples/v201608/user_service/deactivate_users.rb +0 -94
- data/examples/v201608/user_service/get_all_roles.rb +0 -69
- data/examples/v201608/user_service/get_all_users.rb +0 -79
- data/examples/v201608/user_service/get_current_user.rb +0 -62
- data/examples/v201608/user_service/get_users_by_statement.rb +0 -80
- data/examples/v201608/user_service/update_users.rb +0 -94
- data/examples/v201608/user_team_association_service/create_user_team_associations.rb +0 -82
- data/examples/v201608/user_team_association_service/delete_user_team_associations.rb +0 -98
- data/examples/v201608/user_team_association_service/get_all_user_team_associations.rb +0 -83
- data/examples/v201608/user_team_association_service/get_user_team_associations_by_statement.rb +0 -93
- data/examples/v201608/user_team_association_service/update_user_team_associations.rb +0 -98
- data/lib/dfp_api/v201508/activity_group_service.rb +0 -54
- data/lib/dfp_api/v201508/activity_group_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/ad_exclusion_rule_service.rb +0 -62
- data/lib/dfp_api/v201508/ad_exclusion_rule_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/ad_rule_service.rb +0 -62
- data/lib/dfp_api/v201508/ad_rule_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/audience_segment_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/base_rate_service.rb +0 -62
- data/lib/dfp_api/v201508/base_rate_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/company_service.rb +0 -54
- data/lib/dfp_api/v201508/company_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/contact_service.rb +0 -54
- data/lib/dfp_api/v201508/contact_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/content_bundle_service.rb +0 -62
- data/lib/dfp_api/v201508/content_bundle_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/content_metadata_key_hierarchy_service.rb +0 -62
- data/lib/dfp_api/v201508/content_metadata_key_hierarchy_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/content_service.rb +0 -46
- data/lib/dfp_api/v201508/content_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/creative_service.rb +0 -54
- data/lib/dfp_api/v201508/creative_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/creative_set_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/creative_template_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/creative_wrapper_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/custom_field_service.rb +0 -86
- data/lib/dfp_api/v201508/custom_field_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/custom_targeting_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/exchange_rate_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/forecast_service.rb +0 -62
- data/lib/dfp_api/v201508/forecast_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/inventory_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/label_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/line_item_creative_association_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/line_item_service.rb +0 -62
- data/lib/dfp_api/v201508/line_item_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/line_item_template_service.rb +0 -38
- data/lib/dfp_api/v201508/line_item_template_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/live_stream_event_service.rb +0 -62
- data/lib/dfp_api/v201508/live_stream_event_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/network_service.rb +0 -62
- data/lib/dfp_api/v201508/network_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/package_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/placement_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/product_package_service.rb +0 -62
- data/lib/dfp_api/v201508/product_service.rb +0 -54
- data/lib/dfp_api/v201508/product_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/product_template_service.rb +0 -62
- data/lib/dfp_api/v201508/product_template_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/proposal_line_item_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/proposal_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/publisher_query_language_service.rb +0 -38
- data/lib/dfp_api/v201508/publisher_query_language_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/rate_card_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/reconciliation_line_item_report_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/reconciliation_order_report_service.rb +0 -54
- data/lib/dfp_api/v201508/reconciliation_report_row_service.rb +0 -46
- data/lib/dfp_api/v201508/reconciliation_report_row_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/report_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/shared_ad_unit_service.rb +0 -46
- data/lib/dfp_api/v201508/shared_ad_unit_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/suggested_ad_unit_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/user_team_association_service.rb +0 -62
- data/lib/dfp_api/v201508/user_team_association_service_registry.rb +0 -45
- data/lib/dfp_api/v201508/workflow_request_service_registry.rb +0 -45
- data/lib/dfp_api/v201511/activity_service.rb +0 -54
- data/lib/dfp_api/v201511/activity_service_registry.rb +0 -45
- data/lib/dfp_api/v201511/ad_rule_service_registry.rb +0 -45
- data/lib/dfp_api/v201511/audience_segment_service.rb +0 -62
- data/lib/dfp_api/v201511/content_bundle_service_registry.rb +0 -45
- data/lib/dfp_api/v201511/creative_service_registry.rb +0 -45
- data/lib/dfp_api/v201511/creative_set_service.rb +0 -54
- data/lib/dfp_api/v201511/creative_set_service_registry.rb +0 -45
- data/lib/dfp_api/v201511/creative_template_service.rb +0 -38
- data/lib/dfp_api/v201511/creative_template_service_registry.rb +0 -45
- data/lib/dfp_api/v201511/creative_wrapper_service.rb +0 -62
- data/lib/dfp_api/v201511/custom_targeting_service.rb +0 -94
- data/lib/dfp_api/v201511/exchange_rate_service.rb +0 -62
- data/lib/dfp_api/v201511/forecast_service_registry.rb +0 -45
- data/lib/dfp_api/v201511/inventory_service.rb +0 -70
- data/lib/dfp_api/v201511/inventory_service_registry.rb +0 -45
- data/lib/dfp_api/v201511/label_service.rb +0 -62
- data/lib/dfp_api/v201511/line_item_creative_association_service.rb +0 -70
- data/lib/dfp_api/v201511/line_item_creative_association_service_registry.rb +0 -45
- data/lib/dfp_api/v201511/line_item_service_registry.rb +0 -45
- data/lib/dfp_api/v201511/line_item_template_service_registry.rb +0 -45
- data/lib/dfp_api/v201511/order_service.rb +0 -62
- data/lib/dfp_api/v201511/order_service_registry.rb +0 -45
- data/lib/dfp_api/v201511/package_service.rb +0 -62
- data/lib/dfp_api/v201511/placement_service.rb +0 -62
- data/lib/dfp_api/v201511/premium_rate_service.rb +0 -54
- data/lib/dfp_api/v201511/premium_rate_service_registry.rb +0 -45
- data/lib/dfp_api/v201511/product_package_item_service.rb +0 -62
- data/lib/dfp_api/v201511/product_package_item_service_registry.rb +0 -45
- data/lib/dfp_api/v201511/product_package_service_registry.rb +0 -45
- data/lib/dfp_api/v201511/product_service_registry.rb +0 -45
- data/lib/dfp_api/v201511/product_template_service_registry.rb +0 -45
- data/lib/dfp_api/v201511/proposal_line_item_service.rb +0 -62
- data/lib/dfp_api/v201511/proposal_line_item_service_registry.rb +0 -45
- data/lib/dfp_api/v201511/proposal_service.rb +0 -62
- data/lib/dfp_api/v201511/proposal_service_registry.rb +0 -45
- data/lib/dfp_api/v201511/publisher_query_language_service_registry.rb +0 -45
- data/lib/dfp_api/v201511/rate_card_service.rb +0 -62
- data/lib/dfp_api/v201511/reconciliation_line_item_report_service.rb +0 -46
- data/lib/dfp_api/v201511/reconciliation_order_report_service_registry.rb +0 -45
- data/lib/dfp_api/v201511/reconciliation_report_service.rb +0 -46
- data/lib/dfp_api/v201511/reconciliation_report_service_registry.rb +0 -45
- data/lib/dfp_api/v201511/report_service.rb +0 -62
- data/lib/dfp_api/v201511/shared_ad_unit_service.rb +0 -46
- data/lib/dfp_api/v201511/shared_ad_unit_service_registry.rb +0 -45
- data/lib/dfp_api/v201511/suggested_ad_unit_service.rb +0 -46
- data/lib/dfp_api/v201511/suggested_ad_unit_service_registry.rb +0 -45
- data/lib/dfp_api/v201511/team_service.rb +0 -54
- data/lib/dfp_api/v201511/team_service_registry.rb +0 -45
- data/lib/dfp_api/v201511/user_service.rb +0 -78
- data/lib/dfp_api/v201511/user_service_registry.rb +0 -45
- data/lib/dfp_api/v201511/workflow_request_service.rb +0 -46
- data/test/dfp_api/test_config.yml +0 -9
- data/test/suite_unittests.rb +0 -34
@@ -1,89 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# Encoding: utf-8
|
3
|
-
#
|
4
|
-
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
5
|
-
#
|
6
|
-
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
-
# you may not use this file except in compliance with the License.
|
8
|
-
# You may obtain a copy of the License at
|
9
|
-
#
|
10
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
-
#
|
12
|
-
# Unless required by applicable law or agreed to in writing, software
|
13
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
15
|
-
# implied.
|
16
|
-
# See the License for the specific language governing permissions and
|
17
|
-
# limitations under the License.
|
18
|
-
#
|
19
|
-
# This example gets all line item creative associations for a given line item
|
20
|
-
# ID. The statement retrieves up to the maximum page size limit of 500. To
|
21
|
-
# create LICAs, run create_licas.rb. To determine which line items exist, run
|
22
|
-
# get_all_line_items.rb.
|
23
|
-
|
24
|
-
require 'dfp_api'
|
25
|
-
|
26
|
-
|
27
|
-
API_VERSION = :v201608
|
28
|
-
|
29
|
-
def get_licas_by_statement()
|
30
|
-
# Get DfpApi instance and load configuration from ~/dfp_api.yml.
|
31
|
-
dfp = DfpApi::Api.new
|
32
|
-
|
33
|
-
# To enable logging of SOAP requests, set the log_level value to 'DEBUG' in
|
34
|
-
# the configuration file or provide your own logger:
|
35
|
-
# dfp.logger = Logger.new('dfp_xml.log')
|
36
|
-
|
37
|
-
# Get the LineItemCreativeAssociationService.
|
38
|
-
lica_service = dfp.service(:LineItemCreativeAssociationService, API_VERSION)
|
39
|
-
|
40
|
-
# Set the line item to get LICAs by.
|
41
|
-
line_item_id = 'INSERT_LINE_ITEM_ID_HERE'.to_i
|
42
|
-
|
43
|
-
# Create a statement to only select LICAs for the given line item ID.
|
44
|
-
statement = DfpApi::FilterStatement.new(
|
45
|
-
'WHERE lineItemId = :line_item_id ORDER BY lineItemId, orderId ASC',
|
46
|
-
[
|
47
|
-
{:key => 'line_item_id',
|
48
|
-
:value => {:value => line_item_id, :xsi_type => 'NumberValue'}}
|
49
|
-
]
|
50
|
-
)
|
51
|
-
|
52
|
-
# Get LICAs by statement.
|
53
|
-
page = lica_service.get_line_item_creative_associations_by_statement(
|
54
|
-
statement.toStatement())
|
55
|
-
|
56
|
-
if page and page[:results]
|
57
|
-
page[:results].each_with_index do |lica, index|
|
58
|
-
puts "%d) LICA with line item ID: %d, creative ID: %d and status: %s." %
|
59
|
-
[index + statement.offset,
|
60
|
-
lica[:line_item_id], lica[:creative_id], lica[:status]]
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
# Print a footer.
|
65
|
-
if page.include?(:total_result_set_size)
|
66
|
-
puts "Number of results found: %d" % page[:total_result_set_size]
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
if __FILE__ == $0
|
71
|
-
begin
|
72
|
-
get_licas_by_statement()
|
73
|
-
|
74
|
-
# HTTP errors.
|
75
|
-
rescue AdsCommon::Errors::HttpError => e
|
76
|
-
puts "HTTP Error: %s" % e
|
77
|
-
|
78
|
-
# API errors.
|
79
|
-
rescue DfpApi::Errors::ApiException => e
|
80
|
-
puts "Message: %s" % e.message
|
81
|
-
puts 'Errors:'
|
82
|
-
e.errors.each_with_index do |error, index|
|
83
|
-
puts "\tError [%d]:" % (index + 1)
|
84
|
-
error.each do |field, value|
|
85
|
-
puts "\t\t%s: %s" % [field, value]
|
86
|
-
end
|
87
|
-
end
|
88
|
-
end
|
89
|
-
end
|
@@ -1,96 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# Encoding: utf-8
|
3
|
-
#
|
4
|
-
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
5
|
-
#
|
6
|
-
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
-
# you may not use this file except in compliance with the License.
|
8
|
-
# You may obtain a copy of the License at
|
9
|
-
#
|
10
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
-
#
|
12
|
-
# Unless required by applicable law or agreed to in writing, software
|
13
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
15
|
-
# implied.
|
16
|
-
# See the License for the specific language governing permissions and
|
17
|
-
# limitations under the License.
|
18
|
-
#
|
19
|
-
# This example updates the destination URL of all LICAs belonging to a line item.
|
20
|
-
# To determine which LICAs exist, run get_all_licas.rb.
|
21
|
-
|
22
|
-
require 'dfp_api'
|
23
|
-
|
24
|
-
|
25
|
-
API_VERSION = :v201608
|
26
|
-
|
27
|
-
def update_licas()
|
28
|
-
# Get DfpApi instance and load configuration from ~/dfp_api.yml.
|
29
|
-
dfp = DfpApi::Api.new
|
30
|
-
|
31
|
-
# To enable logging of SOAP requests, set the log_level value to 'DEBUG' in
|
32
|
-
# the configuration file or provide your own logger:
|
33
|
-
# dfp.logger = Logger.new('dfp_xml.log')
|
34
|
-
|
35
|
-
# Get the LineItemCreativeAssociationService.
|
36
|
-
lica_service = dfp.service(:LineItemCreativeAssociationService, API_VERSION)
|
37
|
-
|
38
|
-
# Set the line item to get LICAs by.
|
39
|
-
line_item_id = 'INSERT_LINE_ITEM_ID_HERE'.to_i
|
40
|
-
|
41
|
-
# Create a statement to only select LICAs for the given line item ID.
|
42
|
-
statement = DfpApi::FilterStatement.new(
|
43
|
-
'WHERE lineItemId = :line_item_id ORDER BY lineItemId, creativeId ASC',
|
44
|
-
[
|
45
|
-
{:key => 'line_item_id',
|
46
|
-
:value => {:value => line_item_id, :xsi_type => 'NumberValue'}}
|
47
|
-
]
|
48
|
-
)
|
49
|
-
|
50
|
-
# Get LICAs by statement.
|
51
|
-
page = lica_service.get_line_item_creative_associations_by_statement(
|
52
|
-
statement.toStatement())
|
53
|
-
|
54
|
-
if page[:results]
|
55
|
-
licas = page[:results]
|
56
|
-
|
57
|
-
# Update each local LICA object by changing its destination URL.
|
58
|
-
licas.each {|lica| lica[:destination_url] = 'http://news.google.com'}
|
59
|
-
|
60
|
-
# Update the LICAs on the server.
|
61
|
-
return_licas = lica_service.update_line_item_creative_associations(licas)
|
62
|
-
|
63
|
-
if return_licas
|
64
|
-
return_licas.each do |lica|
|
65
|
-
puts ("LICA with line item ID: %d and creative ID: %d was updated " +
|
66
|
-
"with destination url [%s]") %
|
67
|
-
[lica[:line_item_id], lica[:creative_id], lica[:destination_url]]
|
68
|
-
end
|
69
|
-
else
|
70
|
-
raise 'No LICAs were updated.'
|
71
|
-
end
|
72
|
-
else
|
73
|
-
puts 'No LICAs found to update.'
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
|
-
if __FILE__ == $0
|
78
|
-
begin
|
79
|
-
update_licas()
|
80
|
-
|
81
|
-
# HTTP errors.
|
82
|
-
rescue AdsCommon::Errors::HttpError => e
|
83
|
-
puts "HTTP Error: %s" % e
|
84
|
-
|
85
|
-
# API errors.
|
86
|
-
rescue DfpApi::Errors::ApiException => e
|
87
|
-
puts "Message: %s" % e.message
|
88
|
-
puts 'Errors:'
|
89
|
-
e.errors.each_with_index do |error, index|
|
90
|
-
puts "\tError [%d]:" % (index + 1)
|
91
|
-
error.each do |field, value|
|
92
|
-
puts "\t\t%s: %s" % [field, value]
|
93
|
-
end
|
94
|
-
end
|
95
|
-
end
|
96
|
-
end
|
@@ -1,118 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# Encoding: utf-8
|
3
|
-
#
|
4
|
-
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
5
|
-
#
|
6
|
-
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
-
# you may not use this file except in compliance with the License.
|
8
|
-
# You may obtain a copy of the License at
|
9
|
-
#
|
10
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
-
#
|
12
|
-
# Unless required by applicable law or agreed to in writing, software
|
13
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
15
|
-
# implied.
|
16
|
-
# See the License for the specific language governing permissions and
|
17
|
-
# limitations under the License.
|
18
|
-
#
|
19
|
-
# This example activates all line items for the given order. To be activated,
|
20
|
-
# line items need to be in the approved (needs creatives) state and have at
|
21
|
-
# least one creative associated with them. To approve line items, approve the
|
22
|
-
# order to which they belong by running approve_orders.rb. To create LICAs, run
|
23
|
-
# create_licas.rb. To determine which line items exist, run
|
24
|
-
# get_all_line_items.rb. To determine which orders exist, run get_all_orders.rb.
|
25
|
-
|
26
|
-
require 'dfp_api'
|
27
|
-
|
28
|
-
|
29
|
-
API_VERSION = :v201608
|
30
|
-
|
31
|
-
def activate_line_items()
|
32
|
-
# Get DfpApi instance and load configuration from ~/dfp_api.yml.
|
33
|
-
dfp = DfpApi::Api.new
|
34
|
-
|
35
|
-
# To enable logging of SOAP requests, set the log_level value to 'DEBUG' in
|
36
|
-
# the configuration file or provide your own logger:
|
37
|
-
# dfp.logger = Logger.new('dfp_xml.log')
|
38
|
-
|
39
|
-
# Get the LineItemService.
|
40
|
-
line_item_service = dfp.service(:LineItemService, API_VERSION)
|
41
|
-
|
42
|
-
# Set the ID of the order to get line items from.
|
43
|
-
order_id = 'INSERT_ORDER_ID_HERE'.to_i
|
44
|
-
|
45
|
-
# Create a statement to only select line items from the specified order that
|
46
|
-
# are in the approved (needs creatives) state.
|
47
|
-
statement = DfpApi::FilterStatement.new(
|
48
|
-
'WHERE orderID = :order_id AND status = :status',
|
49
|
-
[
|
50
|
-
{:key => 'order_id',
|
51
|
-
:value => {:value => order_id, :xsi_type => 'NumberValue'}},
|
52
|
-
{:key => 'status',
|
53
|
-
:value => {:value => 'NEEDS_CREATIVES', :xsi_type => 'TextValue'}}
|
54
|
-
]
|
55
|
-
)
|
56
|
-
|
57
|
-
line_item_ids = []
|
58
|
-
|
59
|
-
begin
|
60
|
-
# Get line items by statement.
|
61
|
-
page = line_item_service.get_line_items_by_statement(
|
62
|
-
statement.toStatement())
|
63
|
-
|
64
|
-
if page[:results]
|
65
|
-
page[:results].each do |line_item|
|
66
|
-
if !line_item[:is_archived]
|
67
|
-
puts ("%d) Line item with ID: %d, order ID: %d and name: %s will " +
|
68
|
-
"be activated.") % [line_item_ids.size, line_item[:id],
|
69
|
-
line_item[:order_id], line_item[:name]]
|
70
|
-
line_item_ids << line_item[:id]
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
74
|
-
statement.offset += DfpApi::SUGGESTED_PAGE_LIMIT
|
75
|
-
end while statement.offset < page[:total_result_set_size]
|
76
|
-
|
77
|
-
puts "Number of line items to be activated: %d" % line_item_ids.size
|
78
|
-
|
79
|
-
if !line_item_ids.empty?
|
80
|
-
# Modify statement for action. Note, the values are still present.
|
81
|
-
statement = DfpApi::FilterStatement.new(
|
82
|
-
"WHERE id IN (%s)" % line_item_ids.join(', '))
|
83
|
-
|
84
|
-
# Perform action.
|
85
|
-
result = line_item_service.perform_line_item_action(
|
86
|
-
{:xsi_type => 'ActivateLineItems'}, statement.toStatement())
|
87
|
-
|
88
|
-
# Display results.
|
89
|
-
if result and result[:num_changes] > 0
|
90
|
-
puts "Number of line items activated: %d" % result[:num_changes]
|
91
|
-
else
|
92
|
-
puts 'No line items were activated.'
|
93
|
-
end
|
94
|
-
else
|
95
|
-
puts 'No line items found to activate.'
|
96
|
-
end
|
97
|
-
end
|
98
|
-
|
99
|
-
if __FILE__ == $0
|
100
|
-
begin
|
101
|
-
activate_line_items()
|
102
|
-
|
103
|
-
# HTTP errors.
|
104
|
-
rescue AdsCommon::Errors::HttpError => e
|
105
|
-
puts "HTTP Error: %s" % e
|
106
|
-
|
107
|
-
# API errors.
|
108
|
-
rescue DfpApi::Errors::ApiException => e
|
109
|
-
puts "Message: %s" % e.message
|
110
|
-
puts 'Errors:'
|
111
|
-
e.errors.each_with_index do |error, index|
|
112
|
-
puts "\tError [%d]:" % (index + 1)
|
113
|
-
error.each do |field, value|
|
114
|
-
puts "\t\t%s: %s" % [field, value]
|
115
|
-
end
|
116
|
-
end
|
117
|
-
end
|
118
|
-
end
|
@@ -1,182 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# Encoding: utf-8
|
3
|
-
#
|
4
|
-
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
5
|
-
#
|
6
|
-
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
-
# you may not use this file except in compliance with the License.
|
8
|
-
# You may obtain a copy of the License at
|
9
|
-
#
|
10
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
-
#
|
12
|
-
# Unless required by applicable law or agreed to in writing, software
|
13
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
15
|
-
# implied.
|
16
|
-
# See the License for the specific language governing permissions and
|
17
|
-
# limitations under the License.
|
18
|
-
#
|
19
|
-
# This example creates new line items. To determine which line items exist, run
|
20
|
-
# get_all_line_items.rb. To determine which orders exist, run
|
21
|
-
# get_all_orders.rb. To determine which placements exist, run
|
22
|
-
# get_all_placements.rb. To determine the IDs for locations, run
|
23
|
-
# get_all_cities.rb, get_all_countries.rb, get_all_metros.rb and
|
24
|
-
# get_all_regions.rb.
|
25
|
-
|
26
|
-
require 'dfp_api'
|
27
|
-
|
28
|
-
API_VERSION = :v201608
|
29
|
-
# Number of line items to create.
|
30
|
-
ITEM_COUNT = 5
|
31
|
-
|
32
|
-
def create_line_items()
|
33
|
-
# Get DfpApi instance and load configuration from ~/dfp_api.yml.
|
34
|
-
dfp = DfpApi::Api.new
|
35
|
-
|
36
|
-
# To enable logging of SOAP requests, set the log_level value to 'DEBUG' in
|
37
|
-
# the configuration file or provide your own logger:
|
38
|
-
# dfp.logger = Logger.new('dfp_xml.log')
|
39
|
-
|
40
|
-
# Get the LineItemService.
|
41
|
-
line_item_service = dfp.service(:LineItemService, API_VERSION)
|
42
|
-
|
43
|
-
# Set the order that all created line items will belong to and the placement
|
44
|
-
# ID to target.
|
45
|
-
order_id = 'INSERT_ORDER_ID_HERE'.to_i
|
46
|
-
targeted_placement_ids = Array.new(ITEM_COUNT) do
|
47
|
-
'INSERT_PLACEMENT_ID_HERE'.to_i
|
48
|
-
end
|
49
|
-
|
50
|
-
# Create inventory targeting.
|
51
|
-
inventory_targeting = {:targeted_placement_ids => targeted_placement_ids}
|
52
|
-
|
53
|
-
# Create geographical targeting.
|
54
|
-
geo_targeting = {
|
55
|
-
# Include targets.
|
56
|
-
:targeted_locations => [
|
57
|
-
{:id => 2840}, # USA.
|
58
|
-
{:id => 20123}, # Quebec, Canada.
|
59
|
-
{:id => 9000093} # Postal code B3P (Canada).
|
60
|
-
],
|
61
|
-
# Exclude targets.
|
62
|
-
:excluded_locations => [
|
63
|
-
{:id => 1016367}, # Chicago.
|
64
|
-
{:id => 200501} # New York.
|
65
|
-
]
|
66
|
-
}
|
67
|
-
|
68
|
-
# Create user domain targeting. Exclude domains that are not under the
|
69
|
-
# network's control.
|
70
|
-
user_domain_targeting = {:domains => ['usa.gov'], :targeted => false}
|
71
|
-
|
72
|
-
# Create day-part targeting.
|
73
|
-
day_part_targeting = {
|
74
|
-
# Target only the weekend in the browser's timezone.
|
75
|
-
:time_zone => 'BROWSER',
|
76
|
-
:day_parts => [
|
77
|
-
{:day_of_week => 'SATURDAY',
|
78
|
-
:start_time => {:hour => 0, :minute => 'ZERO'},
|
79
|
-
:end_time => {:hour => 24, :minute => 'ZERO'}},
|
80
|
-
{:day_of_week => 'SUNDAY',
|
81
|
-
:start_time => {:hour => 0, :minute => 'ZERO'},
|
82
|
-
:end_time => {:hour => 24, :minute => 'ZERO'}}
|
83
|
-
]
|
84
|
-
}
|
85
|
-
|
86
|
-
# Create technology targeting.
|
87
|
-
technology_targeting = {
|
88
|
-
# Create browser targeting.
|
89
|
-
:browser_targeting => {
|
90
|
-
:is_targeted => true,
|
91
|
-
# Target just the Chrome browser.
|
92
|
-
:browsers => [{:id => 500072}]
|
93
|
-
}
|
94
|
-
}
|
95
|
-
|
96
|
-
# Create targeting.
|
97
|
-
targeting = {:geo_targeting => geo_targeting,
|
98
|
-
:inventory_targeting => inventory_targeting,
|
99
|
-
:user_domain_targeting => user_domain_targeting,
|
100
|
-
:day_part_targeting => day_part_targeting,
|
101
|
-
:technology_targeting => technology_targeting
|
102
|
-
}
|
103
|
-
|
104
|
-
# Create an array to store local line item objects.
|
105
|
-
line_items = (1..ITEM_COUNT).map do |index|
|
106
|
-
line_item = {:name => "Line item #%d-%d" % [Time.new.to_f * 1000, index],
|
107
|
-
:order_id => order_id,
|
108
|
-
:targeting => targeting,
|
109
|
-
:line_item_type => 'STANDARD',
|
110
|
-
:allow_overbook => true}
|
111
|
-
# Set the creative rotation type to even.
|
112
|
-
line_item[:creative_rotation_type] = 'EVEN'
|
113
|
-
|
114
|
-
# Create the creative placeholder.
|
115
|
-
creative_placeholder = {
|
116
|
-
:size => {:width => 300, :height => 250, :is_aspect_ratio => false}
|
117
|
-
}
|
118
|
-
|
119
|
-
# Set the size of creatives that can be associated with this line item.
|
120
|
-
line_item[:creative_placeholders] = [creative_placeholder]
|
121
|
-
|
122
|
-
# Set the length of the line item to run.
|
123
|
-
line_item[:start_date_time_type] = 'IMMEDIATELY'
|
124
|
-
line_item[:end_date_time] = {:date => {:year => Time.now.year + 1,
|
125
|
-
:month => 9,
|
126
|
-
:day => 30},
|
127
|
-
:hour => 0,
|
128
|
-
:minute => 0,
|
129
|
-
:second => 0,
|
130
|
-
:time_zone_id => 'America/Los_Angeles'}
|
131
|
-
|
132
|
-
# Set the cost per unit to $2.
|
133
|
-
line_item[:cost_type] = 'CPM'
|
134
|
-
line_item[:cost_per_unit] = {
|
135
|
-
:currency_code => 'USD',
|
136
|
-
:micro_amount => 2000000
|
137
|
-
}
|
138
|
-
|
139
|
-
# Set the number of units bought to 500,000 so that the budget is $1,000.
|
140
|
-
line_item[:primary_goal] = {
|
141
|
-
:units => '500000',
|
142
|
-
:unit_type => 'IMPRESSIONS',
|
143
|
-
:goal_type => 'LIFETIME'
|
144
|
-
}
|
145
|
-
|
146
|
-
line_item
|
147
|
-
end
|
148
|
-
|
149
|
-
# Create the line items on the server.
|
150
|
-
return_line_items = line_item_service.create_line_items(line_items)
|
151
|
-
|
152
|
-
if return_line_items
|
153
|
-
return_line_items.each do |line_item|
|
154
|
-
puts ("Line item with ID: %d, belonging to order ID: %d, " +
|
155
|
-
"and named: %s was created.") %
|
156
|
-
[line_item[:id], line_item[:order_id], line_item[:name]]
|
157
|
-
end
|
158
|
-
else
|
159
|
-
raise 'No line items were created.'
|
160
|
-
end
|
161
|
-
end
|
162
|
-
|
163
|
-
if __FILE__ == $0
|
164
|
-
begin
|
165
|
-
create_line_items()
|
166
|
-
|
167
|
-
# HTTP errors.
|
168
|
-
rescue AdsCommon::Errors::HttpError => e
|
169
|
-
puts "HTTP Error: %s" % e
|
170
|
-
|
171
|
-
# API errors.
|
172
|
-
rescue DfpApi::Errors::ApiException => e
|
173
|
-
puts "Message: %s" % e.message
|
174
|
-
puts 'Errors:'
|
175
|
-
e.errors.each_with_index do |error, index|
|
176
|
-
puts "\tError [%d]:" % (index + 1)
|
177
|
-
error.each do |field, value|
|
178
|
-
puts "\t\t%s: %s" % [field, value]
|
179
|
-
end
|
180
|
-
end
|
181
|
-
end
|
182
|
-
end
|