Class: EasyHubspot::Base

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

Overview

class EasyHubspot::Base

Direct Known Subclasses

Contact, Deal, LineItem, Product

Class Method Summary collapse

Class Method Details

.email?(string) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/easy_hubspot/base.rb', line 12

def email?(string)
  URI::MailTo::EMAIL_REGEXP.match?(string)
end

.headersObject



7
8
9
10
# File 'lib/easy_hubspot/base.rb', line 7

def headers
  { "Content-Type" => 'application/json',
    "Authorization" => "Bearer #{EasyHubspot.configuration.access_token}" }
end