Skip to content

Commit b61b2cb

Browse files
authored
feat(deps): bump all to latest (#25)
1 parent 18c8a35 commit b61b2cb

File tree

15 files changed

+201
-213
lines changed

15 files changed

+201
-213
lines changed

go.mod

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,32 @@ module github.com/sumup/sumup-cli
33
go 1.25.5
44

55
require (
6-
github.com/charmbracelet/bubbles v0.21.0
7-
github.com/charmbracelet/bubbletea v1.3.10
8-
github.com/charmbracelet/lipgloss v1.1.0
6+
charm.land/bubbles/v2 v2.0.0
7+
charm.land/bubbletea/v2 v2.0.0
8+
charm.land/lipgloss/v2 v2.0.0
99
github.com/mergestat/timediff v0.0.4
1010
github.com/shopspring/decimal v1.4.0
11-
github.com/sumup/sumup-go v0.13.0
11+
github.com/sumup/sumup-go v0.15.0
1212
github.com/urfave/cli/v3 v3.6.2
13-
golang.org/x/term v0.39.0
13+
golang.org/x/term v0.40.0
1414
)
1515

1616
require (
1717
github.com/atotto/clipboard v0.1.4 // indirect
18-
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
19-
github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect
20-
github.com/charmbracelet/x/ansi v0.10.1 // indirect
21-
github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd // indirect
22-
github.com/charmbracelet/x/term v0.2.1 // indirect
23-
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
24-
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
25-
github.com/mattn/go-isatty v0.0.20 // indirect
26-
github.com/mattn/go-localereader v0.0.1 // indirect
27-
github.com/mattn/go-runewidth v0.0.16 // indirect
28-
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
18+
github.com/charmbracelet/colorprofile v0.4.2 // indirect
19+
github.com/charmbracelet/ultraviolet v0.0.0-20260205113103-524a6607adb8 // indirect
20+
github.com/charmbracelet/x/ansi v0.11.6 // indirect
21+
github.com/charmbracelet/x/term v0.2.2 // indirect
22+
github.com/charmbracelet/x/termios v0.1.1 // indirect
23+
github.com/charmbracelet/x/windows v0.2.2 // indirect
24+
github.com/clipperhouse/displaywidth v0.11.0 // indirect
25+
github.com/clipperhouse/uax29/v2 v2.7.0 // indirect
26+
github.com/lucasb-eyer/go-colorful v1.3.0 // indirect
27+
github.com/mattn/go-runewidth v0.0.20 // indirect
2928
github.com/muesli/cancelreader v0.2.2 // indirect
30-
github.com/muesli/termenv v0.16.0 // indirect
3129
github.com/rivo/uniseg v0.4.7 // indirect
3230
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
33-
golang.org/x/oauth2 v0.34.0 // indirect
34-
golang.org/x/sys v0.40.0 // indirect
35-
golang.org/x/text v0.3.8 // indirect
31+
golang.org/x/oauth2 v0.35.0 // indirect
32+
golang.org/x/sync v0.19.0 // indirect
33+
golang.org/x/sys v0.41.0 // indirect
3634
)

go.sum

Lines changed: 42 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,64 @@
1+
charm.land/bubbles/v2 v2.0.0 h1:tE3eK/pHjmtrDiRdoC9uGNLgpopOd8fjhEe31B/ai5s=
2+
charm.land/bubbles/v2 v2.0.0/go.mod h1:rCHoleP2XhU8um45NTuOWBPNVHxnkXKTiZqcclL/qOI=
3+
charm.land/bubbletea/v2 v2.0.0 h1:p0d6CtWyJXJ9GfzMpUUqbP/XUUhhlk06+vCKWmox1wQ=
4+
charm.land/bubbletea/v2 v2.0.0/go.mod h1:3LRff2U4WIYXy7MTxfbAQ+AdfM3D8Xuvz2wbsOD9OHQ=
5+
charm.land/lipgloss/v2 v2.0.0 h1:sd8N/B3x892oiOjFfBQdXBQp3cAkvjGaU5TvVZC3ivo=
6+
charm.land/lipgloss/v2 v2.0.0/go.mod h1:w6SnmsBFBmEFBodiEDurGS/sdUY/u1+v72DqUzc6J14=
17
github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4=
28
github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI=
3-
github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k=
4-
github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8=
5-
github.com/aymanbagabas/go-udiff v0.2.0 h1:TK0fH4MteXUDspT88n8CKzvK0X9O2xu9yQjWpi6yML8=
6-
github.com/aymanbagabas/go-udiff v0.2.0/go.mod h1:RE4Ex0qsGkTAJoQdQQCA0uG+nAzJO/pI/QwceO5fgrA=
7-
github.com/charmbracelet/bubbles v0.21.0 h1:9TdC97SdRVg/1aaXNVWfFH3nnLAwOXr8Fn6u6mfQdFs=
8-
github.com/charmbracelet/bubbles v0.21.0/go.mod h1:HF+v6QUR4HkEpz62dx7ym2xc71/KBHg+zKwJtMw+qtg=
9-
github.com/charmbracelet/bubbletea v1.3.10 h1:otUDHWMMzQSB0Pkc87rm691KZ3SWa4KUlvF9nRvCICw=
10-
github.com/charmbracelet/bubbletea v1.3.10/go.mod h1:ORQfo0fk8U+po9VaNvnV95UPWA1BitP1E0N6xJPlHr4=
11-
github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc h1:4pZI35227imm7yK2bGPcfpFEmuY1gc2YSTShr4iJBfs=
12-
github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc/go.mod h1:X4/0JoqgTIPSFcRA/P6INZzIuyqdFY5rm8tb41s9okk=
13-
github.com/charmbracelet/lipgloss v1.1.0 h1:vYXsiLHVkK7fp74RkV7b2kq9+zDLoEU4MZoFqR/noCY=
14-
github.com/charmbracelet/lipgloss v1.1.0/go.mod h1:/6Q8FR2o+kj8rz4Dq0zQc3vYf7X+B0binUUBwA0aL30=
15-
github.com/charmbracelet/x/ansi v0.10.1 h1:rL3Koar5XvX0pHGfovN03f5cxLbCF2YvLeyz7D2jVDQ=
16-
github.com/charmbracelet/x/ansi v0.10.1/go.mod h1:3RQDQ6lDnROptfpWuUVIUG64bD2g2BgntdxH0Ya5TeE=
17-
github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd h1:vy0GVL4jeHEwG5YOXDmi86oYw2yuYUGqz6a8sLwg0X8=
18-
github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd/go.mod h1:xe0nKWGd3eJgtqZRaN9RjMtK7xUYchjzPr7q6kcvCCs=
19-
github.com/charmbracelet/x/exp/golden v0.0.0-20241011142426-46044092ad91 h1:payRxjMjKgx2PaCWLZ4p3ro9y97+TVLZNaRZgJwSVDQ=
20-
github.com/charmbracelet/x/exp/golden v0.0.0-20241011142426-46044092ad91/go.mod h1:wDlXFlCrmJ8J+swcL/MnGUuYnqgQdW9rhSD61oNMb6U=
21-
github.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQaGIAQ=
22-
github.com/charmbracelet/x/term v0.2.1/go.mod h1:oQ4enTYFV7QN4m0i9mzHrViD7TQKvNEEkHUMCmsxdUg=
9+
github.com/aymanbagabas/go-udiff v0.4.0 h1:TKnLPh7IbnizJIBKFWa9mKayRUBQ9Kh1BPCk6w2PnYM=
10+
github.com/aymanbagabas/go-udiff v0.4.0/go.mod h1:0L9PGwj20lrtmEMeyw4WKJ/TMyDtvAoK9bf2u/mNo3w=
11+
github.com/charmbracelet/colorprofile v0.4.2 h1:BdSNuMjRbotnxHSfxy+PCSa4xAmz7szw70ktAtWRYrY=
12+
github.com/charmbracelet/colorprofile v0.4.2/go.mod h1:0rTi81QpwDElInthtrQ6Ni7cG0sDtwAd4C4le060fT8=
13+
github.com/charmbracelet/ultraviolet v0.0.0-20260205113103-524a6607adb8 h1:eyFRbAmexyt43hVfeyBofiGSEmJ7krjLOYt/9CF5NKA=
14+
github.com/charmbracelet/ultraviolet v0.0.0-20260205113103-524a6607adb8/go.mod h1:SQpCTRNBtzJkwku5ye4S3HEuthAlGy2n9VXZnWkEW98=
15+
github.com/charmbracelet/x/ansi v0.11.6 h1:GhV21SiDz/45W9AnV2R61xZMRri5NlLnl6CVF7ihZW8=
16+
github.com/charmbracelet/x/ansi v0.11.6/go.mod h1:2JNYLgQUsyqaiLovhU2Rv/pb8r6ydXKS3NIttu3VGZQ=
17+
github.com/charmbracelet/x/exp/golden v0.0.0-20250806222409-83e3a29d542f h1:pk6gmGpCE7F3FcjaOEKYriCvpmIN4+6OS/RD0vm4uIA=
18+
github.com/charmbracelet/x/exp/golden v0.0.0-20250806222409-83e3a29d542f/go.mod h1:IfZAMTHB6XkZSeXUqriemErjAWCCzT0LwjKFYCZyw0I=
19+
github.com/charmbracelet/x/term v0.2.2 h1:xVRT/S2ZcKdhhOuSP4t5cLi5o+JxklsoEObBSgfgZRk=
20+
github.com/charmbracelet/x/term v0.2.2/go.mod h1:kF8CY5RddLWrsgVwpw4kAa6TESp6EB5y3uxGLeCqzAI=
21+
github.com/charmbracelet/x/termios v0.1.1 h1:o3Q2bT8eqzGnGPOYheoYS8eEleT5ZVNYNy8JawjaNZY=
22+
github.com/charmbracelet/x/termios v0.1.1/go.mod h1:rB7fnv1TgOPOyyKRJ9o+AsTU/vK5WHJ2ivHeut/Pcwo=
23+
github.com/charmbracelet/x/windows v0.2.2 h1:IofanmuvaxnKHuV04sC0eBy/smG6kIKrWG2/jYn2GuM=
24+
github.com/charmbracelet/x/windows v0.2.2/go.mod h1:/8XtdKZzedat74NQFn0NGlGL4soHB0YQZrETF96h75k=
25+
github.com/clipperhouse/displaywidth v0.11.0 h1:lBc6kY44VFw+TDx4I8opi/EtL9m20WSEFgwIwO+UVM8=
26+
github.com/clipperhouse/displaywidth v0.11.0/go.mod h1:bkrFNkf81G8HyVqmKGxsPufD3JhNl3dSqnGhOoSD/o0=
27+
github.com/clipperhouse/uax29/v2 v2.7.0 h1:+gs4oBZ2gPfVrKPthwbMzWZDaAFPGYK72F0NJv2v7Vk=
28+
github.com/clipperhouse/uax29/v2 v2.7.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM=
2329
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
2430
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
25-
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4=
26-
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM=
27-
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
28-
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
29-
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
30-
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
31-
github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4=
32-
github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88=
33-
github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
34-
github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
31+
github.com/lucasb-eyer/go-colorful v1.3.0 h1:2/yBRLdWBZKrf7gB40FoiKfAWYQ0lqNcbuQwVHXptag=
32+
github.com/lucasb-eyer/go-colorful v1.3.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
33+
github.com/mattn/go-runewidth v0.0.20 h1:WcT52H91ZUAwy8+HUkdM3THM6gXqXuLJi9O3rjcQQaQ=
34+
github.com/mattn/go-runewidth v0.0.20/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs=
3535
github.com/mergestat/timediff v0.0.4 h1:NZ3sqG/6K9flhTubdltmRx3RBfIiYv6LsGP+4FlXMM8=
3636
github.com/mergestat/timediff v0.0.4/go.mod h1:yvMUaRu2oetc+9IbPLYBJviz6sA7xz8OXMDfhBl7YSI=
37-
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI=
38-
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod h1:CJlz5H+gyd6CUWT45Oy4q24RdLyn7Md9Vj2/ldJBSIo=
3937
github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA=
4038
github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo=
41-
github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc=
42-
github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk=
4339
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
4440
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
45-
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
4641
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
4742
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
4843
github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k=
4944
github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME=
5045
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
5146
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
52-
github.com/sumup/sumup-go v0.13.0 h1:35Xpv8cNLS5O02voKgwgks8Gz2QU53Ek8emlOyVuvkU=
53-
github.com/sumup/sumup-go v0.13.0/go.mod h1:UgT9aaxvUBrAiRpunqyb1zi5v/+1z+6Lr6p6bgL8EYI=
47+
github.com/sumup/sumup-go v0.15.0 h1:JnzBKahXjdNbY4st/pB0jWl/AJRl86fO9cKkE0k8rEw=
48+
github.com/sumup/sumup-go v0.15.0/go.mod h1:D++G2u9zvobimuUrgvSbah/tS3ON2Dmi6yb6ScA2Jpg=
5449
github.com/urfave/cli/v3 v3.6.2 h1:lQuqiPrZ1cIz8hz+HcrG0TNZFxU70dPZ3Yl+pSrH9A8=
5550
github.com/urfave/cli/v3 v3.6.2/go.mod h1:ysVLtOEmg2tOy6PknnYVhDoouyC/6N42TMeoMzskhso=
5651
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no=
5752
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM=
58-
golang.org/x/exp v0.0.0-20220909182711-5c715a9e8561 h1:MDc5xs78ZrZr3HMQugiXOAkSZtfTpbJLDr/lwfgO53E=
59-
golang.org/x/exp v0.0.0-20220909182711-5c715a9e8561/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE=
60-
golang.org/x/oauth2 v0.34.0 h1:hqK/t4AKgbqWkdkcAeI8XLmbK+4m4G5YeQRrmiotGlw=
61-
golang.org/x/oauth2 v0.34.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA=
62-
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
63-
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
64-
golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ=
65-
golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
66-
golang.org/x/term v0.39.0 h1:RclSuaJf32jOqZz74CkPA9qFuVTX7vhLlpfj/IGWlqY=
67-
golang.org/x/term v0.39.0/go.mod h1:yxzUCTP/U+FzoxfdKmLaA0RV1WgE0VY7hXBwKtY/4ww=
68-
golang.org/x/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY=
69-
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
53+
golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI=
54+
golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo=
55+
golang.org/x/oauth2 v0.35.0 h1:Mv2mzuHuZuY2+bkyWXIHMfhNdJAdwW3FuWeCPYN5GVQ=
56+
golang.org/x/oauth2 v0.35.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA=
57+
golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4=
58+
golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
59+
golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k=
60+
golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
61+
golang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg=
62+
golang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM=
7063
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
7164
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

internal/commands/checkouts/checkouts.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
"github.com/urfave/cli/v3"
1010

11-
"github.com/sumup/sumup-go/checkouts"
11+
sumup "github.com/sumup/sumup-go"
1212

1313
"github.com/sumup/sumup-cli/internal/app"
1414
"github.com/sumup/sumup-cli/internal/commands/util"
@@ -21,7 +21,7 @@ import (
2121
func NewCommand() *cli.Command {
2222
return &cli.Command{
2323
Name: "checkouts",
24-
Usage: "Commands related to hosted checkouts.",
24+
Usage: "Commands related to hosted sumup.",
2525
Commands: []*cli.Command{
2626
{
2727
Name: "list",
@@ -99,7 +99,7 @@ func listCheckouts(ctx context.Context, cmd *cli.Command) error {
9999
if err != nil {
100100
return err
101101
}
102-
params := checkouts.ListParams{}
102+
params := sumup.CheckoutsListParams{}
103103
if ref := cmd.String("checkout-reference"); ref != "" {
104104
params.CheckoutReference = &ref
105105
}
@@ -153,7 +153,7 @@ func createCheckout(ctx context.Context, cmd *cli.Command) error {
153153
return err
154154
}
155155

156-
body := checkouts.Create{
156+
body := sumup.CheckoutsCreateParams{
157157
CheckoutReference: cmd.String("reference"),
158158
Amount: float32(cmd.Float64("amount")),
159159
Currency: parsedCurrency,
@@ -173,7 +173,7 @@ func createCheckout(ctx context.Context, cmd *cli.Command) error {
173173
body.CustomerID = &value
174174
}
175175
if value := cmd.String("purpose"); value != "" {
176-
purpose := checkouts.CreatePurpose(value)
176+
purpose := sumup.CheckoutCreateRequestPurpose(value)
177177
body.Purpose = &purpose
178178
}
179179

@@ -231,7 +231,9 @@ func deactivateCheckout(ctx context.Context, cmd *cli.Command) error {
231231
details = append(details, attribute.Attribute("Status", attribute.Styled(string(*checkout.Status))))
232232
}
233233
if checkout.ValidUntil != nil {
234-
details = append(details, attribute.Attribute("Valid Until", attribute.Styled(checkout.ValidUntil.UTC().Format(time.RFC3339))))
234+
if validUntil := checkout.ValidUntil.Value(); validUntil != nil {
235+
details = append(details, attribute.Attribute("Valid Until", attribute.Styled(validUntil.UTC().Format(time.RFC3339))))
236+
}
235237
}
236238
display.DataList(details)
237239
return nil

internal/commands/context/context.go

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@ import (
66
"strings"
77
"time"
88

9-
"github.com/charmbracelet/bubbles/textinput"
10-
tea "github.com/charmbracelet/bubbletea"
11-
"github.com/charmbracelet/lipgloss"
9+
"charm.land/bubbles/v2/textinput"
10+
tea "charm.land/bubbletea/v2"
11+
"charm.land/lipgloss/v2"
1212
"github.com/urfave/cli/v3"
1313

14-
"github.com/sumup/sumup-go"
15-
"github.com/sumup/sumup-go/memberships"
16-
"github.com/sumup/sumup-go/shared"
14+
sumup "github.com/sumup/sumup-go"
1715

1816
"github.com/sumup/sumup-cli/internal/app"
1917
"github.com/sumup/sumup-cli/internal/config"
@@ -49,17 +47,17 @@ func NewCommand() *cli.Command {
4947
}
5048

5149
type searchResultMsg struct {
52-
memberships []memberships.Membership
50+
memberships []sumup.Membership
5351
err error
5452
}
5553

5654
// searchDebounceMsg is sent after the debounce delay to trigger the actual search
5755
type searchDebounceMsg struct{}
5856

5957
type navigationLevel struct {
60-
memberships []memberships.Membership
58+
memberships []sumup.Membership
6159
parentID string
62-
parentType memberships.ResourceType
60+
parentType sumup.ResourceType
6361
parentName string
6462
}
6563

@@ -73,15 +71,15 @@ type model struct {
7371
// Current level being displayed
7472
currentLevel navigationLevel
7573
// Currently displayed items (filtered or all)
76-
displayed []memberships.Membership
74+
displayed []sumup.Membership
7775
// Current cursor position in the list
7876
cursor int
7977
// Search input field
8078
searchInput textinput.Model
8179
// Whether search mode is active
8280
searching bool
8381
// Selected membership (if any)
84-
selected *memberships.Membership
82+
selected *sumup.Membership
8583
// Whether a search is in progress
8684
loading bool
8785
// Last executed search query to avoid duplicate requests
@@ -125,9 +123,9 @@ func (m *model) popLevel() {
125123

126124
// drillDownIntoOrg navigates into an organization to view its child merchants
127125
func (m *model) drillDownIntoOrg(orgID, orgName string) tea.Cmd {
128-
parentType := memberships.ResourceType("organization")
126+
parentType := sumup.ResourceType("organization")
129127
newLevel := navigationLevel{
130-
memberships: []memberships.Membership{},
128+
memberships: []sumup.Membership{},
131129
parentID: orgID,
132130
parentType: parentType,
133131
parentName: orgName,
@@ -145,10 +143,10 @@ func debounce() tea.Cmd {
145143
}
146144

147145
// searchMemberships performs an API call to search for memberships by name
148-
func (m model) searchMemberships(query string, parentID string, parentType memberships.ResourceType) tea.Cmd {
146+
func (m model) searchMemberships(query string, parentID string, parentType sumup.ResourceType) tea.Cmd {
149147
return func() tea.Msg {
150-
status := shared.MembershipStatusAccepted
151-
params := memberships.ListParams{
148+
status := sumup.MembershipStatusAccepted
149+
params := sumup.MembershipsListParams{
152150
Status: &status,
153151
}
154152

@@ -203,7 +201,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
203201
m.loading = true
204202
return m, m.searchMemberships(query, m.currentLevel.parentID, m.currentLevel.parentType)
205203

206-
case tea.KeyMsg:
204+
case tea.KeyPressMsg:
207205
switch msg.String() {
208206
case "ctrl+c", "q":
209207
return m, tea.Quit
@@ -266,9 +264,9 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
266264
return m, nil
267265
}
268266

269-
func (m model) View() string {
267+
func (m model) View() tea.View {
270268
if m.err != nil {
271-
return fmt.Sprintf("Error: %v\n", m.err)
269+
return tea.NewView(fmt.Sprintf("Error: %v\n", m.err))
272270
}
273271

274272
var s strings.Builder
@@ -366,7 +364,7 @@ func (m model) View() string {
366364
s.WriteString(helpStyle.Render(help))
367365
}
368366

369-
return s.String()
367+
return tea.NewView(s.String())
370368
}
371369

372370
func setContext(ctx context.Context, cmd *cli.Command) error {
@@ -375,10 +373,10 @@ func setContext(ctx context.Context, cmd *cli.Command) error {
375373
return err
376374
}
377375

378-
message.Notify("Fetching your memberships...")
376+
message.Notify("Fetching your sumup...")
379377

380-
status := shared.MembershipStatusAccepted
381-
params := memberships.ListParams{
378+
status := sumup.MembershipStatusAccepted
379+
params := sumup.MembershipsListParams{
382380
Status: &status,
383381
}
384382

internal/commands/customers/customers.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
"github.com/urfave/cli/v3"
88

9-
"github.com/sumup/sumup-go/customers"
9+
sumup "github.com/sumup/sumup-go"
1010

1111
"github.com/sumup/sumup-cli/internal/app"
1212
"github.com/sumup/sumup-cli/internal/commands/util"
@@ -17,7 +17,7 @@ import (
1717
func NewCommand() *cli.Command {
1818
return &cli.Command{
1919
Name: "customers",
20-
Usage: "Commands for managing customers.",
20+
Usage: "Commands for managing sumup.",
2121
Commands: []*cli.Command{
2222
{
2323
Name: "list",
@@ -66,7 +66,7 @@ func listPaymentInstruments(ctx context.Context, cmd *cli.Command) error {
6666
return nil
6767
}
6868

69-
func paymentInstrumentType(instrument *customers.PaymentInstrumentResponse) string {
69+
func paymentInstrumentType(instrument *sumup.PaymentInstrumentResponse) string {
7070
if instrument.Type != nil {
7171
value := string(*instrument.Type)
7272
if value != "" {
@@ -82,7 +82,7 @@ func paymentInstrumentType(instrument *customers.PaymentInstrumentResponse) stri
8282
return "-"
8383
}
8484

85-
func lastFour(instrument *customers.PaymentInstrumentResponse) string {
85+
func lastFour(instrument *sumup.PaymentInstrumentResponse) string {
8686
if instrument.Card != nil && instrument.Card.Last4Digits != nil && *instrument.Card.Last4Digits != "" {
8787
return *instrument.Card.Last4Digits
8888
}

0 commit comments

Comments
 (0)