Sha256: c19a7c1aacbf3bbdf8558377cabb28ed46c5ca786db0d85043de5002a7c5ae8b

Contents?: true

Size: 687 Bytes

Versions: 3

Compression:

Stored size: 687 Bytes

Contents

#
# fee.rb
# ConstantContact
#
# Copyright (c) 2013 Constant Contact. All rights reserved.

module ConstantContact
  module Components
    class SaleItem < Component
      attr_accessor :id, :amount, :promo_type, :fee_period_type, :type, :name, :quantity

      # Factory method to create an event Fee object from a hash
      # @param [Hash] props - hash of properties to create object from
      # @return [Campaign]
      def self.create(props)
        item = SaleItem.new
        if props
          props.each do |key, value|
            key = key.to_s
            item.send("#{key}=", value) if item.respond_to? key
          end
        end
        item
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
constantcontact-1.1.2 lib/constantcontact/components/event_spot/sale_item.rb
constantcontact-1.1.1 lib/constantcontact/components/event_spot/sale_item.rb
constantcontact-1.1.0 lib/constantcontact/components/event_spot/sale_item.rb