Files
plexruby/lib/plex_ruby_sdk/models/operations/subscription.rb

57 lines
2.7 KiB
Ruby
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
# typed: true
# frozen_string_literal: true
module PlexRubySDK
module Models
module Operations
SUBSCRIPTION_SERVERS = [
'https://plex.tv/api/v2'
].freeze
# If the accounts Plex Pass subscription is active
class Subscription
extend T::Sig
include Crystalline::MetadataFields
# If the account's Plex Pass subscription is active
field :active, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('active') } }
# List of features allowed on your Plex Pass subscription
field :features, T.nilable(T::Array[::String]), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('features') } }
# Payment service used for your Plex Pass subscription
field :payment_service, T.nilable(::String), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('paymentService') } }
# Name of Plex Pass subscription plan
field :plan, T.nilable(::String), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('plan') } }
# String representation of subscriptionActive
field :status, T.nilable(Models::Operations::GetTokenDetailsAuthenticationStatus), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(Models::Operations::GetTokenDetailsAuthenticationStatus, true) } }
# Date the account subscribed to Plex Pass
field :subscribed_at, T.nilable(::String), { 'format_json': { 'letter_case': ::PlexRubySDK::Utils.field_name('subscribedAt') } }
sig { params(active: T.nilable(T::Boolean), features: T.nilable(T::Array[::String]), payment_service: T.nilable(::String), plan: T.nilable(::String), status: T.nilable(Models::Operations::GetTokenDetailsAuthenticationStatus), subscribed_at: T.nilable(::String)).void }
def initialize(active: nil, features: nil, payment_service: nil, plan: nil, status: nil, subscribed_at: nil)
@active = active
@features = features
@payment_service = payment_service
@plan = plan
@status = status
@subscribed_at = subscribed_at
end
def ==(other)
return false unless other.is_a? self.class
return false unless @active == other.active
return false unless @features == other.features
return false unless @payment_service == other.payment_service
return false unless @plan == other.plan
return false unless @status == other.status
return false unless @subscribed_at == other.subscribed_at
true
end
end
end
end
end