class Beehiiv::Subscription
- Beehiiv::Subscription
- Reference
- Object
Included Modules
- BeehiivMethods
- JSON::Serializable
Defined in:
beehiiv/methods/core/subscriptions/create_subscription.crbeehiiv/methods/core/subscriptions/update_subscription.cr
beehiiv/objects/core/subscription.cr
Constructors
Class Method Summary
- .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
- .delete(client : HTTP::Client, publication_id : String, id : String)
- .delete(subscription : Beehiiv::Subscription)
- .list(client : HTTP::Client, publication_id : String) : List(Beehiiv::Subscription)
- .retrieve(client : HTTP::Client, publication_id : String, id : String) : Object(Beehiiv::Subscription)
- .retrieve(subscription : Beehiiv::Subscription)
- .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 Summary
- #created : Time | Nil
- #email : String
- #id : String
- #referral_code : String | Nil
- #referring_site : String | Nil
- #status : Status
- #subscription_tier : SubscriptionTier
- #utm_campaign : String | Nil
- #utm_channel : String | Nil
- #utm_medium : String | Nil
- #utm_source : String | Nil
Constructor Detail
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.retrieve(client : HTTP::Client, publication_id : String, id : String) : Object(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
#