Class: Google::Apis::MybusinessV3::Admin

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

Overview

An administrator of an Account, or a Location.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Admin

Returns a new instance of Admin



252
253
254
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 252

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

Instance Attribute Details

#admin_nameString

The name of the admin. When making the initial invitation, this is the invitee's email address. On GET calls, the user's email address is returned if the invitation is still pending. Otherwise, it contains the user's first and last names. Corresponds to the JSON property adminName

Returns:

  • (String)


227
228
229
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 227

def admin_name
  @admin_name
end

#nameString

The resource name. For account admins, this is in the form: accounts/account_id/admins/admin_id For location admins, this is in the form: `accounts/`account_id`/locations/`location_id`/admins/`admin_id Corresponds to the JSON property name

Returns:

  • (String)


235
236
237
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 235

def name
  @name
end

#pending_invitationBoolean Also known as: pending_invitation?

Indicates whether this admin has a pending invitation for the specified resource. Corresponds to the JSON property pendingInvitation

Returns:

  • (Boolean)


242
243
244
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 242

def pending_invitation
  @pending_invitation
end

#roleString

Specifies the AdminRole that this admin uses with the specified Account or Location resource. Corresponds to the JSON property role

Returns:

  • (String)


250
251
252
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 250

def role
  @role
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



257
258
259
260
261
262
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 257

def update!(**args)
  @admin_name = args[:admin_name] if args.key?(:admin_name)
  @name = args[:name] if args.key?(:name)
  @pending_invitation = args[:pending_invitation] if args.key?(:pending_invitation)
  @role = args[:role] if args.key?(:role)
end