Module: RisenexaLeads
- Defined in:
- lib/risenexa/leads.rb
Overview
Top-level module for convenient SDK access
Defined Under Namespace
Classes: BatchResult, Client, Configuration, ConfigurationError, Result
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.configuration ⇒ Object
Returns the value of attribute configuration.
20
21
22
|
# File 'lib/risenexa/leads.rb', line 20
def configuration
@configuration
end
|
Class Method Details
.batch(leads) ⇒ Object
37
38
39
40
41
42
43
|
# File 'lib/risenexa/leads.rb', line 37
def batch(leads)
raise ArgumentError, "Batch requires at least one lead" if leads.empty?
raise ArgumentError, "Batch maximum is 100 leads" if leads.length > 100
validate_configuration!
client.batch(leads)
end
|
22
23
24
25
|
# File 'lib/risenexa/leads.rb', line 22
def configure
self.configuration ||= Configuration.new
yield(configuration)
end
|
.reset_configuration! ⇒ Object
27
28
29
30
|
# File 'lib/risenexa/leads.rb', line 27
def reset_configuration!
self.configuration = nil
@client = nil
end
|
.track(attributes) ⇒ Object
32
33
34
35
|
# File 'lib/risenexa/leads.rb', line 32
def track(attributes)
validate_configuration!
client.track(attributes)
end
|