SettlementBatchSummary.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. namespace Braintree;
  3. class SettlementBatchSummary extends Base
  4. {
  5. /**
  6. *
  7. * @param array $attributes
  8. * @return SettlementBatchSummary
  9. */
  10. public static function factory($attributes)
  11. {
  12. $instance = new self();
  13. $instance->_initialize($attributes);
  14. return $instance;
  15. }
  16. /**
  17. * @ignore
  18. * @param array $attributes
  19. */
  20. protected function _initialize($attributes)
  21. {
  22. $this->_attributes = $attributes;
  23. }
  24. public function records()
  25. {
  26. return $this->_attributes['records'];
  27. }
  28. /**
  29. * static method redirecting to gateway
  30. *
  31. * @param string $settlement_date Date YYYY-MM-DD
  32. * @param string $groupByCustomField
  33. * @return Result\Successful|Result\Error
  34. */
  35. public static function generate($settlement_date, $groupByCustomField = NULL)
  36. {
  37. return Configuration::gateway()->settlementBatchSummary()->generate($settlement_date, $groupByCustomField);
  38. }
  39. }
  40. class_alias('Braintree\SettlementBatchSummary', 'Braintree_SettlementBatchSummary');