Module: Google::Ads::GoogleAds::Factories
- Defined in:
- lib/google/ads/google_ads/factories.rb,
lib/google/ads/google_ads/factories/v15/enums.rb,
lib/google/ads/google_ads/factories/v16/enums.rb,
lib/google/ads/google_ads/factories/v17/enums.rb,
lib/google/ads/google_ads/factories/v15/services.rb,
lib/google/ads/google_ads/factories/v16/services.rb,
lib/google/ads/google_ads/factories/v17/services.rb,
lib/google/ads/google_ads/factories/v15/resources.rb,
lib/google/ads/google_ads/factories/v16/resources.rb,
lib/google/ads/google_ads/factories/v17/resources.rb,
lib/google/ads/google_ads/factories/v15/operations.rb,
lib/google/ads/google_ads/factories/v16/operations.rb,
lib/google/ads/google_ads/factories/v17/operations.rb
Defined Under Namespace
Modules: V15, V16, V17
Classes: Factory
Constant Summary
collapse
- FACTORY_V15 =
Factory.new(
V15::Resources,
V15::Services,
V15::Enums,
V15::Operations
).freeze
- FACTORY_V16 =
Factory.new(
V16::Resources,
V16::Services,
V16::Enums,
V16::Operations
).freeze
- FACTORY_V17 =
Factory.new(
V17::Resources,
V17::Services,
V17::Enums,
V17::Operations
).freeze
- VERSIONS =
[
:V15,
:V16,
:V17
]
- HIGHEST_VERSION =
:V17
Class Method Summary
collapse
Class Method Details
.at_version(version) ⇒ Object
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
# File 'lib/google/ads/google_ads/factories.rb', line 81
def self.at_version(version)
case version
when :V15
FACTORY_V15
when :V16
FACTORY_V16
when :V17
FACTORY_V17
else
raise ArgumentError.new("Got unkown version: #{version}")
end
end
|
.version_alternate_for(type) ⇒ Object
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# File 'lib/google/ads/google_ads/factories.rb', line 57
def self.version_alternate_for(type)
unless [:resources, :services, :enums, :operations].include?(type)
raise ArgumentError.new(
"Dont have version alternate for #{type}, valid values are :resources, :services, :enums, :operations, got #{type}"
)
end
VersionAlternate.new(
FACTORY_V17.public_send(type),
{
V15: FACTORY_V15.public_send(type),
V16: FACTORY_V16.public_send(type),
V17: FACTORY_V17.public_send(type)
}
)
end
|
.versions ⇒ Object
78
79
|
# File 'lib/google/ads/google_ads/factories.rb', line 78
def self.versions
end
|