Class: Evernote::EDAM::Type::Accounting

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/Evernote/EDAM/types_types.rb

Overview

uploadLimit
The number of bytes that can be uploaded to the account in the current month. For new notes that are created, this is the length of the note content (in Unicode characters) plus the size of each resource (in bytes). For edited notes, this is the the difference between the old length and the new length (if this is greater than 0) plus the size of each new resource.
uploadLimitEnd
The date and time when the current upload limit expires. At this time, the monthly upload count reverts to 0 and a new limit is imposed. This date and time is exclusive, so this is effectively the start of the new month.
uploadLimitNextMonth
When uploadLimitEnd is reached, the service will change uploadLimit to uploadLimitNextMonth. If a premium account is canceled, this mechanism will reset the quota appropriately.
premiumServiceStatus
Indicates the phases of a premium account during the billing process.
premiumOrderNumber
The order number used by the commerce system to process recurring payments
premiumServiceStart
The start date when this premium promotion began (this number will get overwritten if a premium service is canceled and then re-activated).
premiumCommerceService
The commerce system used (paypal, Google checkout, etc)
premiumServiceSKU
The code associated with the purchase eg. monthly or annual purchase. Clients should interpret this value and localize it.
lastSuccessfulCharge
Date the last time the user was charged. Null if never charged.
lastFailedCharge
Date the last time a charge was attempted and failed.
lastFailedChargeReason
Reason provided for the charge failure
nextPaymentDue
The end of the billing cycle. This could be in the past if there are failed charges.
premiumLockUntil
An internal variable to manage locking operations on the commerce variables.
updated
The date any modification where made to this record.
premiumSubscriptionNumber
The number number identifying the recurring subscription used to make the recurring charges.
lastRequestedCharge
Date charge last attempted
currency
ISO 4217 currency code
unitPrice
charge in the smallest unit of the currency (e.g. cents for USD)
businessId
DEPRECATED:See BusinessUserInfo.
businessName
DEPRECATED:See BusinessUserInfo.
businessRole
DEPRECATED:See BusinessUserInfo.
unitDiscount
discount per seat in negative amount and smallest unit of the currency (e.g. cents for USD)
nextChargeDate
The next time the user will be charged, may or may not be the same as nextPaymentDue

Constant Summary collapse

UPLOADLIMIT =
1
UPLOADLIMITEND =
2
UPLOADLIMITNEXTMONTH =
3
PREMIUMSERVICESTATUS =
4
PREMIUMORDERNUMBER =
5
PREMIUMCOMMERCESERVICE =
6
PREMIUMSERVICESTART =
7
PREMIUMSERVICESKU =
8
LASTSUCCESSFULCHARGE =
9
LASTFAILEDCHARGE =
10
LASTFAILEDCHARGEREASON =
11
NEXTPAYMENTDUE =
12
PREMIUMLOCKUNTIL =
13
UPDATED =
14
PREMIUMSUBSCRIPTIONNUMBER =
16
LASTREQUESTEDCHARGE =
17
CURRENCY =
18
UNITPRICE =
19
BUSINESSID =
20
BUSINESSNAME =
21
BUSINESSROLE =
22
UNITDISCOUNT =
23
NEXTCHARGEDATE =
24
FIELDS =
{
  UPLOADLIMIT => {:type => ::Thrift::Types::I64, :name => 'uploadLimit', :optional => true},
  UPLOADLIMITEND => {:type => ::Thrift::Types::I64, :name => 'uploadLimitEnd', :optional => true},
  UPLOADLIMITNEXTMONTH => {:type => ::Thrift::Types::I64, :name => 'uploadLimitNextMonth', :optional => true},
  PREMIUMSERVICESTATUS => {:type => ::Thrift::Types::I32, :name => 'premiumServiceStatus', :optional => true, :enum_class => ::Evernote::EDAM::Type::PremiumOrderStatus},
  PREMIUMORDERNUMBER => {:type => ::Thrift::Types::STRING, :name => 'premiumOrderNumber', :optional => true},
  PREMIUMCOMMERCESERVICE => {:type => ::Thrift::Types::STRING, :name => 'premiumCommerceService', :optional => true},
  PREMIUMSERVICESTART => {:type => ::Thrift::Types::I64, :name => 'premiumServiceStart', :optional => true},
  PREMIUMSERVICESKU => {:type => ::Thrift::Types::STRING, :name => 'premiumServiceSKU', :optional => true},
  LASTSUCCESSFULCHARGE => {:type => ::Thrift::Types::I64, :name => 'lastSuccessfulCharge', :optional => true},
  LASTFAILEDCHARGE => {:type => ::Thrift::Types::I64, :name => 'lastFailedCharge', :optional => true},
  LASTFAILEDCHARGEREASON => {:type => ::Thrift::Types::STRING, :name => 'lastFailedChargeReason', :optional => true},
  NEXTPAYMENTDUE => {:type => ::Thrift::Types::I64, :name => 'nextPaymentDue', :optional => true},
  PREMIUMLOCKUNTIL => {:type => ::Thrift::Types::I64, :name => 'premiumLockUntil', :optional => true},
  UPDATED => {:type => ::Thrift::Types::I64, :name => 'updated', :optional => true},
  PREMIUMSUBSCRIPTIONNUMBER => {:type => ::Thrift::Types::STRING, :name => 'premiumSubscriptionNumber', :optional => true},
  LASTREQUESTEDCHARGE => {:type => ::Thrift::Types::I64, :name => 'lastRequestedCharge', :optional => true},
  CURRENCY => {:type => ::Thrift::Types::STRING, :name => 'currency', :optional => true},
  UNITPRICE => {:type => ::Thrift::Types::I32, :name => 'unitPrice', :optional => true},
  BUSINESSID => {:type => ::Thrift::Types::I32, :name => 'businessId', :optional => true},
  BUSINESSNAME => {:type => ::Thrift::Types::STRING, :name => 'businessName', :optional => true},
  BUSINESSROLE => {:type => ::Thrift::Types::I32, :name => 'businessRole', :optional => true, :enum_class => ::Evernote::EDAM::Type::BusinessUserRole},
  UNITDISCOUNT => {:type => ::Thrift::Types::I32, :name => 'unitDiscount', :optional => true},
  NEXTCHARGEDATE => {:type => ::Thrift::Types::I64, :name => 'nextChargeDate', :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_fieldsObject



533
# File 'lib/Evernote/EDAM/types_types.rb', line 533

def struct_fields; FIELDS; end

#validateObject



535
536
537
538
539
540
541
542
# File 'lib/Evernote/EDAM/types_types.rb', line 535

def validate
  unless @premiumServiceStatus.nil? || ::Evernote::EDAM::Type::PremiumOrderStatus::VALID_VALUES.include?(@premiumServiceStatus)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field premiumServiceStatus!')
  end
  unless @businessRole.nil? || ::Evernote::EDAM::Type::BusinessUserRole::VALID_VALUES.include?(@businessRole)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field businessRole!')
  end
end