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

<dl>

<dt>uploadLimit</dt>
  <dd>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.
  </dd>
<dt>uploadLimitEnd</dt>
  <dd>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.
  </dd>
<dt>uploadLimitNextMonth</dt>
  <dd> When uploadLimitEnd is reached, the service
  will change uploadLimit to uploadLimitNextMonth. If a premium account is
  canceled, this mechanism will reset the quota appropriately.
  </dd>
<dt>premiumServiceStatus</dt>
  <dd>Indicates the phases of a premium account
  during the billing process.
  </dd>
<dt>premiumOrderNumber</dt>
  <dd>The order number used by the commerce system to
  process recurring payments
  </dd>
<dt>premiumServiceStart</dt>
  <dd>The start date when this premium promotion
  began (this number will get overwritten if a premium service is canceled
  and then re-activated).
  </dd>
<dt>premiumCommerceService</dt>
  <dd>The commerce system used (paypal, Google
  checkout, etc)
  </dd>
<dt>premiumServiceSKU</dt>
  <dd>The code associated with the purchase eg. monthly
  or annual purchase. Clients should interpret this value and localize it.
  </dd>
<dt>lastSuccessfulCharge</dt>
  <dd>Date the last time the user was charged.
  Null if never charged.
  </dd>
<dt>lastFailedCharge</dt>
  <dd>Date the last time a charge was attempted and
  failed.
  </dd>
<dt>lastFailedChargeReason</dt>
  <dd>Reason provided for the charge failure
  </dd>
<dt>nextPaymentDue</dt>
  <dd>The end of the billing cycle. This could be in the
  past if there are failed charges.
  </dd>
<dt>premiumLockUntil</dt>
  <dd>An internal variable to manage locking operations
  on the commerce variables.
  </dd>
<dt>updated</dt>
  <dd>The date any modification where made to this record.
  </dd>
<dt>premiumSubscriptionNumber</dt>
  <dd>The number number identifying the
  recurring subscription used to make the recurring charges.
  </dd>
<dt>lastRequestedCharge</dt>
  <dd>Date charge last attempted</dd>
<dt>currency</dt>
  <dd>ISO 4217 currency code</dd>
<dt>unitPrice</dt>
  <dd>charge in the smallest unit of the currency (e.g. cents for USD)</dd>
<dt>businessId</dt>
  <dd><i>DEPRECATED:</i>See BusinessUserInfo.</dd>
<dt>businessName</dt>
  <dd><i>DEPRECATED:</i>See BusinessUserInfo.</dd>
<dt>businessRole</dt>
  <dd><i>DEPRECATED:</i>See BusinessUserInfo.</dd>
<dt>unitDiscount</dt>
  <dd>discount per seat in negative amount and smallest unit of the currency (e.g. cents for USD)</dd>
<dt>nextChargeDate</dt>
  <dd>The next time the user will be charged, may or may not be the same as nextPaymentDue</dd>
</dl>

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