Class: Octobat::Payout

Inherits:
APIResource show all
Extended by:
APIOperations::List
Defined in:
lib/octobat/payout.rb

Instance Attribute Summary

Attributes inherited from OctobatObject

#api_key, #parent_obj

Class Method Summary collapse

Instance Method Summary collapse

Methods included from APIOperations::List

list, set_parent_resource

Methods inherited from APIResource

class_name, #refresh, retrieve, url, #url

Methods inherited from OctobatObject

#[], #[]=, #_dump, _load, #as_json, construct_from, #each, #initialize, #inspect, #keys, #refresh_from, #respond_to?, #to_hash, #to_json, #to_s, #values

Constructor Details

This class inherits a constructor from Octobat::OctobatObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Octobat::OctobatObject

Class Method Details

.csv_export(params = {}, opts = {}) ⇒ Object



9
10
11
12
13
14
15
16
17
18
# File 'lib/octobat/payout.rb', line 9

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

Instance Method Details

#balance_transactions(params = {}) ⇒ Object



5
6
7
# File 'lib/octobat/payout.rb', line 5

def balance_transactions(params = {})
  BalanceTransaction.list(params.merge({ payout: id }), @api_key)
end