Class: ZoomInfo::Base
- Inherits:
-
Object
- Object
- ZoomInfo::Base
- Includes:
- HTTParty
- Defined in:
- lib/zoominfo-ruby/client.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#partner_name ⇒ Object
Returns the value of attribute partner_name.
Instance Method Summary collapse
- #generate_key(search_terms, password) ⇒ Object
-
#initialize(partner_name = nil, api_key = nil) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(partner_name = nil, api_key = nil) ⇒ Base
Returns a new instance of Base.
8 9 10 11 12 |
# File 'lib/zoominfo-ruby/client.rb', line 8 def initialize(partner_name = nil, api_key = nil) @partner_name = partner_name @api_key = api_key self.class.default_params({pc: partner_name, outputType: 'xml'}) end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
6 7 8 |
# File 'lib/zoominfo-ruby/client.rb', line 6 def api_key @api_key end |
#partner_name ⇒ Object
Returns the value of attribute partner_name.
6 7 8 |
# File 'lib/zoominfo-ruby/client.rb', line 6 def partner_name @partner_name end |
Instance Method Details
#generate_key(search_terms, password) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/zoominfo-ruby/client.rb', line 14 def generate_key(search_terms, password) search_term_prefaces = search_terms.collect{|t| t[0..1]}.join() date_formatted = Time.now.strftime("%-d%-m%-Y") Digest::MD5.hexdigest(search_term_prefaces + password + date_formatted) end |