-
-
Save cored/3ca30c869c152fa1c10eba6e860b8809 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Back2bed | |
module Messages | |
module Types | |
include Dry::Types.module | |
end | |
class Payload < Dry::Struct | |
constructor_type :schema | |
LineItems = Types::Array.member(LineItem).default([]) | |
attribute :unique_order_number, Types::String | |
attribute :purchase_order_number, Types::Coercible::Int | |
attribute :line_items, LineItems | |
class LineItem < Dry::Struct | |
attribute :variation_sku, Types::String | |
attribute :quantity, Types::Coercible::Int | |
attribute :purchase_price_per_each, Types::Coercible::Float | |
attribute :product_description, Types::String | |
attribute :upc, Types::String | |
attribute :department_class_code, Types::String | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment