class Beehiiv::Subscription

Included Modules

Defined in:

beehiiv/methods/core/subscriptions/create_subscription.cr
beehiiv/methods/core/subscriptions/update_subscription.cr
beehiiv/objects/core/subscription.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

Class Method Detail

def self.create(client : HTTP::Client, publication_id : String, email : String, reactivate_existing : Bool = false, send_welcome_email : Bool = false, utm_source : String | Nil = nil, utm_medium : String | Nil = nil, utm_campaign : String | Nil = nil, referring_site : String | Nil = nil, referral_code : String | Nil = nil, custom_fields : Array(CustomField) | Nil = nil) : Object(Subscription) forall T, U #

def self.delete(client : HTTP::Client, publication_id : String, id : String) #

def self.delete(subscription : Beehiiv::Subscription) #

def self.list(client : HTTP::Client, publication_id : String) : List(Beehiiv::Subscription) #

def self.retrieve(client : HTTP::Client, publication_id : String, id : String) : Object(Beehiiv::Subscription) #

def self.retrieve(subscription : Beehiiv::Subscription) #

def self.update(client : HTTP::Client, publication_id : String, id : String, unsubscribe : Bool = false, custom_fields : Hash(String, String | Bool) | Nil = nil) : Object(Subscription) forall T, U #

Instance Method Detail

def created : Time | Nil #

def email : String #

def id : String #

def referral_code : String | Nil #

def referring_site : String | Nil #

def status : Status #

def subscription_tier : SubscriptionTier #

def utm_campaign : String | Nil #

def utm_channel : String | Nil #

def utm_medium : String | Nil #

def utm_source : String | Nil #