Class: TD::Types::StarSubscription

Inherits:
Base
  • Object
show all
Defined in:
lib/tdlib/types/star_subscription.rb

Overview

Contains information about subscription to a channel chat paid in Telegram Stars.

Instance Attribute Summary collapse

Method Summary

Methods inherited from Base

#to_hash, #to_json

Instance Attribute Details

#can_reuseBoolean

True, if the subscription is active and the user can use the method reuseStarSubscription to join the subscribed chat again.

Returns:

  • (Boolean)

    the current value of can_reuse



15
16
17
# File 'lib/tdlib/types/star_subscription.rb', line 15

def can_reuse
  @can_reuse
end

#chat_idInteger

Identifier of the channel chat that is subscribed.

Returns:

  • (Integer)

    the current value of chat_id



15
16
17
# File 'lib/tdlib/types/star_subscription.rb', line 15

def chat_id
  @chat_id
end

#expiration_dateInteger

Point in time (Unix timestamp) when the subscription will expire or expired.

Returns:

  • (Integer)

    the current value of expiration_date



15
16
17
# File 'lib/tdlib/types/star_subscription.rb', line 15

def expiration_date
  @expiration_date
end

#idTD::Types::String

Unique identifier of the subscription.

Returns:

  • (TD::Types::String)

    the current value of id



15
16
17
# File 'lib/tdlib/types/star_subscription.rb', line 15

def id
  @id
end

The invite link that can be used to renew the subscription if it has been expired; may be empty, if the link isn’t available anymore.

Returns:

  • (TD::Types::String, nil)

    the current value of invite_link



15
16
17
# File 'lib/tdlib/types/star_subscription.rb', line 15

def invite_link
  @invite_link
end

#is_canceledBoolean

True, if the subscription was canceled.

Returns:

  • (Boolean)

    the current value of is_canceled



15
16
17
# File 'lib/tdlib/types/star_subscription.rb', line 15

def is_canceled
  @is_canceled
end

#is_expiringBoolean

True, if the subscription expires soon and there are no enough Telegram Stars on the user’s balance to extend it.

Returns:

  • (Boolean)

    the current value of is_expiring



15
16
17
# File 'lib/tdlib/types/star_subscription.rb', line 15

def is_expiring
  @is_expiring
end

#pricingTD::Types::StarSubscriptionPricing

The subscription plan.

Returns:



15
16
17
# File 'lib/tdlib/types/star_subscription.rb', line 15

def pricing
  @pricing
end