Class: ClientSDK

Inherits:
Object
  • Object
show all
Defined in:
lib/client_sdk.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(team_name, client_key, client_secret) ⇒ ClientSDK

Returns a new instance of ClientSDK.

Raises:

  • (ArgumentError)


4
5
6
7
8
9
10
11
12
# File 'lib/client_sdk.rb', line 4

def initialize(team_name, client_key, client_secret)
  raise ArgumentError, 'Team Name is not valid' unless !team_name.empty?
  raise ArgumentError, 'Client Key is not valid' unless !client_key.empty?
  raise ArgumentError, 'Client Secret is not valid' unless !client_secret.empty?

  @team_name = team_name
  @client_key = client_key
  @client_secret = client_secret
end

Instance Attribute Details

#client_keyObject

Returns the value of attribute client_key.



2
3
4
# File 'lib/client_sdk.rb', line 2

def client_key
  @client_key
end

#client_secretObject

Returns the value of attribute client_secret.



2
3
4
# File 'lib/client_sdk.rb', line 2

def client_secret
  @client_secret
end

#team_nameObject

Returns the value of attribute team_name.



2
3
4
# File 'lib/client_sdk.rb', line 2

def team_name
  @team_name
end

Instance Method Details

#to_sObject



14
15
16
# File 'lib/client_sdk.rb', line 14

def to_s
  "{ team_name: #{@team_name}, client_key: #{@client_key}, client_secret: #{@client_secret} }"
end