Skip to content

Commit f7697b8

Browse files
Declared the InvoiceItemValueCalculated event
It will eventually replace the class.
1 parent fd59e68 commit f7697b8

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

rails_application/app/processes/processes/invoice_generation.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,18 @@ class InvoiceGeneration
1010
Pricing::PercentageDiscountRemoved
1111
)
1212

13+
def act
14+
end
1315

1416
private
1517

1618
def fetch_id(event)
1719
event.data.fetch(:order_id)
1820
end
1921

22+
def apply(event)
23+
end
24+
2025
end
2126

2227
Invoice = Data.define do
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module Processes
2+
class InvoiceItemValueCalculated < Infra::Event
3+
attribute :order_id, Infra::Types::UUID
4+
attribute :product_id, Infra::Types::UUID
5+
attribute :quantity, Infra::Types::Quantity
6+
attribute :discounted_amount, Infra::Types::Value
7+
attribute :amount, Infra::Types::Value
8+
end
9+
end

0 commit comments

Comments
 (0)