class Hubspot::Subscription

Constants

SUBSCRIPTIONS_PATH
SUBSCRIPTION_PATH
TIMELINE_PATH

Attributes

bounced[R]
marked_as_spam[R]
status[R]
subscribed[R]
subscription_statuses[R]

Public Class Methods

new(response_hash) click to toggle source
# File lib/hubspot/subscription.rb, line 13
def initialize(response_hash)
  @subscribed     = response_hash['subscribed']
  @marked_as_spam = response_hash['markedAsSpam']
  @bounced        = response_hash['bounced']
  @status         = response_hash['status']
  @subscription_statuses  = response_hash['SubscriptionStatuses']
end
status(email) click to toggle source
# File lib/hubspot/subscription.rb, line 22
def status(email)
  response = Hubspot::Connection.get_json(SUBSCRIPTION_PATH, {email_address: email})
  new(response)
end