lib/housecanary/api/sales_history.rb in housecanary-ruby-0.2.1 vs lib/housecanary/api/sales_history.rb in housecanary-ruby-0.2.2
- old
+ new
@@ -9,9 +9,9 @@
module API
class SalesHistory
extend Dry::Initializer
option :api_code_description, optional: true
option :api_code, optional: true
- option :result, type: Dry::Types['coercible.array'].of(Dry.Types.Constructor(Sale))
+ option :result, type: Dry::Types['coercible.array'].of(Dry.Types.Constructor(Sale) { |args| Sale.new(**args) })
end
end
end