-
-
Save cored/6c852fe3253157f0bb58d6565a488067 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
{:purchase_orders=>[{:retail_fulfillment_order_id=>"Some FLEXE internal id", :bill_of_lading_number=>"Some BOL number", :purchase_order_uuid=>"The UUID of the fulfillment purchase order", :tags=>["consolidator_bound"]}], | |
:master_bill_of_lading_number=>"Some master BOL number", | |
:scac=>"Some code", | |
:pro_number=>"Some number", | |
:lading_quantity=>{:num_pallets=>2}} | |
Dry::Struct::Error: [Flexe::NotificationHandler::BulkShipments::RetailFulfilmentOrderInfo::PurchaseOrder.new] :retail_fulfilment_order_id is missing in Hash input | |
class RetailFulfilmentOrderInfo < Dry::Struct¬ | |
class PurchaseOrder < Dry::Struct¬ | |
attribute :purchase_order_uuid, Dry::Types["string"]¬ | |
attribute :bill_of_lading_number, Dry::Types["string"]¬ | |
attribute :retail_fulfilment_order_id, Dry::Types["string"]¬ | |
attribute :tags, Dry::Types["array"].member(Dry::Types["coercible.string"])¬ | |
end¬ | |
¬ | |
PurchaseOrders = Dry::Types["array"].member(PurchaseOrder).default([])¬ | |
attribute :purchase_orders, PurchaseOrders¬ | |
attribute :master_bill_of_lading_number, Dry::Types["string"].default("")¬ | |
+ 1 def purchase_order_uuids¬ | |
purchase_orders.map(&:purchase_order_uuids)¬ | |
end¬ | |
end¬ | |
end¬ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment