Class: Zernio::GetAdAccountHierarchy200ResponseRootsInner
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Zernio::GetAdAccountHierarchy200ResponseRootsInner
- Defined in:
- lib/zernio-sdk/models/get_ad_account_hierarchy200_response_roots_inner.rb
Instance Attribute Summary collapse
-
#clients ⇒ Object
Every account under this root at any depth, in Google's order, followed by pending invitations.
-
#currency ⇒ Object
ISO 4217 code.
-
#customer_id ⇒ Object
Native Google Ads customer id, digits only.
-
#manager ⇒ Object
True for a manager (MCC) account.
-
#manager_links ⇒ Object
Managers linked to this account, ACTIVE or PENDING.
-
#name ⇒ Object
Returns the value of attribute name.
-
#status ⇒ Object
Google customer status: ENABLED, CANCELED, SUSPENDED or CLOSED.
-
#test_account ⇒ Object
Returns the value of attribute test_account.
-
#time_zone ⇒ Object
IANA time zone, e.g.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ GetAdAccountHierarchy200ResponseRootsInner
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ GetAdAccountHierarchy200ResponseRootsInner
Initializes the object
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/zernio-sdk/models/get_ad_account_hierarchy200_response_roots_inner.rb', line 95 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetAdAccountHierarchy200ResponseRootsInner` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetAdAccountHierarchy200ResponseRootsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'customer_id') self.customer_id = attributes[:'customer_id'] end if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'currency') self.currency = attributes[:'currency'] end if attributes.key?(:'time_zone') self.time_zone = attributes[:'time_zone'] end if attributes.key?(:'manager') self.manager = attributes[:'manager'] end if attributes.key?(:'test_account') self.test_account = attributes[:'test_account'] end if attributes.key?(:'status') self.status = attributes[:'status'] end if attributes.key?(:'manager_links') if (value = attributes[:'manager_links']).is_a?(Array) self.manager_links = value end end if attributes.key?(:'clients') if (value = attributes[:'clients']).is_a?(Array) self.clients = value end end end |
Instance Attribute Details
#clients ⇒ Object
Every account under this root at any depth, in Google's order, followed by pending invitations.
41 42 43 |
# File 'lib/zernio-sdk/models/get_ad_account_hierarchy200_response_roots_inner.rb', line 41 def clients @clients end |
#currency ⇒ Object
ISO 4217 code.
24 25 26 |
# File 'lib/zernio-sdk/models/get_ad_account_hierarchy200_response_roots_inner.rb', line 24 def currency @currency end |
#customer_id ⇒ Object
Native Google Ads customer id, digits only.
19 20 21 |
# File 'lib/zernio-sdk/models/get_ad_account_hierarchy200_response_roots_inner.rb', line 19 def customer_id @customer_id end |
#manager ⇒ Object
True for a manager (MCC) account.
30 31 32 |
# File 'lib/zernio-sdk/models/get_ad_account_hierarchy200_response_roots_inner.rb', line 30 def manager @manager end |
#manager_links ⇒ Object
Managers linked to this account, ACTIVE or PENDING.
38 39 40 |
# File 'lib/zernio-sdk/models/get_ad_account_hierarchy200_response_roots_inner.rb', line 38 def manager_links @manager_links end |
#name ⇒ Object
Returns the value of attribute name.
21 22 23 |
# File 'lib/zernio-sdk/models/get_ad_account_hierarchy200_response_roots_inner.rb', line 21 def name @name end |
#status ⇒ Object
Google customer status: ENABLED, CANCELED, SUSPENDED or CLOSED.
35 36 37 |
# File 'lib/zernio-sdk/models/get_ad_account_hierarchy200_response_roots_inner.rb', line 35 def status @status end |
#test_account ⇒ Object
Returns the value of attribute test_account.
32 33 34 |
# File 'lib/zernio-sdk/models/get_ad_account_hierarchy200_response_roots_inner.rb', line 32 def test_account @test_account end |
#time_zone ⇒ Object
IANA time zone, e.g. Europe/Madrid.
27 28 29 |
# File 'lib/zernio-sdk/models/get_ad_account_hierarchy200_response_roots_inner.rb', line 27 def time_zone @time_zone end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
59 60 61 |
# File 'lib/zernio-sdk/models/get_ad_account_hierarchy200_response_roots_inner.rb', line 59 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
64 65 66 |
# File 'lib/zernio-sdk/models/get_ad_account_hierarchy200_response_roots_inner.rb', line 64 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/zernio-sdk/models/get_ad_account_hierarchy200_response_roots_inner.rb', line 44 def self.attribute_map { :'customer_id' => :'customerId', :'name' => :'name', :'currency' => :'currency', :'time_zone' => :'timeZone', :'manager' => :'manager', :'test_account' => :'testAccount', :'status' => :'status', :'manager_links' => :'managerLinks', :'clients' => :'clients' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 |
# File 'lib/zernio-sdk/models/get_ad_account_hierarchy200_response_roots_inner.rb', line 196 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
84 85 86 87 88 89 90 91 |
# File 'lib/zernio-sdk/models/get_ad_account_hierarchy200_response_roots_inner.rb', line 84 def self.openapi_nullable Set.new([ :'name', :'currency', :'time_zone', :'status', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/zernio-sdk/models/get_ad_account_hierarchy200_response_roots_inner.rb', line 69 def self.openapi_types { :'customer_id' => :'String', :'name' => :'String', :'currency' => :'String', :'time_zone' => :'String', :'manager' => :'Boolean', :'test_account' => :'Boolean', :'status' => :'String', :'manager_links' => :'Array<GetAdAccountHierarchy200ResponseRootsInnerManagerLinksInner>', :'clients' => :'Array<GoogleAdsHierarchyClient>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
167 168 169 170 171 172 173 174 175 176 177 178 179 |
# File 'lib/zernio-sdk/models/get_ad_account_hierarchy200_response_roots_inner.rb', line 167 def ==(o) return true if self.equal?(o) self.class == o.class && customer_id == o.customer_id && name == o.name && currency == o.currency && time_zone == o.time_zone && manager == o.manager && test_account == o.test_account && status == o.status && manager_links == o.manager_links && clients == o.clients end |
#eql?(o) ⇒ Boolean
183 184 185 |
# File 'lib/zernio-sdk/models/get_ad_account_hierarchy200_response_roots_inner.rb', line 183 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
189 190 191 |
# File 'lib/zernio-sdk/models/get_ad_account_hierarchy200_response_roots_inner.rb', line 189 def hash [customer_id, name, currency, time_zone, manager, test_account, status, manager_links, clients].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
152 153 154 155 156 |
# File 'lib/zernio-sdk/models/get_ad_account_hierarchy200_response_roots_inner.rb', line 152 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
218 219 220 221 222 223 224 225 226 227 228 229 230 |
# File 'lib/zernio-sdk/models/get_ad_account_hierarchy200_response_roots_inner.rb', line 218 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
160 161 162 163 |
# File 'lib/zernio-sdk/models/get_ad_account_hierarchy200_response_roots_inner.rb', line 160 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' true end |