Class: Octobat::BalanceTransaction
- Inherits:
-
APIResource
- Object
- OctobatObject
- APIResource
- Octobat::BalanceTransaction
- Extended by:
- APIOperations::List
- Defined in:
- lib/octobat/balance_transaction.rb
Instance Attribute Summary
Attributes inherited from OctobatObject
Class Method Summary collapse
Instance Method Summary collapse
Methods included from APIOperations::List
Methods inherited from APIResource
class_name, #refresh, retrieve
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
.set_parent_resource(filters) ⇒ Object
23 24 25 |
# File 'lib/octobat/balance_transaction.rb', line 23 def self.set_parent_resource(filters) @parent_resource = filters.select{|k, v| [:payout].include?(k)} end |
Instance Method Details
#parentize_url ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/octobat/balance_transaction.rb', line 9 def parentize_url if parent_obj.include?(:payout) "#{Payout.url}/#{CGI.escape(parent_obj[:payout])}/balance_transactions/#{CGI.escape(id)}" else url end end |
#url ⇒ Object
5 6 7 |
# File 'lib/octobat/balance_transaction.rb', line 5 def url !parent_obj.nil? ? parentize_url : super end |