Class: Google::Ads::AdManager::V1::OrderService::Rest::Client
- Inherits:
-
Object
- Object
- Google::Ads::AdManager::V1::OrderService::Rest::Client
- Includes:
- Paths
- Defined in:
- lib/google/ads/ad_manager/v1/order_service/rest/client.rb
Overview
REST client for the OrderService service.
Provides methods for handling Order objects.
Defined Under Namespace
Classes: Configuration
Class Method Summary collapse
-
.configure {|config| ... } ⇒ Client::Configuration
Configure the OrderService Client class.
Instance Method Summary collapse
-
#batch_approve_and_overbook_orders(request, options = nil) {|result, operation| ... } ⇒ ::Google::Ads::AdManager::V1::BatchApproveAndOverbookOrdersResponse
Approves and overbooks a list of
Orderobjects. -
#batch_approve_orders(request, options = nil) {|result, operation| ... } ⇒ ::Google::Ads::AdManager::V1::BatchApproveOrdersResponse
Approves a list of
Orderobjects. -
#batch_approve_orders_without_reservation(request, options = nil) {|result, operation| ... } ⇒ ::Google::Ads::AdManager::V1::BatchApproveOrdersWithoutReservationResponse
Approves a list of
Orderobjects without changing reservation status. -
#batch_archive_orders(request, options = nil) {|result, operation| ... } ⇒ ::Google::Ads::AdManager::V1::BatchArchiveOrdersResponse
Archives a list of
Orderobjects. -
#batch_create_orders(request, options = nil) {|result, operation| ... } ⇒ ::Google::Ads::AdManager::V1::BatchCreateOrdersResponse
Creates
Orderobjects. -
#batch_delete_orders(request, options = nil) {|result, operation| ... } ⇒ ::Google::Ads::AdManager::V1::BatchDeleteOrdersResponse
Deletes a list of
Orderobjects. -
#batch_disapprove_orders(request, options = nil) {|result, operation| ... } ⇒ ::Google::Ads::AdManager::V1::BatchDisapproveOrdersResponse
Disapproves a list of
Orderobjects. -
#batch_disapprove_orders_without_reservation_changes(request, options = nil) {|result, operation| ... } ⇒ ::Google::Ads::AdManager::V1::BatchDisapproveOrdersWithoutReservationChangesResponse
Disapproves a list of
Orderobjects without changing reservation status. -
#batch_pause_orders(request, options = nil) {|result, operation| ... } ⇒ ::Google::Ads::AdManager::V1::BatchPauseOrdersResponse
Pauses a list of
Orderobjects. -
#batch_resume_and_overbook_orders(request, options = nil) {|result, operation| ... } ⇒ ::Google::Ads::AdManager::V1::BatchResumeAndOverbookOrdersResponse
Resumes and overbooks a list of
Orderobjects. -
#batch_resume_orders(request, options = nil) {|result, operation| ... } ⇒ ::Google::Ads::AdManager::V1::BatchResumeOrdersResponse
Resumes a list of
Orderobjects. -
#batch_retract_orders(request, options = nil) {|result, operation| ... } ⇒ ::Google::Ads::AdManager::V1::BatchRetractOrdersResponse
Retracts a list of
Orderobjects. -
#batch_retract_orders_without_reservation_changes(request, options = nil) {|result, operation| ... } ⇒ ::Google::Ads::AdManager::V1::BatchRetractOrdersWithoutReservationChangesResponse
Retracts a list of
Orderobjects without changing reservation status. -
#batch_submit_orders_for_approval(request, options = nil) {|result, operation| ... } ⇒ ::Google::Ads::AdManager::V1::BatchSubmitOrdersForApprovalResponse
Submits a list of
Orderobjects for approval. -
#batch_submit_orders_for_approval_and_overbook(request, options = nil) {|result, operation| ... } ⇒ ::Google::Ads::AdManager::V1::BatchSubmitOrdersForApprovalAndOverbookResponse
Submits and overbooks a list of
Orderobjects for approval. -
#batch_submit_orders_for_approval_without_reservation_changes(request, options = nil) {|result, operation| ... } ⇒ ::Google::Ads::AdManager::V1::BatchSubmitOrdersForApprovalWithoutReservationChangesResponse
Submits a list of
Orderobjects for approval without changing reservation status. -
#batch_unarchive_orders(request, options = nil) {|result, operation| ... } ⇒ ::Google::Ads::AdManager::V1::BatchUnarchiveOrdersResponse
Unarchives a list of
Orderobjects. -
#batch_update_orders(request, options = nil) {|result, operation| ... } ⇒ ::Google::Ads::AdManager::V1::BatchUpdateOrdersResponse
Batch updates
Orderobjects. -
#configure {|config| ... } ⇒ Client::Configuration
Configure the OrderService Client instance.
-
#get_order(request, options = nil) {|result, operation| ... } ⇒ ::Google::Ads::AdManager::V1::Order
Retrieves an
Orderobject. -
#initialize {|config| ... } ⇒ Client
constructor
Create a new OrderService REST client object.
-
#list_orders(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Ads::AdManager::V1::Order>
Lists
Orderobjects. -
#logger ⇒ Logger
The logger used for request/response debug logging.
-
#universe_domain ⇒ String
The effective universe domain.
Methods included from Paths
#company_path, #contact_path, #custom_field_path, #label_path, #network_path, #order_path, #team_path, #user_path
Constructor Details
#initialize {|config| ... } ⇒ Client
Create a new OrderService REST client object.
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/google/ads/ad_manager/v1/order_service/rest/client.rb', line 131 def initialize # Create the configuration object @config = Configuration.new Client.configure # Yield the configuration if needed yield @config if block_given? # Create credentials credentials = @config.credentials # Use self-signed JWT if the endpoint is unchanged from default, # but only if the default endpoint does not have a region prefix. enable_self_signed_jwt = @config.endpoint.nil? || (@config.endpoint == Configuration::DEFAULT_ENDPOINT && !@config.endpoint.split(".").first.include?("-")) credentials ||= Credentials.default scope: @config.scope, enable_self_signed_jwt: enable_self_signed_jwt if credentials.is_a?(::String) || credentials.is_a?(::Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id @order_service_stub = ::Google::Ads::AdManager::V1::OrderService::Rest::ServiceStub.new( endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, credentials: credentials, logger: @config.logger ) @order_service_stub.logger(stub: true)&.info do |entry| entry.set_system_name entry.set_service entry. = "Created client for #{entry.service}" entry.set_credentials_fields credentials entry.set "customEndpoint", @config.endpoint if @config.endpoint entry.set "defaultTimeout", @config.timeout if @config.timeout entry.set "quotaProject", @quota_project_id if @quota_project_id end end |
Class Method Details
.configure {|config| ... } ⇒ Client::Configuration
Configure the OrderService Client class.
See Configuration for a description of the configuration fields.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/google/ads/ad_manager/v1/order_service/rest/client.rb', line 64 def self.configure @configure ||= begin namespace = ["Google", "Ads", "AdManager", "V1"] parent_config = while namespace.any? parent_name = namespace.join "::" parent_const = const_get parent_name break parent_const.configure if parent_const.respond_to? :configure namespace.pop end default_config = Client::Configuration.new parent_config default_config.timeout = 60.0 default_config.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config end yield @configure if block_given? @configure end |
Instance Method Details
#batch_approve_and_overbook_orders(request, options = nil) ⇒ ::Google::Ads::AdManager::V1::BatchApproveAndOverbookOrdersResponse #batch_approve_and_overbook_orders(parent: nil, names: nil, skip_inventory_check: nil) ⇒ ::Google::Ads::AdManager::V1::BatchApproveAndOverbookOrdersResponse
Approves and overbooks a list of Order objects.
703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 |
# File 'lib/google/ads/ad_manager/v1/order_service/rest/client.rb', line 703 def batch_approve_and_overbook_orders request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::BatchApproveAndOverbookOrdersRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.batch_approve_and_overbook_orders..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Ads::AdManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.batch_approve_and_overbook_orders.timeout, metadata: , retry_policy: @config.rpcs.batch_approve_and_overbook_orders.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @order_service_stub.batch_approve_and_overbook_orders request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#batch_approve_orders(request, options = nil) ⇒ ::Google::Ads::AdManager::V1::BatchApproveOrdersResponse #batch_approve_orders(parent: nil, names: nil, skip_inventory_check: nil) ⇒ ::Google::Ads::AdManager::V1::BatchApproveOrdersResponse
Approves a list of Order objects.
618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 |
# File 'lib/google/ads/ad_manager/v1/order_service/rest/client.rb', line 618 def batch_approve_orders request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::BatchApproveOrdersRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.batch_approve_orders..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Ads::AdManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.batch_approve_orders.timeout, metadata: , retry_policy: @config.rpcs.batch_approve_orders.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @order_service_stub.batch_approve_orders request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#batch_approve_orders_without_reservation(request, options = nil) ⇒ ::Google::Ads::AdManager::V1::BatchApproveOrdersWithoutReservationResponse #batch_approve_orders_without_reservation(parent: nil, names: nil) ⇒ ::Google::Ads::AdManager::V1::BatchApproveOrdersWithoutReservationResponse
Approves a list of Order objects without changing reservation status.
1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 |
# File 'lib/google/ads/ad_manager/v1/order_service/rest/client.rb', line 1283 def batch_approve_orders_without_reservation request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::BatchApproveOrdersWithoutReservationRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.batch_approve_orders_without_reservation..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Ads::AdManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.batch_approve_orders_without_reservation.timeout, metadata: , retry_policy: @config.rpcs.batch_approve_orders_without_reservation.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @order_service_stub.batch_approve_orders_without_reservation request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#batch_archive_orders(request, options = nil) ⇒ ::Google::Ads::AdManager::V1::BatchArchiveOrdersResponse #batch_archive_orders(parent: nil, names: nil) ⇒ ::Google::Ads::AdManager::V1::BatchArchiveOrdersResponse
Archives a list of Order objects.
1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 |
# File 'lib/google/ads/ad_manager/v1/order_service/rest/client.rb', line 1365 def batch_archive_orders request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::BatchArchiveOrdersRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.batch_archive_orders..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Ads::AdManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.batch_archive_orders.timeout, metadata: , retry_policy: @config.rpcs.batch_archive_orders.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @order_service_stub.batch_archive_orders request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#batch_create_orders(request, options = nil) ⇒ ::Google::Ads::AdManager::V1::BatchCreateOrdersResponse #batch_create_orders(parent: nil, requests: nil) ⇒ ::Google::Ads::AdManager::V1::BatchCreateOrdersResponse
Creates Order objects.
449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 |
# File 'lib/google/ads/ad_manager/v1/order_service/rest/client.rb', line 449 def batch_create_orders request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::BatchCreateOrdersRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.batch_create_orders..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Ads::AdManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.batch_create_orders.timeout, metadata: , retry_policy: @config.rpcs.batch_create_orders.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @order_service_stub.batch_create_orders request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#batch_delete_orders(request, options = nil) ⇒ ::Google::Ads::AdManager::V1::BatchDeleteOrdersResponse #batch_delete_orders(parent: nil, names: nil) ⇒ ::Google::Ads::AdManager::V1::BatchDeleteOrdersResponse
Deletes a list of Order objects.
1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 |
# File 'lib/google/ads/ad_manager/v1/order_service/rest/client.rb', line 1529 def batch_delete_orders request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::BatchDeleteOrdersRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.batch_delete_orders..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Ads::AdManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.batch_delete_orders.timeout, metadata: , retry_policy: @config.rpcs.batch_delete_orders.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @order_service_stub.batch_delete_orders request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#batch_disapprove_orders(request, options = nil) ⇒ ::Google::Ads::AdManager::V1::BatchDisapproveOrdersResponse #batch_disapprove_orders(parent: nil, names: nil) ⇒ ::Google::Ads::AdManager::V1::BatchDisapproveOrdersResponse
Disapproves a list of Order objects.
1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 |
# File 'lib/google/ads/ad_manager/v1/order_service/rest/client.rb', line 1611 def batch_disapprove_orders request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::BatchDisapproveOrdersRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.batch_disapprove_orders..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Ads::AdManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.batch_disapprove_orders.timeout, metadata: , retry_policy: @config.rpcs.batch_disapprove_orders.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @order_service_stub.batch_disapprove_orders request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#batch_disapprove_orders_without_reservation_changes(request, options = nil) ⇒ ::Google::Ads::AdManager::V1::BatchDisapproveOrdersWithoutReservationChangesResponse #batch_disapprove_orders_without_reservation_changes(parent: nil, names: nil) ⇒ ::Google::Ads::AdManager::V1::BatchDisapproveOrdersWithoutReservationChangesResponse
Disapproves a list of Order objects without changing reservation status.
1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 |
# File 'lib/google/ads/ad_manager/v1/order_service/rest/client.rb', line 1693 def batch_disapprove_orders_without_reservation_changes request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::BatchDisapproveOrdersWithoutReservationChangesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.batch_disapprove_orders_without_reservation_changes..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Ads::AdManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.batch_disapprove_orders_without_reservation_changes.timeout, metadata: , retry_policy: @config.rpcs.batch_disapprove_orders_without_reservation_changes.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @order_service_stub.batch_disapprove_orders_without_reservation_changes request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#batch_pause_orders(request, options = nil) ⇒ ::Google::Ads::AdManager::V1::BatchPauseOrdersResponse #batch_pause_orders(parent: nil, names: nil) ⇒ ::Google::Ads::AdManager::V1::BatchPauseOrdersResponse
Pauses a list of Order objects.
1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 |
# File 'lib/google/ads/ad_manager/v1/order_service/rest/client.rb', line 1034 def batch_pause_orders request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::BatchPauseOrdersRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.batch_pause_orders..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Ads::AdManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.batch_pause_orders.timeout, metadata: , retry_policy: @config.rpcs.batch_pause_orders.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @order_service_stub.batch_pause_orders request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#batch_resume_and_overbook_orders(request, options = nil) ⇒ ::Google::Ads::AdManager::V1::BatchResumeAndOverbookOrdersResponse #batch_resume_and_overbook_orders(parent: nil, names: nil) ⇒ ::Google::Ads::AdManager::V1::BatchResumeAndOverbookOrdersResponse
Resumes and overbooks a list of Order objects.
1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 |
# File 'lib/google/ads/ad_manager/v1/order_service/rest/client.rb', line 1201 def batch_resume_and_overbook_orders request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::BatchResumeAndOverbookOrdersRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.batch_resume_and_overbook_orders..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Ads::AdManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.batch_resume_and_overbook_orders.timeout, metadata: , retry_policy: @config.rpcs.batch_resume_and_overbook_orders.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @order_service_stub.batch_resume_and_overbook_orders request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#batch_resume_orders(request, options = nil) ⇒ ::Google::Ads::AdManager::V1::BatchResumeOrdersResponse #batch_resume_orders(parent: nil, names: nil, skip_inventory_check: nil) ⇒ ::Google::Ads::AdManager::V1::BatchResumeOrdersResponse
Resumes a list of Order objects.
1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 |
# File 'lib/google/ads/ad_manager/v1/order_service/rest/client.rb', line 1119 def batch_resume_orders request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::BatchResumeOrdersRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.batch_resume_orders..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Ads::AdManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.batch_resume_orders.timeout, metadata: , retry_policy: @config.rpcs.batch_resume_orders.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @order_service_stub.batch_resume_orders request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#batch_retract_orders(request, options = nil) ⇒ ::Google::Ads::AdManager::V1::BatchRetractOrdersResponse #batch_retract_orders(parent: nil, names: nil) ⇒ ::Google::Ads::AdManager::V1::BatchRetractOrdersResponse
Retracts a list of Order objects.
1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 |
# File 'lib/google/ads/ad_manager/v1/order_service/rest/client.rb', line 1775 def batch_retract_orders request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::BatchRetractOrdersRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.batch_retract_orders..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Ads::AdManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.batch_retract_orders.timeout, metadata: , retry_policy: @config.rpcs.batch_retract_orders.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @order_service_stub.batch_retract_orders request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#batch_retract_orders_without_reservation_changes(request, options = nil) ⇒ ::Google::Ads::AdManager::V1::BatchRetractOrdersWithoutReservationChangesResponse #batch_retract_orders_without_reservation_changes(parent: nil, names: nil) ⇒ ::Google::Ads::AdManager::V1::BatchRetractOrdersWithoutReservationChangesResponse
Retracts a list of Order objects without changing reservation status.
1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 |
# File 'lib/google/ads/ad_manager/v1/order_service/rest/client.rb', line 1857 def batch_retract_orders_without_reservation_changes request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::BatchRetractOrdersWithoutReservationChangesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.batch_retract_orders_without_reservation_changes..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Ads::AdManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.batch_retract_orders_without_reservation_changes.timeout, metadata: , retry_policy: @config.rpcs.batch_retract_orders_without_reservation_changes.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @order_service_stub.batch_retract_orders_without_reservation_changes request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#batch_submit_orders_for_approval(request, options = nil) ⇒ ::Google::Ads::AdManager::V1::BatchSubmitOrdersForApprovalResponse #batch_submit_orders_for_approval(parent: nil, names: nil, skip_inventory_check: nil) ⇒ ::Google::Ads::AdManager::V1::BatchSubmitOrdersForApprovalResponse
Submits a list of Order objects for approval.
788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 |
# File 'lib/google/ads/ad_manager/v1/order_service/rest/client.rb', line 788 def batch_submit_orders_for_approval request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::BatchSubmitOrdersForApprovalRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.batch_submit_orders_for_approval..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Ads::AdManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.batch_submit_orders_for_approval.timeout, metadata: , retry_policy: @config.rpcs.batch_submit_orders_for_approval.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @order_service_stub.batch_submit_orders_for_approval request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#batch_submit_orders_for_approval_and_overbook(request, options = nil) ⇒ ::Google::Ads::AdManager::V1::BatchSubmitOrdersForApprovalAndOverbookResponse #batch_submit_orders_for_approval_and_overbook(parent: nil, names: nil) ⇒ ::Google::Ads::AdManager::V1::BatchSubmitOrdersForApprovalAndOverbookResponse
Submits and overbooks a list of Order objects for approval.
869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 |
# File 'lib/google/ads/ad_manager/v1/order_service/rest/client.rb', line 869 def batch_submit_orders_for_approval_and_overbook request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::BatchSubmitOrdersForApprovalAndOverbookRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.batch_submit_orders_for_approval_and_overbook..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Ads::AdManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.batch_submit_orders_for_approval_and_overbook.timeout, metadata: , retry_policy: @config.rpcs.batch_submit_orders_for_approval_and_overbook.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @order_service_stub.batch_submit_orders_for_approval_and_overbook request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#batch_submit_orders_for_approval_without_reservation_changes(request, options = nil) ⇒ ::Google::Ads::AdManager::V1::BatchSubmitOrdersForApprovalWithoutReservationChangesResponse #batch_submit_orders_for_approval_without_reservation_changes(parent: nil, names: nil) ⇒ ::Google::Ads::AdManager::V1::BatchSubmitOrdersForApprovalWithoutReservationChangesResponse
Submits a list of Order objects for approval without changing reservation
status.
952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 |
# File 'lib/google/ads/ad_manager/v1/order_service/rest/client.rb', line 952 def batch_submit_orders_for_approval_without_reservation_changes request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::BatchSubmitOrdersForApprovalWithoutReservationChangesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.batch_submit_orders_for_approval_without_reservation_changes..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Ads::AdManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.batch_submit_orders_for_approval_without_reservation_changes.timeout, metadata: , retry_policy: @config.rpcs.batch_submit_orders_for_approval_without_reservation_changes.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @order_service_stub.batch_submit_orders_for_approval_without_reservation_changes request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#batch_unarchive_orders(request, options = nil) ⇒ ::Google::Ads::AdManager::V1::BatchUnarchiveOrdersResponse #batch_unarchive_orders(parent: nil, names: nil) ⇒ ::Google::Ads::AdManager::V1::BatchUnarchiveOrdersResponse
Unarchives a list of Order objects.
1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 |
# File 'lib/google/ads/ad_manager/v1/order_service/rest/client.rb', line 1447 def batch_unarchive_orders request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::BatchUnarchiveOrdersRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.batch_unarchive_orders..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Ads::AdManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.batch_unarchive_orders.timeout, metadata: , retry_policy: @config.rpcs.batch_unarchive_orders.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @order_service_stub.batch_unarchive_orders request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#batch_update_orders(request, options = nil) ⇒ ::Google::Ads::AdManager::V1::BatchUpdateOrdersResponse #batch_update_orders(parent: nil, requests: nil) ⇒ ::Google::Ads::AdManager::V1::BatchUpdateOrdersResponse
Batch updates Order objects.
533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 |
# File 'lib/google/ads/ad_manager/v1/order_service/rest/client.rb', line 533 def batch_update_orders request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::BatchUpdateOrdersRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.batch_update_orders..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Ads::AdManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.batch_update_orders.timeout, metadata: , retry_policy: @config.rpcs.batch_update_orders.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @order_service_stub.batch_update_orders request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#configure {|config| ... } ⇒ Client::Configuration
Configure the OrderService Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on configure.
See Configuration for a description of the configuration fields.
101 102 103 104 |
# File 'lib/google/ads/ad_manager/v1/order_service/rest/client.rb', line 101 def configure yield @config if block_given? @config end |
#get_order(request, options = nil) ⇒ ::Google::Ads::AdManager::V1::Order #get_order(name: nil) ⇒ ::Google::Ads::AdManager::V1::Order
Retrieves an Order object.
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 |
# File 'lib/google/ads/ad_manager/v1/order_service/rest/client.rb', line 228 def get_order request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::GetOrderRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_order..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Ads::AdManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_order.timeout, metadata: , retry_policy: @config.rpcs.get_order.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @order_service_stub.get_order request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_orders(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Ads::AdManager::V1::Order> #list_orders(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, skip: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Ads::AdManager::V1::Order>
Lists Order objects.
Fields used for literal matching in filter string:
order_iddisplay_nameexternal_order_id
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 |
# File 'lib/google/ads/ad_manager/v1/order_service/rest/client.rb', line 363 def list_orders request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::AdManager::V1::ListOrdersRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_orders..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Ads::AdManager::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_orders.timeout, metadata: , retry_policy: @config.rpcs.list_orders.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @order_service_stub.list_orders request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @order_service_stub, :list_orders, "orders", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#logger ⇒ Logger
The logger used for request/response debug logging.
178 179 180 |
# File 'lib/google/ads/ad_manager/v1/order_service/rest/client.rb', line 178 def logger @order_service_stub.logger end |
#universe_domain ⇒ String
The effective universe domain
111 112 113 |
# File 'lib/google/ads/ad_manager/v1/order_service/rest/client.rb', line 111 def universe_domain @order_service_stub.universe_domain end |