Sha256: faa10c426da11d7230a53dd86d2c8c832244033e4f7f329ffd2880bd521f6c9d

Contents?: true

Size: 632 Bytes

Versions: 9

Compression:

Stored size: 632 Bytes

Contents

module Octobat
  class Transaction < APIResource
    extend Octobat::APIOperations::List
    include Octobat::APIOperations::Create
    include Octobat::APIOperations::Update

    def items(params = {}, opts = {})
      Item.list(params.merge({ :transaction => id }), {api_key: @api_key}.merge(opts))
    end
    
    def self.csv_export(params = {}, opts={})
      api_key, headers = Util.parse_opts(opts)
      api_key ||= @api_key
      opts[:api_key] = api_key

      instance = self.new(nil, opts)

      response, api_key = Octobat.request(:post, url + '/csv_export', api_key, params)
      return true
    end
    
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
octobat-2.0.27 lib/octobat/transaction.rb
octobat-2.0.26 lib/octobat/transaction.rb
octobat-2.0.25 lib/octobat/transaction.rb
octobat-2.0.24 lib/octobat/transaction.rb
octobat-2.0.23 lib/octobat/transaction.rb
octobat-2.0.22 lib/octobat/transaction.rb
octobat-2.0.21 lib/octobat/transaction.rb
octobat-2.0.20 lib/octobat/transaction.rb
octobat-2.0.19 lib/octobat/transaction.rb