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.



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

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

Instance Attribute Details

#accountString

Immutable. The name of the Account resource that this Admin refers to. Used when calling locations.admins.create to invite a LocationGroup as an admin. If both this field and admin are set on CREATE requests, this field takes precedence and the email address in admin will be ignored. Format: accounts/ account`. Corresponds to the JSON propertyaccount`

Returns:

  • (String)


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

def 
  @account
end

#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)


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

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)


150
151
152
# File 'lib/google/apis/mybusinessaccountmanagement_v1/classes.rb', line 150

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)


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

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)


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

def role
  @role
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



170
171
172
173
174
175
176
# File 'lib/google/apis/mybusinessaccountmanagement_v1/classes.rb', line 170

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