Sha256: c60150ed80f73cac6fea597884ec669f3574cc1be68b5c8ed863200838b5e9c4

Contents?: true

Size: 1.25 KB

Versions: 19

Compression:

Stored size: 1.25 KB

Contents

class Kaui::Subscription < Kaui::Base
  define_attr :account_id
  define_attr :subscription_id
  define_attr :bundle_id
  define_attr :external_key
  define_attr :product_category
  define_attr :product_name
  define_attr :billing_period
  define_attr :charged_through_date
  define_attr :price_list
  define_attr :start_date
  define_attr :canceled_date

  has_many :events, Kaui::Event

  def initialize(data = {})
    super(:account_id =>  data['accountId'] || data['account_id'],
          :subscription_id => data['subscriptionId'] || data['subscription_id'],
          :bundle_id => data['bundleId'] || data['bundle_id'],
          :external_key => data['externalKey'] || data['external_key'],
          :product_category => data['productCategory'] || data['product_category'],
          :product_name => data['productName'] || data['product_name'],
          :billing_period => data['billingPeriod'] || data['billing_period'],
          :charged_through_date => data['chargedThroughDate'] || data['charged_through_date'],
          :price_list => data['priceList'] || data['price_list'],
          :start_date => data['startDate'] || data['start_date'],
          :canceled_date => data['cancelledDate'] || data['canceled_date'],
          :events => data['events'])
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
kaui-0.6.6 app/models/kaui/subscription.rb
kaui-0.6.5 app/models/kaui/subscription.rb
kaui-0.6.4 app/models/kaui/subscription.rb
kaui-0.6.3 app/models/kaui/subscription.rb
kaui-0.6.2 app/models/kaui/subscription.rb
kaui-0.6.1 app/models/kaui/subscription.rb
kaui-0.6.0 app/models/kaui/subscription.rb
kaui-0.5.3 app/models/kaui/subscription.rb
kaui-0.5.2 app/models/kaui/subscription.rb
kaui-0.5.1 app/models/kaui/subscription.rb
kaui-0.5.0 app/models/kaui/subscription.rb
kaui-0.4.9 app/models/kaui/subscription.rb
kaui-0.4.8 app/models/kaui/subscription.rb
kaui-0.4.7 app/models/kaui/subscription.rb
kaui-0.4.6 app/models/kaui/subscription.rb
kaui-0.4.5 app/models/kaui/subscription.rb
kaui-0.4.4 app/models/kaui/subscription.rb
kaui-0.4.3 app/models/kaui/subscription.rb
kaui-0.4.2 app/models/kaui/subscription.rb