Sha256: a9e51114a75d00c7fc78dc0116d5fd225f999db52212a6ffa4ac0083a17c1655

Contents?: true

Size: 917 Bytes

Versions: 2

Compression:

Stored size: 917 Bytes

Contents

# frozen_string_literal: true

module EveOnline
  module ESI
    module Models
      class LoyaltyStoreOffer < Base
        def as_json
          {
            ak_cost: ak_cost,
            isk_cost: isk_cost,
            lp_cost: lp_cost,
            offer_id: offer_id,
            quantity: quantity,
            type_id: type_id,
          }
        end

        def ak_cost
          options["ak_cost"]
        end

        def isk_cost
          options["isk_cost"]
        end

        def lp_cost
          options["lp_cost"]
        end

        def offer_id
          options["offer_id"]
        end

        def quantity
          options["quantity"]
        end

        def type_id
          options["type_id"]
        end

        def offer_required_items
          @offer_required_items ||= OfferRequiredItems.new(options["required_items"]).offer_required_items
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
eve_online-0.31.0 lib/eve_online/esi/models/loyalty_store_offer.rb
eve_online-0.30.0 lib/eve_online/esi/models/loyalty_store_offer.rb