Class: Tripletexer::Endpoints::Ledger::CloseGroup

Inherits:
AbstractEndpoint show all
Defined in:
lib/tripletexer/endpoints/ledger/close_group.rb

Instance Method Summary collapse

Methods inherited from AbstractEndpoint

#initialize

Constructor Details

This class inherits a constructor from Tripletexer::Endpoints::AbstractEndpoint

Instance Method Details

#find(id, params = {}) ⇒ Object



15
16
17
# File 'lib/tripletexer/endpoints/ledger/close_group.rb', line 15

def find(id, params = {})
  find_entity("/v2/ledger/closeGroup/#{id}", params)
end

#search(date_from, date_to, params = {}) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/tripletexer/endpoints/ledger/close_group.rb', line 6

def search(date_from, date_to, params = {})
  final_params = params.merge(
    'dateFrom' => ::Tripletexer::FormatHelpers.format_date(date_from),
    'dateTo' => ::Tripletexer::FormatHelpers.format_date(date_to)
  )
  find_entities('/v2/ledger/closeGroup', final_params)
end