Sha256: 33eb05e07f6f0f7c44c34d0a62eb1960c93d26ed968862bf0803a6e8d93fed42
Contents?: true
Size: 1.47 KB
Versions: 24
Compression:
Stored size: 1.47 KB
Contents
module Centaman class Object::CouponCheck < Centaman::Object attr_reader :effects def after_init(args = {}) define_effects(args) end def define_effects(args) @effects = args['Effects'].map do |effect_hash| Centaman::Object::Effect.new(effect_hash) end end # rubocop:disable Metrics/MethodLength def attributes [ Centaman::Attribute.new( centaman_key: 'CouponCode', app_key: :coupon_code, type: :string ), Centaman::Attribute.new( centaman_key: 'LimitedUse', app_key: :limited_use, type: :boolean ), Centaman::Attribute.new( centaman_key: 'UsesRemaining', app_key: :uses_remaining, type: :integer ), Centaman::Attribute.new( centaman_key: 'ConditionForUse', app_key: :condition_for_use, type: :string ), Centaman::Attribute.new( centaman_key: 'CouponStockID', app_key: :coupon_stock_id, type: :integer ), Centaman::Attribute.new( centaman_key: 'IsValidForNewMembership', app_key: :is_valid_for_new_membership, type: :boolean ), Centaman::Attribute.new( centaman_key: 'IsvalidForRenewMembership', app_key: :is_valid_for_renew_membership, type: :boolean ) ] end # rubocop:enable Metrics/MethodLength end end
Version data entries
24 entries across 24 versions & 1 rubygems