Sha256: 4b9f292830fd29c75483f0791200b0b831352d3696bedcd8d5786faebe4f92c9
Contents?: true
Size: 763 Bytes
Versions: 11
Compression:
Stored size: 763 Bytes
Contents
# # promocode.rb # ConstantContact # # Copyright (c) 2013 Constant Contact. All rights reserved. module ConstantContact module Components class Promocode < Component attr_accessor :code_name, :code_type, :discount_amount, :discount_percent, :discount_scope, :discount_type, :fee_ids, :id, :is_paused, :quantity_available, :quantity_total, :quantity_used, :status # Factory method to create an event Promocode object from a hash # @param [Hash] props - properties to create object from # @return [Promocode] def self.create(props) obj = Promocode.new props.each do |key, value| obj.send("#{key}=", value) if obj.respond_to? key end obj end end end end
Version data entries
11 entries across 11 versions & 2 rubygems