Class: Evernote::EDAM::Type::PremiumInfo
- Inherits:
-
Object
- Object
- Evernote::EDAM::Type::PremiumInfo
- Includes:
- Thrift::Struct, Thrift::Struct_Union
- Defined in:
- lib/Evernote/EDAM/types_types.rb
Overview
<dl>
<dt>currentTime</dt>
<dd>
The server-side date and time when this data was generated.
</dd>
<dt>premium</dt>
<dd>
True if the user's account is Premium.
</dd>
<dt>premiumRecurring</dt>
<dd>
True if the user's account is Premium and has a recurring payment method.
</dd>
<dt>premiumExpirationDate</dt>
<dd>
The date when the user's Premium account expires, or the date when the
user's account is due for payment if it has a recurring payment method.
</dd>
<dt>premiumExtendable</dt>
<dd>
True if the user is eligible for purchasing Premium account extensions.
</dd>
<dt>premiumPending</dt>
<dd>
True if the user's Premium account is pending payment confirmation
</dd>
<dt>premiumCancellationPending</dt>
<dd>
True if the user has requested that no further charges to be made; the
Premium account will remain active until it expires.
</dd>
<dt>canPurchaseUploadAllowance</dt>
<dd>
True if the user is eligible for purchasing additional upload allowance.
</dd>
<dt>sponsoredGroupName</dt>
<dd>
The name of the sponsored group that the user is part of.
</dd>
<dt>sponsoredGroupRole</dt>
<dd>
DEPRECATED - will be removed in a future update.
</dd>
<dt>premiumUpgradable</dt>
<dd>
True if the user is eligible for purchasing Premium account upgrade.
</dd>
</dl>
Constant Summary collapse
- CURRENTTIME =
1
- PREMIUM =
2
- PREMIUMRECURRING =
3
- PREMIUMEXPIRATIONDATE =
4
- PREMIUMEXTENDABLE =
5
- PREMIUMPENDING =
6
- PREMIUMCANCELLATIONPENDING =
7
- CANPURCHASEUPLOADALLOWANCE =
8
- SPONSOREDGROUPNAME =
9
- SPONSOREDGROUPROLE =
10
- PREMIUMUPGRADABLE =
11
- FIELDS =
{ CURRENTTIME => {:type => ::Thrift::Types::I64, :name => 'currentTime'}, PREMIUM => {:type => ::Thrift::Types::BOOL, :name => 'premium'}, PREMIUMRECURRING => {:type => ::Thrift::Types::BOOL, :name => 'premiumRecurring'}, PREMIUMEXPIRATIONDATE => {:type => ::Thrift::Types::I64, :name => 'premiumExpirationDate', :optional => true}, PREMIUMEXTENDABLE => {:type => ::Thrift::Types::BOOL, :name => 'premiumExtendable'}, PREMIUMPENDING => {:type => ::Thrift::Types::BOOL, :name => 'premiumPending'}, PREMIUMCANCELLATIONPENDING => {:type => ::Thrift::Types::BOOL, :name => 'premiumCancellationPending'}, CANPURCHASEUPLOADALLOWANCE => {:type => ::Thrift::Types::BOOL, :name => 'canPurchaseUploadAllowance'}, SPONSOREDGROUPNAME => {:type => ::Thrift::Types::STRING, :name => 'sponsoredGroupName', :optional => true}, SPONSOREDGROUPROLE => {:type => ::Thrift::Types::I32, :name => 'sponsoredGroupRole', :optional => true, :enum_class => ::Evernote::EDAM::Type::SponsoredGroupRole}, PREMIUMUPGRADABLE => {:type => ::Thrift::Types::BOOL, :name => 'premiumUpgradable', :optional => true} }
Constants included from Thrift::Struct_Union
Thrift::Struct_Union::CONTAINER_TYPES
Instance Method Summary collapse
Methods included from Thrift::Struct
#<=>, #==, #differences, #eql?, field_accessor, #fields_with_default_values, generate_accessors, #hash, #initialize, #inspect, qmark_isset_method, #read, #write
Methods included from Thrift::Struct_Union
#each_field, #field_info, #inspect_collection, #inspect_field, #is_container?, #name_to_id, #read_field, #sorted_field_ids, #write_container, #write_data
Instance Method Details
#struct_fields ⇒ Object
669 |
# File 'lib/Evernote/EDAM/types_types.rb', line 669 def struct_fields; FIELDS; end |
#validate ⇒ Object
671 672 673 674 675 676 677 678 679 680 681 682 |
# File 'lib/Evernote/EDAM/types_types.rb', line 671 def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field currentTime is unset!') unless @currentTime raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premium is unset!') if @premium.nil? raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premiumRecurring is unset!') if @premiumRecurring.nil? raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premiumExtendable is unset!') if @premiumExtendable.nil? raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premiumPending is unset!') if @premiumPending.nil? raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premiumCancellationPending is unset!') if @premiumCancellationPending.nil? raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field canPurchaseUploadAllowance is unset!') if @canPurchaseUploadAllowance.nil? unless @sponsoredGroupRole.nil? || ::Evernote::EDAM::Type::SponsoredGroupRole::VALID_VALUES.include?(@sponsoredGroupRole) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field sponsoredGroupRole!') end end |