Sha256: 9269dd4e5e37a542cc50dff24c47ba4e6bb2886e2a6adbdbd78d966fb4feec38

Contents?: true

Size: 1.37 KB

Versions: 57

Compression:

Stored size: 1.37 KB

Contents

# https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2014_1/schema/record/promotioncode.html

module NetSuite
  module Records
    class PromotionCode
      include Support::Fields
      include Support::RecordRefs
      include Support::Records
      include Support::Actions
      include Namespaces::ListMkt

      actions :get, :get_list, :add, :search, :delete, :update, :upsert

      fields :code, :code_pattern, :description, :discount_type, :display_line_discounts, :end_date,
             :exclude_items, :is_inactive, :is_public, :minimum_order_amount, :name, :number_to_generate,
             :rate, :start_date

      record_refs :free_ship_method, :implementation, :custom_form

      # TODO custom records need to be implemented
      # field :currency_list, PromotionCodeCurrencyList
      # field :apply_discount_to, PromotionCodeApplyDiscountTo
      # field :items_list, PromotionCodeItemsList
      # field :partners_list, PromotionCodePartnersList
      # field :use_type, PromotionCodeUseType

      attr_reader   :internal_id
      attr_accessor :external_id

      def initialize(attributes = {})
        @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
        @external_id = attributes.delete(:external_id) || attributes.delete(:@external_id)
        initialize_from_attributes_hash(attributes)
      end

    end
  end
end

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
netsuite-0.9.3 lib/netsuite/records/promotion_code.rb
netsuite-0.9.2 lib/netsuite/records/promotion_code.rb
netsuite-0.9.1 lib/netsuite/records/promotion_code.rb
netsuite-0.9.0 lib/netsuite/records/promotion_code.rb
netsuite-0.8.12 lib/netsuite/records/promotion_code.rb
netsuite-0.8.11 lib/netsuite/records/promotion_code.rb
netsuite-0.8.10 lib/netsuite/records/promotion_code.rb
netsuite-0.8.9 lib/netsuite/records/promotion_code.rb
netsuite-0.8.8 lib/netsuite/records/promotion_code.rb
netsuite-0.8.7 lib/netsuite/records/promotion_code.rb
netsuite-0.8.6 lib/netsuite/records/promotion_code.rb
netsuite-0.8.5 lib/netsuite/records/promotion_code.rb
netsuite-0.8.4 lib/netsuite/records/promotion_code.rb
netsuite-0.8.3 lib/netsuite/records/promotion_code.rb
netsuite-0.8.2 lib/netsuite/records/promotion_code.rb
netsuite-0.8.1 lib/netsuite/records/promotion_code.rb
netsuite-0.8.0 lib/netsuite/records/promotion_code.rb
netsuite-0.7.9 lib/netsuite/records/promotion_code.rb
netsuite-0.7.8 lib/netsuite/records/promotion_code.rb
netsuite-0.7.7 lib/netsuite/records/promotion_code.rb