Class: Courier::Resources::Users

Inherits:
Object
  • Object
show all
Defined in:
lib/courier/resources/users.rb,
lib/courier/resources/users/tokens.rb,
lib/courier/resources/users/tenants.rb,
lib/courier/resources/users/preferences.rb,
sig/courier/resources/users.rbs,
sig/courier/resources/users/tokens.rbs,
sig/courier/resources/users/tenants.rbs,
sig/courier/resources/users/preferences.rbs

Defined Under Namespace

Classes: Preferences, Tenants, Tokens

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Users

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Users.

Parameters:



24
25
26
27
28
29
# File 'lib/courier/resources/users.rb', line 24

def initialize(client:)
  @client = client
  @preferences = Courier::Resources::Users::Preferences.new(client: client)
  @tenants = Courier::Resources::Users::Tenants.new(client: client)
  @tokens = Courier::Resources::Users::Tokens.new(client: client)
end

Instance Attribute Details

#preferencesCourier::Resources::Users::Preferences (readonly)

Read and write a single user's notification preferences, per topic and per channel.



9
10
11
# File 'lib/courier/resources/users.rb', line 9

def preferences
  @preferences
end

#tenantsCourier::Resources::Users::Tenants (readonly)

Associate a user with one or more tenants, and read or remove those associations.



14
15
16
# File 'lib/courier/resources/users.rb', line 14

def tenants
  @tenants
end

#tokensCourier::Resources::Users::Tokens (readonly)

Register and manage the APNS and FCM device tokens Courier delivers push notifications to.



19
20
21
# File 'lib/courier/resources/users.rb', line 19

def tokens
  @tokens
end