google-ads-ad_manager 2.1.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 344598a164a5a71954fd4259982f857776c1058db303b75a2d41c54a4f535552
4
- data.tar.gz: 7c33a172b805afaeed52c491856d95314ea8fb99f5412daf607396f30324012f
3
+ metadata.gz: 402cc23aa7d0147aeb5d2363ed5fdb32a3ed2ed907c3d4512f1c67f483cc8b12
4
+ data.tar.gz: f7b286a5d0c2db4097f586d630f87182b0059577c883f2cb04e0df3907e3bf0d
5
5
  SHA512:
6
- metadata.gz: 8d45256bdaef6eb74827b02584804451bf290de7419aea8bea58a508550dd8871a90e6337c56c14795db7f53d0a13ec49699a8f3177d52c45d0ddf07f609381e
7
- data.tar.gz: f7811fb68a3727a2b43b63a492f61056c2db3da7cc5dce9738fb9e05b440621203732cef7b3328a6e696f8a6f35b6b427734302d3d6731df64afb4ba3d701ce4
6
+ metadata.gz: ad01f7ff205aab4a6069aa0596aa4e8b18f7515e44ab692bf6ced5aeb9e0ac1c6642c98b3aa39386130c459996e0a3595a47af609ced875f7c4ab9933127fbb2
7
+ data.tar.gz: cf779a655739b20bc279cff50145dc2e3416d8014231923268538c3d19e930c8bd35ef09d9f3cfc84a993d7eb3c82481ce6de70c383eed5fab5eca33bcf6d1ac
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Ads
22
22
  module AdManager
23
- VERSION = "2.1.0"
23
+ VERSION = "3.0.0"
24
24
  end
25
25
  end
26
26
  end
@@ -1539,6 +1539,69 @@ module Google
1539
1539
  false
1540
1540
  end
1541
1541
 
1542
+ ##
1543
+ # Create a new client object for LineItemService.
1544
+ #
1545
+ # By default, this returns an instance of
1546
+ # [Google::Ads::AdManager::V1::LineItemService::Rest::Client](https://rubydoc.info/gems/google-ads-ad_manager-v1/Google/Ads/AdManager/V1/LineItemService/Rest/Client)
1547
+ # for a REST client for version V1 of the API.
1548
+ # However, you can specify a different API version by passing it in the
1549
+ # `version` parameter. If the LineItemService service is
1550
+ # supported by that API version, and the corresponding gem is available, the
1551
+ # appropriate versioned client will be returned.
1552
+ #
1553
+ # Raises an exception if the currently installed versioned client gem for the
1554
+ # given API version does not support the LineItemService service.
1555
+ # You can determine whether the method will succeed by calling
1556
+ # {Google::Ads::AdManager.line_item_service_available?}.
1557
+ #
1558
+ # ## About LineItemService
1559
+ #
1560
+ # Provides methods for handling `LineItem` objects.
1561
+ #
1562
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
1563
+ # Defaults to `:v1`.
1564
+ # @return [::Object] A client object for the specified version.
1565
+ #
1566
+ def self.line_item_service version: :v1, &block
1567
+ require "google/ads/ad_manager/#{version.to_s.downcase}"
1568
+
1569
+ package_name = Google::Ads::AdManager
1570
+ .constants
1571
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
1572
+ .first
1573
+ service_module = Google::Ads::AdManager.const_get(package_name).const_get(:LineItemService)
1574
+ service_module.const_get(:Rest).const_get(:Client).new(&block)
1575
+ end
1576
+
1577
+ ##
1578
+ # Determines whether the LineItemService service is supported by the current client.
1579
+ # If true, you can retrieve a client object by calling {Google::Ads::AdManager.line_item_service}.
1580
+ # If false, that method will raise an exception. This could happen if the given
1581
+ # API version does not exist or does not support the LineItemService service,
1582
+ # or if the versioned client gem needs an update to support the LineItemService service.
1583
+ #
1584
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
1585
+ # Defaults to `:v1`.
1586
+ # @return [boolean] Whether the service is available.
1587
+ #
1588
+ def self.line_item_service_available? version: :v1
1589
+ require "google/ads/ad_manager/#{version.to_s.downcase}"
1590
+ package_name = Google::Ads::AdManager
1591
+ .constants
1592
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
1593
+ .first
1594
+ return false unless package_name
1595
+ service_module = Google::Ads::AdManager.const_get package_name
1596
+ return false unless service_module.const_defined? :LineItemService
1597
+ service_module = service_module.const_get :LineItemService
1598
+ return false unless service_module.const_defined? :Rest
1599
+ service_module = service_module.const_get :Rest
1600
+ service_module.const_defined? :Client
1601
+ rescue ::LoadError
1602
+ false
1603
+ end
1604
+
1542
1605
  ##
1543
1606
  # Create a new client object for MobileCarrierService.
1544
1607
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-ads-ad_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC