Class: Google::Apis::MybusinessaccountmanagementV1::Admin

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

Overview

An administrator of an Account or a location.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Admin

Returns a new instance of Admin.



156
157
158
# File 'lib/google/apis/mybusinessaccountmanagement_v1/classes.rb', line 156

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

Instance Attribute Details

#adminString

Optional. 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. This field is only needed to be set during admin creation. Corresponds to the JSON property admin

Returns:

  • (String)


133
134
135
# File 'lib/google/apis/mybusinessaccountmanagement_v1/classes.rb', line 133

def admin
  @admin
end

#nameString

Immutable. The resource name. For account admins, this is in the form: accounts/account_id/admins/admin_idFor location admins, this is in the form: `locations/`location_id`/admins/`admin_id This field will be ignored if set during admin creation. Corresponds to the JSON property name

Returns:

  • (String)


141
142
143
# File 'lib/google/apis/mybusinessaccountmanagement_v1/classes.rb', line 141

def name
  @name
end

#pending_invitationBoolean Also known as: pending_invitation?

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

Returns:

  • (Boolean)


147
148
149
# File 'lib/google/apis/mybusinessaccountmanagement_v1/classes.rb', line 147

def pending_invitation
  @pending_invitation
end

#roleString

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

Returns:

  • (String)


154
155
156
# File 'lib/google/apis/mybusinessaccountmanagement_v1/classes.rb', line 154

def role
  @role
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



161
162
163
164
165
166
# File 'lib/google/apis/mybusinessaccountmanagement_v1/classes.rb', line 161

def update!(**args)
  @admin = args[:admin] if args.key?(:admin)
  @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