From 927e39e66257f9d65348ae3c041f78260824bb99 Mon Sep 17 00:00:00 2001 From: akadusei Date: Sat, 27 Jul 2024 23:29:31 +0000 Subject: [PATCH] Add `Bill::User#billing_details` abstract method --- CHANGELOG.md | 3 +++ spec/support/app/src/models/user.cr | 2 +- src/bill/models/user.cr | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0033e57..ad86f59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] - +### Added +- Add `Bill::User#billing_details` abstract method + ### Changed - Upgrade GitHub actions - Limit description lengths to mitigate potential DoS diff --git a/spec/support/app/src/models/user.cr b/spec/support/app/src/models/user.cr index 2785f13..ad15626 100644 --- a/spec/support/app/src/models/user.cr +++ b/spec/support/app/src/models/user.cr @@ -19,7 +19,7 @@ class User < BaseModel "User ##{id}" end - def billing_details + def billing_details : String <<-TEXT #{full_name} <#{email}> diff --git a/src/bill/models/user.cr b/src/bill/models/user.cr index 3159bcd..828cc1d 100644 --- a/src/bill/models/user.cr +++ b/src/bill/models/user.cr @@ -1,4 +1,6 @@ module Bill::User + abstract def billing_details : String + macro included end end