Sha256: 2517048db899d004ebfaffd41c6418e76b3cf9ee9d2f0dc0721437942f42e81d

Contents?: true

Size: 424 Bytes

Versions: 2

Compression:

Stored size: 424 Bytes

Contents

# frozen_string_literal: true

module Stash
  module Rewards
    class StashReward
      attr_reader :reward_name, :reward_id, :description, :prices

      def initialize(reward_payload)
        @reward_name = reward_payload['rewardName']
        @reward_id = reward_payload['rewardId']
        @description = reward_payload['description']
        @prices = reward_payload['denominations'] || []
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
stash-rewards-0.0.4 lib/stash/rewards/stash_reward.rb
stash-rewards-0.0.3 lib/stash/rewards/stash_reward.rb