Class: Braintree::SettlementBatchSummary

Inherits:
Object
  • Object
show all
Includes:
BaseModule
Defined in:
lib/braintree/settlement_batch_summary.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from BaseModule

included

Methods included from BaseModule::Methods

#copy_instance_variables_from_object, #return_object_or_raise, #set_instance_variables_from_hash, #singleton_class

Constructor Details

#initialize(gateway, attributes) ⇒ SettlementBatchSummary

Returns a new instance of SettlementBatchSummary.


13
14
15
16
# File 'lib/braintree/settlement_batch_summary.rb', line 13

def initialize(gateway, attributes)
  @gateway = gateway
  set_instance_variables_from_hash(attributes)
end

Instance Attribute Details

#recordsObject (readonly)

Returns the value of attribute records.


5
6
7
# File 'lib/braintree/settlement_batch_summary.rb', line 5

def records
  @records
end

Class Method Details

._new(*args) ⇒ Object


20
21
22
# File 'lib/braintree/settlement_batch_summary.rb', line 20

def _new(*args)
  self.new(*args)
end

.generate(settlement_date, group_by_custom_field = nil) ⇒ Object


7
8
9
10
11
# File 'lib/braintree/settlement_batch_summary.rb', line 7

def self.generate(settlement_date, group_by_custom_field = nil)
  criteria = {:settlement_date => settlement_date}
  criteria.merge!({:group_by_custom_field => group_by_custom_field}) if group_by_custom_field
  Configuration.gateway.settlement_batch_summary.generate(criteria)
end