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.


184
185
186
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 184

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)

167
168
169
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 167

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)

159
160
161
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 159

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)

181
182
183
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 181

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)

174
175
176
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 174

def role
  @role
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


189
190
191
192
193
194
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 189

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