orderId === null) { return false; } DB::table('order_items')->updateOrInsert( ['legacy_id' => $data->legacyId], [ 'order_id' => $data->orderId, 'product_id' => $data->productId, 'product_pricing_id' => $data->productPricingId, 'server_name' => $data->serverName, 'domain_name' => $data->domainName, 'billing_cycle' => $data->billingCycle, 'months' => $data->months, 'quantity' => $data->quantity, 'price' => $data->price, 'created_at' => $data->createdAt, 'updated_at' => $data->updatedAt, ] ); return true; } }