Sha256: 909f8c121be141d52cc52aad83618ee2efe0c47dcfabd0468c7e93bb1e5160fa
Contents?: true
Size: 678 Bytes
Versions: 15
Compression:
Stored size: 678 Bytes
Contents
module Octobat class BalanceTransaction < APIResource extend Octobat::APIOperations::List def url !parent_obj.nil? ? parentize_url : super end def parentize_url if parent_obj.include?(:payout) "#{Payout.url}/#{CGI.escape(parent_obj[:payout])}/balance_transactions/#{CGI.escape(id)}" else url end end def self.url if @parent_resource.include?(:payout) "#{Payout.url}/#{CGI.escape(@parent_resource[:payout])}/balance_transactions" end end def self.set_parent_resource(filters) @parent_resource = filters.select{|k, v| [:payout].include?(k)} end end end
Version data entries
15 entries across 15 versions & 1 rubygems