Sha256: 6078bd3fd6ddc4e366ed6283ceb867742518b8aa16a9e014521d06bf708e050d

Contents?: true

Size: 402 Bytes

Versions: 7

Compression:

Stored size: 402 Bytes

Contents

module Conekta
  class DiscountLine < Resource
    include Conekta::Operations::Delete
    include Conekta::Operations::Update
    include Conekta::Operations::CustomAction

    attr_accessor :code, :amount, :type, :parent_id

    def _url
      ensure_id

      "#{self.order._url}#{self.class._url}/#{id}"
    end

    def delete
      self.delete_member('order', 'discount_lines')
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
conekta-2.6.0 lib/conekta/discount_line.rb
conekta-tiempometa-2.4.2 lib/conekta/discount_line.rb
conekta-2.5.0 lib/conekta/discount_line.rb
conekta-2.4.2 lib/conekta/discount_line.rb
conekta-2.4.1 lib/conekta/discount_line.rb
conekta-2.4.0 lib/conekta/discount_line.rb
conekta-2.3.0 lib/conekta/discount_line.rb