Sha256: b70847c6ab84e7bb6b1e514f044f579de160648a42dfc088ac7f9afcf4df7619

Contents?: true

Size: 1.12 KB

Versions: 1

Compression:

Stored size: 1.12 KB

Contents

object false

child @features, object_root: false, root: 'features' do
  attributes :id, :feature_type_id, :price, :price_type_id, :subtitle, :discount_percentage,
             :total_cost, :order_discount, :total_per_word_cost,
             :order_per_word_price, :order_basic_price, :total_cost, :feature_badge_id

  node :title do |feature|
    # if feature.feature_type.multiple_variants?
    #   "#{feature.feature_type.title} #{feature.title}"
    # else
    #   feature.title
    # end
    feature.title
  end

  node :is_percentage do |feature|
    feature.price_type.percentage?
  end

  node :is_extras do |feature|
    feature.feature_type.extras?
  end

  node :code do |feature|
    feature.feature_type.code
  end

  node :is_writer_level do |feature|
    feature.feature_type.writer_level?
  end
  node :tip, &:subtitle
end

child @payment_types, object_root: false, root: 'payment_types' do
  attributes :id, :code, :title, :processing_type
end

child :rates do
  child @exchange_rates, object_root: false, root: 'currencies' do
    attributes :id, :currency, :value, :updated_at, :sort_order
    node :symbol, &:symbol
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
translation_cms-0.1.5 app/views/account/transactions/features.json.rabl