Skip to content

Commit d4d68bf

Browse files
committed
restructure directory
1 parent 8dd6ad7 commit d4d68bf

31 files changed

+1501
-1145
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# frozen_string_literal: true
2+
3+
require_relative "../../../test_helper"
4+
5+
describe Square::CashDrawers::Shifts::Client do
6+
describe "#list" do
7+
it "list cash drawer shifts" do
8+
start_time = Time.now - 3600 # 1 hour ago
9+
end_time = Time.now
10+
11+
_request = {
12+
location_id: client.locations.list.locations.first.id,
13+
begin_time: start_time.iso8601,
14+
end_time: end_time.iso8601
15+
}
16+
17+
puts "request #{_request}" if verbose?
18+
19+
response = client.cash_drawers.shifts.list(
20+
location_id: _request[:location_id],
21+
begin_time: _request[:begin_time],
22+
end_time: _request[:end_time]
23+
)
24+
refute_nil response
25+
26+
puts "response #{response.to_h}" if verbose?
27+
end
28+
end
29+
end

0 commit comments

Comments
 (0)