google-dfp-api 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +4 -0
- data/README +17 -2
- data/Rakefile +3 -5
- data/examples/v201101/common/oauth_handling.rb +128 -0
- data/examples/v201101/company_service/create_companies.rb +1 -1
- data/examples/v201101/company_service/get_all_companies.rb +1 -1
- data/examples/v201101/creative_service/create_creatives.rb +1 -1
- data/examples/v201101/creative_service/get_all_creatives.rb +1 -1
- data/examples/v201101/custom_targeting_service/delete_custom_targeting_keys.rb +2 -2
- data/examples/v201101/custom_targeting_service/delete_custom_targeting_values.rb +2 -2
- data/examples/v201101/custom_targeting_service/get_all_custom_targeting_keys_and_values.rb +2 -2
- data/examples/v201101/inventory_service/create_ad_units.rb +1 -1
- data/examples/v201101/inventory_service/deactivate_ad_units.rb +2 -2
- data/examples/v201101/inventory_service/get_ad_units_by_statement.rb +1 -1
- data/examples/v201101/inventory_service/get_all_ad_units.rb +1 -1
- data/examples/v201101/line_item_creative_association_service/deactivate_licas.rb +2 -2
- data/examples/v201101/line_item_creative_association_service/get_all_licas.rb +1 -1
- data/examples/v201101/line_item_service/activate_line_items.rb +2 -2
- data/examples/v201101/line_item_service/create_line_items.rb +2 -2
- data/examples/v201101/line_item_service/get_all_line_items.rb +1 -1
- data/examples/v201101/order_service/approve_orders.rb +2 -2
- data/examples/v201101/order_service/create_orders.rb +1 -1
- data/examples/v201101/order_service/get_all_orders.rb +1 -1
- data/examples/v201101/placement_service/create_placements.rb +3 -3
- data/examples/v201101/placement_service/deactivate_placements.rb +2 -2
- data/examples/v201101/placement_service/get_all_placements.rb +1 -1
- data/examples/v201101/user_service/get_all_users.rb +1 -1
- data/examples/v201103/common/oauth_handling.rb +128 -0
- data/examples/v201103/company_service/create_companies.rb +1 -1
- data/examples/v201103/company_service/get_all_companies.rb +1 -1
- data/examples/v201103/creative_service/create_creatives.rb +1 -1
- data/examples/v201103/creative_service/get_all_creatives.rb +1 -1
- data/examples/v201103/custom_targeting_service/delete_custom_targeting_keys.rb +2 -2
- data/examples/v201103/custom_targeting_service/delete_custom_targeting_values.rb +2 -2
- data/examples/v201103/custom_targeting_service/get_all_custom_targeting_keys_and_values.rb +2 -2
- data/examples/v201103/inventory_service/create_ad_units.rb +1 -1
- data/examples/v201103/inventory_service/deactivate_ad_units.rb +2 -2
- data/examples/v201103/inventory_service/get_ad_units_by_statement.rb +1 -1
- data/examples/v201103/inventory_service/get_all_ad_units.rb +1 -1
- data/examples/v201103/line_item_creative_association_service/deactivate_licas.rb +2 -2
- data/examples/v201103/line_item_creative_association_service/get_all_licas.rb +1 -1
- data/examples/v201103/line_item_service/activate_line_items.rb +2 -2
- data/examples/v201103/line_item_service/create_line_items.rb +2 -2
- data/examples/v201103/line_item_service/get_all_line_items.rb +1 -1
- data/examples/v201103/order_service/approve_orders.rb +2 -2
- data/examples/v201103/order_service/create_orders.rb +1 -1
- data/examples/v201103/order_service/get_all_orders.rb +1 -1
- data/examples/v201103/placement_service/create_placements.rb +3 -3
- data/examples/v201103/placement_service/deactivate_placements.rb +2 -2
- data/examples/v201103/placement_service/get_all_placements.rb +1 -1
- data/examples/v201103/user_service/get_all_users.rb +1 -1
- data/examples/v201104/common/oauth_handling.rb +128 -0
- data/examples/v201104/company_service/create_companies.rb +1 -1
- data/examples/v201104/company_service/get_all_companies.rb +1 -1
- data/examples/v201104/creative_service/create_creatives.rb +1 -1
- data/examples/v201104/creative_service/get_all_creatives.rb +1 -1
- data/examples/v201104/custom_targeting_service/delete_custom_targeting_keys.rb +2 -2
- data/examples/v201104/custom_targeting_service/delete_custom_targeting_values.rb +2 -2
- data/examples/v201104/custom_targeting_service/get_all_custom_targeting_keys_and_values.rb +2 -2
- data/examples/v201104/inventory_service/create_ad_units.rb +1 -1
- data/examples/v201104/inventory_service/deactivate_ad_units.rb +2 -2
- data/examples/v201104/inventory_service/get_ad_units_by_statement.rb +1 -1
- data/examples/v201104/inventory_service/get_all_ad_units.rb +1 -1
- data/examples/v201104/line_item_creative_association_service/deactivate_licas.rb +2 -2
- data/examples/v201104/line_item_creative_association_service/get_all_licas.rb +1 -1
- data/examples/v201104/line_item_service/activate_line_items.rb +2 -2
- data/examples/v201104/line_item_service/create_line_items.rb +1 -1
- data/examples/v201104/line_item_service/get_all_line_items.rb +1 -1
- data/examples/v201104/order_service/approve_orders.rb +2 -2
- data/examples/v201104/order_service/create_orders.rb +1 -1
- data/examples/v201104/order_service/get_all_orders.rb +1 -1
- data/examples/v201104/placement_service/create_placements.rb +3 -3
- data/examples/v201104/placement_service/deactivate_placements.rb +2 -2
- data/examples/v201104/placement_service/get_all_placements.rb +1 -1
- data/examples/v201104/user_service/get_all_users.rb +1 -1
- data/lib/dfp_api.rb +24 -70
- data/lib/dfp_api/api_config.rb +3 -1
- data/lib/dfp_api/client_login_header_handler.rb +56 -0
- data/lib/dfp_api/credential_handler.rb +19 -14
- data/lib/dfp_api/errors.rb +1 -1
- data/lib/dfp_api/v201101/company_service.rb +3 -3
- data/lib/dfp_api/v201101/company_service_registry.rb +9 -4
- data/lib/dfp_api/v201101/creative_service.rb +3 -3
- data/lib/dfp_api/v201101/creative_service_registry.rb +9 -4
- data/lib/dfp_api/v201101/custom_targeting_service.rb +7 -7
- data/lib/dfp_api/v201101/custom_targeting_service_registry.rb +9 -4
- data/lib/dfp_api/v201101/forecast_service.rb +3 -3
- data/lib/dfp_api/v201101/forecast_service_registry.rb +9 -4
- data/lib/dfp_api/v201101/inventory_service.rb +7 -7
- data/lib/dfp_api/v201101/inventory_service_registry.rb +9 -4
- data/lib/dfp_api/v201101/line_item_creative_association_service.rb +7 -7
- data/lib/dfp_api/v201101/line_item_creative_association_service_registry.rb +9 -4
- data/lib/dfp_api/v201101/line_item_service.rb +7 -7
- data/lib/dfp_api/v201101/line_item_service_registry.rb +9 -4
- data/lib/dfp_api/v201101/network_service.rb +7 -7
- data/lib/dfp_api/v201101/network_service_registry.rb +9 -4
- data/lib/dfp_api/v201101/order_service.rb +11 -11
- data/lib/dfp_api/v201101/order_service_registry.rb +9 -4
- data/lib/dfp_api/v201101/placement_service.rb +3 -3
- data/lib/dfp_api/v201101/placement_service_registry.rb +9 -4
- data/lib/dfp_api/v201101/publisher_query_language_service.rb +3 -3
- data/lib/dfp_api/v201101/publisher_query_language_service_registry.rb +9 -4
- data/lib/dfp_api/v201101/report_service.rb +3 -3
- data/lib/dfp_api/v201101/report_service_registry.rb +9 -4
- data/lib/dfp_api/v201101/user_service.rb +7 -7
- data/lib/dfp_api/v201101/user_service_registry.rb +9 -4
- data/lib/dfp_api/v201103/company_service.rb +3 -3
- data/lib/dfp_api/v201103/company_service_registry.rb +9 -4
- data/lib/dfp_api/v201103/creative_service.rb +3 -3
- data/lib/dfp_api/v201103/creative_service_registry.rb +9 -4
- data/lib/dfp_api/v201103/custom_targeting_service.rb +7 -7
- data/lib/dfp_api/v201103/custom_targeting_service_registry.rb +9 -4
- data/lib/dfp_api/v201103/forecast_service.rb +3 -3
- data/lib/dfp_api/v201103/forecast_service_registry.rb +9 -4
- data/lib/dfp_api/v201103/inventory_service.rb +7 -7
- data/lib/dfp_api/v201103/inventory_service_registry.rb +9 -4
- data/lib/dfp_api/v201103/line_item_creative_association_service.rb +7 -7
- data/lib/dfp_api/v201103/line_item_creative_association_service_registry.rb +9 -4
- data/lib/dfp_api/v201103/line_item_service.rb +7 -7
- data/lib/dfp_api/v201103/line_item_service_registry.rb +9 -4
- data/lib/dfp_api/v201103/network_service.rb +7 -7
- data/lib/dfp_api/v201103/network_service_registry.rb +9 -4
- data/lib/dfp_api/v201103/order_service.rb +11 -11
- data/lib/dfp_api/v201103/order_service_registry.rb +9 -4
- data/lib/dfp_api/v201103/placement_service.rb +3 -3
- data/lib/dfp_api/v201103/placement_service_registry.rb +9 -4
- data/lib/dfp_api/v201103/publisher_query_language_service.rb +3 -3
- data/lib/dfp_api/v201103/publisher_query_language_service_registry.rb +9 -4
- data/lib/dfp_api/v201103/report_service.rb +3 -3
- data/lib/dfp_api/v201103/report_service_registry.rb +9 -4
- data/lib/dfp_api/v201103/user_service.rb +7 -7
- data/lib/dfp_api/v201103/user_service_registry.rb +9 -4
- data/lib/dfp_api/v201104/company_service.rb +3 -3
- data/lib/dfp_api/v201104/company_service_registry.rb +9 -4
- data/lib/dfp_api/v201104/creative_service.rb +3 -3
- data/lib/dfp_api/v201104/creative_service_registry.rb +9 -4
- data/lib/dfp_api/v201104/custom_targeting_service.rb +7 -7
- data/lib/dfp_api/v201104/custom_targeting_service_registry.rb +9 -4
- data/lib/dfp_api/v201104/forecast_service.rb +3 -3
- data/lib/dfp_api/v201104/forecast_service_registry.rb +9 -4
- data/lib/dfp_api/v201104/inventory_service.rb +7 -7
- data/lib/dfp_api/v201104/inventory_service_registry.rb +9 -4
- data/lib/dfp_api/v201104/line_item_creative_association_service.rb +7 -7
- data/lib/dfp_api/v201104/line_item_creative_association_service_registry.rb +9 -4
- data/lib/dfp_api/v201104/line_item_service.rb +7 -7
- data/lib/dfp_api/v201104/line_item_service_registry.rb +9 -4
- data/lib/dfp_api/v201104/network_service.rb +7 -7
- data/lib/dfp_api/v201104/network_service_registry.rb +9 -4
- data/lib/dfp_api/v201104/order_service.rb +11 -11
- data/lib/dfp_api/v201104/order_service_registry.rb +9 -4
- data/lib/dfp_api/v201104/placement_service.rb +3 -3
- data/lib/dfp_api/v201104/placement_service_registry.rb +9 -4
- data/lib/dfp_api/v201104/publisher_query_language_service.rb +3 -3
- data/lib/dfp_api/v201104/publisher_query_language_service_registry.rb +9 -4
- data/lib/dfp_api/v201104/report_service.rb +3 -3
- data/lib/dfp_api/v201104/report_service_registry.rb +9 -4
- data/lib/dfp_api/v201104/user_service.rb +7 -7
- data/lib/dfp_api/v201104/user_service_registry.rb +9 -4
- data/test/bugs/test_issue_00000016.rb +6 -5
- data/test/dfp_api/test_dfp_api.rb +29 -7
- metadata +257 -253
@@ -3,16 +3,20 @@
|
|
3
3
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
4
4
|
# License:: Licensed under the Apache License,Version 2.0 (the "License").
|
5
5
|
#
|
6
|
-
# Code generated by AdsCommon library 0.
|
6
|
+
# Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:32:43.
|
7
7
|
|
8
8
|
require 'ads_common/savon_service'
|
9
9
|
require 'dfp_api/v201101/line_item_service_registry'
|
10
10
|
|
11
11
|
module DfpApi; module V201101; module LineItemService
|
12
12
|
class LineItemService < AdsCommon::SavonService
|
13
|
-
def initialize(endpoint)
|
13
|
+
def initialize(api, endpoint)
|
14
14
|
namespace = 'https://www.google.com/apis/ads/publisher/v201101'
|
15
|
-
super(endpoint, namespace)
|
15
|
+
super(api, endpoint, namespace, :v201101)
|
16
|
+
end
|
17
|
+
|
18
|
+
def update_line_items(*args)
|
19
|
+
return execute_action('update_line_items', args)
|
16
20
|
end
|
17
21
|
|
18
22
|
def create_line_items(*args)
|
@@ -39,10 +43,6 @@ module DfpApi; module V201101; module LineItemService
|
|
39
43
|
return execute_action('create_line_item', args)
|
40
44
|
end
|
41
45
|
|
42
|
-
def update_line_items(*args)
|
43
|
-
return execute_action('update_line_items', args)
|
44
|
-
end
|
45
|
-
|
46
46
|
private
|
47
47
|
|
48
48
|
def get_service_registry()
|
@@ -3,12 +3,13 @@
|
|
3
3
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
4
4
|
# License:: Licensed under the Apache License,Version 2.0 (the "License").
|
5
5
|
#
|
6
|
-
# Code generated by AdsCommon library 0.
|
6
|
+
# Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:32:43.
|
7
7
|
|
8
8
|
module DfpApi; module V201101; module LineItemService
|
9
9
|
class LineItemServiceRegistry
|
10
|
-
LINEITEMSERVICE_METHODS = {:
|
11
|
-
LINEITEMSERVICE_TYPES = {:
|
10
|
+
LINEITEMSERVICE_METHODS = {:update_line_items=>{:input=>[{:type=>"LineItem", :min_occurs=>0, :name=>:line_items, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"LineItem", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"update_line_items_response"}}, :create_line_items=>{:input=>[{:type=>"LineItem", :min_occurs=>0, :name=>:line_items, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"LineItem", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"create_line_items_response"}}, :get_line_item=>{:input=>[{:type=>"long", :min_occurs=>0, :name=>:line_item_id, :max_occurs=>1}], :output=>{:fields=>[{:type=>"LineItem", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_line_item_response"}}, :get_line_items_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"LineItemPage", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_line_items_by_statement_response"}}, :perform_line_item_action=>{:input=>[{:type=>"LineItemAction", :min_occurs=>0, :name=>:line_item_action, :max_occurs=>1}, {:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"UpdateResult", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"perform_line_item_action_response"}}, :update_line_item=>{:input=>[{:type=>"LineItem", :min_occurs=>0, :name=>:line_item, :max_occurs=>1}], :output=>{:fields=>[{:type=>"LineItem", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"update_line_item_response"}}, :create_line_item=>{:input=>[{:type=>"LineItem", :min_occurs=>0, :name=>:line_item, :max_occurs=>1}], :output=>{:fields=>[{:type=>"LineItem", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"create_line_item_response"}}}
|
11
|
+
LINEITEMSERVICE_TYPES = {:Size=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:width, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:height, :max_occurs=>1}, {:type=>"boolean", :min_occurs=>0, :name=>:is_aspect_ratio, :max_occurs=>1}]}, :LineItemSummary=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:order_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:id, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:order_name, :max_occurs=>1}, {:type=>"DateTime", :min_occurs=>0, :name=>:start_date_time, :max_occurs=>1}, {:type=>"StartDateTimeType", :min_occurs=>0, :name=>:start_date_time_type, :max_occurs=>1}, {:type=>"DateTime", :min_occurs=>0, :name=>:end_date_time, :max_occurs=>1}, {:type=>"boolean", :min_occurs=>0, :name=>:unlimited_end_date_time, :max_occurs=>1}, {:type=>"CreativeRotationType", :min_occurs=>0, :name=>:creative_rotation_type, :max_occurs=>1}, {:type=>"DeliveryRateType", :min_occurs=>0, :name=>:delivery_rate_type, :max_occurs=>1}, {:type=>"RoadblockingType", :min_occurs=>0, :name=>:roadblocking_type, :max_occurs=>1}, {:type=>"FrequencyCap", :min_occurs=>0, :name=>:frequency_caps, :max_occurs=>:unbounded}, {:type=>"LineItemType", :min_occurs=>0, :name=>:line_item_type, :max_occurs=>1}, {:type=>"UnitType", :min_occurs=>0, :name=>:unit_type, :max_occurs=>1}, {:type=>"LineItemSummary.Duration", :min_occurs=>0, :name=>:duration, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:units_bought, :max_occurs=>1}, {:type=>"Money", :min_occurs=>0, :name=>:cost_per_unit, :max_occurs=>1}, {:type=>"Money", :min_occurs=>0, :name=>:value_cost_per_unit, :max_occurs=>1}, {:type=>"CostType", :min_occurs=>0, :name=>:cost_type, :max_occurs=>1}, {:type=>"LineItemDiscountType", :min_occurs=>0, :name=>:discount_type, :max_occurs=>1}, {:type=>"double", :min_occurs=>0, :name=>:discount, :max_occurs=>1}, {:type=>"Size", :min_occurs=>0, :name=>:creative_sizes, :max_occurs=>:unbounded}, {:type=>"boolean", :min_occurs=>0, :name=>:allow_overbook, :max_occurs=>1}, {:type=>"Stats", :min_occurs=>0, :name=>:stats, :max_occurs=>1}, {:type=>"DeliveryIndicator", :min_occurs=>0, :name=>:delivery_indicator, :max_occurs=>1}, {:type=>"DeliveryData", :min_occurs=>0, :name=>:delivery_data, :max_occurs=>1}, {:type=>"Money", :min_occurs=>0, :name=>:budget, :max_occurs=>1}, {:type=>"ComputedStatus", :min_occurs=>0, :name=>:status, :max_occurs=>1}, {:type=>"LineItemSummary.ReservationStatus", :min_occurs=>0, :name=>:reservation_status, :max_occurs=>1}, {:type=>"boolean", :min_occurs=>0, :name=>:is_archived, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:line_item_summary_type, :max_occurs=>1}]}, :CustomCriteriaSet=>{:base=>"CustomCriteriaNode", :fields=>[{:type=>"CustomCriteriaSet.LogicalOperator", :min_occurs=>0, :name=>:logical_operator, :max_occurs=>1}, {:type=>"CustomCriteriaNode", :min_occurs=>0, :name=>:children, :max_occurs=>:unbounded}]}, :Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:query, :max_occurs=>1}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :name=>:values, :max_occurs=>:unbounded}]}, :ReleaseLineItems=>{:base=>"LineItemAction", :fields=>[]}, :Money=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:currency_code, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:micro_amount, :max_occurs=>1}]}, :GeoTargeting=>{:fields=>[{:type=>"Location", :min_occurs=>0, :name=>:targeted_locations, :max_occurs=>:unbounded}, {:type=>"Location", :min_occurs=>0, :name=>:excluded_locations, :max_occurs=>:unbounded}]}, :ActivateLineItems=>{:base=>"LineItemAction", :fields=>[]}, :UpdateResult=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:num_changes, :max_occurs=>1}]}, :Stats=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:impressions_delivered, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:clicks_delivered, :max_occurs=>1}]}, :Location=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:location_type, :max_occurs=>1}]}, :CustomCriteriaNode=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:custom_criteria_node_type, :max_occurs=>1}]}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:key, :max_occurs=>1}, {:type=>"Value", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :ReserveAndOverbookLineItems=>{:base=>"ReserveLineItems", :fields=>[]}, :NumberValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :InventoryTargeting=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:targeted_ad_unit_ids, :max_occurs=>:unbounded}, {:type=>"string", :min_occurs=>0, :name=>:excluded_ad_unit_ids, :max_occurs=>:unbounded}, {:type=>"long", :min_occurs=>0, :name=>:targeted_placement_ids, :max_occurs=>:unbounded}]}, :ArchiveLineItems=>{:base=>"LineItemAction", :fields=>[]}, :Targeting=>{:fields=>[{:type=>"GeoTargeting", :min_occurs=>0, :name=>:geo_targeting, :max_occurs=>1}, {:type=>"InventoryTargeting", :min_occurs=>0, :name=>:inventory_targeting, :max_occurs=>1}, {:type=>"CustomCriteriaSet", :min_occurs=>0, :name=>:custom_targeting, :max_occurs=>1}]}, :MetroLocation=>{:base=>"Location", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:metro_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:country_code, :max_occurs=>1}]}, :DeliveryData=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:units, :max_occurs=>:unbounded}]}, :ReserveLineItems=>{:base=>"LineItemAction", :fields=>[]}, :LineItemAction=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:line_item_action_type, :max_occurs=>1}]}, :CustomTargetingValue=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:custom_targeting_key_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:id, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:display_name, :max_occurs=>1}, {:type=>"CustomTargetingValue.MatchType", :min_occurs=>0, :name=>:match_type, :max_occurs=>1}]}, :CityLocation=>{:base=>"Location", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:city_name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:region_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:country_code, :max_occurs=>1}]}, :Value=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value_type, :max_occurs=>1}]}, :UnarchiveLineItems=>{:base=>"LineItemAction", :fields=>[]}, :PauseLineItems=>{:base=>"LineItemAction", :fields=>[]}, :DeliveryIndicator=>{:fields=>[{:type=>"double", :min_occurs=>0, :name=>:expected_delivery_percentage, :max_occurs=>1}, {:type=>"double", :min_occurs=>0, :name=>:actual_delivery_percentage, :max_occurs=>1}]}, :Date=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:year, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:month, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:day, :max_occurs=>1}]}, :ResumeAndOverbookLineItems=>{:base=>"ResumeLineItems", :fields=>[]}, :LineItem=>{:base=>"LineItemSummary", :fields=>[{:type=>"Targeting", :min_occurs=>0, :name=>:targeting, :max_occurs=>1}]}, :CountryLocation=>{:base=>"Location", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:country_code, :max_occurs=>1}]}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:auth_token, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:network_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:application_name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:o_auth_token, :max_occurs=>1}]}, :PredefinedCustomCriteria=>{:base=>"CustomCriteria", :fields=>[{:type=>"long", :min_occurs=>0, :name=>:value_ids, :max_occurs=>:unbounded}]}, :FreeFormCustomCriteria=>{:base=>"CustomCriteria", :fields=>[{:type=>"CustomTargetingValue", :min_occurs=>0, :name=>:values, :max_occurs=>:unbounded}]}, :BooleanValue=>{:base=>"Value", :fields=>[{:type=>"boolean", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :TextValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :ResumeLineItems=>{:base=>"LineItemAction", :fields=>[]}, :LineItemPage=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:total_result_set_size, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:start_index, :max_occurs=>1}, {:type=>"LineItem", :min_occurs=>0, :name=>:results, :max_occurs=>:unbounded}]}, :DateTime=>{:fields=>[{:type=>"Date", :min_occurs=>0, :name=>:date, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:hour, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:minute, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:second, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:time_zone_id, :max_occurs=>1}]}, :CustomCriteria=>{:base=>"CustomCriteriaNode", :fields=>[{:type=>"long", :min_occurs=>0, :name=>:key_id, :max_occurs=>1}, {:type=>"CustomCriteria.ComparisonOperator", :min_occurs=>0, :name=>:operator, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:request_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:response_time, :max_occurs=>1}]}, :RegionLocation=>{:base=>"Location", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:region_code, :max_occurs=>1}]}, :FrequencyCap=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:max_impressions, :max_occurs=>1}, {:type=>"TimeUnit", :min_occurs=>0, :name=>:time_unit, :max_occurs=>1}]}}
|
12
|
+
LINEITEMSERVICE_NAMESPACES = []
|
12
13
|
|
13
14
|
def self.get_method_signature(method_name)
|
14
15
|
return LINEITEMSERVICE_METHODS[method_name.to_sym]
|
@@ -17,6 +18,10 @@ module DfpApi; module V201101; module LineItemService
|
|
17
18
|
def self.get_type_signature(type_name)
|
18
19
|
return LINEITEMSERVICE_TYPES[type_name.to_sym]
|
19
20
|
end
|
21
|
+
|
22
|
+
def self.get_namespace(index)
|
23
|
+
return LINEITEMSERVICE_NAMESPACES[index]
|
24
|
+
end
|
20
25
|
end
|
21
26
|
|
22
27
|
# Base class for exceptions.
|
@@ -29,7 +34,7 @@ module DfpApi; module V201101; module LineItemService
|
|
29
34
|
class ApiException < ApplicationException
|
30
35
|
attr_reader :errors # ApiError
|
31
36
|
def initialize(exception_fault)
|
32
|
-
@array_fields
|
37
|
+
@array_fields ||= []
|
33
38
|
@array_fields << 'errors'
|
34
39
|
super(exception_fault)
|
35
40
|
end
|
@@ -3,16 +3,20 @@
|
|
3
3
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
4
4
|
# License:: Licensed under the Apache License,Version 2.0 (the "License").
|
5
5
|
#
|
6
|
-
# Code generated by AdsCommon library 0.
|
6
|
+
# Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:33:04.
|
7
7
|
|
8
8
|
require 'ads_common/savon_service'
|
9
9
|
require 'dfp_api/v201101/network_service_registry'
|
10
10
|
|
11
11
|
module DfpApi; module V201101; module NetworkService
|
12
12
|
class NetworkService < AdsCommon::SavonService
|
13
|
-
def initialize(endpoint)
|
13
|
+
def initialize(api, endpoint)
|
14
14
|
namespace = 'https://www.google.com/apis/ads/publisher/v201101'
|
15
|
-
super(endpoint, namespace)
|
15
|
+
super(api, endpoint, namespace, :v201101)
|
16
|
+
end
|
17
|
+
|
18
|
+
def get_current_network(*args)
|
19
|
+
return execute_action('get_current_network', args)
|
16
20
|
end
|
17
21
|
|
18
22
|
def update_network(*args)
|
@@ -23,10 +27,6 @@ module DfpApi; module V201101; module NetworkService
|
|
23
27
|
return execute_action('get_all_networks', args)
|
24
28
|
end
|
25
29
|
|
26
|
-
def get_current_network(*args)
|
27
|
-
return execute_action('get_current_network', args)
|
28
|
-
end
|
29
|
-
|
30
30
|
private
|
31
31
|
|
32
32
|
def get_service_registry()
|
@@ -3,12 +3,13 @@
|
|
3
3
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
4
4
|
# License:: Licensed under the Apache License,Version 2.0 (the "License").
|
5
5
|
#
|
6
|
-
# Code generated by AdsCommon library 0.
|
6
|
+
# Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:33:04.
|
7
7
|
|
8
8
|
module DfpApi; module V201101; module NetworkService
|
9
9
|
class NetworkServiceRegistry
|
10
|
-
NETWORKSERVICE_METHODS = {:
|
11
|
-
NETWORKSERVICE_TYPES = {:Network=>{:fields=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1
|
10
|
+
NETWORKSERVICE_METHODS = {:get_current_network=>{:input=>[], :output=>{:fields=>[{:type=>"Network", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_current_network_response"}}, :update_network=>{:input=>[{:type=>"Network", :min_occurs=>0, :name=>:network, :max_occurs=>1}], :output=>{:fields=>[{:type=>"Network", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"update_network_response"}}, :get_all_networks=>{:input=>[], :output=>{:fields=>[{:type=>"Network", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"get_all_networks_response"}}}
|
11
|
+
NETWORKSERVICE_TYPES = {:Network=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:id, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:display_name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:network_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:property_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:time_zone, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:currency_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:effective_root_ad_unit_id, :max_occurs=>1}]}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:auth_token, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:network_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:application_name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:o_auth_token, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:request_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:response_time, :max_occurs=>1}]}}
|
12
|
+
NETWORKSERVICE_NAMESPACES = []
|
12
13
|
|
13
14
|
def self.get_method_signature(method_name)
|
14
15
|
return NETWORKSERVICE_METHODS[method_name.to_sym]
|
@@ -17,6 +18,10 @@ module DfpApi; module V201101; module NetworkService
|
|
17
18
|
def self.get_type_signature(type_name)
|
18
19
|
return NETWORKSERVICE_TYPES[type_name.to_sym]
|
19
20
|
end
|
21
|
+
|
22
|
+
def self.get_namespace(index)
|
23
|
+
return NETWORKSERVICE_NAMESPACES[index]
|
24
|
+
end
|
20
25
|
end
|
21
26
|
|
22
27
|
# Base class for exceptions.
|
@@ -29,7 +34,7 @@ module DfpApi; module V201101; module NetworkService
|
|
29
34
|
class ApiException < ApplicationException
|
30
35
|
attr_reader :errors # ApiError
|
31
36
|
def initialize(exception_fault)
|
32
|
-
@array_fields
|
37
|
+
@array_fields ||= []
|
33
38
|
@array_fields << 'errors'
|
34
39
|
super(exception_fault)
|
35
40
|
end
|
@@ -3,24 +3,16 @@
|
|
3
3
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
4
4
|
# License:: Licensed under the Apache License,Version 2.0 (the "License").
|
5
5
|
#
|
6
|
-
# Code generated by AdsCommon library 0.
|
6
|
+
# Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:32:27.
|
7
7
|
|
8
8
|
require 'ads_common/savon_service'
|
9
9
|
require 'dfp_api/v201101/order_service_registry'
|
10
10
|
|
11
11
|
module DfpApi; module V201101; module OrderService
|
12
12
|
class OrderService < AdsCommon::SavonService
|
13
|
-
def initialize(endpoint)
|
13
|
+
def initialize(api, endpoint)
|
14
14
|
namespace = 'https://www.google.com/apis/ads/publisher/v201101'
|
15
|
-
super(endpoint, namespace)
|
16
|
-
end
|
17
|
-
|
18
|
-
def create_orders(*args)
|
19
|
-
return execute_action('create_orders', args)
|
20
|
-
end
|
21
|
-
|
22
|
-
def get_order(*args)
|
23
|
-
return execute_action('get_order', args)
|
15
|
+
super(api, endpoint, namespace, :v201101)
|
24
16
|
end
|
25
17
|
|
26
18
|
def get_orders_by_statement(*args)
|
@@ -43,6 +35,14 @@ module DfpApi; module V201101; module OrderService
|
|
43
35
|
return execute_action('update_orders', args)
|
44
36
|
end
|
45
37
|
|
38
|
+
def create_orders(*args)
|
39
|
+
return execute_action('create_orders', args)
|
40
|
+
end
|
41
|
+
|
42
|
+
def get_order(*args)
|
43
|
+
return execute_action('get_order', args)
|
44
|
+
end
|
45
|
+
|
46
46
|
private
|
47
47
|
|
48
48
|
def get_service_registry()
|
@@ -3,12 +3,13 @@
|
|
3
3
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
4
4
|
# License:: Licensed under the Apache License,Version 2.0 (the "License").
|
5
5
|
#
|
6
|
-
# Code generated by AdsCommon library 0.
|
6
|
+
# Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:32:27.
|
7
7
|
|
8
8
|
module DfpApi; module V201101; module OrderService
|
9
9
|
class OrderServiceRegistry
|
10
|
-
ORDERSERVICE_METHODS = {:
|
11
|
-
ORDERSERVICE_TYPES = {:Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1
|
10
|
+
ORDERSERVICE_METHODS = {:get_orders_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"OrderPage", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_orders_by_statement_response"}}, :perform_order_action=>{:input=>[{:type=>"OrderAction", :min_occurs=>0, :name=>:order_action, :max_occurs=>1}, {:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"UpdateResult", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"perform_order_action_response"}}, :update_order=>{:input=>[{:type=>"Order", :min_occurs=>0, :name=>:order, :max_occurs=>1}], :output=>{:fields=>[{:type=>"Order", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"update_order_response"}}, :create_order=>{:input=>[{:type=>"Order", :min_occurs=>0, :name=>:order, :max_occurs=>1}], :output=>{:fields=>[{:type=>"Order", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"create_order_response"}}, :update_orders=>{:input=>[{:type=>"Order", :min_occurs=>0, :name=>:orders, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"Order", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"update_orders_response"}}, :create_orders=>{:input=>[{:type=>"Order", :min_occurs=>0, :name=>:orders, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"Order", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"create_orders_response"}}, :get_order=>{:input=>[{:type=>"long", :min_occurs=>0, :name=>:order_id, :max_occurs=>1}], :output=>{:fields=>[{:type=>"Order", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_order_response"}}}
|
11
|
+
ORDERSERVICE_TYPES = {:UnarchiveOrders=>{:base=>"OrderAction", :fields=>[]}, :PauseOrders=>{:base=>"OrderAction", :fields=>[]}, :Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:query, :max_occurs=>1}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :name=>:values, :max_occurs=>:unbounded}]}, :Money=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:currency_code, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:micro_amount, :max_occurs=>1}]}, :UpdateResult=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:num_changes, :max_occurs=>1}]}, :ResumeAndOverbookOrders=>{:base=>"ResumeOrders", :fields=>[]}, :ApproveAndOverbookOrders=>{:base=>"ApproveOrders", :fields=>[]}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:key, :max_occurs=>1}, {:type=>"Value", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :NumberValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :ResumeOrders=>{:base=>"OrderAction", :fields=>[]}, :ApproveOrders=>{:base=>"OrderAction", :fields=>[]}, :SubmitOrdersForApproval=>{:base=>"OrderAction", :fields=>[]}, :OrderAction=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:order_action_type, :max_occurs=>1}]}, :Value=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value_type, :max_occurs=>1}]}, :RetractOrders=>{:base=>"OrderAction", :fields=>[]}, :Date=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:year, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:month, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:day, :max_occurs=>1}]}, :ArchiveOrders=>{:base=>"OrderAction", :fields=>[]}, :SubmitOrdersForApprovalAndOverbook=>{:base=>"SubmitOrdersForApproval", :fields=>[]}, :Order=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:id, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:name, :max_occurs=>1}, {:type=>"DateTime", :min_occurs=>0, :name=>:start_date_time, :max_occurs=>1}, {:type=>"DateTime", :min_occurs=>0, :name=>:end_date_time, :max_occurs=>1}, {:type=>"boolean", :min_occurs=>0, :name=>:unlimited_end_date_time, :max_occurs=>1}, {:type=>"OrderStatus", :min_occurs=>0, :name=>:status, :max_occurs=>1}, {:type=>"boolean", :min_occurs=>0, :name=>:is_archived, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:notes, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:external_id, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:currency_code, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:advertiser_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:creator_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:trafficker_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:salesperson_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:total_impressions_delivered, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:total_clicks_delivered, :max_occurs=>1}, {:type=>"Money", :min_occurs=>0, :name=>:total_budget, :max_occurs=>1}]}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:auth_token, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:network_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:application_name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:o_auth_token, :max_occurs=>1}]}, :BooleanValue=>{:base=>"Value", :fields=>[{:type=>"boolean", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :TextValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :OrderPage=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:total_result_set_size, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:start_index, :max_occurs=>1}, {:type=>"Order", :min_occurs=>0, :name=>:results, :max_occurs=>:unbounded}]}, :DateTime=>{:fields=>[{:type=>"Date", :min_occurs=>0, :name=>:date, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:hour, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:minute, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:second, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:time_zone_id, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:request_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:response_time, :max_occurs=>1}]}, :DisapproveOrders=>{:base=>"OrderAction", :fields=>[]}}
|
12
|
+
ORDERSERVICE_NAMESPACES = []
|
12
13
|
|
13
14
|
def self.get_method_signature(method_name)
|
14
15
|
return ORDERSERVICE_METHODS[method_name.to_sym]
|
@@ -17,6 +18,10 @@ module DfpApi; module V201101; module OrderService
|
|
17
18
|
def self.get_type_signature(type_name)
|
18
19
|
return ORDERSERVICE_TYPES[type_name.to_sym]
|
19
20
|
end
|
21
|
+
|
22
|
+
def self.get_namespace(index)
|
23
|
+
return ORDERSERVICE_NAMESPACES[index]
|
24
|
+
end
|
20
25
|
end
|
21
26
|
|
22
27
|
# Base class for exceptions.
|
@@ -29,7 +34,7 @@ module DfpApi; module V201101; module OrderService
|
|
29
34
|
class ApiException < ApplicationException
|
30
35
|
attr_reader :errors # ApiError
|
31
36
|
def initialize(exception_fault)
|
32
|
-
@array_fields
|
37
|
+
@array_fields ||= []
|
33
38
|
@array_fields << 'errors'
|
34
39
|
super(exception_fault)
|
35
40
|
end
|
@@ -3,16 +3,16 @@
|
|
3
3
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
4
4
|
# License:: Licensed under the Apache License,Version 2.0 (the "License").
|
5
5
|
#
|
6
|
-
# Code generated by AdsCommon library 0.
|
6
|
+
# Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:32:55.
|
7
7
|
|
8
8
|
require 'ads_common/savon_service'
|
9
9
|
require 'dfp_api/v201101/placement_service_registry'
|
10
10
|
|
11
11
|
module DfpApi; module V201101; module PlacementService
|
12
12
|
class PlacementService < AdsCommon::SavonService
|
13
|
-
def initialize(endpoint)
|
13
|
+
def initialize(api, endpoint)
|
14
14
|
namespace = 'https://www.google.com/apis/ads/publisher/v201101'
|
15
|
-
super(endpoint, namespace)
|
15
|
+
super(api, endpoint, namespace, :v201101)
|
16
16
|
end
|
17
17
|
|
18
18
|
def perform_placement_action(*args)
|
@@ -3,12 +3,13 @@
|
|
3
3
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
4
4
|
# License:: Licensed under the Apache License,Version 2.0 (the "License").
|
5
5
|
#
|
6
|
-
# Code generated by AdsCommon library 0.
|
6
|
+
# Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:32:55.
|
7
7
|
|
8
8
|
module DfpApi; module V201101; module PlacementService
|
9
9
|
class PlacementServiceRegistry
|
10
|
-
PLACEMENTSERVICE_METHODS = {:perform_placement_action=>{:input=>[{:type=>"PlacementAction", :min_occurs=>0, :max_occurs=>1
|
11
|
-
PLACEMENTSERVICE_TYPES = {:
|
10
|
+
PLACEMENTSERVICE_METHODS = {:perform_placement_action=>{:input=>[{:type=>"PlacementAction", :min_occurs=>0, :name=>:placement_action, :max_occurs=>1}, {:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"UpdateResult", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"perform_placement_action_response"}}, :update_placement=>{:input=>[{:type=>"Placement", :min_occurs=>0, :name=>:placement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"Placement", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"update_placement_response"}}, :create_placement=>{:input=>[{:type=>"Placement", :min_occurs=>0, :name=>:placement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"Placement", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"create_placement_response"}}, :update_placements=>{:input=>[{:type=>"Placement", :min_occurs=>0, :name=>:placements, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"Placement", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"update_placements_response"}}, :create_placements=>{:input=>[{:type=>"Placement", :min_occurs=>0, :name=>:placements, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"Placement", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"create_placements_response"}}, :get_placement=>{:input=>[{:type=>"long", :min_occurs=>0, :name=>:placement_id, :max_occurs=>1}], :output=>{:fields=>[{:type=>"Placement", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_placement_response"}}, :get_placements_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"PlacementPage", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_placements_by_statement_response"}}}
|
11
|
+
PLACEMENTSERVICE_TYPES = {:PlacementPage=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:total_result_set_size, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:start_index, :max_occurs=>1}, {:type=>"Placement", :min_occurs=>0, :name=>:results, :max_occurs=>:unbounded}]}, :Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:query, :max_occurs=>1}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :name=>:values, :max_occurs=>:unbounded}]}, :ArchivePlacements=>{:base=>"PlacementAction", :fields=>[]}, :UpdateResult=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:num_changes, :max_occurs=>1}]}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:key, :max_occurs=>1}, {:type=>"Value", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :NumberValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :DeactivatePlacements=>{:base=>"PlacementAction", :fields=>[]}, :PlacementAction=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:placement_action_type, :max_occurs=>1}]}, :Value=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value_type, :max_occurs=>1}]}, :Placement=>{:base=>"SiteTargetingInfo", :fields=>[{:type=>"long", :min_occurs=>0, :name=>:id, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:description, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:placement_code, :max_occurs=>1}, {:type=>"InventoryStatus", :min_occurs=>0, :name=>:status, :max_occurs=>1}, {:type=>"boolean", :min_occurs=>0, :name=>:is_ad_sense_targeting_enabled, :max_occurs=>1}, {:type=>"boolean", :min_occurs=>0, :name=>:is_ad_planner_targeting_enabled, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:ad_sense_targeting_locale, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:targeted_ad_unit_ids, :max_occurs=>:unbounded}]}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:auth_token, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:network_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:application_name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:o_auth_token, :max_occurs=>1}]}, :BooleanValue=>{:base=>"Value", :fields=>[{:type=>"boolean", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :SiteTargetingInfo=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:targeting_description, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:targeting_site_name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:targeting_ad_location, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:site_targeting_info_type, :max_occurs=>1}]}, :TextValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:request_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:response_time, :max_occurs=>1}]}, :ActivatePlacements=>{:base=>"PlacementAction", :fields=>[]}}
|
12
|
+
PLACEMENTSERVICE_NAMESPACES = []
|
12
13
|
|
13
14
|
def self.get_method_signature(method_name)
|
14
15
|
return PLACEMENTSERVICE_METHODS[method_name.to_sym]
|
@@ -17,6 +18,10 @@ module DfpApi; module V201101; module PlacementService
|
|
17
18
|
def self.get_type_signature(type_name)
|
18
19
|
return PLACEMENTSERVICE_TYPES[type_name.to_sym]
|
19
20
|
end
|
21
|
+
|
22
|
+
def self.get_namespace(index)
|
23
|
+
return PLACEMENTSERVICE_NAMESPACES[index]
|
24
|
+
end
|
20
25
|
end
|
21
26
|
|
22
27
|
# Base class for exceptions.
|
@@ -29,7 +34,7 @@ module DfpApi; module V201101; module PlacementService
|
|
29
34
|
class ApiException < ApplicationException
|
30
35
|
attr_reader :errors # ApiError
|
31
36
|
def initialize(exception_fault)
|
32
|
-
@array_fields
|
37
|
+
@array_fields ||= []
|
33
38
|
@array_fields << 'errors'
|
34
39
|
super(exception_fault)
|
35
40
|
end
|
@@ -3,16 +3,16 @@
|
|
3
3
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
4
4
|
# License:: Licensed under the Apache License,Version 2.0 (the "License").
|
5
5
|
#
|
6
|
-
# Code generated by AdsCommon library 0.
|
6
|
+
# Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:32:59.
|
7
7
|
|
8
8
|
require 'ads_common/savon_service'
|
9
9
|
require 'dfp_api/v201101/publisher_query_language_service_registry'
|
10
10
|
|
11
11
|
module DfpApi; module V201101; module PublisherQueryLanguageService
|
12
12
|
class PublisherQueryLanguageService < AdsCommon::SavonService
|
13
|
-
def initialize(endpoint)
|
13
|
+
def initialize(api, endpoint)
|
14
14
|
namespace = 'https://www.google.com/apis/ads/publisher/v201101'
|
15
|
-
super(endpoint, namespace)
|
15
|
+
super(api, endpoint, namespace, :v201101)
|
16
16
|
end
|
17
17
|
|
18
18
|
def select(*args)
|
@@ -3,12 +3,13 @@
|
|
3
3
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
4
4
|
# License:: Licensed under the Apache License,Version 2.0 (the "License").
|
5
5
|
#
|
6
|
-
# Code generated by AdsCommon library 0.
|
6
|
+
# Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:32:59.
|
7
7
|
|
8
8
|
module DfpApi; module V201101; module PublisherQueryLanguageService
|
9
9
|
class PublisherQueryLanguageServiceRegistry
|
10
|
-
PUBLISHERQUERYLANGUAGESERVICE_METHODS = {:select=>{:input=>[{:type=>"Statement", :min_occurs=>0, :max_occurs=>1
|
11
|
-
PUBLISHERQUERYLANGUAGESERVICE_TYPES = {:Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1
|
10
|
+
PUBLISHERQUERYLANGUAGESERVICE_METHODS = {:select=>{:input=>[{:type=>"Statement", :min_occurs=>0, :name=>:select_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"ResultSet", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"select_response"}}}
|
11
|
+
PUBLISHERQUERYLANGUAGESERVICE_TYPES = {:Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:query, :max_occurs=>1}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :name=>:values, :max_occurs=>:unbounded}]}, :ResultSet=>{:fields=>[{:type=>"ColumnType", :min_occurs=>0, :name=>:column_types, :max_occurs=>:unbounded}, {:type=>"Row", :min_occurs=>0, :name=>:rows, :max_occurs=>:unbounded}]}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:key, :max_occurs=>1}, {:type=>"Value", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :NumberValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :Value=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value_type, :max_occurs=>1}]}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:auth_token, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:network_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:application_name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:o_auth_token, :max_occurs=>1}]}, :ColumnType=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:label_name, :max_occurs=>1}]}, :BooleanValue=>{:base=>"Value", :fields=>[{:type=>"boolean", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :TextValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :Row=>{:fields=>[{:type=>"Value", :min_occurs=>0, :name=>:values, :max_occurs=>:unbounded}]}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:request_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:response_time, :max_occurs=>1}]}}
|
12
|
+
PUBLISHERQUERYLANGUAGESERVICE_NAMESPACES = []
|
12
13
|
|
13
14
|
def self.get_method_signature(method_name)
|
14
15
|
return PUBLISHERQUERYLANGUAGESERVICE_METHODS[method_name.to_sym]
|
@@ -17,6 +18,10 @@ module DfpApi; module V201101; module PublisherQueryLanguageService
|
|
17
18
|
def self.get_type_signature(type_name)
|
18
19
|
return PUBLISHERQUERYLANGUAGESERVICE_TYPES[type_name.to_sym]
|
19
20
|
end
|
21
|
+
|
22
|
+
def self.get_namespace(index)
|
23
|
+
return PUBLISHERQUERYLANGUAGESERVICE_NAMESPACES[index]
|
24
|
+
end
|
20
25
|
end
|
21
26
|
|
22
27
|
# Base class for exceptions.
|
@@ -29,7 +34,7 @@ module DfpApi; module V201101; module PublisherQueryLanguageService
|
|
29
34
|
class ApiException < ApplicationException
|
30
35
|
attr_reader :errors # ApiError
|
31
36
|
def initialize(exception_fault)
|
32
|
-
@array_fields
|
37
|
+
@array_fields ||= []
|
33
38
|
@array_fields << 'errors'
|
34
39
|
super(exception_fault)
|
35
40
|
end
|
@@ -3,16 +3,16 @@
|
|
3
3
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
4
4
|
# License:: Licensed under the Apache License,Version 2.0 (the "License").
|
5
5
|
#
|
6
|
-
# Code generated by AdsCommon library 0.
|
6
|
+
# Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:32:40.
|
7
7
|
|
8
8
|
require 'ads_common/savon_service'
|
9
9
|
require 'dfp_api/v201101/report_service_registry'
|
10
10
|
|
11
11
|
module DfpApi; module V201101; module ReportService
|
12
12
|
class ReportService < AdsCommon::SavonService
|
13
|
-
def initialize(endpoint)
|
13
|
+
def initialize(api, endpoint)
|
14
14
|
namespace = 'https://www.google.com/apis/ads/publisher/v201101'
|
15
|
-
super(endpoint, namespace)
|
15
|
+
super(api, endpoint, namespace, :v201101)
|
16
16
|
end
|
17
17
|
|
18
18
|
def get_report_download_url(*args)
|
@@ -3,12 +3,13 @@
|
|
3
3
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
4
4
|
# License:: Licensed under the Apache License,Version 2.0 (the "License").
|
5
5
|
#
|
6
|
-
# Code generated by AdsCommon library 0.
|
6
|
+
# Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:32:40.
|
7
7
|
|
8
8
|
module DfpApi; module V201101; module ReportService
|
9
9
|
class ReportServiceRegistry
|
10
|
-
REPORTSERVICE_METHODS = {:get_report_download_url=>{:original_name=>"getReportDownloadURL", :input=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1
|
11
|
-
REPORTSERVICE_TYPES = {:
|
10
|
+
REPORTSERVICE_METHODS = {:get_report_download_url=>{:original_name=>"getReportDownloadURL", :input=>[{:type=>"long", :min_occurs=>0, :name=>:report_job_id, :max_occurs=>1}, {:type=>"ExportFormat", :min_occurs=>0, :name=>:export_format, :max_occurs=>1}], :output=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_report_download_url_response"}}, :get_report_job=>{:input=>[{:type=>"long", :min_occurs=>0, :name=>:report_job_id, :max_occurs=>1}], :output=>{:fields=>[{:type=>"ReportJob", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_report_job_response"}}, :run_report_job=>{:input=>[{:type=>"ReportJob", :min_occurs=>0, :name=>:report_job, :max_occurs=>1}], :output=>{:fields=>[{:type=>"ReportJob", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"run_report_job_response"}}}
|
11
|
+
REPORTSERVICE_TYPES = {:Date=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:year, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:month, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:day, :max_occurs=>1}]}, :ReportQuery=>{:fields=>[{:type=>"Dimension", :min_occurs=>0, :name=>:dimensions, :max_occurs=>:unbounded}, {:type=>"Column", :min_occurs=>0, :name=>:columns, :max_occurs=>:unbounded}, {:type=>"DateTime", :min_occurs=>0, :name=>:start_date_time, :max_occurs=>1}, {:type=>"DateTime", :min_occurs=>0, :name=>:end_date_time, :max_occurs=>1}, {:type=>"DateRangeType", :min_occurs=>0, :name=>:date_range_type, :max_occurs=>1}, {:type=>"DimensionFilter", :min_occurs=>0, :name=>:dimension_filters, :max_occurs=>:unbounded}]}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:auth_token, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:network_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:application_name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:o_auth_token, :max_occurs=>1}]}, :ReportJob=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:id, :max_occurs=>1}, {:type=>"ReportQuery", :min_occurs=>0, :name=>:report_query, :max_occurs=>1}, {:type=>"ReportJobStatus", :min_occurs=>0, :name=>:report_job_status, :max_occurs=>1}]}, :DateTime=>{:fields=>[{:type=>"Date", :min_occurs=>0, :name=>:date, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:hour, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:minute, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:second, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:time_zone_id, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:request_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:response_time, :max_occurs=>1}]}}
|
12
|
+
REPORTSERVICE_NAMESPACES = []
|
12
13
|
|
13
14
|
def self.get_method_signature(method_name)
|
14
15
|
return REPORTSERVICE_METHODS[method_name.to_sym]
|
@@ -17,6 +18,10 @@ module DfpApi; module V201101; module ReportService
|
|
17
18
|
def self.get_type_signature(type_name)
|
18
19
|
return REPORTSERVICE_TYPES[type_name.to_sym]
|
19
20
|
end
|
21
|
+
|
22
|
+
def self.get_namespace(index)
|
23
|
+
return REPORTSERVICE_NAMESPACES[index]
|
24
|
+
end
|
20
25
|
end
|
21
26
|
|
22
27
|
# Base class for exceptions.
|
@@ -29,7 +34,7 @@ module DfpApi; module V201101; module ReportService
|
|
29
34
|
class ApiException < ApplicationException
|
30
35
|
attr_reader :errors # ApiError
|
31
36
|
def initialize(exception_fault)
|
32
|
-
@array_fields
|
37
|
+
@array_fields ||= []
|
33
38
|
@array_fields << 'errors'
|
34
39
|
super(exception_fault)
|
35
40
|
end
|
@@ -3,16 +3,20 @@
|
|
3
3
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
4
4
|
# License:: Licensed under the Apache License,Version 2.0 (the "License").
|
5
5
|
#
|
6
|
-
# Code generated by AdsCommon library 0.
|
6
|
+
# Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:32:34.
|
7
7
|
|
8
8
|
require 'ads_common/savon_service'
|
9
9
|
require 'dfp_api/v201101/user_service_registry'
|
10
10
|
|
11
11
|
module DfpApi; module V201101; module UserService
|
12
12
|
class UserService < AdsCommon::SavonService
|
13
|
-
def initialize(endpoint)
|
13
|
+
def initialize(api, endpoint)
|
14
14
|
namespace = 'https://www.google.com/apis/ads/publisher/v201101'
|
15
|
-
super(endpoint, namespace)
|
15
|
+
super(api, endpoint, namespace, :v201101)
|
16
|
+
end
|
17
|
+
|
18
|
+
def create_users(*args)
|
19
|
+
return execute_action('create_users', args)
|
16
20
|
end
|
17
21
|
|
18
22
|
def update_users(*args)
|
@@ -43,10 +47,6 @@ module DfpApi; module V201101; module UserService
|
|
43
47
|
return execute_action('update_user', args)
|
44
48
|
end
|
45
49
|
|
46
|
-
def create_users(*args)
|
47
|
-
return execute_action('create_users', args)
|
48
|
-
end
|
49
|
-
|
50
50
|
private
|
51
51
|
|
52
52
|
def get_service_registry()
|
@@ -3,12 +3,13 @@
|
|
3
3
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
4
4
|
# License:: Licensed under the Apache License,Version 2.0 (the "License").
|
5
5
|
#
|
6
|
-
# Code generated by AdsCommon library 0.
|
6
|
+
# Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:32:34.
|
7
7
|
|
8
8
|
module DfpApi; module V201101; module UserService
|
9
9
|
class UserServiceRegistry
|
10
|
-
USERSERVICE_METHODS = {:
|
11
|
-
USERSERVICE_TYPES = {:Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1
|
10
|
+
USERSERVICE_METHODS = {:create_users=>{:input=>[{:type=>"User", :min_occurs=>0, :name=>:users, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"User", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"create_users_response"}}, :update_users=>{:input=>[{:type=>"User", :min_occurs=>0, :name=>:users, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"User", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"update_users_response"}}, :get_all_roles=>{:input=>[], :output=>{:fields=>[{:type=>"Role", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"get_all_roles_response"}}, :get_user=>{:input=>[{:type=>"long", :min_occurs=>0, :name=>:user_id, :max_occurs=>1}], :output=>{:fields=>[{:type=>"User", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_user_response"}}, :get_users_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"UserPage", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_users_by_statement_response"}}, :perform_user_action=>{:input=>[{:type=>"UserAction", :min_occurs=>0, :name=>:user_action, :max_occurs=>1}, {:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"UpdateResult", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"perform_user_action_response"}}, :create_user=>{:input=>[{:type=>"User", :min_occurs=>0, :name=>:user, :max_occurs=>1}], :output=>{:fields=>[{:type=>"User", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"create_user_response"}}, :update_user=>{:input=>[{:type=>"User", :min_occurs=>0, :name=>:user, :max_occurs=>1}], :output=>{:fields=>[{:type=>"User", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"update_user_response"}}}
|
11
|
+
USERSERVICE_TYPES = {:Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:query, :max_occurs=>1}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :name=>:values, :max_occurs=>:unbounded}]}, :UserRecord=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:id, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:email, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:role_id, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:role_name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:preferred_locale, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:user_record_type, :max_occurs=>1}]}, :UpdateResult=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:num_changes, :max_occurs=>1}]}, :ActivateUsers=>{:base=>"UserAction", :fields=>[]}, :UserPage=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:total_result_set_size, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:start_index, :max_occurs=>1}, {:type=>"User", :min_occurs=>0, :name=>:results, :max_occurs=>:unbounded}]}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:key, :max_occurs=>1}, {:type=>"Value", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :NumberValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :DeactivateUsers=>{:base=>"UserAction", :fields=>[]}, :Value=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value_type, :max_occurs=>1}]}, :Role=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:id, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:description, :max_occurs=>1}]}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:auth_token, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:network_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:application_name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:o_auth_token, :max_occurs=>1}]}, :UserAction=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:user_action_type, :max_occurs=>1}]}, :BooleanValue=>{:base=>"Value", :fields=>[{:type=>"boolean", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :TextValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :User=>{:base=>"UserRecord", :fields=>[{:type=>"boolean", :min_occurs=>0, :name=>:is_active, :max_occurs=>1}, {:type=>"boolean", :min_occurs=>0, :name=>:is_email_notification_allowed, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:request_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:response_time, :max_occurs=>1}]}}
|
12
|
+
USERSERVICE_NAMESPACES = []
|
12
13
|
|
13
14
|
def self.get_method_signature(method_name)
|
14
15
|
return USERSERVICE_METHODS[method_name.to_sym]
|
@@ -17,6 +18,10 @@ module DfpApi; module V201101; module UserService
|
|
17
18
|
def self.get_type_signature(type_name)
|
18
19
|
return USERSERVICE_TYPES[type_name.to_sym]
|
19
20
|
end
|
21
|
+
|
22
|
+
def self.get_namespace(index)
|
23
|
+
return USERSERVICE_NAMESPACES[index]
|
24
|
+
end
|
20
25
|
end
|
21
26
|
|
22
27
|
# Base class for exceptions.
|
@@ -29,7 +34,7 @@ module DfpApi; module V201101; module UserService
|
|
29
34
|
class ApiException < ApplicationException
|
30
35
|
attr_reader :errors # ApiError
|
31
36
|
def initialize(exception_fault)
|
32
|
-
@array_fields
|
37
|
+
@array_fields ||= []
|
33
38
|
@array_fields << 'errors'
|
34
39
|
super(exception_fault)
|
35
40
|
end
|