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) #

[View source]

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 #

[View source]
def self.delete(client : HTTP::Client, publication_id : String, id : String) #

[View source]
def self.delete(subscription : Beehiiv::Subscription) #

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

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

[View source]
def self.retrieve(subscription : Beehiiv::Subscription) #

[View source]
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 #

[View source]

Instance Method Detail

def created : Time | Nil #

[View source]
def email : String #

[View source]
def id : String #

[View source]
def referral_code : String | Nil #

[View source]
def referring_site : String | Nil #

[View source]
def status : Status #

[View source]
def subscription_tier : SubscriptionTier #

[View source]
def utm_campaign : String | Nil #

[View source]
def utm_channel : String | Nil #

[View source]
def utm_medium : String | Nil #

[View source]
def utm_source : String | Nil #

[View source]