class Centaman::Object::CouponCheck
Attributes
effects[R]
Public Instance Methods
after_init(args = {})
click to toggle source
# File lib/centaman/object/coupon_check.rb, line 5 def after_init(args = {}) define_effects(args) end
attributes()
click to toggle source
rubocop:disable Metrics/MethodLength
# File lib/centaman/object/coupon_check.rb, line 16 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
define_effects(args)
click to toggle source
# File lib/centaman/object/coupon_check.rb, line 9 def define_effects(args) @effects = args['Effects'].map do |effect_hash| Centaman::Object::Effect.new(effect_hash) end end