Does anybody know what might be causing this problem? I’m trying to save a Fulfillment and getting this error NoMethodError (undefined method `each’ for nil:NilClass)
Code is this
fulfillment = ShopifyAPI::Fulfillment.new
fulfillment.message = "The package will ship within 1 business day."
fulfillment.notify_customer = true
fulfillment.tracking_info = {
"number" => tn,
"company" => tc
}
fulfillment.line_items_by_fulfillment_order = [
{
"fulfillment_order_id" => fulfillment_order.id
}
]
fulfillment.save!
Figured it out. The issue was that the FulfillmentOrder was not accepted yet. Once I accepted it, the error went away and the Fulfillment was able to save.