Class: Google::Apis::MerchantapiAccountsV1beta::Account

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/merchantapi_accounts_v1beta/classes.rb,
lib/google/apis/merchantapi_accounts_v1beta/representations.rb,
lib/google/apis/merchantapi_accounts_v1beta/representations.rb

Overview

The Account message represents a business's account within Merchant Center. It's the primary entity for managing product data, settings, and interactions with Google's services and external providers. Accounts can operate as standalone entities or be part of a advanced account structure. In an advanced account setup the parent account manages multiple sub-accounts. Establishing an account involves configuring attributes like the account name, time zone, and language preferences. The Account message is the parent entity for many other resources, for example, AccountRelationship, Homepage, BusinessInfo and so on.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Account

Returns a new instance of Account.



179
180
181
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 179

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#account_idFixnum

Output only. The ID of the account. Corresponds to the JSON property accountId

Returns:

  • (Fixnum)


140
141
142
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 140

def 
  @account_id
end

#account_nameString

Required. A human-readable name of the account. Don't use punctuation, capitalization, or non-alphanumeric symbols such as the "/" or "_" symbols. See Adding a business name for more information. Corresponds to the JSON property accountName

Returns:

  • (String)


148
149
150
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 148

def 
  @account_name
end

#adult_contentBoolean Also known as: adult_content?

Optional. Whether this account contains adult content. Corresponds to the JSON property adultContent

Returns:

  • (Boolean)


153
154
155
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 153

def adult_content
  @adult_content
end

#language_codeString

Required. The account's BCP-47 language code, such as en-US or sr-Latn. Corresponds to the JSON property languageCode

Returns:

  • (String)


160
161
162
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 160

def language_code
  @language_code
end

#nameString

Identifier. The resource name of the account. Format: accounts/account` Corresponds to the JSON propertyname`

Returns:

  • (String)


165
166
167
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 165

def name
  @name
end

#test_accountBoolean Also known as: test_account?

Output only. Whether this is a test account. Corresponds to the JSON property testAccount

Returns:

  • (Boolean)


170
171
172
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 170

def 
  @test_account
end

#time_zoneGoogle::Apis::MerchantapiAccountsV1beta::TimeZone

Represents a time zone from the IANA Time Zone Database. Corresponds to the JSON property timeZone



177
178
179
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 177

def time_zone
  @time_zone
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



184
185
186
187
188
189
190
191
192
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 184

def update!(**args)
  @account_id = args[:account_id] if args.key?(:account_id)
  @account_name = args[:account_name] if args.key?(:account_name)
  @adult_content = args[:adult_content] if args.key?(:adult_content)
  @language_code = args[:language_code] if args.key?(:language_code)
  @name = args[:name] if args.key?(:name)
  @test_account = args[:test_account] if args.key?(:test_account)
  @time_zone = args[:time_zone] if args.key?(:time_zone)
end